opsgenie.User
Explore with Pulumi AI
Manages a User within Opsgenie.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opsgenie = Pulumi.Opsgenie;
return await Deployment.RunAsync(() =>
{
var test = new Opsgenie.User("test", new()
{
FullName = "Test User",
Locale = "en_US",
Role = "User",
SkypeUsername = "skypename",
Tags = new[]
{
"sre",
"opsgenie",
},
Timezone = "America/New_York",
UserAddresses = new[]
{
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: opsgenie.UserUserAddressArray{
&opsgenie.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
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opsgenie.User;
import com.pulumi.opsgenie.UserArgs;
import com.pulumi.opsgenie.inputs.UserUserAddressArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var test = new User("test", UserArgs.builder()
.fullName("Test User")
.locale("en_US")
.role("User")
.skypeUsername("skypename")
.tags(
"sre",
"opsgenie")
.timezone("America/New_York")
.userAddresses(UserUserAddressArgs.builder()
.city("City")
.country("Country")
.line("Line")
.state("State")
.zipcode("998877")
.build())
.userDetails(Map.ofEntries(
Map.entry("key1", "val1,val2"),
Map.entry("key2", "val3,val4")
))
.username("user@domain.com")
.build());
}
}
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",
});
resources:
test:
type: opsgenie:User
properties:
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
Create 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)
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:
- Full
Name 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.
- Skype
Username string Skype username of the user.
- 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.
- User
Addresses List<UserUser Address> Address of the user.
- User
Details Dictionary<string, string> Details about the user in form of key and list. of values.
- Full
Name 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.
- Skype
Username string Skype username of the user.
- []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.
- User
Addresses []UserUser Address Args Address of the user.
- User
Details map[string]string Details about the user in form of key and list. of values.
- full
Name 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.
- skype
Username String Skype username of the user.
- 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.
- user
Addresses List<UserUser Address> Address of the user.
- user
Details Map<String,String> Details about the user in form of key and list. of values.
- full
Name 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.
- skype
Username string Skype username of the user.
- 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.
- user
Addresses UserUser Address[] Address of the user.
- user
Details {[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.
- 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[UserUser Address Args] Address of the user.
- user_
details Mapping[str, str] Details about the user in form of key and list. of values.
- full
Name 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.
- skype
Username String Skype username of the user.
- 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.
- user
Addresses List<Property Map> Address of the user.
- user
Details Map<String> 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 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.
- Full
Name 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.
- Skype
Username string Skype username of the user.
- 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.
- User
Addresses List<UserUser Address> Address of the user.
- User
Details 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.
- Full
Name 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.
- Skype
Username string Skype username of the user.
- []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.
- User
Addresses []UserUser Address Args Address of the user.
- User
Details 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.
- full
Name 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.
- skype
Username String Skype username of the user.
- 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.
- user
Addresses List<UserUser Address> Address of the user.
- user
Details 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.
- full
Name 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.
- skype
Username string Skype username of the user.
- 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.
- user
Addresses UserUser Address[] Address of the user.
- user
Details {[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.
- 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[UserUser Address Args] 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.
- full
Name 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.
- skype
Username String Skype username of the user.
- 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.
- user
Addresses List<Property Map> Address of the user.
- user
Details Map<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.
Supporting Types
UserUserAddress, UserUserAddressArgs
Import
Users can be imported using the user_id
, e.g.
$ pulumi import opsgenie:index/user:User user user_id`
Package Details
- Repository
- Opsgenie pulumi/pulumi-opsgenie
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
opsgenie
Terraform Provider.