UNPKG

@pulumi/pagerduty

Version:

A Pulumi package for creating and managing pagerduty cloud resources.

167 lines (166 loc) 5.85 kB
import * as pulumi from "@pulumi/pulumi"; /** * ## 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", * teams: [examplePagerdutyTeam.id], * }); * const email = new pagerduty.UserContactMethod("email", { * userId: example.id, * type: "email_contact_method", * address: "foo@bar.com", * label: "Work", * }); * const phone = new pagerduty.UserContactMethod("phone", { * userId: example.id, * type: "phone_contact_method", * countryCode: 1, * address: "2025550199", * label: "Work", * }); * const sms = new pagerduty.UserContactMethod("sms", { * userId: example.id, * type: "sms_contact_method", * countryCode: 1, * address: "2025550199", * label: "Work", * }); * ``` * * ## Import * * Contact methods can be imported using the `user_id` and the `id`, e.g. * * ```sh * $ pulumi import pagerduty:index/userContactMethod:UserContactMethod main PLBP09X:PLBP09X * ``` */ export declare class UserContactMethod extends pulumi.CustomResource { /** * Get an existing UserContactMethod 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?: UserContactMethodState, opts?: pulumi.CustomResourceOptions): UserContactMethod; /** * Returns true if the given object is an instance of UserContactMethod. 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 UserContactMethod; /** * The "address" to deliver to: `email`, `phone number`, etc., depending on the type. */ readonly address: pulumi.Output<string>; /** * If true, this phone has been blacklisted by PagerDuty and no messages will be sent to it. */ readonly blacklisted: pulumi.Output<boolean>; /** * The 1-to-3 digit country calling code. Required when using `phoneContactMethod` or `smsContactMethod`. */ readonly countryCode: pulumi.Output<number>; /** * If true, this phone is capable of receiving SMS messages. */ readonly enabled: pulumi.Output<boolean>; /** * The label (e.g., "Work", "Mobile", etc.). */ readonly label: pulumi.Output<string>; /** * Send an abbreviated email message instead of the standard email output. */ readonly sendShortEmail: pulumi.Output<boolean | undefined>; /** * The contact method type. May be (`emailContactMethod`, `phoneContactMethod`, `smsContactMethod`, `pushNotificationContactMethod`). */ readonly type: pulumi.Output<string>; /** * The ID of the user. */ readonly userId: pulumi.Output<string>; /** * Create a UserContactMethod 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: UserContactMethodArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering UserContactMethod resources. */ export interface UserContactMethodState { /** * The "address" to deliver to: `email`, `phone number`, etc., depending on the type. */ address?: pulumi.Input<string>; /** * If true, this phone has been blacklisted by PagerDuty and no messages will be sent to it. */ blacklisted?: pulumi.Input<boolean>; /** * The 1-to-3 digit country calling code. Required when using `phoneContactMethod` or `smsContactMethod`. */ countryCode?: pulumi.Input<number>; /** * If true, this phone is capable of receiving SMS messages. */ enabled?: pulumi.Input<boolean>; /** * The label (e.g., "Work", "Mobile", etc.). */ label?: pulumi.Input<string>; /** * Send an abbreviated email message instead of the standard email output. */ sendShortEmail?: pulumi.Input<boolean>; /** * The contact method type. May be (`emailContactMethod`, `phoneContactMethod`, `smsContactMethod`, `pushNotificationContactMethod`). */ type?: pulumi.Input<string>; /** * The ID of the user. */ userId?: pulumi.Input<string>; } /** * The set of arguments for constructing a UserContactMethod resource. */ export interface UserContactMethodArgs { /** * The "address" to deliver to: `email`, `phone number`, etc., depending on the type. */ address: pulumi.Input<string>; /** * The 1-to-3 digit country calling code. Required when using `phoneContactMethod` or `smsContactMethod`. */ countryCode?: pulumi.Input<number>; /** * The label (e.g., "Work", "Mobile", etc.). */ label: pulumi.Input<string>; /** * Send an abbreviated email message instead of the standard email output. */ sendShortEmail?: pulumi.Input<boolean>; /** * The contact method type. May be (`emailContactMethod`, `phoneContactMethod`, `smsContactMethod`, `pushNotificationContactMethod`). */ type: pulumi.Input<string>; /** * The ID of the user. */ userId: pulumi.Input<string>; }