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"
}
}
}
}
}