UNPKG

@pulumi/pagerduty

Version:

A Pulumi package for creating and managing pagerduty cloud resources.

98 lines 4.45 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.User = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * 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 * ``` */ 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, id, state, opts) { return new User(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * 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) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === User.__pulumiType; } constructor(name, argsOrState, opts) { var _a; let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["avatarUrl"] = state ? state.avatarUrl : undefined; resourceInputs["color"] = state ? state.color : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["email"] = state ? state.email : undefined; resourceInputs["htmlUrl"] = state ? state.htmlUrl : undefined; resourceInputs["invitationSent"] = state ? state.invitationSent : undefined; resourceInputs["jobTitle"] = state ? state.jobTitle : undefined; resourceInputs["license"] = state ? state.license : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["role"] = state ? state.role : undefined; resourceInputs["teams"] = state ? state.teams : undefined; resourceInputs["timeZone"] = state ? state.timeZone : undefined; } else { const args = argsOrState; if ((!args || args.email === undefined) && !opts.urn) { throw new Error("Missing required property 'email'"); } resourceInputs["color"] = args ? args.color : undefined; resourceInputs["description"] = (_a = (args ? args.description : undefined)) !== null && _a !== void 0 ? _a : "Managed by Pulumi"; resourceInputs["email"] = args ? args.email : undefined; resourceInputs["jobTitle"] = args ? args.jobTitle : undefined; resourceInputs["license"] = args ? args.license : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["role"] = args ? args.role : undefined; resourceInputs["teams"] = args ? args.teams : undefined; resourceInputs["timeZone"] = args ? args.timeZone : undefined; resourceInputs["avatarUrl"] = undefined /*out*/; resourceInputs["htmlUrl"] = undefined /*out*/; resourceInputs["invitationSent"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(User.__pulumiType, name, resourceInputs, opts); } } exports.User = User; /** @internal */ User.__pulumiType = 'pagerduty:index/user:User'; //# sourceMappingURL=user.js.map