Queries the information about the bindings whose binding destination is a specific exchange.

Request parameters

Parameter Type Required Example Description
Action String Yes ListExchangeUpStreamBindings

The operation that you want to perform. Set the value to

ListExchangeUpStreamBindings.

ExchangeName String Yes test

The name of the exchange.

InstanceId String Yes 1880770869023***

The ID of the instance.

MaxResults Integer Yes 1

The maximum number of entries to return.

RegionId String Yes cn-hangzhou

The ID of the region.

VirtualHost String Yes test

The name of the virtual host (vhost).

NextToken String No caeba0bbb2be03f84eb48b699f0a****

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

Response parameters

Parameter Type Example Description
Code Integer 200

The HTTP status code. The HTTP status code 200 indicates that the request was successful.

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 to only headers exchanges.

BindingKey String amq.dle.test

The binding key.

  • If the source exchange is not a topic exchange, the binding key meets the following requirements:
    • The binding key can contain only letters, digits, and the following special characters: -_./@
    • The binding key must be 1 to 255 characters in length.
  • If the source exchange is a topic exchange, the binding key meets the following requirements:
    • The binding key can contain letters, digits, and the following special characters: -_.#/@
    • The binding key cannot start or end with a period (.). If the binding key starts with a number sign (#) or an asterisk (*), a period (.) must be specified after the number sign (#) or asterisk (*). If the binding key ends with a number sign (#) or an asterisk (*), a period (.) must be specified before the number sign (#) or asterisk (*). If the binding key does not start or end with a number sign (#) or an asterisk (*), the key must start with a period (.) and end with a period (.).
    • The binding key must be 1 to 255 characters in length.
BindingType String EXCHANGE

The type of the object to which the source exchange is bound. Valid values:

  • QUEUE
  • EXCHANGE
DestinationName String test

The name of the object to which the source exchange is bound.

SourceExchange String dle

The name of the source exchange.

MaxResults Integer 1

The maximum number of entries returned.

NextToken String caebacccb2be03f84eb48b699f0a****

The token that marks the end position of the returned result. If this parameter is empty, all data is returned.

Message String operation success

The message returned.

RequestId String 2DCCCE88-BC82-4A4F-AF5E-9A759672B***

The ID of the request.

Success Boolean true

Indicates whether the request was successful.

Examples

Sample requests

http(s)://amqp-open.cn-hangzhou.aliyuncs.com/?Action=ListExchangeUpStreamBindings
&ExchangeName=test
&InstanceId=1880770869023***
&MaxResults=1
&RegionId=cn-hangzhou
&VirtualHost=test
&<Common request parameters>

Sample success responses

XML format

<ListExchangeUpStreamBindingsResponse>
      <RequestId>2DCCCE88-BC82-4A4F-AF5E-9A759672B***</RequestId>
      <Message>operation success</Message>
      <Data>
            <NextToken>,</NextToken>
            <MaxResults>1</MaxResults>
            <Bindings>
                  <SourceExchange>dle</SourceExchange>
                  <Argument>all</Argument>
                  <BindingType>EXCHANGE</BindingType>
                  <BindingKey>amq.dle.test</BindingKey>
                  <DestinationName>test</DestinationName>
            </Bindings>
      </Data>
      <Code>200</Code>
      <Success>true</Success>
</ListExchangeUpStreamBindingsResponse>

JSON format

{
    "RequestId": "2DCCCE88-BC82-4A4F-AF5E-9A759672B***",
    "Message": "operation success",
    "Data": {
        "NextToken": ",",
        "MaxResults": 1,
        "Bindings": {
            "SourceExchange": "dle",
            "Argument": "all",
            "BindingType": "EXCHANGE",
            "BindingKey": "amq.dle.test",
            "DestinationName": "test"
        }
    },
    "Code": 200,
    "Success": true
}

Error codes

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