Skip to main content

subscriptions

Creates, updates, deletes, gets or lists a subscriptions resource.

Overview

Namesubscriptions
TypeResource
Idaws.sns.subscriptions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
endpointstringThe subscription's endpoint (format depends on the protocol).
ownerstringThe subscription's owner.
protocolstringThe subscription's protocol.
subscription_arnstringThe subscription's ARN.
topic_arnstringThe ARN of the subscription's topic.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_subscriptionsselectregionNextTokenReturns a list of the requester's subscriptions. Each call returns a limited list of subscriptions, up to 100. If there are more subscriptions, a NextToken is also returned. Use the NextToken parameter in a new ListSubscriptions call to get further results. This action is throttled at 30 transactions per second (TPS).
unsubscribeexecSubscriptionArn, regionDeletes a subscription. If the subscription requires authentication for deletion, only the owner of the subscription or the topic's owner can unsubscribe, and an Amazon Web Services signature is required. If the Unsubscribe call does not require authentication and the requester is not the subscription owner, a final cancellation message is delivered to the endpoint, so that the endpoint owner can easily resubscribe to the topic if the Unsubscribe request was unintended. This action is throttled at 100 transactions per second (TPS).

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
SubscriptionArnstringThe ARN of the subscription to be deleted.
regionstringAWS region (default: us-east-1)
NextTokenstringToken returned by the previous ListSubscriptions request.

SELECT examples

Returns a list of the requester's subscriptions. Each call returns a limited list of subscriptions, up to 100. If there are more subscriptions, a NextToken is also returned. Use the NextToken parameter in a new ListSubscriptions call to get further results. This action is throttled at 30 transactions per second (TPS).

SELECT
endpoint,
owner,
protocol,
subscription_arn,
topic_arn
FROM aws.sns.subscriptions
WHERE region = '{{ region }}' -- required
AND NextToken = '{{ NextToken }}'
;

Lifecycle Methods

Deletes a subscription. If the subscription requires authentication for deletion, only the owner of the subscription or the topic's owner can unsubscribe, and an Amazon Web Services signature is required. If the Unsubscribe call does not require authentication and the requester is not the subscription owner, a final cancellation message is delivered to the endpoint, so that the endpoint owner can easily resubscribe to the topic if the Unsubscribe request was unintended. This action is throttled at 100 transactions per second (TPS).

EXEC aws.sns.subscriptions.unsubscribe
@SubscriptionArn='{{ SubscriptionArn }}' --required,
@region='{{ region }}' --required
;