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


Allows a topic owner to set an attribute of the topic to a new value.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.


The name of the attribute you want to set. Only a subset of the topic's attributes are mutable.

Valid values: Policy | DisplayName | DeliveryPolicy

Type: String

Required: Yes


The new value for the attribute.

Type: String

Required: No


The ARN of the topic to modify.

Type: String

Required: Yes


For information about the errors that are common to all actions, see Common Errors.


Indicates that the user has been denied access to the requested resource.

HTTP Status Code: 403


Indicates an internal service error.

HTTP Status Code: 500


Indicates that a request parameter does not comply with the associated constraints.

HTTP Status Code: 400


Indicates that the requested resource does not exist.

HTTP Status Code: 404



Sample Request

The following example sets the DisplayName attribute to MyTopicName ?AttributeValue=MyTopicName &TopicArn=arn%3Aaws%3Asns%3Aus-east-1%3A123456789012%3AMy-Topic &AttributeName=DisplayName &Action=SetTopicAttributes &SignatureVersion=2 &SignatureMethod=HmacSHA256 &Timestamp=2010-03-31T12%3A00%3A00.000Z &AWSAccessKeyId=(AWS Access Key Id) &Signature=mQA3nJI%2BcmAIY7r8HCArGElSqPX5JG4UGzF4yo0RygE%3D The following example sets the delivery policy to 5 total retries ?AttributeValue={"http":{"defaultHealthyRetryPolicy":{"numRetries":5}}} &TopicArn=arn%3Aaws%3Asns%3Aus-east-1%3A123456789012%3AMy-Topic &AttributeName=DeliveryPolicy &Action=SetTopicAttributes &SignatureVersion=2 &SignatureMethod=HmacSHA256 &Timestamp=2010-03-31T12%3A00%3A00.000Z &AWSAccessKeyId=(AWS Access Key Id) &Signature=mQA3nJI%2BcmAIY7r8HCArGElSqPX5JG4UGzF4yo0RygE%3D The JSON format for the DeliveryPolicy AttributeValue (linebreaks added for readability): { "http": { "defaultHealthyRetryPolicy": { "minDelayTarget": <int>, "maxDelayTarget": <int>, "numRetries": <int>, "numMaxDelayRetries": <int>, "backoffFunction": "<linear|arithmetic|geometric|exponential>" }, "disableSubscriptionOverrides": <boolean>, "defaultThrottlePolicy": { "maxReceivesPerSecond": <int> } }

Sample Response

<SetTopicAttributesResponse xmlns=""> <ResponseMetadata> <RequestId>a8763b99-33a7-11df-a9b7-05d48da6f042</RequestId> </ResponseMetadata> </SetTopicAttributesResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: