aws.ssmcontacts.ContactChannel
Explore with Pulumi AI
Resource for managing an AWS SSM Contacts Contact Channel.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.ssmcontacts.ContactChannel("example", {
contactId: "arn:aws:ssm-contacts:us-west-2:123456789012:contact/contactalias",
deliveryAddress: {
simpleAddress: "email@example.com",
},
name: "Example contact channel",
type: "EMAIL",
});
import pulumi
import pulumi_aws as aws
example = aws.ssmcontacts.ContactChannel("example",
contact_id="arn:aws:ssm-contacts:us-west-2:123456789012:contact/contactalias",
delivery_address={
"simple_address": "email@example.com",
},
name="Example contact channel",
type="EMAIL")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssmcontacts"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ssmcontacts.NewContactChannel(ctx, "example", &ssmcontacts.ContactChannelArgs{
ContactId: pulumi.String("arn:aws:ssm-contacts:us-west-2:123456789012:contact/contactalias"),
DeliveryAddress: &ssmcontacts.ContactChannelDeliveryAddressArgs{
SimpleAddress: pulumi.String("email@example.com"),
},
Name: pulumi.String("Example contact channel"),
Type: pulumi.String("EMAIL"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.SsmContacts.ContactChannel("example", new()
{
ContactId = "arn:aws:ssm-contacts:us-west-2:123456789012:contact/contactalias",
DeliveryAddress = new Aws.SsmContacts.Inputs.ContactChannelDeliveryAddressArgs
{
SimpleAddress = "email@example.com",
},
Name = "Example contact channel",
Type = "EMAIL",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ssmcontacts.ContactChannel;
import com.pulumi.aws.ssmcontacts.ContactChannelArgs;
import com.pulumi.aws.ssmcontacts.inputs.ContactChannelDeliveryAddressArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new ContactChannel("example", ContactChannelArgs.builder()
.contactId("arn:aws:ssm-contacts:us-west-2:123456789012:contact/contactalias")
.deliveryAddress(ContactChannelDeliveryAddressArgs.builder()
.simpleAddress("email@example.com")
.build())
.name("Example contact channel")
.type("EMAIL")
.build());
}
}
resources:
example:
type: aws:ssmcontacts:ContactChannel
properties:
contactId: arn:aws:ssm-contacts:us-west-2:123456789012:contact/contactalias
deliveryAddress:
simpleAddress: email@example.com
name: Example contact channel
type: EMAIL
Usage with SSM Contact
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleContact = new aws.ssmcontacts.Contact("example_contact", {
alias: "example_contact",
type: "PERSONAL",
});
const example = new aws.ssmcontacts.ContactChannel("example", {
contactId: exampleContact.arn,
deliveryAddress: {
simpleAddress: "email@example.com",
},
name: "Example contact channel",
type: "EMAIL",
});
import pulumi
import pulumi_aws as aws
example_contact = aws.ssmcontacts.Contact("example_contact",
alias="example_contact",
type="PERSONAL")
example = aws.ssmcontacts.ContactChannel("example",
contact_id=example_contact.arn,
delivery_address={
"simple_address": "email@example.com",
},
name="Example contact channel",
type="EMAIL")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssmcontacts"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleContact, err := ssmcontacts.NewContact(ctx, "example_contact", &ssmcontacts.ContactArgs{
Alias: pulumi.String("example_contact"),
Type: pulumi.String("PERSONAL"),
})
if err != nil {
return err
}
_, err = ssmcontacts.NewContactChannel(ctx, "example", &ssmcontacts.ContactChannelArgs{
ContactId: exampleContact.Arn,
DeliveryAddress: &ssmcontacts.ContactChannelDeliveryAddressArgs{
SimpleAddress: pulumi.String("email@example.com"),
},
Name: pulumi.String("Example contact channel"),
Type: pulumi.String("EMAIL"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var exampleContact = new Aws.SsmContacts.Contact("example_contact", new()
{
Alias = "example_contact",
Type = "PERSONAL",
});
var example = new Aws.SsmContacts.ContactChannel("example", new()
{
ContactId = exampleContact.Arn,
DeliveryAddress = new Aws.SsmContacts.Inputs.ContactChannelDeliveryAddressArgs
{
SimpleAddress = "email@example.com",
},
Name = "Example contact channel",
Type = "EMAIL",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ssmcontacts.Contact;
import com.pulumi.aws.ssmcontacts.ContactArgs;
import com.pulumi.aws.ssmcontacts.ContactChannel;
import com.pulumi.aws.ssmcontacts.ContactChannelArgs;
import com.pulumi.aws.ssmcontacts.inputs.ContactChannelDeliveryAddressArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleContact = new Contact("exampleContact", ContactArgs.builder()
.alias("example_contact")
.type("PERSONAL")
.build());
var example = new ContactChannel("example", ContactChannelArgs.builder()
.contactId(exampleContact.arn())
.deliveryAddress(ContactChannelDeliveryAddressArgs.builder()
.simpleAddress("email@example.com")
.build())
.name("Example contact channel")
.type("EMAIL")
.build());
}
}
resources:
exampleContact:
type: aws:ssmcontacts:Contact
name: example_contact
properties:
alias: example_contact
type: PERSONAL
example:
type: aws:ssmcontacts:ContactChannel
properties:
contactId: ${exampleContact.arn}
deliveryAddress:
simpleAddress: email@example.com
name: Example contact channel
type: EMAIL
Create ContactChannel Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ContactChannel(name: string, args: ContactChannelArgs, opts?: CustomResourceOptions);
@overload
def ContactChannel(resource_name: str,
args: ContactChannelArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ContactChannel(resource_name: str,
opts: Optional[ResourceOptions] = None,
contact_id: Optional[str] = None,
delivery_address: Optional[ContactChannelDeliveryAddressArgs] = None,
type: Optional[str] = None,
name: Optional[str] = None)
func NewContactChannel(ctx *Context, name string, args ContactChannelArgs, opts ...ResourceOption) (*ContactChannel, error)
public ContactChannel(string name, ContactChannelArgs args, CustomResourceOptions? opts = null)
public ContactChannel(String name, ContactChannelArgs args)
public ContactChannel(String name, ContactChannelArgs args, CustomResourceOptions options)
type: aws:ssmcontacts:ContactChannel
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ContactChannelArgs
- 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 ContactChannelArgs
- 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 ContactChannelArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ContactChannelArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ContactChannelArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var contactChannelResource = new Aws.SsmContacts.ContactChannel("contactChannelResource", new()
{
ContactId = "string",
DeliveryAddress = new Aws.SsmContacts.Inputs.ContactChannelDeliveryAddressArgs
{
SimpleAddress = "string",
},
Type = "string",
Name = "string",
});
example, err := ssmcontacts.NewContactChannel(ctx, "contactChannelResource", &ssmcontacts.ContactChannelArgs{
ContactId: pulumi.String("string"),
DeliveryAddress: &ssmcontacts.ContactChannelDeliveryAddressArgs{
SimpleAddress: pulumi.String("string"),
},
Type: pulumi.String("string"),
Name: pulumi.String("string"),
})
var contactChannelResource = new ContactChannel("contactChannelResource", ContactChannelArgs.builder()
.contactId("string")
.deliveryAddress(ContactChannelDeliveryAddressArgs.builder()
.simpleAddress("string")
.build())
.type("string")
.name("string")
.build());
contact_channel_resource = aws.ssmcontacts.ContactChannel("contactChannelResource",
contact_id="string",
delivery_address={
"simpleAddress": "string",
},
type="string",
name="string")
const contactChannelResource = new aws.ssmcontacts.ContactChannel("contactChannelResource", {
contactId: "string",
deliveryAddress: {
simpleAddress: "string",
},
type: "string",
name: "string",
});
type: aws:ssmcontacts:ContactChannel
properties:
contactId: string
deliveryAddress:
simpleAddress: string
name: string
type: string
ContactChannel 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 ContactChannel resource accepts the following input properties:
- Contact
Id string - Amazon Resource Name (ARN) of the AWS SSM Contact that the contact channel belongs to.
- Delivery
Address ContactChannel Delivery Address - Block that contains contact engagement details. See details below.
- Type string
- Type of the contact channel. One of
SMS
,VOICE
orEMAIL
. - Name string
- Name of the contact channel. Must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_
), hyphens (-
), periods (.
), and spaces.
- Contact
Id string - Amazon Resource Name (ARN) of the AWS SSM Contact that the contact channel belongs to.
- Delivery
Address ContactChannel Delivery Address Args - Block that contains contact engagement details. See details below.
- Type string
- Type of the contact channel. One of
SMS
,VOICE
orEMAIL
. - Name string
- Name of the contact channel. Must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_
), hyphens (-
), periods (.
), and spaces.
- contact
Id String - Amazon Resource Name (ARN) of the AWS SSM Contact that the contact channel belongs to.
- delivery
Address ContactChannel Delivery Address - Block that contains contact engagement details. See details below.
- type String
- Type of the contact channel. One of
SMS
,VOICE
orEMAIL
. - name String
- Name of the contact channel. Must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_
), hyphens (-
), periods (.
), and spaces.
- contact
Id string - Amazon Resource Name (ARN) of the AWS SSM Contact that the contact channel belongs to.
- delivery
Address ContactChannel Delivery Address - Block that contains contact engagement details. See details below.
- type string
- Type of the contact channel. One of
SMS
,VOICE
orEMAIL
. - name string
- Name of the contact channel. Must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_
), hyphens (-
), periods (.
), and spaces.
- contact_
id str - Amazon Resource Name (ARN) of the AWS SSM Contact that the contact channel belongs to.
- delivery_
address ContactChannel Delivery Address Args - Block that contains contact engagement details. See details below.
- type str
- Type of the contact channel. One of
SMS
,VOICE
orEMAIL
. - name str
- Name of the contact channel. Must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_
), hyphens (-
), periods (.
), and spaces.
- contact
Id String - Amazon Resource Name (ARN) of the AWS SSM Contact that the contact channel belongs to.
- delivery
Address Property Map - Block that contains contact engagement details. See details below.
- type String
- Type of the contact channel. One of
SMS
,VOICE
orEMAIL
. - name String
- Name of the contact channel. Must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_
), hyphens (-
), periods (.
), and spaces.
Outputs
All input properties are implicitly available as output properties. Additionally, the ContactChannel resource produces the following output properties:
- Activation
Status string - Whether the contact channel is activated. The contact channel must be activated to use it to engage the contact. One of
ACTIVATED
orNOT_ACTIVATED
. - Arn string
- Amazon Resource Name (ARN) of the contact channel.
- Id string
- The provider-assigned unique ID for this managed resource.
- Activation
Status string - Whether the contact channel is activated. The contact channel must be activated to use it to engage the contact. One of
ACTIVATED
orNOT_ACTIVATED
. - Arn string
- Amazon Resource Name (ARN) of the contact channel.
- Id string
- The provider-assigned unique ID for this managed resource.
- activation
Status String - Whether the contact channel is activated. The contact channel must be activated to use it to engage the contact. One of
ACTIVATED
orNOT_ACTIVATED
. - arn String
- Amazon Resource Name (ARN) of the contact channel.
- id String
- The provider-assigned unique ID for this managed resource.
- activation
Status string - Whether the contact channel is activated. The contact channel must be activated to use it to engage the contact. One of
ACTIVATED
orNOT_ACTIVATED
. - arn string
- Amazon Resource Name (ARN) of the contact channel.
- id string
- The provider-assigned unique ID for this managed resource.
- activation_
status str - Whether the contact channel is activated. The contact channel must be activated to use it to engage the contact. One of
ACTIVATED
orNOT_ACTIVATED
. - arn str
- Amazon Resource Name (ARN) of the contact channel.
- id str
- The provider-assigned unique ID for this managed resource.
- activation
Status String - Whether the contact channel is activated. The contact channel must be activated to use it to engage the contact. One of
ACTIVATED
orNOT_ACTIVATED
. - arn String
- Amazon Resource Name (ARN) of the contact channel.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ContactChannel Resource
Get an existing ContactChannel 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?: ContactChannelState, opts?: CustomResourceOptions): ContactChannel
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
activation_status: Optional[str] = None,
arn: Optional[str] = None,
contact_id: Optional[str] = None,
delivery_address: Optional[ContactChannelDeliveryAddressArgs] = None,
name: Optional[str] = None,
type: Optional[str] = None) -> ContactChannel
func GetContactChannel(ctx *Context, name string, id IDInput, state *ContactChannelState, opts ...ResourceOption) (*ContactChannel, error)
public static ContactChannel Get(string name, Input<string> id, ContactChannelState? state, CustomResourceOptions? opts = null)
public static ContactChannel get(String name, Output<String> id, ContactChannelState 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.
- Activation
Status string - Whether the contact channel is activated. The contact channel must be activated to use it to engage the contact. One of
ACTIVATED
orNOT_ACTIVATED
. - Arn string
- Amazon Resource Name (ARN) of the contact channel.
- Contact
Id string - Amazon Resource Name (ARN) of the AWS SSM Contact that the contact channel belongs to.
- Delivery
Address ContactChannel Delivery Address - Block that contains contact engagement details. See details below.
- Name string
- Name of the contact channel. Must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_
), hyphens (-
), periods (.
), and spaces. - Type string
- Type of the contact channel. One of
SMS
,VOICE
orEMAIL
.
- Activation
Status string - Whether the contact channel is activated. The contact channel must be activated to use it to engage the contact. One of
ACTIVATED
orNOT_ACTIVATED
. - Arn string
- Amazon Resource Name (ARN) of the contact channel.
- Contact
Id string - Amazon Resource Name (ARN) of the AWS SSM Contact that the contact channel belongs to.
- Delivery
Address ContactChannel Delivery Address Args - Block that contains contact engagement details. See details below.
- Name string
- Name of the contact channel. Must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_
), hyphens (-
), periods (.
), and spaces. - Type string
- Type of the contact channel. One of
SMS
,VOICE
orEMAIL
.
- activation
Status String - Whether the contact channel is activated. The contact channel must be activated to use it to engage the contact. One of
ACTIVATED
orNOT_ACTIVATED
. - arn String
- Amazon Resource Name (ARN) of the contact channel.
- contact
Id String - Amazon Resource Name (ARN) of the AWS SSM Contact that the contact channel belongs to.
- delivery
Address ContactChannel Delivery Address - Block that contains contact engagement details. See details below.
- name String
- Name of the contact channel. Must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_
), hyphens (-
), periods (.
), and spaces. - type String
- Type of the contact channel. One of
SMS
,VOICE
orEMAIL
.
- activation
Status string - Whether the contact channel is activated. The contact channel must be activated to use it to engage the contact. One of
ACTIVATED
orNOT_ACTIVATED
. - arn string
- Amazon Resource Name (ARN) of the contact channel.
- contact
Id string - Amazon Resource Name (ARN) of the AWS SSM Contact that the contact channel belongs to.
- delivery
Address ContactChannel Delivery Address - Block that contains contact engagement details. See details below.
- name string
- Name of the contact channel. Must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_
), hyphens (-
), periods (.
), and spaces. - type string
- Type of the contact channel. One of
SMS
,VOICE
orEMAIL
.
- activation_
status str - Whether the contact channel is activated. The contact channel must be activated to use it to engage the contact. One of
ACTIVATED
orNOT_ACTIVATED
. - arn str
- Amazon Resource Name (ARN) of the contact channel.
- contact_
id str - Amazon Resource Name (ARN) of the AWS SSM Contact that the contact channel belongs to.
- delivery_
address ContactChannel Delivery Address Args - Block that contains contact engagement details. See details below.
- name str
- Name of the contact channel. Must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_
), hyphens (-
), periods (.
), and spaces. - type str
- Type of the contact channel. One of
SMS
,VOICE
orEMAIL
.
- activation
Status String - Whether the contact channel is activated. The contact channel must be activated to use it to engage the contact. One of
ACTIVATED
orNOT_ACTIVATED
. - arn String
- Amazon Resource Name (ARN) of the contact channel.
- contact
Id String - Amazon Resource Name (ARN) of the AWS SSM Contact that the contact channel belongs to.
- delivery
Address Property Map - Block that contains contact engagement details. See details below.
- name String
- Name of the contact channel. Must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_
), hyphens (-
), periods (.
), and spaces. - type String
- Type of the contact channel. One of
SMS
,VOICE
orEMAIL
.
Supporting Types
ContactChannelDeliveryAddress, ContactChannelDeliveryAddressArgs
- Simple
Address string - Details to engage this contact channel. The expected format depends on the contact channel type and is described in the
ContactChannelAddress
section of the SSM Contacts API Reference.
- Simple
Address string - Details to engage this contact channel. The expected format depends on the contact channel type and is described in the
ContactChannelAddress
section of the SSM Contacts API Reference.
- simple
Address String - Details to engage this contact channel. The expected format depends on the contact channel type and is described in the
ContactChannelAddress
section of the SSM Contacts API Reference.
- simple
Address string - Details to engage this contact channel. The expected format depends on the contact channel type and is described in the
ContactChannelAddress
section of the SSM Contacts API Reference.
- simple_
address str - Details to engage this contact channel. The expected format depends on the contact channel type and is described in the
ContactChannelAddress
section of the SSM Contacts API Reference.
- simple
Address String - Details to engage this contact channel. The expected format depends on the contact channel type and is described in the
ContactChannelAddress
section of the SSM Contacts API Reference.
Import
Using pulumi import
, import SSM Contact Channel using the ARN
. For example:
$ pulumi import aws:ssmcontacts/contactChannel:ContactChannel example arn:aws:ssm-contacts:us-west-2:123456789012:contact-channel/example
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.