ContactChannel class
Resource for managing an AWS SSM Contacts Contact Channel.
> NOTE: The contact channel needs to be activated in the AWS Systems Manager console, otherwise it can't be used to engage the contact. See the Contacts section of the Incident Manager User Guide for more information.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.ssmcontacts.ContactChannel("example", {
deliveryAddress: {
simpleAddress: "email@example.com",
},
contactId: "arn:aws:ssm-contacts:us-west-2:123456789012:contact/contactalias",
name: "Example contact channel",
type: "EMAIL",
});
import pulumi
import pulumi_aws as aws
example = aws.ssmcontacts.ContactChannel("example",
delivery_address={
"simple_address": "email@example.com",
},
contact_id="arn:aws:ssm-contacts:us-west-2:123456789012:contact/contactalias",
name="Example contact channel",
type="EMAIL")
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()
{
DeliveryAddress = new Aws.SsmContacts.Inputs.ContactChannelDeliveryAddressArgs
{
SimpleAddress = "email@example.com",
},
ContactId = "arn:aws:ssm-contacts:us-west-2:123456789012:contact/contactalias",
Name = "Example contact channel",
Type = "EMAIL",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/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{
DeliveryAddress: &ssmcontacts.ContactChannelDeliveryAddressArgs{
SimpleAddress: pulumi.String("email@example.com"),
},
ContactId: pulumi.String("arn:aws:ssm-contacts:us-west-2:123456789012:contact/contactalias"),
Name: pulumi.String("Example contact channel"),
Type: pulumi.String("EMAIL"),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_ssmcontacts_contactchannel" "example" {
delivery_address = {
simple_address = "email@example.com"
}
contact_id = "arn:aws:ssm-contacts:us-west-2:123456789012:contact/contactalias"
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.ArrayList;
import java.util.Arrays;
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()
.deliveryAddress(ContactChannelDeliveryAddressArgs.builder()
.simpleAddress("email@example.com")
.build())
.contactId("arn:aws:ssm-contacts:us-west-2:123456789012:contact/contactalias")
.name("Example contact channel")
.type("EMAIL")
.build());
}
}
resources:
example:
type: aws:ssmcontacts:ContactChannel
properties:
deliveryAddress:
simpleAddress: email@example.com
contactId: arn:aws:ssm-contacts:us-west-2:123456789012:contact/contactalias
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", {
deliveryAddress: {
simpleAddress: "email@example.com",
},
contactId: exampleContact.arn,
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",
delivery_address={
"simple_address": "email@example.com",
},
contact_id=example_contact.arn,
name="Example contact channel",
type="EMAIL")
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()
{
DeliveryAddress = new Aws.SsmContacts.Inputs.ContactChannelDeliveryAddressArgs
{
SimpleAddress = "email@example.com",
},
ContactId = exampleContact.Arn,
Name = "Example contact channel",
Type = "EMAIL",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/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{
DeliveryAddress: &ssmcontacts.ContactChannelDeliveryAddressArgs{
SimpleAddress: pulumi.String("email@example.com"),
},
ContactId: exampleContact.Arn,
Name: pulumi.String("Example contact channel"),
Type: pulumi.String("EMAIL"),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_ssmcontacts_contact" "example_contact" {
alias = "example_contact"
type = "PERSONAL"
}
resource "aws_ssmcontacts_contactchannel" "example" {
delivery_address = {
simple_address = "email@example.com"
}
contact_id = aws_ssmcontacts_contact.example_contact.arn
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.ArrayList;
import java.util.Arrays;
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()
.deliveryAddress(ContactChannelDeliveryAddressArgs.builder()
.simpleAddress("email@example.com")
.build())
.contactId(exampleContact.arn())
.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:
deliveryAddress:
simpleAddress: email@example.com
contactId: ${exampleContact.arn}
name: Example contact channel
type: EMAIL
Import
Identity Schema
Required
arn(String) ARN of the contact channel.
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
Constructors
- ContactChannel(String name, {ContactChannelArgs? args, CustomResourceOptions? options})
-
Creates a new ContactChannel.
nameThe Pulumi resource name.argsArguments used to configure this ContactChannel. The set of arguments for ContactChannel.optionsResource options controlling this resource's behavior. - ContactChannel.reference(String urn)
- Creates a typed reference to an existing ContactChannel resource.
Properties
-
activationStatus
↔ Output<
String> -
Whether the contact channel is activated. The contact channel must be activated to use it to engage the contact. One of
ACTIVATEDorNOT_ACTIVATED.latefinal -
arn
↔ Output<
String> -
ARN of the contact channel.
latefinal
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
contactId
↔ Output<
String> -
ARN of the AWS SSM Contact that the contact channel belongs to.
latefinal
-
deliveryAddress
↔ Output<
ContactChannelDeliveryAddress> -
Block that contains contact engagement details. See details below.
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
-
id
↔ Output<
String> -
getter/setter pairinherited
- isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
name
↔ Output<
String> -
Name of the contact channel. Must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_), hyphens (-), periods (.), and spaces.latefinal -
region
↔ Output<
String> -
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
type
↔ Output<
String> -
Type of the contact channel. One of
SMS,VOICEorEMAIL.latefinal -
urn
↔ Output<
String> -
latefinalinherited
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
get(
String name, Input< String> id, {ContactChannelState? state, CustomResourceOptions? options}) → ContactChannel -
Gets an existing ContactChannel resource's state with the given
nameandid.