Skip to content
v2.278.0

CfnEventSubscriptionProps Struct ​

Properties for defining a CfnEventSubscription.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_redshift as redshift } from 'aws-cdk-lib';
const cfnEventSubscriptionProps: redshift.CfnEventSubscriptionProps = {
  subscriptionName: 'subscriptionName',

  // the properties below are optional
  enabled: false,
  eventCategories: ['eventCategories'],
  severity: 'severity',
  snsTopicArn: 'snsTopicArn',
  sourceIds: ['sourceIds'],
  sourceType: 'sourceType',
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
python
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_redshift as redshift

cfn_event_subscription_props = redshift.CfnEventSubscriptionProps(
    subscription_name="subscriptionName",

    # the properties below are optional
    enabled=False,
    event_categories=["eventCategories"],
    severity="severity",
    sns_topic_arn="snsTopicArn",
    source_ids=["sourceIds"],
    source_type="sourceType",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.redshift.*;

CfnEventSubscriptionProps cfnEventSubscriptionProps = CfnEventSubscriptionProps.builder()
        .subscriptionName("subscriptionName")

        // the properties below are optional
        .enabled(false)
        .eventCategories(List.of("eventCategories"))
        .severity("severity")
        .snsTopicArn("snsTopicArn")
        .sourceIds(List.of("sourceIds"))
        .sourceType("sourceType")
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .build();
csharp
// 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.Redshift;

var cfnEventSubscriptionProps = new CfnEventSubscriptionProps {
    SubscriptionName = "subscriptionName",

    // the properties below are optional
    Enabled = false,
    EventCategories = new [] { "eventCategories" },
    Severity = "severity",
    SnsTopicArn = "snsTopicArn",
    SourceIds = new [] { "sourceIds" },
    SourceType = "sourceType",
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
go
// 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{
	SubscriptionName: jsii.String("subscriptionName"),

	// the properties below are optional
	Enabled: jsii.Boolean(false),
	EventCategories: []*string{
		jsii.String("eventCategories"),
	},
	Severity: jsii.String("severity"),
	SnsTopicArn: jsii.String("snsTopicArn"),
	SourceIds: []*string{
		jsii.String("sourceIds"),
	},
	SourceType: jsii.String("sourceType"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}

Properties ​

enabledoptionalboolean | IResolvableenabledoptionaltyping.Union[bool, IResolvable]enabledoptionalBooleanEnabledoptionalboolEnabledoptionalinterface{} #
A boolean value;

set to true to activate the subscription, and set to false to create the subscription but not activate it.

eventCategoriesoptionalstring[]event_categoriesoptionaltyping.List[str]eventCategoriesoptionalList<String>EventCategoriesoptionalstring[]EventCategoriesoptional*[]*string #
Specifies the Amazon Redshift event categories to be published by the event notification subscription.

Values: configuration, management, monitoring, security, pending

severityoptionalstringseverityoptionalstrseverityoptionalStringSeverityoptionalstringSeverityoptional*string #
Specifies the Amazon Redshift event severity to be published by the event notification subscription.

Values: ERROR, INFO

snsTopicArnoptionalstring | ITopicRefsns_topic_arnoptionaltyping.Union[str, ITopicRef]snsTopicArnoptionalStringSnsTopicArnoptionalstringSnsTopicArnoptionalinterface{} #
The Amazon Resource Name (ARN) of the Amazon SNS topic used to transmit the event notifications.

The ARN is created by Amazon SNS when you create a topic and subscribe to it.

sourceIdsoptionalstring[]source_idsoptionaltyping.List[str]sourceIdsoptionalList<String>SourceIdsoptionalstring[]SourceIdsoptional*[]*string #
A list of one or more identifiers of Amazon Redshift source objects.
notes

All of the objects must be of the same type as was specified in the source type parameter. The event subscription will return only events generated by the specified objects. If not specified, then events are returned for all objects within the source type specified.

Example: my-cluster-1, my-cluster-2

Example: my-snapshot-20131010

sourceTypeoptionalstringsource_typeoptionalstrsourceTypeoptionalStringSourceTypeoptionalstringSourceTypeoptional*string #
The type of source that will be generating the events.
notes

For example, if you want to be notified of events generated by a cluster, you would set this parameter to cluster. If this value is not specified, events are returned for all Amazon Redshift objects in your AWS account . You must specify a source type in order to specify source IDs.

Valid values: cluster, cluster-parameter-group, cluster-security-group, cluster-snapshot, and scheduled-action.

subscriptionNamestringsubscription_namestrsubscriptionNameStringSubscriptionNamestringSubscriptionName*string required #
The name of the event subscription to be created.

Constraints:

  • Cannot be null, empty, or blank.
  • Must contain from 1 to 255 alphanumeric characters or hyphens.
  • First character must be a letter.
  • Cannot end with a hyphen or contain two consecutive hyphens.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
A list of tag instances.