Opsgenie

Pulumi Official
Package maintained by Pulumi
v1.1.5 published on Friday, Feb 18, 2022 by Pulumi

User

Manages a User within Opsgenie.

Example Usage

using Pulumi;
using Opsgenie = Pulumi.Opsgenie;

class MyStack : Stack
{
    public MyStack()
    {
        var test = new Opsgenie.User("test", new Opsgenie.UserArgs
        {
            FullName = "Test User",
            Locale = "en_US",
            Role = "User",
            SkypeUsername = "skypename",
            Tags = 
            {
                "sre",
                "opsgenie",
            },
            Timezone = "America/New_York",
            UserAddresses = 
            {
                new Opsgenie.Inputs.UserUserAddressArgs
                {
                    City = "City",
                    Country = "Country",
                    Line = "Line",
                    State = "State",
                    Zipcode = "998877",
                },
            },
            UserDetails = 
            {
                { "key1", "val1,val2" },
                { "key2", "val3,val4" },
            },
            Username = "user@domain.com",
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-opsgenie/sdk/go/opsgenie"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := opsgenie.NewUser(ctx, "test", &opsgenie.UserArgs{
			FullName:      pulumi.String("Test User"),
			Locale:        pulumi.String("en_US"),
			Role:          pulumi.String("User"),
			SkypeUsername: pulumi.String("skypename"),
			Tags: pulumi.StringArray{
				pulumi.String("sre"),
				pulumi.String("opsgenie"),
			},
			Timezone: pulumi.String("America/New_York"),
			UserAddresses: UserUserAddressArray{
				&UserUserAddressArgs{
					City:    pulumi.String("City"),
					Country: pulumi.String("Country"),
					Line:    pulumi.String("Line"),
					State:   pulumi.String("State"),
					Zipcode: pulumi.String("998877"),
				},
			},
			UserDetails: pulumi.StringMap{
				"key1": pulumi.String("val1,val2"),
				"key2": pulumi.String("val3,val4"),
			},
			Username: pulumi.String("user@domain.com"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_opsgenie as opsgenie

test = opsgenie.User("test",
    full_name="Test User",
    locale="en_US",
    role="User",
    skype_username="skypename",
    tags=[
        "sre",
        "opsgenie",
    ],
    timezone="America/New_York",
    user_addresses=[opsgenie.UserUserAddressArgs(
        city="City",
        country="Country",
        line="Line",
        state="State",
        zipcode="998877",
    )],
    user_details={
        "key1": "val1,val2",
        "key2": "val3,val4",
    },
    username="user@domain.com")
import * as pulumi from "@pulumi/pulumi";
import * as opsgenie from "@pulumi/opsgenie";

const test = new opsgenie.User("test", {
    fullName: "Test User",
    locale: "en_US",
    role: "User",
    skypeUsername: "skypename",
    tags: [
        "sre",
        "opsgenie",
    ],
    timezone: "America/New_York",
    userAddresses: [{
        city: "City",
        country: "Country",
        line: "Line",
        state: "State",
        zipcode: "998877",
    }],
    userDetails: {
        key1: "val1,val2",
        key2: "val3,val4",
    },
    username: "user@domain.com",
});

Coming soon!

Create a User Resource

new User(name: string, args: UserArgs, opts?: CustomResourceOptions);
@overload
def User(resource_name: str,
         opts: Optional[ResourceOptions] = None,
         full_name: Optional[str] = None,
         locale: Optional[str] = None,
         role: Optional[str] = None,
         skype_username: Optional[str] = None,
         tags: Optional[Sequence[str]] = None,
         timezone: Optional[str] = None,
         user_addresses: Optional[Sequence[UserUserAddressArgs]] = None,
         user_details: Optional[Mapping[str, str]] = None,
         username: Optional[str] = None)
@overload
def User(resource_name: str,
         args: UserArgs,
         opts: Optional[ResourceOptions] = None)
func NewUser(ctx *Context, name string, args UserArgs, opts ...ResourceOption) (*User, error)
public User(string name, UserArgs args, CustomResourceOptions? opts = null)
public User(String name, UserArgs args)
public User(String name, UserArgs args, CustomResourceOptions options)
type: opsgenie:User
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args UserArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args UserArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args UserArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args UserArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args UserArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

User Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The User resource accepts the following input properties:

FullName string

The Full Name of the User.

Role string

The Role assigned to the User. Either a built-in such as 'Admin' or 'User' - or the name of a custom role.

Username string

The email address associated with this user. Opsgenie defines that this must not be longer than 100 characters and must contain lowercase characters only.

Locale string

Location information for the user. Please look at Supported Locale Ids for available locales.

SkypeUsername string

Skype username of the user.

Tags List<string>

A list of tags to be associated with the user.

Timezone string

Timezone information of the user. Please look at Supported Timezone Ids for available timezones.

UserAddresses List<UserUserAddressArgs>

Address of the user.

UserDetails Dictionary<string, string>

Details about the user in form of key and list. of values.

FullName string

The Full Name of the User.

Role string

The Role assigned to the User. Either a built-in such as 'Admin' or 'User' - or the name of a custom role.

Username string

The email address associated with this user. Opsgenie defines that this must not be longer than 100 characters and must contain lowercase characters only.

Locale string

Location information for the user. Please look at Supported Locale Ids for available locales.

SkypeUsername string

Skype username of the user.

Tags []string

A list of tags to be associated with the user.

Timezone string

Timezone information of the user. Please look at Supported Timezone Ids for available timezones.

UserAddresses []UserUserAddressArgs

Address of the user.

UserDetails map[string]string

Details about the user in form of key and list. of values.

fullName String

The Full Name of the User.

role String

The Role assigned to the User. Either a built-in such as 'Admin' or 'User' - or the name of a custom role.

username String

The email address associated with this user. Opsgenie defines that this must not be longer than 100 characters and must contain lowercase characters only.

locale String

Location information for the user. Please look at Supported Locale Ids for available locales.

skypeUsername String

Skype username of the user.

tags List

A list of tags to be associated with the user.

timezone String

Timezone information of the user. Please look at Supported Timezone Ids for available timezones.

userAddresses ListUserAddressArgs>

Address of the user.

userDetails Map

Details about the user in form of key and list. of values.

fullName string

The Full Name of the User.

role string

The Role assigned to the User. Either a built-in such as 'Admin' or 'User' - or the name of a custom role.

username string

The email address associated with this user. Opsgenie defines that this must not be longer than 100 characters and must contain lowercase characters only.

locale string

Location information for the user. Please look at Supported Locale Ids for available locales.

skypeUsername string

Skype username of the user.

tags string[]

A list of tags to be associated with the user.

timezone string

Timezone information of the user. Please look at Supported Timezone Ids for available timezones.

userAddresses UserUserAddressArgs[]

Address of the user.

userDetails {[key: string]: string}

Details about the user in form of key and list. of values.

full_name str

The Full Name of the User.

role str

The Role assigned to the User. Either a built-in such as 'Admin' or 'User' - or the name of a custom role.

username str

The email address associated with this user. Opsgenie defines that this must not be longer than 100 characters and must contain lowercase characters only.

locale str

Location information for the user. Please look at Supported Locale Ids for available locales.

skype_username str

Skype username of the user.

tags Sequence[str]

A list of tags to be associated with the user.

timezone str

Timezone information of the user. Please look at Supported Timezone Ids for available timezones.

user_addresses Sequence[UserUserAddressArgs]

Address of the user.

user_details Mapping[str, str]

Details about the user in form of key and list. of values.

fullName String

The Full Name of the User.

role String

The Role assigned to the User. Either a built-in such as 'Admin' or 'User' - or the name of a custom role.

username String

The email address associated with this user. Opsgenie defines that this must not be longer than 100 characters and must contain lowercase characters only.

locale String

Location information for the user. Please look at Supported Locale Ids for available locales.

skypeUsername String

Skype username of the user.

tags List

A list of tags to be associated with the user.

timezone String

Timezone information of the user. Please look at Supported Timezone Ids for available timezones.

userAddresses List

Address of the user.

userDetails Map

Details about the user in form of key and list. of values.

Outputs

All input properties are implicitly available as output properties. Additionally, the User resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up an Existing User Resource

Get an existing User resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: UserState, opts?: CustomResourceOptions): User
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        full_name: Optional[str] = None,
        locale: Optional[str] = None,
        role: Optional[str] = None,
        skype_username: Optional[str] = None,
        tags: Optional[Sequence[str]] = None,
        timezone: Optional[str] = None,
        user_addresses: Optional[Sequence[UserUserAddressArgs]] = None,
        user_details: Optional[Mapping[str, str]] = None,
        username: Optional[str] = None) -> User
func GetUser(ctx *Context, name string, id IDInput, state *UserState, opts ...ResourceOption) (*User, error)
public static User Get(string name, Input<string> id, UserState? state, CustomResourceOptions? opts = null)
public static User get(String name, Output<String> id, UserState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
FullName string

The Full Name of the User.

Locale string

Location information for the user. Please look at Supported Locale Ids for available locales.

Role string

The Role assigned to the User. Either a built-in such as 'Admin' or 'User' - or the name of a custom role.

SkypeUsername string

Skype username of the user.

Tags List<string>

A list of tags to be associated with the user.

Timezone string

Timezone information of the user. Please look at Supported Timezone Ids for available timezones.

UserAddresses List<UserUserAddressArgs>

Address of the user.

UserDetails Dictionary<string, string>

Details about the user in form of key and list. of values.

Username string

The email address associated with this user. Opsgenie defines that this must not be longer than 100 characters and must contain lowercase characters only.

FullName string

The Full Name of the User.

Locale string

Location information for the user. Please look at Supported Locale Ids for available locales.

Role string

The Role assigned to the User. Either a built-in such as 'Admin' or 'User' - or the name of a custom role.

SkypeUsername string

Skype username of the user.

Tags []string

A list of tags to be associated with the user.

Timezone string

Timezone information of the user. Please look at Supported Timezone Ids for available timezones.

UserAddresses []UserUserAddressArgs

Address of the user.

UserDetails map[string]string

Details about the user in form of key and list. of values.

Username string

The email address associated with this user. Opsgenie defines that this must not be longer than 100 characters and must contain lowercase characters only.

fullName String

The Full Name of the User.

locale String

Location information for the user. Please look at Supported Locale Ids for available locales.

role String

The Role assigned to the User. Either a built-in such as 'Admin' or 'User' - or the name of a custom role.

skypeUsername String

Skype username of the user.

tags List

A list of tags to be associated with the user.

timezone String

Timezone information of the user. Please look at Supported Timezone Ids for available timezones.

userAddresses ListUserAddressArgs>

Address of the user.

userDetails Map

Details about the user in form of key and list. of values.

username String

The email address associated with this user. Opsgenie defines that this must not be longer than 100 characters and must contain lowercase characters only.

fullName string

The Full Name of the User.

locale string

Location information for the user. Please look at Supported Locale Ids for available locales.

role string

The Role assigned to the User. Either a built-in such as 'Admin' or 'User' - or the name of a custom role.

skypeUsername string

Skype username of the user.

tags string[]

A list of tags to be associated with the user.

timezone string

Timezone information of the user. Please look at Supported Timezone Ids for available timezones.

userAddresses UserUserAddressArgs[]

Address of the user.

userDetails {[key: string]: string}

Details about the user in form of key and list. of values.

username string

The email address associated with this user. Opsgenie defines that this must not be longer than 100 characters and must contain lowercase characters only.

full_name str

The Full Name of the User.

locale str

Location information for the user. Please look at Supported Locale Ids for available locales.

role str

The Role assigned to the User. Either a built-in such as 'Admin' or 'User' - or the name of a custom role.

skype_username str

Skype username of the user.

tags Sequence[str]

A list of tags to be associated with the user.

timezone str

Timezone information of the user. Please look at Supported Timezone Ids for available timezones.

user_addresses Sequence[UserUserAddressArgs]

Address of the user.

user_details Mapping[str, str]

Details about the user in form of key and list. of values.

username str

The email address associated with this user. Opsgenie defines that this must not be longer than 100 characters and must contain lowercase characters only.

fullName String

The Full Name of the User.

locale String

Location information for the user. Please look at Supported Locale Ids for available locales.

role String

The Role assigned to the User. Either a built-in such as 'Admin' or 'User' - or the name of a custom role.

skypeUsername String

Skype username of the user.

tags List

A list of tags to be associated with the user.

timezone String

Timezone information of the user. Please look at Supported Timezone Ids for available timezones.

userAddresses List

Address of the user.

userDetails Map

Details about the user in form of key and list. of values.

username String

The email address associated with this user. Opsgenie defines that this must not be longer than 100 characters and must contain lowercase characters only.

Supporting Types

UserUserAddress

City string
Country string
Line string
State string
Zipcode string
City string
Country string
Line string
State string
Zipcode string
city String
country String
line String
state String
zipcode String
city string
country string
line string
state string
zipcode string
city str
country str
line str
state str
zipcode str
city String
country String
line String
state String
zipcode String

Import

Users can be imported using the user_id, e.g.

 $ pulumi import opsgenie:index/user:User user user_id`

Package Details

Repository
https://github.com/pulumi/pulumi-opsgenie
License
Apache-2.0
Notes

This Pulumi package is based on the opsgenie Terraform Provider.