AWS::DMS::EventSubscription - AWS CloudFormation

AWS::DMS::EventSubscription

Use the AWS::DMS::EventSubscription resource to get notifications for AWS Database Migration Service events through the Amazon Simple Notification Service. For more information, see Using AWS DMS Event Notification in the AWS Database Migration Service User Guide.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::DMS::EventSubscription", "Properties" : { "Enabled" : Boolean, "EventCategories" : [ String, ... ], "SnsTopicArn" : String, "SourceIds" : [ String, ... ], "SourceType" : String, "SubscriptionName" : String, "Tags" : [ Tag, ... ] } }

YAML

Type: AWS::DMS::EventSubscription Properties: Enabled: Boolean EventCategories: - String SnsTopicArn: String SourceIds: - String SourceType: String SubscriptionName: String Tags: - Tag

Properties

Enabled

Indicates whether to activate the subscription. If you don't specify this property, AWS CloudFormation activates the subscription.

Required: No

Type: Boolean

Update requires: No interruption

EventCategories

A list of event categories for a source type that you want to subscribe to. If you don't specify this property, you are notified about all event categories. For more information, see Working with Events and Notifications in the AWS DMS User Guide.

Required: No

Type: List of String

Update requires: No interruption

SnsTopicArn

The Amazon Resource Name (ARN) of the Amazon SNS topic created for event notification. The ARN is created by Amazon SNS when you create a topic and subscribe to it.

Required: Yes

Type: String

Update requires: No interruption

SourceIds

A list of identifiers for which AWS DMS provides notification events.

If you don't specify a value, notifications are provided for all sources.

If you specify multiple values, they must be of the same type. For example, if you specify a database instance ID, then all of the other values must be database instance IDs.

Required: No

Type: List of String

Update requires: Replacement

SourceType

The type of AWS DMS resource that generates the events. For example, if you want to be notified of events generated by a replication instance, you set this parameter to replication-instance. If this value isn't specified, all events are returned.

Valid values: replication-instance | replication-task

Required: No

Type: String

Update requires: No interruption

SubscriptionName

The name of the AWS DMS event notification subscription. This name must be less than 255 characters.

Required: No

Type: String

Update requires: Replacement

Tags

One or more tags to be assigned to the event subscription.

Required: No

Type: List of Tag

Update requires: Replacement

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the resource name. For example:

{ "Ref": "myEventSubscription" }

For more information about using the Ref function, see Ref.

Examples

The following snippet creates an event subscription for an existing replication instance rep-instance-1, which is declared elsewhere in the same template.

JSON

{ "AWSTemplateFormatVersion": "2010-09-09", "Resources": { "myEventSubscription": { "Type": "AWS::DMS::EventSubscription", "Properties": { "EventCategories": [ "configuration change", "failure", "deletion" ], "SnsTopicArn": "arn:aws:sns:us-west-2:123456789012:example-topic", "SourceIds": [ "rep-instance-1" ], "SourceType": "replication-instance", "Enabled": false } } } }

YAML

AWSTemplateFormatVersion: 2010-09-09 Resources: myEventSubscription: Properties: Enabled: false EventCategories: - "configuration change" - failure - deletion SnsTopicArn: "arn:aws:sns:us-west-2:123456789012:example-topic" SourceIds: - rep-instance-1 SourceType: replication-instance Type: "AWS::DMS::EventSubscription"

See also