Datadog

Pulumi Official
Package maintained by Pulumi
v4.8.0 published on Monday, Mar 28, 2022 by Pulumi

Channel

Resource for interacting with the Datadog Slack channel API

Example Usage

using Pulumi;
using Datadog = Pulumi.Datadog;

class MyStack : Stack
{
    public MyStack()
    {
        var testChannel = new Datadog.Slack.Channel("testChannel", new Datadog.Slack.ChannelArgs
        {
            AccountName = "foo",
            ChannelName = "#test_channel",
            Display = new Datadog.Slack.Inputs.ChannelDisplayArgs
            {
                Message = true,
                Notified = false,
                Snapshot = false,
                Tags = true,
            },
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-datadog/sdk/v4/go/datadog/slack"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := slack.NewChannel(ctx, "testChannel", &slack.ChannelArgs{
			AccountName: pulumi.String("foo"),
			ChannelName: pulumi.String("#test_channel"),
			Display: &slack.ChannelDisplayArgs{
				Message:  pulumi.Bool(true),
				Notified: pulumi.Bool(false),
				Snapshot: pulumi.Bool(false),
				Tags:     pulumi.Bool(true),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_datadog as datadog

test_channel = datadog.slack.Channel("testChannel",
    account_name="foo",
    channel_name="#test_channel",
    display=datadog.slack.ChannelDisplayArgs(
        message=True,
        notified=False,
        snapshot=False,
        tags=True,
    ))
import * as pulumi from "@pulumi/pulumi";
import * as datadog from "@pulumi/datadog";

const testChannel = new datadog.slack.Channel("test_channel", {
    accountName: "foo",
    channelName: "#test_channel",
    display: {
        message: true,
        notified: false,
        snapshot: false,
        tags: true,
    },
});

Coming soon!

Create a Channel Resource

new Channel(name: string, args: ChannelArgs, opts?: CustomResourceOptions);
@overload
def Channel(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            account_name: Optional[str] = None,
            channel_name: Optional[str] = None,
            display: Optional[ChannelDisplayArgs] = None)
@overload
def Channel(resource_name: str,
            args: ChannelArgs,
            opts: Optional[ResourceOptions] = None)
func NewChannel(ctx *Context, name string, args ChannelArgs, opts ...ResourceOption) (*Channel, error)
public Channel(string name, ChannelArgs args, CustomResourceOptions? opts = null)
public Channel(String name, ChannelArgs args)
public Channel(String name, ChannelArgs args, CustomResourceOptions options)
type: datadog:slack:Channel
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args ChannelArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args ChannelArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ChannelArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ChannelArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args ChannelArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Channel Resource Properties

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

Inputs

The Channel resource accepts the following input properties:

AccountName string

Slack account name.

ChannelName string

Slack channel name.

Display ChannelDisplayArgs

Configuration options for what is shown in an alert event message.

AccountName string

Slack account name.

ChannelName string

Slack channel name.

Display ChannelDisplayArgs

Configuration options for what is shown in an alert event message.

accountName String

Slack account name.

channelName String

Slack channel name.

display ChannelDisplayArgs

Configuration options for what is shown in an alert event message.

accountName string

Slack account name.

channelName string

Slack channel name.

display ChannelDisplayArgs

Configuration options for what is shown in an alert event message.

account_name str

Slack account name.

channel_name str

Slack channel name.

display ChannelDisplayArgs

Configuration options for what is shown in an alert event message.

accountName String

Slack account name.

channelName String

Slack channel name.

display Property Map

Configuration options for what is shown in an alert event message.

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up an Existing Channel Resource

Get an existing Channel 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?: ChannelState, opts?: CustomResourceOptions): Channel
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        account_name: Optional[str] = None,
        channel_name: Optional[str] = None,
        display: Optional[ChannelDisplayArgs] = None) -> Channel
func GetChannel(ctx *Context, name string, id IDInput, state *ChannelState, opts ...ResourceOption) (*Channel, error)
public static Channel Get(string name, Input<string> id, ChannelState? state, CustomResourceOptions? opts = null)
public static Channel get(String name, Output<String> id, ChannelState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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.
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:
AccountName string

Slack account name.

ChannelName string

Slack channel name.

Display ChannelDisplayArgs

Configuration options for what is shown in an alert event message.

AccountName string

Slack account name.

ChannelName string

Slack channel name.

Display ChannelDisplayArgs

Configuration options for what is shown in an alert event message.

accountName String

Slack account name.

channelName String

Slack channel name.

display ChannelDisplayArgs

Configuration options for what is shown in an alert event message.

accountName string

Slack account name.

channelName string

Slack channel name.

display ChannelDisplayArgs

Configuration options for what is shown in an alert event message.

account_name str

Slack account name.

channel_name str

Slack channel name.

display ChannelDisplayArgs

Configuration options for what is shown in an alert event message.

accountName String

Slack account name.

channelName String

Slack channel name.

display Property Map

Configuration options for what is shown in an alert event message.

Supporting Types

ChannelDisplay

Message bool

Show the main body of the alert event.

Notified bool

Show the list of @-handles in the alert event.

Snapshot bool

Show the alert event's snapshot image.

Tags bool

Show the scopes on which the monitor alerted.

Message bool

Show the main body of the alert event.

Notified bool

Show the list of @-handles in the alert event.

Snapshot bool

Show the alert event's snapshot image.

Tags bool

Show the scopes on which the monitor alerted.

message Boolean

Show the main body of the alert event.

notified Boolean

Show the list of @-handles in the alert event.

snapshot Boolean

Show the alert event's snapshot image.

tags Boolean

Show the scopes on which the monitor alerted.

message boolean

Show the main body of the alert event.

notified boolean

Show the list of @-handles in the alert event.

snapshot boolean

Show the alert event's snapshot image.

tags boolean

Show the scopes on which the monitor alerted.

message bool

Show the main body of the alert event.

notified bool

Show the list of @-handles in the alert event.

snapshot bool

Show the alert event's snapshot image.

tags bool

Show the scopes on which the monitor alerted.

message Boolean

Show the main body of the alert event.

notified Boolean

Show the list of @-handles in the alert event.

snapshot Boolean

Show the alert event's snapshot image.

tags Boolean

Show the scopes on which the monitor alerted.

Import

Slack channel integrations can be imported using their account_name and channel_name separated with a colon (:).

 $ pulumi import datadog:slack/channel:Channel test_channel "foo:#test_channel"

Package Details

Repository
https://github.com/pulumi/pulumi-datadog
License
Apache-2.0
Notes

This Pulumi package is based on the datadog Terraform Provider.