Show / Hide Table of Contents

Class GetNotificationChannel

Inheritance
System.Object
GetNotificationChannel
Inherited Members
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.Gcp.Monitoring
Assembly: Pulumi.Gcp.dll
Syntax
public static class GetNotificationChannel

Methods

View Source

InvokeAsync(GetNotificationChannelArgs, InvokeOptions)

A NotificationChannel is a medium through which an alert is delivered when a policy violation is detected. Examples of channels include email, SMS, and third-party messaging applications. Fields containing sensitive information like authentication tokens or contact info are only partially populated on retrieval.

To get more information about NotificationChannel, see:

  • API documentation
  • How-to Guides
  • Notification Options
  • Monitoring API Documentation

Example Usage - Notification Channel Basic

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var basic = Output.Create(Gcp.Monitoring.GetNotificationChannel.InvokeAsync(new Gcp.Monitoring.GetNotificationChannelArgs
    {
        DisplayName = "Test Notification Channel",
    }));
    var alertPolicy = new Gcp.Monitoring.AlertPolicy("alertPolicy", new Gcp.Monitoring.AlertPolicyArgs
    {
        DisplayName = "My Alert Policy",
        NotificationChannels = 
        {
            basic.Apply(basic => basic.Name),
        },
        Combiner = "OR",
        Conditions = 
        {
            new Gcp.Monitoring.Inputs.AlertPolicyConditionArgs
            {
                DisplayName = "test condition",
                Condition_threshold = 
                {
                    { "filter", "metric.type=\"compute.googleapis.com/instance/disk/write_bytes_count\" AND resource.type=\"gce_instance\"" },
                    { "duration", "60s" },
                    { "comparison", "COMPARISON_GT" },
                    { "aggregations", 
                    {

                        {
                            { "alignmentPeriod", "60s" },
                            { "perSeriesAligner", "ALIGN_RATE" },
                        },
                    } },
                },
            },
        },
    });
}

}
Declaration
public static Task<GetNotificationChannelResult> InvokeAsync(GetNotificationChannelArgs args = null, InvokeOptions options = null)
Parameters
Type Name Description
GetNotificationChannelArgs args
InvokeOptions options
Returns
Type Description
System.Threading.Tasks.Task<GetNotificationChannelResult>
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.