Show / Hide Table of Contents

Class UserNotificationRule

A notification rule configures where and when a PagerDuty user is notified when a triggered incident is assigned to him. Unique notification rules can be created for both high and low-urgency incidents.

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",
    });
    var email = new Pagerduty.UserContactMethod("email", new Pagerduty.UserContactMethodArgs
    {
        UserId = example.Id,
        Type = "email_contact_method",
        Address = "foo@bar.com",
        Label = "Work",
    });
    var phone = new Pagerduty.UserContactMethod("phone", new Pagerduty.UserContactMethodArgs
    {
        UserId = example.Id,
        Type = "phone_contact_method",
        CountryCode = "+1",
        Address = "2025550199",
        Label = "Work",
    });
    var sms = new Pagerduty.UserContactMethod("sms", new Pagerduty.UserContactMethodArgs
    {
        UserId = example.Id,
        Type = "sms_contact_method",
        CountryCode = "+1",
        Address = "2025550199",
        Label = "Work",
    });
    var highUrgencyPhone = new Pagerduty.UserNotificationRule("highUrgencyPhone", new Pagerduty.UserNotificationRuleArgs
    {
        UserId = example.Id,
        StartDelayInMinutes = 1,
        Urgency = "high",
        ContactMethod = new Pagerduty.Inputs.UserNotificationRuleContactMethodArgs
        {
            Type = "phone_contact_method",
            Id = phone.Id,
        },
    });
    var lowUrgencyEmail = new Pagerduty.UserNotificationRule("lowUrgencyEmail", new Pagerduty.UserNotificationRuleArgs
    {
        UserId = example.Id,
        StartDelayInMinutes = 1,
        Urgency = "low",
        ContactMethod = new Pagerduty.Inputs.UserNotificationRuleContactMethodArgs
        {
            Type = "email_contact_method",
            Id = email.Id,
        },
    });
    var lowUrgencySms = new Pagerduty.UserNotificationRule("lowUrgencySms", new Pagerduty.UserNotificationRuleArgs
    {
        UserId = example.Id,
        StartDelayInMinutes = 10,
        Urgency = "low",
        ContactMethod = new Pagerduty.Inputs.UserNotificationRuleContactMethodArgs
        {
            Type = "sms_contact_method",
            Id = sms.Id,
        },
    });
}

}
Inheritance
System.Object
Pulumi.Resource
Pulumi.CustomResource
UserNotificationRule
Inherited Members
Pulumi.CustomResource.Id
Pulumi.Resource.GetResourceType()
Pulumi.Resource.GetResourceName()
Pulumi.Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Pagerduty
Assembly: Pulumi.Pagerduty.dll
Syntax
public class UserNotificationRule : CustomResource

Constructors

View Source

UserNotificationRule(String, UserNotificationRuleArgs, CustomResourceOptions)

Create a UserNotificationRule resource with the given unique name, arguments, and options.

Declaration
public UserNotificationRule(string name, UserNotificationRuleArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

UserNotificationRuleArgs 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 Source

ContactMethod

A contact method block, configured as a block described below.

Declaration
public Output<UserNotificationRuleContactMethod> ContactMethod { get; }
Property Value
Type Description
Pulumi.Output<UserNotificationRuleContactMethod>
View Source

StartDelayInMinutes

The delay before firing the rule, in minutes.

Declaration
public Output<int> StartDelayInMinutes { get; }
Property Value
Type Description
Pulumi.Output<System.Int32>
View Source

Urgency

Which incident urgency this rule is used for. Account must have the urgencies ability to have a low urgency notification rule. Can be high or low.

Declaration
public Output<string> Urgency { get; }
Property Value
Type Description
Pulumi.Output<System.String>
View Source

UserId

The ID of the user.

Declaration
public Output<string> UserId { get; }
Property Value
Type Description
Pulumi.Output<System.String>

Methods

View Source

Get(String, Input<String>, UserNotificationRuleState, CustomResourceOptions)

Get an existing UserNotificationRule resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static UserNotificationRule Get(string name, Input<string> id, UserNotificationRuleState 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.

UserNotificationRuleState state

Any extra arguments used during the lookup.

Pulumi.CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
UserNotificationRule
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.