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::RDS::EventSubscription`` resource allows you to receive notifications for Amazon Relational Database Service events through the Amazon Simple Notification Service (Amazon SNS). For more information, see [Using Amazon RDS Event Notification](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html) in the *Amazon RDS User Guide*.
Idawscc.rds.event_subscriptions

Fields

NameDatatypeDescription
tagsarrayAn optional array of key-value pairs to apply to this subscription.
subscription_namestringThe name of the subscription.<br />Constraints: The name must be less than 255 characters.
enabledbooleanSpecifies whether to activate the subscription. If the event notification subscription isn't activated, the subscription is created but not active.
event_categoriesarrayA list of event categories for a particular source type (&#96;&#96;SourceType&#96;&#96;) that you want to subscribe to. 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 &#91;Amazon RDS User Guide&#93;(https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER&#95;Events.Messages.html) or the &#91;Amazon Aurora User Guide&#93;(https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER&#95;Events.Messages.html). You can also see this list by using the &#96;&#96;DescribeEventCategories&#96;&#96; operation.
sns_topic_arnstringThe Amazon Resource Name (ARN) of the SNS topic created for event notification. SNS automatically creates the ARN when you create a topic and subscribe to it.<br />RDS doesn't support FIFO (first in, first out) topics. For more information, see &#91;Message ordering and deduplication (FIFO topics)&#93;(https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html) in the &#42;Amazon Simple Notification Service Developer Guide&#42;.
source_idsarrayThe list of identifiers of the event sources for which events are returned. 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.<br />Constraints:<br />+ If &#96;&#96;SourceIds&#96;&#96; are supplied, &#96;&#96;SourceType&#96;&#96; must also be provided.<br />+ If the source type is a DB instance, a &#96;&#96;DBInstanceIdentifier&#96;&#96; value must be supplied.<br />+ If the source type is a DB cluster, a &#96;&#96;DBClusterIdentifier&#96;&#96; value must be supplied.<br />+ If the source type is a DB parameter group, a &#96;&#96;DBParameterGroupName&#96;&#96; value must be supplied.<br />+ If the source type is a DB security group, a &#96;&#96;DBSecurityGroupName&#96;&#96; value must be supplied.<br />+ If the source type is a DB snapshot, a &#96;&#96;DBSnapshotIdentifier&#96;&#96; value must be supplied.<br />+ If the source type is a DB cluster snapshot, a &#96;&#96;DBClusterSnapshotIdentifier&#96;&#96; value must be supplied.<br />+ If the source type is an RDS Proxy, a &#96;&#96;DBProxyName&#96;&#96; value must be supplied.
source_typestringThe type of source that is generating the events. For example, if you want to be notified of events generated by a DB instance, you set this parameter to &#96;&#96;db-instance&#96;&#96;. For RDS Proxy events, specify &#96;&#96;db-proxy&#96;&#96;. If this value isn't specified, all events are returned.<br />Valid Values:&#96;&#96;db-instance &#124; db-cluster &#124; db-parameter-group &#124; db-security-group &#124; db-snapshot &#124; db-cluster-snapshot &#124; db-proxy &#124; zero-etl &#124; custom-engine-version &#124; blue-green-deployment&#96;&#96;
regionstringAWS region.

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

Methods

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

SELECT examples

Gets all properties from an individual event_subscription.

SELECT
region,
tags,
subscription_name,
enabled,
event_categories,
sns_topic_arn,
source_ids,
source_type
FROM awscc.rds.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 awscc.rds.event_subscriptions (
SnsTopicArn,
region
)
SELECT
'{{ SnsTopicArn }}',
'{{ region }}';

DELETE example

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

Permissions

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

Create

iam:CreateServiceLinkedRole,
rds:CreateEventSubscription,
rds:DescribeEventSubscriptions,
rds:ListTagsForResource,
rds:AddTagsToResource,
rds:RemoveTagsFromResource

Read

rds:DescribeEventSubscriptions,
rds:ListTagsForResource

Update

rds:ModifyEventSubscription,
rds:AddSourceIdentifierToSubscription,
rds:RemoveSourceIdentifierFromSubscription,
rds:DescribeEventSubscriptions,
rds:ListTagsForResource,
rds:AddTagsToResource,
rds:RemoveTagsFromResource

Delete

rds:DeleteEventSubscription,
rds:DescribeEventSubscriptions

List

rds:DescribeEventSubscriptions