Modifies the parameters of a queue.
Name | Value |
---|---|
API | SetQueueAttributes |
Action | mns:SetQueueAttributes |
Resource | acs:mns:$region:$accountid:/queues/$queueName |
Request
Each request consists of the following parts:
- Request line
PUT /queues/$queueName? metaoverride=true HTTP/1.1
- URI parameters
To modify the parameters of a queue, you can specify
metaoverride=true
in the URI. - Operation-specific request headers
None. For more information about common request headers, see Common parameters.
-
Request Body
The request body is in the XML format. The parameters of the queue can be included in the request body. All the parameters are optional.
Parameter Description Value DelaySeconds The delay period after which all messages sent to the queue can be consumed. Unit: seconds. Valid values: 0 to 604800 seconds (7 days). Data type: integer. MaximumMessageSize The maximum size of the message body that can be sent to the queue. Unit: bytes. Valid values: 1024 B (1 KB) to 65536 B (64 KB). Data type: integer. MessageRetentionPeriod The maximum period for which the message can be retained in the queue. A message that is sent to the queue can be retained for a specified period. After the specified period ends, the message is deleted no matter whether it is consumed. Unit: seconds. Valid values: 60 seconds (1 minute) to 604800 seconds (7 days). Data type: integer. VisibilityTimeout The invisibility period for which the received message remains the Inactive state. Unit: seconds. Valid values: 1 to 43200 seconds (12 hours). Data type: integer. PollingWaitSeconds The maximum period for which a ReceiveMessage request waits if no message is available in the queue. Unit: seconds. Valid values: 0 to 30. Data type: integer. LoggingEnabled Indicates whether the log management feature is enabled for the queue. Valid values: - True: The log management feature is enabled.
- false: The log management feature is disabled.
Response
Each response consists of the following parts:
- HTTP Status Code
HTTP/1.1 204 No Content
- Operation-specific response headers
None. For more information about common response headers, see Common parameters.
- Response Body
None.
Examples
Sample requests
PUT /queues/$queueName? Metaoverride=true HTTP/1.1
Host: $AccountId.mns.cn-hangzhou.aliyuncs.com
Date: Wed, 08 Mar 2012 12:00:00 GMT
x-mns-version: 2015-06-06
Authorization: MNS 15B4D3461F177624206A:xQE0diMbLRepdf3YB+FIEXAMPLE=
<? xml version="1.0" encoding="UTF-8"? >
<Queue xmlns="http://mns.aliyuncs.com/doc/v1/">
<VisibilityTimeout >60</VisibilityTimeout>
<MaximumMessageSize>1024</MaximumMessageSize>
<MessageRetentionPeriod>120</MessageRetentionPeriod>
<DelaySeconds>30</DelaySeconds>
<LoggingEnabled>True</LoggingEnabled>
</Queue>
Sample success responses
HTTP/1.1 204 No Content
x-mns-request-id:512B2A634403E52B1956133E
x-mns-version: 2015-06-06
Special Error
Error code | Error message | HTTP status code |
---|---|---|
InvalidArgument | The value of Element should between Low and High seconds/bytes. | 400 |
QueueNotExist | The queue name you provided is not exist. | 404 |