Class CfnEventSubscription
Creates an Amazon DocumentDB event notification subscription.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.DocDB
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnEventSubscription : CfnResource, IInspectable
Syntax (vb)
Public Class CfnEventSubscription Inherits CfnResource Implements IInspectable
Remarks
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.
CloudformationResource: AWS::DocDB::EventSubscription
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.DocDB;
var cfnEventSubscription = new CfnEventSubscription(this, "MyCfnEventSubscription", new CfnEventSubscriptionProps {
SnsTopicArn = "snsTopicArn",
// the properties below are optional
Enabled = false,
EventCategories = new [] { "eventCategories" },
SourceIds = new [] { "sourceIds" },
SourceType = "sourceType",
SubscriptionName = "subscriptionName"
});
Synopsis
Constructors
CfnEventSubscription(Construct, string, ICfnEventSubscriptionProps) | Creates an Amazon DocumentDB event notification subscription. |
Properties
AttrId | Creates an Amazon DocumentDB event notification subscription. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | Creates an Amazon DocumentDB event notification subscription. |
Enabled | A Boolean value; |
EventCategories | A list of event categories for a |
SnsTopicArn | The Amazon Resource Name (ARN) of the SNS topic created for event notification. |
SourceIds | The list of identifiers of the event sources for which events are returned. |
SourceType | The type of source that is generating the events. |
SubscriptionName | The name of the subscription. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<string, object>) | Creates an Amazon DocumentDB event notification subscription. |
Constructors
CfnEventSubscription(Construct, string, ICfnEventSubscriptionProps)
Creates an Amazon DocumentDB event notification subscription.
public CfnEventSubscription(Construct scope, string id, ICfnEventSubscriptionProps props)
Parameters
- scope Construct
Scope in which this resource is defined.
- id string
Construct identifier for this resource (unique in its scope).
- props ICfnEventSubscriptionProps
Resource properties.
Remarks
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.
CloudformationResource: AWS::DocDB::EventSubscription
ExampleMetadata: fixture=_generated
Properties
AttrId
Creates an Amazon DocumentDB event notification subscription.
public virtual string AttrId { get; }
Property Value
Remarks
CloudformationAttribute: Id
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
Remarks
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.
CloudformationResource: AWS::DocDB::EventSubscription
ExampleMetadata: fixture=_generated
CfnProperties
Creates an Amazon DocumentDB event notification subscription.
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
Overrides
Remarks
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.
CloudformationResource: AWS::DocDB::EventSubscription
ExampleMetadata: fixture=_generated
Enabled
A Boolean value;
public virtual object? Enabled { get; set; }
Property Value
Remarks
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.
CloudformationResource: AWS::DocDB::EventSubscription
ExampleMetadata: fixture=_generated
EventCategories
A list of event categories for a SourceType
that you want to subscribe to.
public virtual string[]? EventCategories { get; set; }
Property Value
string[]
Remarks
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.
CloudformationResource: AWS::DocDB::EventSubscription
ExampleMetadata: fixture=_generated
SnsTopicArn
The Amazon Resource Name (ARN) of the SNS topic created for event notification.
public virtual string SnsTopicArn { get; set; }
Property Value
Remarks
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.
CloudformationResource: AWS::DocDB::EventSubscription
ExampleMetadata: fixture=_generated
SourceIds
The list of identifiers of the event sources for which events are returned.
public virtual string[]? SourceIds { get; set; }
Property Value
string[]
Remarks
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.
CloudformationResource: AWS::DocDB::EventSubscription
ExampleMetadata: fixture=_generated
SourceType
The type of source that is generating the events.
public virtual string? SourceType { get; set; }
Property Value
Remarks
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.
CloudformationResource: AWS::DocDB::EventSubscription
ExampleMetadata: fixture=_generated
SubscriptionName
The name of the subscription.
public virtual string? SubscriptionName { get; set; }
Property Value
Remarks
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.
CloudformationResource: AWS::DocDB::EventSubscription
ExampleMetadata: fixture=_generated
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
Remarks
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.
CloudformationResource: AWS::DocDB::EventSubscription
ExampleMetadata: fixture=_generated
RenderProperties(IDictionary<string, object>)
Creates an Amazon DocumentDB event notification subscription.
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props IDictionary<string, object>
Returns
Overrides
Remarks
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.
CloudformationResource: AWS::DocDB::EventSubscription
ExampleMetadata: fixture=_generated