Resource: awsRedshiftEventSubscription
Provides a Redshift event subscription resource.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsRedshiftClusterDefault = new aws.redshiftCluster.RedshiftCluster(
this,
"default",
{
clusterIdentifier: "default",
databaseName: "default",
}
);
const awsSnsTopicDefault = new aws.snsTopic.SnsTopic(this, "default_1", {
name: "redshift-events",
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsSnsTopicDefault.overrideLogicalId("default");
const awsRedshiftEventSubscriptionDefault =
new aws.redshiftEventSubscription.RedshiftEventSubscription(
this,
"default_2",
{
eventCategories: [
"configuration",
"management",
"monitoring",
"security",
],
name: "redshift-event-sub",
severity: "INFO",
snsTopicArn: awsSnsTopicDefault.arn,
sourceIds: [awsRedshiftClusterDefault.id],
sourceType: "cluster",
tags: {
Name: "default",
},
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsRedshiftEventSubscriptionDefault.overrideLogicalId("default");
Argument Reference
The following arguments are supported:
name
- (Required) The name of the Redshift event subscription.snsTopicArn
- (Required) The ARN of the SNS topic to send events to.sourceIds
- (Optional) A list of identifiers of the event sources for which events will be returned. If not specified, then all sources are included in the response. If specified, asourceType
must also be specified.sourceType
- (Optional) The type of source that will be generating the events. Valid options arecluster
,clusterParameterGroup
,clusterSecurityGroup
,clusterSnapshot
, orscheduledAction
. If not set, all sources will be subscribed to.severity
- (Optional) The event severity to be published by the notification subscription. Valid options areinfo
orerror
. Default value ofinfo
.eventCategories
- (Optional) A list of event categories for a SourceType that you want to subscribe to. See https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-event-notifications.html or runawsRedshiftDescribeEventCategories
.enabled
- (Optional) A boolean flag to enable/disable the subscription. Defaults totrue
.tags
- (Optional) A map of tags to assign to the resource. If configured with a providerdefaultTags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
arn
- Amazon Resource Name (ARN) of the Redshift event notification subscriptionid
- The name of the Redshift event notification subscriptioncustomerAwsId
- The AWS customer account associated with the Redshift event notification subscriptiontagsAll
- A map of tags assigned to the resource, including those inherited from the providerdefaultTags
configuration block.
Import
Redshift Event Subscriptions can be imported using the name
, e.g.,