Menu
Amazon Simple Notification Service
CLI Reference (API Version 2010-03-31)

sns-confirm-subscription

The Amazon SNS CLI has been deprecated and is no longer supported. Please use the AWS Unified CLI or the AWS Tools for Windows PowerShell instead. To map the old SNS CLI commands to the AWS Unified CLI or PowerShell, see Migrating Amazon SNS CLI Commands to AWS CLI and PowerShell Commands.

Description

Confirms the subscription of an endpoint to a topic, using the token sent to that endpoint. Once the subscription has been confirmed, each message published to the topic is delivered to the endpoint.

Syntax

Copy
sns-confirm-subscription TopicArn --token value [--authenticate-on-unsubscribe ] [General Options]

Options

Name Description Required

TopicArn

The ARN of the topic for which the endpoint's subscription should be confirmed.

Yes

--token

The confirmation token sent to the endpoint. Tokens are only valid for two hours after issue.

Yes

--authenticate-on-unsubscribe

If the value of this optional parameter is true and the requester's AWS Account ID is the same as the subscriber's, only the topic owner and subscription owner can unsubscribe from the subscription.

No

Output

Returns the subscription ARN.

Example

Example Request

This example confirms a subscription for topic ARN arn:aws:sns:us-east-1:295079676684:Foo with token 51b2ff3edb475b7d91550e0ab6edf.

Copy
sns-confirm-subscription --topic-arn arn:aws:sns:us-east-1:295079676684:Foo --authenticate-on-unsubscribe --token 51b2ff3edb475b7d91550e0ab6edf

Example Response

Copy
arn:aws:sns:us-east-1:295079676684:Foo:c52d81ff-1d86-4dd6-b446-99547b0bdad5