Class 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,
});
}
}
Inheritance
Inherited Members
Namespace: Pulumi.Pagerduty
Assembly: Pulumi.Pagerduty.dll
Syntax
public class UserContactMethod : CustomResource
Constructors
View SourceUserContactMethod(String, UserContactMethodArgs, CustomResourceOptions)
Create a UserContactMethod resource with the given unique name, arguments, and options.
Declaration
public UserContactMethod(string name, UserContactMethodArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| UserContactMethodArgs | args | The arguments used to populate this resource's properties |
| Pulumi.CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAddress
The "address" to deliver to: email, phone number, etc., depending on the type.
Declaration
public Output<string> Address { get; }
Property Value
| Type | Description |
|---|---|
| Pulumi.Output<System.String> |
Blacklisted
If true, this phone has been blacklisted by PagerDuty and no messages will be sent to it.
Declaration
public Output<bool> Blacklisted { get; }
Property Value
| Type | Description |
|---|---|
| Pulumi.Output<System.Boolean> |
CountryCode
The 1-to-3 digit country calling code. Required when using phone_contact_method or sms_contact_method.
Declaration
public Output<int?> CountryCode { get; }
Property Value
| Type | Description |
|---|---|
| Pulumi.Output<System.Nullable<System.Int32>> |
Enabled
If true, this phone is capable of receiving SMS messages.
Declaration
public Output<bool> Enabled { get; }
Property Value
| Type | Description |
|---|---|
| Pulumi.Output<System.Boolean> |
Label
The label (e.g., "Work", "Mobile", etc.).
Declaration
public Output<string> Label { get; }
Property Value
| Type | Description |
|---|---|
| Pulumi.Output<System.String> |
SendShortEmail
Send an abbreviated email message instead of the standard email output.
Declaration
public Output<bool?> SendShortEmail { get; }
Property Value
| Type | Description |
|---|---|
| Pulumi.Output<System.Nullable<System.Boolean>> |
Type
The contact method type. May be (email_contact_method, phone_contact_method, sms_contact_method, push_notification_contact_method).
Declaration
public Output<string> Type { get; }
Property Value
| Type | Description |
|---|---|
| Pulumi.Output<System.String> |
UserId
The ID of the user.
Declaration
public Output<string> UserId { get; }
Property Value
| Type | Description |
|---|---|
| Pulumi.Output<System.String> |
Methods
View SourceGet(String, Input<String>, UserContactMethodState, CustomResourceOptions)
Get an existing UserContactMethod resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static UserContactMethod Get(string name, Input<string> id, UserContactMethodState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Pulumi.Input<System.String> | id | The unique provider ID of the resource to lookup. |
| UserContactMethodState | state | Any extra arguments used during the lookup. |
| Pulumi.CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| UserContactMethod |