Skip to main content

event_subscriptions

Creates, updates, deletes or gets an event_subscription resource or lists event_subscriptions in a region

Overview

Nameevent_subscriptions
TypeResource
DescriptionThe `AWS::Redshift::EventSubscription` resource creates an Amazon Redshift Event Subscription.
Idawscc.redshift.event_subscriptions

Fields

NameDatatypeDescription
statusstringThe status of the Amazon Redshift event notification subscription.
cust_subscription_idstringThe name of the Amazon Redshift event notification subscription.
event_categories_listarrayThe list of Amazon Redshift event categories specified in the event notification subscription.
source_typestringThe type of source that will be generating the events.
event_categoriesarraySpecifies the Amazon Redshift event categories to be published by the event notification subscription.
enabledbooleanA boolean value; set to true to activate the subscription, and set to false to create the subscription but not activate it.
severitystringSpecifies the Amazon Redshift event severity to be published by the event notification subscription.
subscription_namestringThe name of the Amazon Redshift event notification subscription
source_idsarrayA list of one or more identifiers of Amazon Redshift source objects.
customer_aws_idstringThe AWS account associated with the Amazon Redshift event notification subscription.
source_ids_listarrayA list of the sources that publish events to the Amazon Redshift event notification subscription.
sns_topic_arnstringThe Amazon Resource Name (ARN) of the Amazon SNS topic used to transmit the event notifications.
subscription_creation_timestringThe date and time the Amazon Redshift event notification subscription was created.
tagsarrayAn array of key-value pairs to apply to this resource.
regionstringAWS region.

For more information, see AWS::Redshift::EventSubscription.

Methods

NameResourceAccessible byRequired Params
create_resourceevent_subscriptionsINSERTSubscriptionName, region
delete_resourceevent_subscriptionsDELETEIdentifier, region
update_resourceevent_subscriptionsUPDATEIdentifier, PatchDocument, region
list_resourcesevent_subscriptions_list_onlySELECTregion
get_resourceevent_subscriptionsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual event_subscription.

SELECT
region,
status,
cust_subscription_id,
event_categories_list,
source_type,
event_categories,
enabled,
severity,
subscription_name,
source_ids,
customer_aws_id,
source_ids_list,
sns_topic_arn,
subscription_creation_time,
tags
FROM awscc.redshift.event_subscriptions
WHERE
region = 'us-east-1' AND
Identifier = '{{ subscription_name }}';

INSERT example

Use the following StackQL query and manifest file to create a new event_subscription resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.redshift.event_subscriptions (
SubscriptionName,
region
)
SELECT
'{{ subscription_name }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a event_subscription resource, using stack-deploy.

/*+ update */
UPDATE awscc.redshift.event_subscriptions
SET PatchDocument = string('{{ {
"SourceType": source_type,
"EventCategories": event_categories,
"Enabled": enabled,
"Severity": severity,
"SourceIds": source_ids,
"SnsTopicArn": sns_topic_arn,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ subscription_name }}';

DELETE example

/*+ delete */
DELETE FROM awscc.redshift.event_subscriptions
WHERE
Identifier = '{{ subscription_name }}' AND
region = 'us-east-1';

Permissions

To operate on the event_subscriptions resource, the following permissions are required:

redshift:DescribeEventSubscriptions,
redshift:DescribeTags