Queries 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 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
Code Integer 200

The response code. The HTTP 200 status code indicates that the request is 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 only to headers exchanges.

BindingKey String amq.dle.test

The binding key.

  • For a non-topic source exchange:
    • The binding key can contain only letters, digits, hyphens (-), underscores (_), periods (.), 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 (.), 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 EXCHANGE

The type of the destination. Valid values:

  • QUEUE
  • EXCHANGE
DestinationName String test

The name of the destination.

SourceExchange String dle

The name of the source exchange.

MaxResults Integer 1

The maximum number of returned result entries.

NextToken String ,

The token used to view data of the next page.

Message String operation success

The response message.

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

The ID of the request.

Success Boolean true

Indicates whether the request is successful.

Examples

Sample requests

http(s)://[Endpoint]/?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.