Creates a binding. In ApsaraMQ for RabbitMQ, after a producer sends a message to an exchange, the exchange routes the message to a queue or another exchange based on the binding relationship and the routing rule.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
amqp:GetExchange | create | *Queue acs:amqp:{#regionId}:{#accountId}:/instances/{#InstanceId}/vhosts/{#vhostName}/queues/* |
|
|
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 virtual host (vhost) name. You must create the vhost in the ApsaraMQ for RabbitMQ console in advance. The object specified by DestinationName and the source exchange specified by SourceExchange must belong to the vhost. | test |
SourceExchange | string | Yes | The name of the source exchange. You must create the source exchange in the ApsaraMQ for RabbitMQ console in advance. | NormalEX |
DestinationName | string | Yes | The name of the object that you want to bind to the source exchange. You must create the object in the ApsaraMQ for RabbitMQ console in advance. The vhost of the object is the same as the vhost to which the source exchange specified by SourceExchange belongs. The vhost of the source exchange is the one specified by VirtualHost. | DemoQueue |
BindingKey | string | Yes | The binding key.
| .test |
BindingType | string | Yes | The type of the object that you want to bind to the source exchange. Valid values:
| 0 |
Argument | string | Yes | The key-value pairs that are configured for the headers attributes of a message. One or more key-value pairs can be concatenated to configure the headers attributes of a message. You must specify the x-match attribute as one of the valid values. You can specify custom values for other attributes. Valid values of the x-match attribute:
Separate the attributes with semicolons (;). Separate the key and value of an attribute with a colon (:). Example: x-match:all;type:report;format:pdf. This parameter is available for only headers exchanges. You can set this parameter to an arbitrary value for other types of exchanges. | x-match:all;type:report;format:pdf |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "09768C14-E51C-4F4A-8077-30810032C***"
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-11-12 | The internal configuration of the API is changed, but the call is not affected | View Change Details |