Queries the list of queues that belong to an Alibaba Cloud account. The queues are displayed by page.
Name | Value |
---|---|
API | ListQueue |
Action | mns:ListQueue |
Resource | acs:mns:$region:$accountid:/queues |
Description
You can call this operation to query the list of queues that belong to an Alibaba
Cloud account. The queues are displayed by page. Only the QueueURL parameter of the
queue is returned. If you need to query other parameters of the queue, call the GetQueueAttributes operation. To query the list of queues that contain a specific prefix, you can specify
the x-mns-prefix
parameter when you call the ListQueue operation.
x-mns-ret-number
parameter, the value of the NextMarker
parameter that indicates the start position of the next page is returned. When you
send another request to query the remaining queues, you must set the x-mns-marker
parameter to the returned value of the NextMarker parameter.
Request
Each request consists of the following parts:
- Request line
GET /queues HTTP/1.1
- Operation-specific request headers
Parameter Required Description x-mns-marker No The start position of the page. Set the value of this parameter to the value of the NextMarker parameter in the previous response. x-mns-ret-number No The maximum number of queues that can be returned for a single request. Valid values: 1 to 1000. Data type: integer. Default value: 1000. x-mns-prefix No The prefix of the queues to be queried. For more information about other parameters, see Common parameters.
- Request Body
None.
Response
Each response consists of the following parts:
- HTTP Status Code
HTTP/1.1 200 OK
- Operation-specific response headers
None. For information about common response headers, see Common parameters.
- Response Body
The response body is in the XML format. A list of queues is returned and each queue includes a queue URL. If the number of the returned queues exceeds the value of the
x-mns-ret-number
parameter, the value of theNextMarker
parameter that indicates the start position of the next page is returned.
Examples
Sample requests
GET /queues HTTP/1.1
x-mns-marker: xxxx
x-mns-ret-number:2
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=
Sample success responses
HTTP/1.1 200 OK
x-mns-request-id:512B2A634403E52B1956133E
x-mns-version: 2015-06-06
<? xml version="1.0" encoding="UTF-8"? >
<Queues xmlns="http://mns.aliyuncs.com/doc/v1/">
<Queue>
<QueueURL>http://$AccountId.mns.cn-hangzhou.aliyuncs.com/queues/queueName1</QueueURL>
</Queue>
<Queue>
<QueueURL>http://$AccountId.mns.cn-hangzhou.aliyuncs.com/queues/queueName2</QueueURL>
</Queue>
<NextMarker> Base64 Encoded Result </NextMarker>
</Queues>
Special error
No operation-specific errors occur when you call this operation. Common errors are caused by unauthorized access and invalid parameters. For more information, see Error codes.