Creates a binding. After a producer sends a message to an exchange, the exchange routes the message to a specified queue or another exchange based on the created bindings and routing rules.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
amqp:GetExchange |
create |
*Queue
|
None |
|
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The ID of the ApsaraMQ for RabbitMQ instance. |
amqp-cn-v0h1kb9nu*** |
| VirtualHost |
string |
Yes |
The name of the vhost. The vhost must be created in the console and must be the vhost to which both DestinationName and SourceExchange belong. |
test |
| SourceExchange |
string |
Yes |
The name of the source exchange. The exchange must be created in the console. |
NormalEX |
| DestinationName |
string |
Yes |
The name of the binding destination. The destination must be created in the console and belong to the same vhost as SourceExchange, which is specified by VirtualHost. |
DemoQueue |
| BindingKey |
string |
No |
The binding key.
|
.test |
| BindingType |
string |
Yes |
The type of the binding destination. Valid values:
|
0 |
| Argument |
string |
No |
The key-value pairs of the message header attributes. The message header attributes are concatenated by using one or more key-value pairs. The x-match attribute is required, and other attributes are custom. Valid values of the x-match attribute:
Separate attributes with semicolons (;) and separate attribute keys and values with colons (:). Example: x-match:all;type:report;format:pdf. This parameter applies only to headers exchanges and is invalid for other types of exchanges. For other types of exchanges, you can set this parameter to any value. |
x-match:all;type:report;format:pdf |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. |
09768C14-E51C-4F4A-8077-30810032C*** |
Examples
Success response
JSON format
{
"RequestId": "09768C14-E51C-4F4A-8077-30810032C***"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.