ALIYUN::AMQP::Binding digunakan untuk mengikat antrian atau pertukaran ke pertukaran.
Sintaksis
{
"Type": "ALIYUN::AMQP::Binding",
"Properties": {
"Argument": String,
"SourceExchange": String,
"InstanceId": String,
"BindingKey": String,
"BindingType": String,
"DestinationName": String,
"VirtualHost": String
}
}Properti
Properti | Tipe | Diperlukan | Dapat Diedit | Deskripsi | Kendala |
Argument | String | Ya | Tidak | Pasangan kunci-nilai yang dikonfigurasi untuk atribut headers dari sebuah pesan. | Satu atau lebih pasangan kunci-nilai dapat digabungkan untuk mengonfigurasi atribut headers dari sebuah pesan. Atribut Nilai valid untuk atribut
Pisahkan atribut dengan titik koma (;). Pisahkan kunci dan nilai atribut dengan tanda titik dua (:). Sebagai contoh, parameter |
BindingKey | String | Ya | Tidak | Kunci pengikatan. | Jika pertukaran sumber bukan pertukaran topik, konfigurasikan kunci pengikatan berdasarkan persyaratan berikut:
Jika pertukaran sumber adalah pertukaran topik, konfigurasikan kunci pengikatan berdasarkan persyaratan berikut:
|
BindingType | String | Ya | Tidak | Tipe objek yang ingin Anda ikat ke pertukaran sumber. | Nilai valid:
|
DestinationName | String | Ya | Tidak | Nama objek yang ingin Anda ikat ke pertukaran sumber. | Anda harus membuat objek tersebut di konsol ApsaraMQ for RabbitMQ. Pastikan bahwa vhost tempat objek tersebut berada sama dengan vhost tempat pertukaran yang ditentukan oleh |
InstanceId | String | Ya | Tidak | ID instance. | Tidak ada. |
SourceExchange | String | Ya | Tidak | Nama pertukaran sumber. | Tidak ada. |
VirtualHost | String | Ya | Tidak | Nama vhost. | Anda harus membuat vhost tersebut di konsol. Objek yang ditentukan oleh DestinationName dan objek yang ditentukan oleh SourceExchange termasuk dalam vhost. |
Nilai Kembali
Fn::GetAtt
Tidak ada.
Contoh
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::BindingJSON 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"
}
}
}
}
}