Queries queues.

Request parameters

Parameter Type Required Example Description
Action String Yes ListQueues

The operation that you want to perform.

Set the value to ListQueues.

InstanceId String Yes 1880770869023***

The ID of the instance.

MaxResults Integer Yes 1

The maximum number of result entries to return.

RegionId String Yes cn-hangzhou

The ID of the region.

VirtualHost String Yes test

The name of the vhost.

NextToken String No ,

The token used to view data of the next page. This parameter is left empty for the first call.

Response parameters

Parameter Type Example Description
Data Struct

The returned data.

MaxResults Integer 1

The maximum number of returned result entries.

NextToken String ,

The token used to view data of the next page.

Queues Array of QueueVO

An array of queues.

Attributes Map test

The attributes.

AutoDeleteState Boolean false

Indicates whether the Auto Delete attribute is configured.

CreateTime Long 1580887085240

The creation time.

ExclusiveState Boolean false

Indicates whether the queue is an exclusive queue.

LastConsumeTime Long 1680887085240

The last consumption time.

Name String QueueTest

The name of the queue.

OwnerId String 1880770869023***

The ID of the instance.

VHostName String test

The name of the vhost.

RequestId String CE811989-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.