ALIYUN::AMQP::Binding is used to bind a queue or an exchange to an exchange.
Syntax
{
"Type": "ALIYUN::AMQP::Binding",
"Properties": {
"Argument": String,
"SourceExchange": String,
"InstanceId": String,
"BindingKey": String,
"BindingType": String,
"DestinationName": String,
"VirtualHost": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
Argument | String | Yes | No | 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. The Valid values of the
Separate the attributes with semicolons (;). Separate the key and value of an attribute with a colon (:). For example, the |
BindingKey | String | Yes | No | The binding key. | If the source exchange is not a topic exchange, configure the binding key based on the following requirements:
If the source exchange is a topic exchange, configure the binding key based on the following requirements:
|
BindingType | String | Yes | No | The type of the object that you want to bind to the source exchange. | Valid values:
|
DestinationName | String | Yes | No | 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. Make sure that the vhost to which the object belongs is the same as the vhost to which the exchange specified by |
InstanceId | String | Yes | No | The instance ID. | None. |
SourceExchange | String | Yes | No | The name of the source exchange. | None. |
VirtualHost | String | Yes | No | The vhost name. | You must create the vhost in the console. The object specified by DestinationName and the object specified by SourceExchange belong to the vhost. |
Return values
Fn::GetAtt
None.
Examples
YAML
format
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
Argument:
Description: 'X-match Attributes. Valid Values:
"x-match:all": Default Value, All the Message Header of Key-Value Pairs Stored
in the Must Match.
"x-match:any": at Least One Pair of the Message Header of Key-Value Pairs Stored
in the Must Match.'
Type: String
BindingKey:
Description: The Binding Key.
Type: String
BindingType:
AllowedValues:
- 0
- '0'
- QUEUE
- 1
- '1'
- EXCHANGE
Description: 'The Target Binding Types. Valid values: EXCHANGE, QUEUE.'
Type: String
DestinationName:
Description: The Target Queue Or Exchange of the Name.
Type: String
InstanceId:
Description: InstanceId
Type: String
SourceExchange:
Description: The Source Exchange Name.
Type: String
VirtualHost:
Description: The name of the virtual host.
Type: String
Resources:
Binding:
Properties:
Argument:
Ref: Argument
BindingKey:
Ref: BindingKey
BindingType:
Ref: BindingType
DestinationName:
Ref: DestinationName
InstanceId:
Ref: InstanceId
SourceExchange:
Ref: SourceExchange
VirtualHost:
Ref: VirtualHost
Type: ALIYUN::AMQP::Binding
JSON
format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"Argument": {
"Type": "String",
"Description": "X-match Attributes. Valid Values:\n\"x-match:all\": Default Value, All the Message Header of Key-Value Pairs Stored in the Must Match.\n\"x-match:any\": at Least One Pair of the Message Header of Key-Value Pairs Stored in the Must Match."
},
"SourceExchange": {
"Type": "String",
"Description": "The Source Exchange Name."
},
"InstanceId": {
"Type": "String",
"Description": "InstanceId"
},
"BindingKey": {
"Type": "String",
"Description": "The Binding Key."
},
"BindingType": {
"Type": "String",
"Description": "The Target Binding Types. Valid values: EXCHANGE, QUEUE.",
"AllowedValues": [
0,
"0",
"QUEUE",
1,
"1",
"EXCHANGE"
]
},
"DestinationName": {
"Type": "String",
"Description": "The Target Queue Or Exchange of the Name."
},
"VirtualHost": {
"Type": "String",
"Description": "The name of the virtual host."
}
},
"Resources": {
"Binding": {
"Type": "ALIYUN::AMQP::Binding",
"Properties": {
"Argument": {
"Ref": "Argument"
},
"SourceExchange": {
"Ref": "SourceExchange"
},
"InstanceId": {
"Ref": "InstanceId"
},
"BindingKey": {
"Ref": "BindingKey"
},
"BindingType": {
"Ref": "BindingType"
},
"DestinationName": {
"Ref": "DestinationName"
},
"VirtualHost": {
"Ref": "VirtualHost"
}
}
}
}
}