subscriptions
Creates, updates, deletes, gets or lists a subscriptions resource.
Overview
| Name | subscriptions |
| Type | Resource |
| Id | aws.sns.subscriptions |
Fields
The following fields are returned by SELECT queries:
- list_subscriptions
| Name | Datatype | Description |
|---|---|---|
endpoint | string | The subscription's endpoint (format depends on the protocol). |
owner | string | The subscription's owner. |
protocol | string | The subscription's protocol. |
subscription_arn | string | The subscription's ARN. |
topic_arn | string | The ARN of the subscription's topic. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_subscriptions | select | region | NextToken | 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). |
unsubscribe | exec | SubscriptionArn, region | 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). |
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.
| Name | Datatype | Description |
|---|---|---|
SubscriptionArn | string | The ARN of the subscription to be deleted. |
region | string | AWS region (default: us-east-1) |
NextToken | string | Token returned by the previous ListSubscriptions request. |
SELECT examples
- list_subscriptions
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
- unsubscribe
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
;