ListQueues

Description

The ListQueues action returns a list of your queues. The maximum number of queues that can be returned is 1000. If you specify a value for the optional QueueNamePrefix parameter, only queues with a name beginning with the specified value are returned.

[Important]Important

The WSDL version you use for the request affects which queues are included in the response. Before the release of version 2008-01-01, you could use either of the available versions (2007-05-01 or 2006-04-01) for your ListQueues call and the response would include all your queues.

If you're now using one or both of the old versions and the 2008-01-01 version to create queues, you can't get a list of all your queues with a single call to ListQueues. Instead, you must call twice: once using either the 2007-05-01 or 2006-04-01 version (which returns all queues you created with versions older than 2008-01-01), and once using the 2008-01-01 version (which returns only the queues created with the 2008-01-01 version). We did this because queues created with the older versions are not compatible with the 2008-01-01 version, and vice versa.

Request Parameters

The following table lists the special request parameters the ListQueues action uses in addition to the common request parameters all actions use (for more information, see Request Parameters Common to All Actions).

NameDescriptionRequired

QueueNamePrefix

String to use for filtering the list results. Only those queues whose name begins with the specified string are returned.

Type: String

Constraints: Maximum 80 characters; alphanumeric characters, hyphens (-), and underscores (_) are allowed.

No

Response Elements

The following table lists the response elements the ListQueues action returns in addition to the common response elements all actions return (for more information, see Structure of a Successful Response).

NameDescription

QueueUrl

The queue URL for a queue. The response can contain up to 1000 QueueUrl elements.

Type: String

Ancestor: ListQueuesResult

Special Errors

The ListQueues action returns no special errors besides the common errors all actions return (for more information, see Errors Common to all Actions).

Examples

The following example Query request returns the queues whose names begin with the letter "T".

Sample Request

http://queue.amazonaws.com/
?Action=ListQueues
&QueueNamePrefix=T
&AWSAccessKeyId=0AS7553JW73RRM642K02EXAMPLE
&Version=2008-01-01
&Expires=2008-02-10T12:00:00Z
&Signature=Qnpl4Qk7tINHzfXCiT7VbBatDAEXAMPLE
&SignatureVersion=2
&SignatureMethod=HmacSHA256

Sample Response

<ListQueuesResponse
  xmlns=http://queue.amazonaws.com/doc/2008-01-01/
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
  xsi:type=ListQueuesResponse>
  <ListQueuesResult>
    <QueueUrl>
      http://queue.amazonaws.com/Toast
    </QueueUrl>
    <QueueUrl>
      http://queue.amazonaws.com/Test
    </QueueUrl>
  </ListQueuesResult>
  <ResponseMetadata>
    <RequestId>cb919c0a-9bce-4afe-9b48-9bdf2412bb67</RequestId>
  </ResponseMetadata>
</ListQueuesResponse>

Related Actions