SetSubscriptionAttributes
You can call the SetSubscriptionAttributes operation to modify the properties of a subscription.
Authorization information
By default, only Alibaba Cloud accounts can call this operation. Resource Access Management (RAM) users can call this operation only after they are granted the required permissions. The following table lists the authorization information for this operation. For more information, see Authorization policies and examples.
Name | Value |
API | SetSubscriptionAttributes |
RAM authorization operation | mns:SetSubscriptionAttributes |
Resource | acs:mns:$region:$accountid:/topics/$topicName/subscriptions/$subscriptionName |
Request message
A request message consists of a request line, URL parameters, HTTP headers, and a message body.
Request line
PUT /topics/$TopicName/subscriptions/$SubscriptionName?metaoverride=true HTTP/1.1Specific URI parameters
The
metaoverride=trueparameter is used to modify the properties of the subscription.Specific request headers
None.
Request body
The request body is in XML format and contains the properties of the subscription that you want to modify.
Parameter name
Type
Required
Example
Description
NotifyStrategy
Boolean
No
BACKOFF_RETRY
The retry policy to use when an error occurs while MNS pushes messages to an endpoint.
Valid values:
BACKOFF_RETRY: backoff retry
EXPONENTIAL_DECAY_RETRY: exponential decay retry
For more information about retry policies, see NotifyStrategy.
Default value: BACKOFF_RETRY.
Response message
A response message consists of a status line, HTTP headers, and a message body.
HTTP status code
HTTP/1.1 204 No ContentSpecific response headers
None.
Response body
None.
Examples
Request example:
PUT /topics/$TopicName/subscriptions/$SubscriptionName?metaoverride=true HTTP/1.1
Host: $AccountId.mns.cn-hangzhou.aliyuncs.com
Date: Tue, 08 Dec 2015 06:09:22 GMT
Authorization: MNS 15B4D3461F177624206A:rNT4xclLS297/n0UFYIezzHJ****
x-mns-version: 2015-06-06
<?xml version="1.0" encoding="utf-8"?>
<Subscription xmlns="http://mns.aliyuncs.com/doc/v1/">
<NotifyStrategy>BACKOFF_RETRY</NotifyStrategy>
</Subscription>Response example:
HTTP/1.1 204 No Content
x-mns-request-id:56667412B2B71C9C1600****
x-mns-version: 2015-06-06Error codes
Error code | Error message | HTTP status code | Description |
SubscriptionNotExist | The subscription you provided does not exist. | 404 | The subscription does not exist. Create a subscription first. |