UserContactMethod

A contact method is a contact method for a PagerDuty user (email, phone or SMS).

Example Usage

using Pulumi;
using Pagerduty = Pulumi.Pagerduty;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Pagerduty.User("example", new Pagerduty.UserArgs
        {
            Email = "125.greenholt.earline@graham.name",
            Teams = 
            {
                pagerduty_team.Example.Id,
            },
        });
        var email = new Pagerduty.UserContactMethod("email", new Pagerduty.UserContactMethodArgs
        {
            Address = "foo@bar.com",
            Label = "Work",
            Type = "email_contact_method",
            UserId = example.Id,
        });
        var phone = new Pagerduty.UserContactMethod("phone", new Pagerduty.UserContactMethodArgs
        {
            Address = "2025550199",
            CountryCode = "+1",
            Label = "Work",
            Type = "phone_contact_method",
            UserId = example.Id,
        });
        var sms = new Pagerduty.UserContactMethod("sms", new Pagerduty.UserContactMethodArgs
        {
            Address = "2025550199",
            CountryCode = "+1",
            Label = "Work",
            Type = "sms_contact_method",
            UserId = example.Id,
        });
    }

}

Coming soon!

import pulumi
import pulumi_pagerduty as pagerduty

example = pagerduty.User("example",
    email="125.greenholt.earline@graham.name",
    teams=[pagerduty_team["example"]["id"]])
email = pagerduty.UserContactMethod("email",
    address="foo@bar.com",
    label="Work",
    type="email_contact_method",
    user_id=example.id)
phone = pagerduty.UserContactMethod("phone",
    address="2025550199",
    country_code="+1",
    label="Work",
    type="phone_contact_method",
    user_id=example.id)
sms = pagerduty.UserContactMethod("sms",
    address="2025550199",
    country_code="+1",
    label="Work",
    type="sms_contact_method",
    user_id=example.id)
import * as pulumi from "@pulumi/pulumi";
import * as pagerduty from "@pulumi/pagerduty";

const example = new pagerduty.User("example", {
    email: "125.greenholt.earline@graham.name",
    teams: [pagerduty_team_example.id],
});
const email = new pagerduty.UserContactMethod("email", {
    address: "foo@bar.com",
    label: "Work",
    type: "email_contact_method",
    userId: example.id,
});
const phone = new pagerduty.UserContactMethod("phone", {
    address: "2025550199",
    countryCode: 1,
    label: "Work",
    type: "phone_contact_method",
    userId: example.id,
});
const sms = new pagerduty.UserContactMethod("sms", {
    address: "2025550199",
    countryCode: 1,
    label: "Work",
    type: "sms_contact_method",
    userId: example.id,
});

Create a UserContactMethod Resource

def UserContactMethod(resource_name, opts=None, address=None, country_code=None, label=None, send_short_email=None, type=None, user_id=None, __props__=None);
name string
The unique name of the resource.
args UserContactMethodArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args UserContactMethodArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args UserContactMethodArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

UserContactMethod Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The UserContactMethod resource accepts the following input properties:

Address string

The “address” to deliver to: email, phone number, etc., depending on the type.

Label string

The label (e.g., “Work”, “Mobile”, etc.).

Type string

The contact method type. May be (email_contact_method, phone_contact_method, sms_contact_method, push_notification_contact_method).

UserId string

The ID of the user.

CountryCode int

The 1-to-3 digit country calling code. Required when using phone_contact_method or sms_contact_method.

SendShortEmail bool

Send an abbreviated email message instead of the standard email output.

Address string

The “address” to deliver to: email, phone number, etc., depending on the type.

Label string

The label (e.g., “Work”, “Mobile”, etc.).

Type string

The contact method type. May be (email_contact_method, phone_contact_method, sms_contact_method, push_notification_contact_method).

UserId string

The ID of the user.

CountryCode int

The 1-to-3 digit country calling code. Required when using phone_contact_method or sms_contact_method.

SendShortEmail bool

Send an abbreviated email message instead of the standard email output.

address string

The “address” to deliver to: email, phone number, etc., depending on the type.

label string

The label (e.g., “Work”, “Mobile”, etc.).

type string

The contact method type. May be (email_contact_method, phone_contact_method, sms_contact_method, push_notification_contact_method).

userId string

The ID of the user.

countryCode number

The 1-to-3 digit country calling code. Required when using phone_contact_method or sms_contact_method.

sendShortEmail boolean

Send an abbreviated email message instead of the standard email output.

address str

The “address” to deliver to: email, phone number, etc., depending on the type.

label str

The label (e.g., “Work”, “Mobile”, etc.).

type str

