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.
Topics
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" : [Resource Tag, ...] } }
YAML
Type: AWS::DMS::EventSubscription Properties: Enabled:BooleanEventCategories: -StringSnsTopicArn:StringSourceIds: -StringSourceType:StringSubscriptionName: -StringTags: -Resource 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 that you want to subscribe to for a given source type. If you don't specify this property, you are notified about all event categories. For more information, see Using AWS DMS Event Notification in the AWS Database Migration Service User Guide.
Required: No
Type: List of String values
Update requires: No interruption
SnsTopicArn-
The Amazon Resource Name (ARN) of an Amazon SNS topic that you want to send event notifications to.
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, all other values must be database instance IDs.
Required: No
Type: List of String values
Update requires: Replacement
SourceType-
The type of source for which AWS DMS provides notification events. For example, if you want to be notified of events generated by a database instance, set this parameter to
replication-instance. If you don't specify a value, notifications are provided for all source types. For valid values, see theSourceTypeparameter for the CreateEventSubscription action in the AWS Database Migration Service API Reference.Required: Conditional. If you specify the
SourceIdsorEventCategoriesproperty, you must specify this property.Type: String
Update requires: No interruption
SubscriptionName-
The subscription name.
If you don't specify a value, we create a random value.
Required: No
Type: List of String values
Update requires: Replacement
Tags-
The tags that you want to attach to the DMS event subscription.
Required: No
Type: List of resource tags in key-value format
Update requires: Replacement
Return Value
When the logical ID of this resource is provided to the Ref intrinsic
function, Ref returns the resource name. For example:
{ "Ref": "myEventSubscription" }
For the resource with the logical ID myEventSubscription,
Ref returns the AWS DMS event subscription name, such as:
mystack-myEventSubscription-1DDYF1E3B3I.
For more information about using the Ref function, see Ref.
Example
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: 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
