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

sns-set-subscription-attributes

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

Sets a new value on an attribute of a subscription.

Syntax

Copy
sns-set-subscription-attributes SubscriptionArn --attribute-name value [--attribute-value value ] [General Options]

Options

Name Description Required

SubscriptionArn

The ARN of the subscription whose attributes you want to return.

Yes

attribute-name

The name of the subscription attribute to modify. Currently, you can specify only DeliveryPolicy.

Yes

attribute-value

The new value for the subscription attribute. For DeliveryPolicy, this is a delivery policy in JSON format.

Yes

Output

Returns a message stating that the attribute was set.

Examples

Example Request

This example sets the DeliveryPolicy attribute to the delivery policy {"healthyRetryPolicy":{"numRetries":5}} for a subscription with ARN arn:aws:sns:us-east-1:123456789012:MyTopic:b3a77e54-00fb-460b-8fe8-5100a30a2d9d.

Copy
$PROMPT> sns-set-subscription-attributes arn:aws:sns:us-east-1:123456789012:MyTopic:b3a77e54-00fb-460b-8fe8-5100a30a2d9d --attribute-name DeliveryPolicy --attribute-value {"healthyRetryPolicy":{"numRetries":5}}

Example Response

Copy
Attribute set.