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.
Idaws.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.

Methods

NameAccessible byRequired Params
create_resourceINSERTSubscriptionName, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all event_subscriptions in a region.

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 aws.redshift.event_subscriptions
WHERE region = 'us-east-1';

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 aws.redshift.event_subscriptions
WHERE region = 'us-east-1' AND data__Identifier = '<SubscriptionName>';

INSERT example

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

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

DELETE example

/*+ delete */
DELETE FROM aws.redshift.event_subscriptions
WHERE data__Identifier = '<SubscriptionName>'
AND region = 'us-east-1';

Permissions

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

Read

redshift:DescribeEventSubscriptions,
redshift:DescribeTags

Create

redshift:CreateEventSubscription,
redshift:CreateTags,
redshift:DescribeTags,
redshift:DescribeEventSubscriptions

Update

redshift:ModifyEventSubscription,
redshift:CreateTags,
redshift:DescribeTags,
redshift:DescribeEventSubscriptions,
redshift:DeleteTags

List

redshift:DescribeTags,
redshift:DescribeEventSubscriptions

Delete

redshift:DescribeEventSubscriptions,
redshift:DeleteEventSubscription,
redshift:DescribeTags,
redshift:DeleteTags