CfnEventSubscriptionProps
Properties for defining a CfnEventSubscription.
| Source | |
|---|---|
| Type last changed |
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_rds as rds } from 'aws-cdk-lib';
const cfnEventSubscriptionProps: rds.CfnEventSubscriptionProps = {
snsTopicArn: 'snsTopicArn',
// the properties below are optional
enabled: false,
eventCategories: ['eventCategories'],
sourceIds: ['sourceIds'],
sourceType: 'sourceType',
subscriptionName: 'subscriptionName',
tags: [{
key: 'key',
value: 'value',
}],
};
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_rds as rds
cfn_event_subscription_props = rds.CfnEventSubscriptionProps(
sns_topic_arn="snsTopicArn",
# the properties below are optional
enabled=False,
event_categories=["eventCategories"],
source_ids=["sourceIds"],
source_type="sourceType",
subscription_name="subscriptionName",
tags=[CfnTag(
key="key",
value="value"
)]
)
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.rds.*;
CfnEventSubscriptionProps cfnEventSubscriptionProps = CfnEventSubscriptionProps.builder()
.snsTopicArn("snsTopicArn")
// the properties below are optional
.enabled(false)
.eventCategories(List.of("eventCategories"))
.sourceIds(List.of("sourceIds"))
.sourceType("sourceType")
.subscriptionName("subscriptionName")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.RDS;
var cfnEventSubscriptionProps = new CfnEventSubscriptionProps {
SnsTopicArn = "snsTopicArn",
// the properties below are optional
Enabled = false,
EventCategories = new [] { "eventCategories" },
SourceIds = new [] { "sourceIds" },
SourceType = "sourceType",
SubscriptionName = "subscriptionName",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
};
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
cfnEventSubscriptionProps := &CfnEventSubscriptionProps{
SnsTopicArn: jsii.String("snsTopicArn"),
// the properties below are optional
Enabled: jsii.Boolean(false),
EventCategories: []*string{
jsii.String("eventCategories"),
},
SourceIds: []interface{}{
jsii.String("sourceIds"),
},
SourceType: jsii.String("sourceType"),
SubscriptionName: jsii.String("subscriptionName"),
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
}
Properties
enabledoptionalboolean | IResolvableenabledoptionaltyping.Union[bool, IResolvable]enabledoptionalBooleanEnabledoptionalboolEnabledoptionalinterface{} = true #If the event notification subscription isn't activated, the subscription is created but not active.
eventCategoriesoptionalstring[]event_categoriesoptionaltyping.List[str]eventCategoriesoptionalList<String>EventCategoriesoptionalstring[]EventCategoriesoptional*[]*string #notes
You can see a list of the categories for a given source type in the "Amazon RDS event categories and event messages" section of the Amazon RDS User Guide or the Amazon Aurora User Guide . You can also see this list by using the DescribeEventCategories operation.
snsTopicArnstring | ITopicRefsns_topic_arntyping.Union[str, ITopicRef]snsTopicArnStringSnsTopicArnstringSnsTopicArninterface{} required #notes
SNS automatically creates the ARN when you create a topic and subscribe to it.
RDS doesn't support FIFO (first in, first out) topics. For more information, see Message ordering and deduplication (FIFO topics) in the Amazon Simple Notification Service Developer Guide .
sourceIdsoptionalstring | IDBClusterRef | IDBInstanceRef[]source_idsoptionaltyping.List[typing.Union[str, IDBClusterRef, IDBInstanceRef]]sourceIdsoptionalList<String>SourceIdsoptionalstring[]SourceIdsoptional*[]interface{} #notes
If not specified, then all sources are included in the response. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens. It can't end with a hyphen or contain two consecutive hyphens.
Constraints:
- If
SourceIdsare supplied,SourceTypemust also be provided. - If the source type is a DB instance, a
DBInstanceIdentifiervalue must be supplied. - If the source type is a DB cluster, a
DBClusterIdentifiervalue must be supplied. - If the source type is a DB parameter group, a
DBParameterGroupNamevalue must be supplied. - If the source type is a DB security group, a
DBSecurityGroupNamevalue must be supplied. - If the source type is a DB snapshot, a
DBSnapshotIdentifiervalue must be supplied. - If the source type is a DB cluster snapshot, a
DBClusterSnapshotIdentifiervalue must be supplied. - If the source type is an RDS Proxy, a
DBProxyNamevalue must be supplied.
sourceTypeoptionalstringsource_typeoptionalstrsourceTypeoptionalStringSourceTypeoptionalstringSourceTypeoptional*string #notes
For example, if you want to be notified of events generated by a DB instance, you set this parameter to db-instance . For RDS Proxy events, specify db-proxy . If this value isn't specified, all events are returned.
Valid Values: db-instance | db-cluster | db-parameter-group | db-security-group | db-snapshot | db-cluster-snapshot | db-proxy | zero-etl | custom-engine-version | blue-green-deployment
subscriptionNameoptionalstringsubscription_nameoptionalstrsubscriptionNameoptionalStringSubscriptionNameoptionalstringSubscriptionNameoptional*string #Constraints: The name must be less than 255 characters.