Associa uma tabela de rotas personalizada a um vSwitch na mesma VPC.
Sintaxe
{
"Type": "ALIYUN::VPC::RouteTableAssociation",
"Properties": {
"RouteTableId": String,
"VSwitchId": String
}
}
Propriedades
|
Nome da propriedade |
Tipo |
Obrigatória |
Atualização permitida |
Descrição |
Restrições |
|
RouteTableId |
String |
Sim |
Não |
ID da tabela de rotas. |
Nenhuma. |
|
VSwitchId |
String |
Sim |
Não |
ID do vSwitch a associar. |
Nenhuma. |
Valores de retorno
Fn::GetAtt
RouteTableId: ID da tabela de rotas.
VSwitchId: ID do vSwitch associado.
Exemplos
-
Formato
YAMLROSTemplateFormatVersion: '2015-09-01' Parameters: RouteTableId: Type: String Description: The ID of the route table. VSwitchId: Type: String AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId Resources: RouteTableAssociation: Type: ALIYUN::VPC::RouteTableAssociation Properties: RouteTableId: Ref: RouteTableId VSwitchId: Ref: VSwitchId Outputs: RouteTableId: Description: The ID of the route table. Value: Fn::GetAtt: - RouteTableAssociation - RouteTableId VSwitchId: Description: The VSwitch ID which the route table associated with. Value: Fn::GetAtt: - RouteTableAssociation - VSwitchId -
Formato
JSON{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { "RouteTableId": { "Type": "String", "Description": "The ID of the route table." }, "VSwitchId": { "Type": "String", "AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId" } }, "Resources": { "RouteTableAssociation": { "Type": "ALIYUN::VPC::RouteTableAssociation", "Properties": { "RouteTableId": { "Ref": "RouteTableId" }, "VSwitchId": { "Ref": "VSwitchId" } } } }, "Outputs": { "RouteTableId": { "Description": "The ID of the route table.", "Value": { "Fn::GetAtt": [ "RouteTableAssociation", "RouteTableId" ] } }, "VSwitchId": { "Description": "The VSwitch ID which the route table associated with.", "Value": { "Fn::GetAtt": [ "RouteTableAssociation", "VSwitchId" ] } } } }