Queries all queues that belong to an Alibaba Cloud account. The queues are displayed by page.
Authorization information
By default, you can use only an Alibaba Cloud account to call this operation. You can call this operation as a Resource Access Management (RAM) user only after you grant the required permissions to the RAM user. The following table describes the authorization information of this operation. For more information, see Permission policies and examples.
Name | Value |
Operation | ListQueue |
Action | mns:ListQueue |
Resource | acs:mns:$region:$accountid:/queues |
Usage notes
Only the QueueURL property of each queue is returned. You can call the GetQueueAttributes operation to query other properties of the queues. To query the queues that have a specific prefix, you can specify x-mns-prefix
when you call the ListQueue operation.
If the number of returned queues exceeds the value of x-mns-ret-number
, a value that indicates the start position of the next page is returned for NextMarker
. If you want to send another request to query the remaining queues, you must set x-mns-marker
to the returned value of NextMarker.
Request
A request consists of the following parts:
Request line
GET /queues HTTP/1.1
Operation-specific request headers
Parameter
Type
Required
Example
Description
x-mns-marker
Integer
No
OTczNjU4MTcvYmRw************************XN0VG9waWMtMy8w
The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request.
You must specify the token that is obtained from the previous query as the value of NextMarker.
x-mns-ret-number
Integer
No
1000
The maximum number of results that can be returned for a single request.
Valid values: 1 to 1000.
x-mns-prefix
String
No
queue
The prefix of the queues to be queried.
For information about other parameters, see Common parameters.
Request Body
None
Response
A response consists of the following parts:
HTTP status code
HTTP/1.1 200 OK
Operation-specific response headers
None
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
x-mns-ret-number
, a value that indicates the start position of the next page is returned forNextMarker
.
Examples
Sample requests
GET /queues HTTP/1.1
x-mns-marker: OTczNjU4MTcvYmRw************************XN0VG9waWMtMy8w
x-mns-ret-number:1000
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+FIEXAM****
Sample success responses
HTTP/1.1 200 OK
x-mns-request-id:512B2A634403E52B1956****
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>
Error codes
No operation-specific errors occur when you call this operation. Common errors include unauthorized access and invalid parameters. For more information, see Error codes.