| « PreviousNext » | |
![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
The SetSubscriptionAttributes action allows a subscription owner to set an attribute of the topic to a new value.
For information about the common parameters that all actions use, see Common Parameters.
The name of the attribute you want to set. Only a subset of the subscriptions attributes are mutable.
Valid values: DeliveryPolicy
Type: String
Required: Yes
The new value for the attribute in JSON format.
Type: String
Required: No
The ARN of the subscription 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
The following example sets the delivery policy to 5 total retries
http://sns.us-east-1.amazonaws.com/
?AttributeValue={"healthyRetryPolicy":{"numRetries":5}}
&SubscriptionArn=arn%3Aaws%3Asns%3Aus-east-1%3A123456789012%3AMy-Topic%3A80289ba6-0fd4-4079-afb4-ce8c8260f0ca
&AttributeName=DeliveryPolicy
&Action=SetSubscriptionAttributes
&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):
{
"healthyRetryPolicy":
{
"minDelayTarget": <int>,
"maxDelayTarget": <int>,
"numRetries": <int>,
"numMaxDelayRetries": <int>,
"backoffFunction": "<linear|arithmetic|geometric|exponential>"
},
"throttlePolicy":
{
"maxReceivesPerSecond": <int>
}
}
<SetSubscriptionAttributesResponse xmlns="http://sns.amazonaws.com/doc/2010-03-31/">
<ResponseMetadata>
<RequestId>a8763b99-33a7-11df-a9b7-05d48da6f042</RequestId>
</ResponseMetadata>
</SetSubscriptionAttributesResponse>