@pulumi/pagerduty
Version:
A Pulumi package for creating and managing pagerduty cloud resources.
213 lines (212 loc) • 10.4 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* A [user](https://developer.pagerduty.com/api-reference/b3A6Mjc0ODIzNA-create-a-user) is a member of a PagerDuty account that have the ability to interact with incidents and other data on the account.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pagerduty from "@pulumi/pagerduty";
*
* const example = new pagerduty.User("example", {
* name: "Earline Greenholt",
* email: "125.greenholt.earline@graham.name",
* });
* ```
*
* ## Import
*
* Users can be imported using the `id`, e.g.
*
* ```sh
* $ pulumi import pagerduty:index/user:User main PLBP09X
* ```
*/
export declare class User extends pulumi.CustomResource {
/**
* Get an existing User resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: UserState, opts?: pulumi.CustomResourceOptions): User;
/**
* Returns true if the given object is an instance of User. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is User;
/**
* The URL of the user's avatar.
*/
readonly avatarUrl: pulumi.Output<string>;
/**
* The schedule color for the user. Valid options are purple, red, green, blue, teal, orange, brown, turquoise, dark-slate-blue, cayenne, orange-red, dark-orchid, dark-slate-grey, lime, dark-magenta, lime-green, midnight-blue, deep-pink, dark-green, dark-orange, dark-cyan, darkolive-green, dark-slate-gray, grey20, firebrick, maroon, crimson, dark-red, dark-goldenrod, chocolate, medium-violet-red, sea-green, olivedrab, forest-green, dark-olive-green, blue-violet, royal-blue, indigo, slate-blue, saddle-brown, or steel-blue.
*/
readonly color: pulumi.Output<string>;
/**
* A human-friendly description of the user.
* If not set, a placeholder of "Managed by Pulumi" will be set.
*/
readonly description: pulumi.Output<string>;
/**
* The user's email address.
*/
readonly email: pulumi.Output<string>;
/**
* URL at which the entity is uniquely displayed in the Web app
*/
readonly htmlUrl: pulumi.Output<string>;
/**
* If true, the user has an outstanding invitation.
*/
readonly invitationSent: pulumi.Output<boolean>;
/**
* The user's title.
*/
readonly jobTitle: pulumi.Output<string | undefined>;
/**
* The license id assigned to the user. If provided the user's role must exist in the assigned license's `validRoles` list. To reference purchased licenses' ids see data source `pagerduty.getLicenses` [data source](https://developer.pagerduty.com/api-reference/b3A6Mjc0ODIzNA-create-a-user).
*/
readonly license: pulumi.Output<string>;
/**
* The name of the user.
*/
readonly name: pulumi.Output<string>;
/**
* The user role. Can be `admin`, `limitedUser`, `observer`, `owner`, `readOnlyUser`, `readOnlyLimitedUser`, `restrictedAccess`, or `user`.
* Notes:
* * Account must have the `readOnlyUsers` ability to set a user as a `readOnlyUser` or a `readOnlyLimitedUser`, and must have advanced permissions abilities to set a user as `observer` or `restrictedAccess`.
* * With advanced permissions, users can have both a user role (base role) and a team role. The team role can be configured in the `pagerduty.TeamMembership` resource.
* * Mapping of `role` values to Web UI user role names available in the [user roles support page](https://support.pagerduty.com/docs/advanced-permissions#roles-in-the-rest-api-and-saml).
*/
readonly role: pulumi.Output<string | undefined>;
/**
* A list of teams the user should belong to. Please use `pagerduty.TeamMembership` instead.
*
* @deprecated Use the 'pagerduty_team_membership' resource instead.
*/
readonly teams: pulumi.Output<string[]>;
/**
* The time zone of the user. Default is account default timezone.
*/
readonly timeZone: pulumi.Output<string>;
/**
* Create a User resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: UserArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering User resources.
*/
export interface UserState {
/**
* The URL of the user's avatar.
*/
avatarUrl?: pulumi.Input<string>;
/**
* The schedule color for the user. Valid options are purple, red, green, blue, teal, orange, brown, turquoise, dark-slate-blue, cayenne, orange-red, dark-orchid, dark-slate-grey, lime, dark-magenta, lime-green, midnight-blue, deep-pink, dark-green, dark-orange, dark-cyan, darkolive-green, dark-slate-gray, grey20, firebrick, maroon, crimson, dark-red, dark-goldenrod, chocolate, medium-violet-red, sea-green, olivedrab, forest-green, dark-olive-green, blue-violet, royal-blue, indigo, slate-blue, saddle-brown, or steel-blue.
*/
color?: pulumi.Input<string>;
/**
* A human-friendly description of the user.
* If not set, a placeholder of "Managed by Pulumi" will be set.
*/
description?: pulumi.Input<string>;
/**
* The user's email address.
*/
email?: pulumi.Input<string>;
/**
* URL at which the entity is uniquely displayed in the Web app
*/
htmlUrl?: pulumi.Input<string>;
/**
* If true, the user has an outstanding invitation.
*/
invitationSent?: pulumi.Input<boolean>;
/**
* The user's title.
*/
jobTitle?: pulumi.Input<string>;
/**
* The license id assigned to the user. If provided the user's role must exist in the assigned license's `validRoles` list. To reference purchased licenses' ids see data source `pagerduty.getLicenses` [data source](https://developer.pagerduty.com/api-reference/b3A6Mjc0ODIzNA-create-a-user).
*/
license?: pulumi.Input<string>;
/**
* The name of the user.
*/
name?: pulumi.Input<string>;
/**
* The user role. Can be `admin`, `limitedUser`, `observer`, `owner`, `readOnlyUser`, `readOnlyLimitedUser`, `restrictedAccess`, or `user`.
* Notes:
* * Account must have the `readOnlyUsers` ability to set a user as a `readOnlyUser` or a `readOnlyLimitedUser`, and must have advanced permissions abilities to set a user as `observer` or `restrictedAccess`.
* * With advanced permissions, users can have both a user role (base role) and a team role. The team role can be configured in the `pagerduty.TeamMembership` resource.
* * Mapping of `role` values to Web UI user role names available in the [user roles support page](https://support.pagerduty.com/docs/advanced-permissions#roles-in-the-rest-api-and-saml).
*/
role?: pulumi.Input<string>;
/**
* A list of teams the user should belong to. Please use `pagerduty.TeamMembership` instead.
*
* @deprecated Use the 'pagerduty_team_membership' resource instead.
*/
teams?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The time zone of the user. Default is account default timezone.
*/
timeZone?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a User resource.
*/
export interface UserArgs {
/**
* The schedule color for the user. Valid options are purple, red, green, blue, teal, orange, brown, turquoise, dark-slate-blue, cayenne, orange-red, dark-orchid, dark-slate-grey, lime, dark-magenta, lime-green, midnight-blue, deep-pink, dark-green, dark-orange, dark-cyan, darkolive-green, dark-slate-gray, grey20, firebrick, maroon, crimson, dark-red, dark-goldenrod, chocolate, medium-violet-red, sea-green, olivedrab, forest-green, dark-olive-green, blue-violet, royal-blue, indigo, slate-blue, saddle-brown, or steel-blue.
*/
color?: pulumi.Input<string>;
/**
* A human-friendly description of the user.
* If not set, a placeholder of "Managed by Pulumi" will be set.
*/
description?: pulumi.Input<string>;
/**
* The user's email address.
*/
email: pulumi.Input<string>;
/**
* The user's title.
*/
jobTitle?: pulumi.Input<string>;
/**
* The license id assigned to the user. If provided the user's role must exist in the assigned license's `validRoles` list. To reference purchased licenses' ids see data source `pagerduty.getLicenses` [data source](https://developer.pagerduty.com/api-reference/b3A6Mjc0ODIzNA-create-a-user).
*/
license?: pulumi.Input<string>;
/**
* The name of the user.
*/
name?: pulumi.Input<string>;
/**
* The user role. Can be `admin`, `limitedUser`, `observer`, `owner`, `readOnlyUser`, `readOnlyLimitedUser`, `restrictedAccess`, or `user`.
* Notes:
* * Account must have the `readOnlyUsers` ability to set a user as a `readOnlyUser` or a `readOnlyLimitedUser`, and must have advanced permissions abilities to set a user as `observer` or `restrictedAccess`.
* * With advanced permissions, users can have both a user role (base role) and a team role. The team role can be configured in the `pagerduty.TeamMembership` resource.
* * Mapping of `role` values to Web UI user role names available in the [user roles support page](https://support.pagerduty.com/docs/advanced-permissions#roles-in-the-rest-api-and-saml).
*/
role?: pulumi.Input<string>;
/**
* A list of teams the user should belong to. Please use `pagerduty.TeamMembership` instead.
*
* @deprecated Use the 'pagerduty_team_membership' resource instead.
*/
teams?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The time zone of the user. Default is account default timezone.
*/
timeZone?: pulumi.Input<string>;
}