CfnEventSubscriptionPropsMixin

class aws_cdk.mixins_preview.aws_docdb.mixins.CfnEventSubscriptionPropsMixin(props, *, strategy=None)

Bases: Mixin

Creates an Amazon DocumentDB event notification subscription.

This action requires a topic Amazon Resource Name (ARN) created by using the Amazon DocumentDB console, the Amazon SNS console, or the Amazon SNS API. To obtain an ARN with Amazon SNS, you must create a topic in Amazon SNS and subscribe to the topic. The ARN is displayed in the Amazon SNS console.

You can specify the type of source ( SourceType ) that you want to be notified of. You can also provide a list of Amazon DocumentDB sources ( SourceIds ) that trigger the events, and you can provide a list of event categories ( EventCategories ) for events that you want to be notified of. For example, you can specify SourceType = db-instance , SourceIds = mydbinstance1, mydbinstance2 and EventCategories = Availability, Backup .

If you specify both the SourceType and SourceIds (such as SourceType = db-instance and SourceIdentifier = myDBInstance1 ), you are notified of all the db-instance events for the specified source. If you specify a SourceType but do not specify a SourceIdentifier , you receive notice of the events for that source type for all your Amazon DocumentDB sources. If you do not specify either the SourceType or the SourceIdentifier , you are notified of events generated from all Amazon DocumentDB sources belonging to your customer account.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-eventsubscription.html

CloudformationResource:

AWS::DocDB::EventSubscription

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_docdb import mixins as docdb_mixins

cfn_event_subscription_props_mixin = docdb_mixins.CfnEventSubscriptionPropsMixin(docdb_mixins.CfnEventSubscriptionMixinProps(
    enabled=False,
    event_categories=["eventCategories"],
    sns_topic_arn="snsTopicArn",
    source_ids=["sourceIds"],
    source_type="sourceType",
    subscription_name="subscriptionName"
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::DocDB::EventSubscription.

Parameters:

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['enabled', 'eventCategories', 'snsTopicArn', 'sourceIds', 'sourceType', 'subscriptionName']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental