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 | 是 | 否 | 设置消息头属性键值对信息。 | 消息头属性使用一个或多个键值对拼接而成。x-match 属性必须配置,其余属性支持自定义。
x-match:all;type:report;format:pdf 参数仅适用于Headers Exchange ,对其它类型的Exchange无效。
|
SourceExchange | String | 是 | 否 | 源Exchange名称。 | 无 |
InstanceId | String | 是 | 否 | 实例ID。 | 无 |
BindingKey | String | 是 | 否 | 绑定键。 | 绑定源Exchange为非Topic类型:
|
BindingType | String | 是 | 否 | 绑定目标对象的类型。 | 取值:
|
DestinationName | String | 是 | 否 | 绑定目标名称。 | 绑定目标需在控制台创建且所属的Vhost与SourceExchange 所属Vhost一致,即在VirtualHost中。
|
VirtualHost | String | 是 | 否 | Vhost名称。 | Vhost已在控制台创建且是DestinationName和SourceExchange所属的Vhost。 |
返回值
Fn::GetAtt
无
示例
-
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" } } } } }