Queries exchanges.
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ListExchanges | The operation that you want to perform. Set the value to ListExchanges. |
InstanceId | String | Yes | amqp-cn-7pp2mwbc**** | The ID of the instance. |
MaxResults | Integer | Yes | 1 | The maximum number of entries to return. Valid values: 1 to 100. |
VirtualHost | String | Yes | test | The name of the virtual host (vhost). |
NextToken | String | No | AAAANDQBYW1xcC1jbi03cHAybXdiY3AwMGEBdmhvc3QBAXNkZndhYWJhATE2NDkzMTM4OTU5NDIB4o3z1pPwWzk4aYuiRffi8R6-**** | The token that is used to query the next page. Set the value to:
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Data | Struct | The returned data. | |
Exchanges | Array of ExchangeVO | An array of exchanges. | |
Attributes | Map | test | The current version does not support this parameter. The attributes. |
AutoDeleteState | Boolean | false | Indicates whether the exchange was automatically deleted. |
CreateTime | Long | 1580886216000 | The time when the instance was created. This value is a UNIX timestamp. Unit: milliseconds. |
ExchangeType | String | DIRECT | The type of the exchange. |
Name | String | amq.direct | The name of the exchange. |
VHostName | String | test | The name of the virtual host (vhost). |
MaxResults | Integer | 1 | The maximum number of entries returned. |
NextToken | String | AAAANDQBYW1xcC1jbi03cHAybXdiY3AwMGEBdmhvc3QBAXNkZndhYWJhATE2NDkzMTM4OTU5NDIB4o3z1pPwWzk4aYuiRffi8R6-**** | The token that marks the end of the current returned page.
|
RequestId | String | FEBA5E0C-50D0-4FA6-A794-4901E5465*** | The ID of the request. |
Examples
Sample requests
http(s)://amqp-open.cn-hangzhou.aliyuncs.com/?Action=ListExchanges
&InstanceId=amqp-cn-7pp2mwbc****
&MaxResults=1
&RegionId=cn-hangzhou
&VirtualHost=test
&<Common request parameters>
Sample success responses
XML
format
<ListExchangesResponse>
<RequestId>FEBA5E0C-50D0-4FA6-A794-4901E5465***</RequestId>
<Data>
<NextToken></NextToken>
<MaxResults>1</MaxResults>
<Exchanges>
<VHostName>test</VHostName>
<CreateTime>1580886216000</CreateTime>
<AutoDeleteState>false</AutoDeleteState>
<ExchangeType>DIRECT</ExchangeType>
<Name>amq.direct</Name>
</Exchanges>
</Data>
</ListExchangesResponse>
JSON
format
{
"RequestId": "FEBA5E0C-50D0-4FA6-A794-4901E5465***",
"Data": {
"NextToken": "",
"MaxResults": 1,
"Exchanges": [
{
"VHostName": "test",
"CreateTime": 1580886216000,
"AutoDeleteState": false,
"ExchangeType": "DIRECT",
"Name": "amq.direct"
}
]
}
}
Error codes
For a list of error codes, visit the API Error Center.