Queries information about the bindings of a specific queue.

Request parameters

Parameter Type Required Example Description
Action String Yes ListQueueUpStreamBindings

The operation that you want to perform.

Set the value to ListQueueUpStreamBindings.

InstanceId String Yes 1880770869023***

The ID of the instance.

MaxResults Integer Yes 1

The maximum number of result entries to return.

QueueName String Yes QueueTest

The name of the queue.

RegionId String Yes cn-hangzhou

The ID of the region.

VirtualHost String Yes test

The name of the vhost.

NextToken String No caeba0bbb2be03f84eb48b699f0a****

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

Parameter Type Example Description
Data Struct

The returned data.

Bindings Array of BindingVO

An array of bindings.

Argument String all

The x-match attribute. Valid values:

  • all: A headers exchange routes a message to a queue only if all binding attributes of the queue except for x-match match the headers attributes of the message. This value is a default value.
  • any: A headers exchange routes a message to a queue if one or more binding attributes of the queue except for x-match match the headers attributes of the message.

This parameter applies only to headers exchanges.

BindingKey String amq.test

The binding key.

  • For a non-topic source exchange:
    • The binding key can contain only letters, digits, hyphens (-), underscores (_), periods (.), forward slashes (/), and at signs (@).
    • The binding key must be 1 to 255 characters in length.
  • For a topic source exchange:
    • The binding key can contain letters, digits, hyphens (-), underscores (_), periods (.), number signs (#), forward slashes (/), and at signs (@).
    • If the binding key contains a number sign (#), the binding key must start with a number sign (#) followed by a period (.) or end with a number sign (#) that follows a period (.).
    • The binding key must be 1 to 255 characters in length.
BindingType String QUEUE

The type of the destination. Valid values:

  • QUEUE
  • EXCHANGE
DestinationName String QueueTest

The name of the destination.

SourceExchange String test

The name of the source exchange.

MaxResults String 1

The maximum number of returned result entries.

NextToken String caebacccb2be03f84eb48b699f0a****

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.

RequestId String 8BFB1C9D-08A2-4859-A47C-403C9EFA2***

The ID of the request.

Examples

Sample requests

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

Sample success responses

XML format

<ListQueueUpStreamBindingsResponse>
      <RequestId>8BFB1C9D-08A2-4859-A47C-403C9EFA2***</RequestId>
      <Data>
            <NextToken>,</NextToken>
            <MaxResults>1</MaxResults>
            <Bindings>
                  <SourceExchange>test</SourceExchange>
                  <Argument>all</Argument>
                  <BindingType>QUEUE</BindingType>
                  <BindingKey>amq.test</BindingKey>
                  <DestinationName>QueueTest</DestinationName>
            </Bindings>
      </Data>
</ListQueueUpStreamBindingsResponse>

JSON format

{
    "RequestId": "8BFB1C9D-08A2-4859-A47C-403C9EFA2***",
    "Data": {
        "NextToken": ",",
        "MaxResults": 1,
        "Bindings": {
            "SourceExchange": "test",
            "Argument": "all",
            "BindingType": "QUEUE",
            "BindingKey": "amq.test",
            "DestinationName": "QueueTest"
        }
    }
}

Error codes

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