class CfnEventSubscriptionPropsMixin
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.DocDB.Mixins.CfnEventSubscriptionPropsMixin |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awsdocdb/mixins#CfnEventSubscriptionPropsMixin |
Java | software.amazon.awscdk.mixins.preview.services.docdb.mixins.CfnEventSubscriptionPropsMixin |
Python | aws_cdk.mixins_preview.aws_docdb.mixins.CfnEventSubscriptionPropsMixin |
TypeScript | @aws-cdk/mixins-preview » aws_docdb » mixins » CfnEventSubscriptionPropsMixin |
Implements
IMixin
Extends
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.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { mixins } from '@aws-cdk/mixins-preview';
import { mixins as docdb_mixins } from '@aws-cdk/mixins-preview/aws-docdb';
const cfnEventSubscriptionPropsMixin = new docdb_mixins.CfnEventSubscriptionPropsMixin({
enabled: false,
eventCategories: ['eventCategories'],
snsTopicArn: 'snsTopicArn',
sourceIds: ['sourceIds'],
sourceType: 'sourceType',
subscriptionName: 'subscriptionName',
}, /* all optional props */ {
strategy: mixins.PropertyMergeStrategy.OVERRIDE,
});
Initializer
new CfnEventSubscriptionPropsMixin(props: CfnEventSubscriptionMixinProps, options?: CfnPropertyMixinOptions)
Parameters
- props
Cfn— L1 properties to apply.Event Subscription Mixin Props - options
Cfn— Mixin options.Property Mixin Options
Create a mixin to apply properties to AWS::DocDB::EventSubscription.
Properties
| Name | Type | Description |
|---|---|---|
| props | Cfn | |
| strategy | Property | |
| static CFN_PROPERTY_KEYS | string[] |
props
Type:
Cfn
strategy
Type:
Property
static CFN_PROPERTY_KEYS
Type:
string[]
Methods
| Name | Description |
|---|---|
| apply | Apply the mixin properties to the construct. |
| supports(construct) | Check if this mixin supports the given construct. |
applyTo(construct)
public applyTo(construct: IConstruct): IConstruct
Parameters
- construct
IConstruct
Returns
Apply the mixin properties to the construct.
supports(construct)
public supports(construct: IConstruct): boolean
Parameters
- construct
IConstruct
Returns
boolean
Check if this mixin supports the given construct.

.NET
Go
Java
Python
TypeScript