O recurso ALIYUN::AMQP::Binding vincula uma fila ou um exchange a outro exchange.
Sintaxe
{
"Type": "ALIYUN::AMQP::Binding",
"Properties": {
"Argument": String,
"SourceExchange": String,
"InstanceId": String,
"BindingKey": String,
"BindingType": String,
"DestinationName": String,
"VirtualHost": String
}
}
Propriedades
Propriedade | Tipo | Obrigatório | Editável | Descrição | Restrição |
Argument | String | Sim | Não | Pares chave-valor configurados para os atributos de cabeçalho (headers) de uma mensagem. | Concatene um ou mais pares chave-valor para configurar os atributos de cabeçalho da mensagem. Defina o atributo Valores válidos para o atributo
Separe os atributos com ponto e vírgula (;). Use dois pontos (:) para separar a chave e o valor de cada atributo. Por exemplo, o parâmetro |
BindingKey | String | Sim | Não | Chave de vinculação. | Se o exchange de origem não for do tipo topic, configure a chave de vinculação seguindo estas regras:
Se o exchange de origem for do tipo topic, observe as seguintes exigências:
|
BindingType | String | Sim | Não | Tipo do objeto a vincular ao exchange de origem. | Valores válidos:
|
DestinationName | String | Sim | Não | Nome do objeto a vincular ao exchange de origem. | Crie o objeto no console do ApsaraMQ for RabbitMQ. Verifique se o vhost do objeto coincide com o vhost do exchange especificado em |
InstanceId | String | Sim | Não | ID da instância. | Nenhuma. |
SourceExchange | String | Sim | Não | Nome do exchange de origem. | Nenhuma. |
VirtualHost | String | Sim | Não | Nome do vhost. | Crie o vhost no console. O objeto especificado em DestinationName e o objeto especificado em SourceExchange devem pertencer a esse vhost. |
Valores de retorno
Fn::GetAtt
Nenhum.
Exemplos
Formato 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
Formato 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"
}
}
}
}
}