ALIYUN::VPC::RouteTableAssociation is used to associate a custom routing table with a vSwitch in the same VPC.
Syntax
{
"Type": "ALIYUN::VPC::RouteTableAssociation",
"Properties": {
"RouteTableId": String,
"VSwitchId": String
}
}
Properties
Name | Type | Required | Editable | Description | Validity |
Name | Type | Required | Editable | Description | Validity |
---|
RouteTableId | String | Yes | No | The ID of the routing table. | None |
VSwitchId | String | Yes | No | The ID of the vSwitch with which the routing table will be associated. | None |
Response parameters
Fn::GetAtt
- RouteTableId: the ID of the routing table.
- VSwitchId: the ID of the vSwitch.
Examples
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
{
"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"
]
}
}
}
}