Queries the queues that belong to an Alibaba Cloud account. The queues are displayed by page.

Authorization

By default, only Alibaba Cloud accounts can call this operation. RAM users can call this operation only after these RAM users are granted related permissions. The following table describes the authorization information of this operation. For more information, see Permission policies and examples.

Item Value
API operation ListQueue
Action mns:ListQueue
Resource acs:mns:$region:$accountid:/queues

Description

Only the QueueURL parameter of each queue is returned. If you need to query other parameters of the queue, call the GetQueueAttributes operation. To query the queues that contain a specific prefix, you can specify the x-mns-prefix parameter when you call the ListQueue operation.

Note If the number of returned queues exceeds the value of the 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

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 10 The start position of the next page. Set the value of this parameter to the value of the NextMarker parameter in the previous response.
    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 more 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 the x-mns-ret-number parameter, the value of the NextMarker parameter that indicates the start position of the next page is returned.

Examples

Sample requests

GET /queues  HTTP/1.1
x-mns-marker: 10
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.