AWS::DMS::EventSubscription - Amazon CloudFormation
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

AWS::DMS::EventSubscription

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

Syntax

To declare this entity in your Amazon 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, Amazon 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 Amazon DMS User Guide.

Required: No

Type: Array 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 Amazon 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: Array of String

Update requires: Replacement

SourceType

The type of Amazon 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 Amazon 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: Array of Tag

Update requires: No interruption

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.

Fn::GetAtt

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