The contact method type. May be (email_contact_method, phone_contact_method, sms_contact_method, push_notification_contact_method).

user_id str

The ID of the user.

country_code float

The 1-to-3 digit country calling code. Required when using phone_contact_method or sms_contact_method.

send_short_email bool

Send an abbreviated email message instead of the standard email output.

Outputs

All input properties are implicitly available as output properties. Additionally, the UserContactMethod resource produces the following output properties:

Blacklisted bool

If true, this phone has been blacklisted by PagerDuty and no messages will be sent to it.

Enabled bool

If true, this phone is capable of receiving SMS messages.

Id string
The provider-assigned unique ID for this managed resource.
Blacklisted bool

If true, this phone has been blacklisted by PagerDuty and no messages will be sent to it.

Enabled bool

If true, this phone is capable of receiving SMS messages.

Id string
The provider-assigned unique ID for this managed resource.
blacklisted boolean

If true, this phone has been blacklisted by PagerDuty and no messages will be sent to it.

enabled boolean

If true, this phone is capable of receiving SMS messages.

id string
The provider-assigned unique ID for this managed resource.
blacklisted bool

If true, this phone has been blacklisted by PagerDuty and no messages will be sent to it.

enabled bool

If true, this phone is capable of receiving SMS messages.

id str
The provider-assigned unique ID for this managed resource.

Look up an Existing UserContactMethod Resource

Get an existing UserContactMethod 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?: UserContactMethodState, opts?: CustomResourceOptions): UserContactMethod
static get(resource_name, id, opts=None, address=None, blacklisted=None, country_code=None, enabled=None, label=None, send_short_email=None, type=None, user_id=None, __props__=None);
func GetUserContactMethod(ctx *Context, name string, id IDInput, state *UserContactMethodState, opts ...ResourceOption) (*UserContactMethod, error)
public static UserContactMethod Get(string name, Input<string> id, UserContactMethodState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

Address string

The “address” to deliver to: email, phone number, etc., depending on the type.

Blacklisted bool

If true, this phone has been blacklisted by PagerDuty and no messages will be sent to it.

CountryCode int

The 1-to-3 digit country calling code. Required when using phone_contact_method or sms_contact_method.

Enabled bool

If true, this phone is capable of receiving SMS messages.

Label string

The label (e.g., “Work”, “Mobile”, etc.).

SendShortEmail bool

Send an abbreviated email message instead of the standard email output.

Type string

The contact method type. May be (email_contact_method, phone_contact_method, sms_contact_method, push_notification_contact_method).

UserId string

The ID of the user.

Address string

The “address” to deliver to: email, phone number, etc., depending on the type.

Blacklisted bool

If true, this phone has been blacklisted by PagerDuty and no messages will be sent to it.

CountryCode int

The 1-to-3 digit country calling code. Required when using phone_contact_method or sms_contact_method.

Enabled bool

If true, this phone is capable of receiving SMS messages.

Label string

The label (e.g., “Work”, “Mobile”, etc.).

SendShortEmail bool

Send an abbreviated email message instead of the standard email output.

Type string

The contact method type. May be (email_contact_method, phone_contact_method, sms_contact_method, push_notification_contact_method).

UserId string

The ID of the user.

address string

The “address” to deliver to: email, phone number, etc., depending on the type.

blacklisted boolean

If true, this phone has been blacklisted by PagerDuty and no messages will be sent to it.

countryCode number

The 1-to-3 digit country calling code. Required when using phone_contact_method or sms_contact_method.

enabled boolean

If true, this phone is capable of receiving SMS messages.

label string

The label (e.g., “Work”, “Mobile”, etc.).

sendShortEmail boolean

Send an abbreviated email message instead of the standard email output.

type string

The contact method type. May be (email_contact_method, phone_contact_method, sms_contact_method, push_notification_contact_method).

userId string

The ID of the user.

address str

The “address” to deliver to: email, phone number, etc., depending on the type.

blacklisted bool

If true, this phone has been blacklisted by PagerDuty and no messages will be sent to it.

country_code float

The 1-to-3 digit country calling code. Required when using phone_contact_method or sms_contact_method.

enabled bool

If true, this phone is capable of receiving SMS messages.

label str

The label (e.g., “Work”, “Mobile”, etc.).

send_short_email bool

Send an abbreviated email message instead of the standard email output.

type str

The contact method type. May be (email_contact_method, phone_contact_method, sms_contact_method, push_notification_contact_method).

user_id str

The ID of the user.

Package Details

Repository
https://github.com/pulumi/pulumi-pagerduty
License
Apache-2.0
Notes
This Pulumi package is based on the pagerduty Terraform Provider.