ALIYUN::AMQP::Binding类型用于为Exchange绑定目标对象Queue或Exchange。
语法
{
"Type": "ALIYUN::AMQP::Binding",
"Properties": {
"Argument": String,
"SourceExchange": String,
"InstanceId": String,
"BindingKey": String,
"BindingType": String,
"DestinationName": String,
"VirtualHost": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
Argument | String | 是 | 否 | 设置消息头属性键值对信息。 | 消息头属性使用一个或多个键值对拼接而成。
属性之间使用半角分号(;)隔开,属性键与值之间使用半角冒号(:)区分。例如: |
BindingKey | String | 是 | 否 | 绑定键。 | 绑定源Exchange为非Topic类型:
绑定源Exchange为Topic类型:
|
BindingType | String | 是 | 否 | 绑定目标对象的类型。 | 取值:
|
DestinationName | String | 是 | 否 | 绑定目标名称。 | 绑定目标需在控制台创建且所属的Vhost与 |
InstanceId | String | 是 | 否 | 实例ID。 | 无 |
SourceExchange | String | 是 | 否 | 源Exchange名称。 | 无 |
VirtualHost | String | 是 | 否 | Vhost名称。 | Vhost已在控制台创建且是DestinationName和SourceExchange所属的Vhost。 |
返回值
Fn::GetAtt
无
示例
YAML
格式
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
格式
{
"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"
}
}
}
}
}