import * as pulumi from "@pulumi/pulumi"; /** * > This resource behaves a little differently than may be expected. If the defined contact method already exists for the user in PagerDuty this resource will import the values of the existing contact method into your Terraform state. * * A [contact method](https://developer.pagerduty.com/api-reference/b3A6Mjc0ODI0MA-create-a-user-contact-method) is a contact method for a PagerDuty user (email, phone or SMS). * * ## 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 `userId` 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, 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; /** * If true, this phone has been blacklisted by PagerDuty and no messages will be sent to it. */ readonly blacklisted: pulumi.Output; /** * The 1-to-3 digit country calling code. Required when using `phoneContactMethod` or `smsContactMethod`. */ readonly countryCode: pulumi.Output; readonly deviceType: pulumi.Output; /** * If true, this phone is capable of receiving SMS messages. */ readonly enabled: pulumi.Output; /** * The label (e.g., "Work", "Mobile", etc.). */ readonly label: pulumi.Output; /** * Send an abbreviated email message instead of the standard email output. */ readonly sendShortEmail: pulumi.Output; /** * The contact method type. May be (`emailContactMethod`, `phoneContactMethod`, `smsContactMethod`, `pushNotificationContactMethod`, `whatsappContactMethod`). */ readonly type: pulumi.Output; /** * The ID of the user. */ readonly userId: pulumi.Output; /** * 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; /** * If true, this phone has been blacklisted by PagerDuty and no messages will be sent to it. */ blacklisted?: pulumi.Input; /** * The 1-to-3 digit country calling code. Required when using `phoneContactMethod` or `smsContactMethod`. */ countryCode?: pulumi.Input; deviceType?: pulumi.Input; /** * If true, this phone is capable of receiving SMS messages. */ enabled?: pulumi.Input; /** * The label (e.g., "Work", "Mobile", etc.). */ label?: pulumi.Input; /** * Send an abbreviated email message instead of the standard email output. */ sendShortEmail?: pulumi.Input; /** * The contact method type. May be (`emailContactMethod`, `phoneContactMethod`, `smsContactMethod`, `pushNotificationContactMethod`, `whatsappContactMethod`). */ type?: pulumi.Input; /** * The ID of the user. */ userId?: pulumi.Input; } /** * 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; /** * The 1-to-3 digit country calling code. Required when using `phoneContactMethod` or `smsContactMethod`. */ countryCode?: pulumi.Input; deviceType?: pulumi.Input; /** * The label (e.g., "Work", "Mobile", etc.). */ label: pulumi.Input; /** * Send an abbreviated email message instead of the standard email output. */ sendShortEmail?: pulumi.Input; /** * The contact method type. May be (`emailContactMethod`, `phoneContactMethod`, `smsContactMethod`, `pushNotificationContactMethod`, `whatsappContactMethod`). */ type: pulumi.Input; /** * The ID of the user. */ userId: pulumi.Input; }