CfnEventSubscriptionPropsMixin
- class aws_cdk.mixins_preview.aws_docdb.mixins.CfnEventSubscriptionPropsMixin(props, *, strategy=None)
Bases:
MixinCreates 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 specifySourceType = db-instance,SourceIds = mydbinstance1, mydbinstance2andEventCategories = Availability, Backup.If you specify both the
SourceTypeandSourceIds(such asSourceType = db-instanceandSourceIdentifier = myDBInstance1), you are notified of all thedb-instanceevents for the specified source. If you specify aSourceTypebut do not specify aSourceIdentifier, you receive notice of the events for that source type for all your Amazon DocumentDB sources. If you do not specify either theSourceTypeor theSourceIdentifier, you are notified of events generated from all Amazon DocumentDB sources belonging to your customer account.- See:
- 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:
props (
Union[CfnEventSubscriptionMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- 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
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental