Queries queues.

Request parameters

ParameterTypeRequiredExampleDescription
ActionStringYesListQueues

The operation that you want to perform.

Set the value to ListQueues.

InstanceIdStringYes1880770869023***

The ID of the instance.

MaxResultsIntegerYes1

The maximum number of result entries to return.

RegionIdStringYescn-hangzhou

The ID of the region.

VirtualHostStringYestest

The name of the vhost.

NextTokenStringNocaeba0bbb2be03f84eb48b699f0a****

The token that marks the end position of the previous returned page. Call the operation again by using the value of the NextToken parameter returned by the previous request to obtain the next set of data. Leave this parameter empty the first time you call this operation. If all results have been returned, the value of NextToken in the response parameter is empty.

Response parameters

ParameterTypeExampleDescription
DataStruct

The returned data.

MaxResultsInteger1

The maximum number of returned result entries.

NextTokenStringcaebacccb2be03f84eb48b699f0a****

The token that marks the end of the current returned page. If this parameter is empty, it indicates that you have retrieved all the data.

QueuesArray of QueueVO

An array of queues.

AttributesMaptest

The attributes.

AutoDeleteStateBooleanfalse

Indicates whether the Auto Delete attribute is configured.

CreateTimeLong1580887085240

The creation time.

ExclusiveStateBooleanfalse

Indicates whether the queue is an exclusive queue.

LastConsumeTimeLong1680887085240

The last consumption time.

NameStringQueueTest

The name of the queue.

OwnerIdString1880770869023***

The ID of the instance.

VHostNameStringtest

The name of the vhost.

RequestIdStringCE811989-9F02-42CE-97A6-2239CB5C2***

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListQueues
&InstanceId=1880770869023***
&MaxResults=1
&RegionId=cn-hangzhou
&VirtualHost=test
&<Common request parameters>

Sample success responses

XML format

<ListQueuesResponse>
      <RequestId>CE811989-9F02-42CE-97A6-2239CB5C2***</RequestId>
      <Data>
            <NextToken>,</NextToken>
            <MaxResults>1</MaxResults>
            <Queues>
                  <VHostName>test</VHostName>
                  <OwnerId>1880770869023***</OwnerId>
                  <CreateTime>1580887085240</CreateTime>
                  <ExclusiveState>false</ExclusiveState>
                  <Attributes>test</Attributes>
                  <LastConsumeTime>1680887085240</LastConsumeTime>
                  <AutoDeleteState>false</AutoDeleteState>
                  <Name>QueueTest</Name>
            </Queues>
      </Data>
</ListQueuesResponse>

JSON format

{
    "RequestId": "CE811989-9F02-42CE-97A6-2239CB5C2***",
    "Data": {
        "NextToken": ",",
        "MaxResults": 1,
        "Queues": {
            "VHostName": "test",
            "OwnerId": "1880770869023***",
            "CreateTime": 1580887085240,
            "ExclusiveState": false,
            "Attributes": "test",
            "LastConsumeTime": 1680887085240,
            "AutoDeleteState": false,
            "Name": "QueueTest"
        }
    }
}

Error codes

For a list of error codes, visit the API Error Center.