All Products
Search
Document Center

ApsaraMQ for RabbitMQ:ListQueues

Last Updated:Nov 25, 2024

Queries all queues in a vhost of an ApsaraMQ for RabbitMQ instance.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
amqp:ListQueuelist
*Instance
acs:amqp:{#regionId}:{#accountId}:/instances/{#instanceId}
    none
  • amqp:GetInstance

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The ID of the ApsaraMQ for RabbitMQ instance.

1880770869023***
VirtualHoststringYes

The virtual host (vhost) name.

test
NextTokenstringNo

The token that marks the end position of the previous returned page. To obtain the next batch of data, call the operation again by using the value of NextToken returned by the previous request. If you call this operation for the first time or want to query all results, set NextToken to an empty string.

caeba0bbb2be03f84eb48b699f0a****
MaxResultsintegerYes

The maximum number of entries to return.

1

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

CE811989-9F02-42CE-97A6-2239CB5C2***
Dataobject

The returned data.

MaxResultsinteger

The maximum number of entries returned.

1
NextTokenstring

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

caebacccb2be03f84eb48b699f0a****
Queuesarray<object>

The queues.

QueueVOobject
ExclusiveStateboolean

Indicates whether the queue is an exclusive queue.

false
AutoDeleteStateboolean

Indicates whether the queue was automatically deleted.

false
CreateTimelong

The time when the queue was created.

1580887085240
Attributesobject

The attributes.

test
VHostNamestring

The vhost name.

test
Namestring

The queue name.

QueueTest
OwnerIdstring

The ID of the ApsaraMQ for RabbitMQ instance to which the queue belongs.

1880770869023***
LastConsumeTimelong

The time when messages in the queue were last consumed.

1680887085240

Examples

Sample success responses

JSONformat

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

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history