The ALIYUN::VPC::RouteTableAssociation resource attaches a custom route table to a vSwitch in the same VPC.
Syntax
{
"Type": "ALIYUN::VPC::RouteTableAssociation",
"Properties": {
"RouteTableId": String,
"VSwitchId": String
}
}Properties
| Property name | Type | Required | Update allowed | Description | Constraints |
| RouteTableId | String | Yes | No | The ID of the route table. | None. |
| VSwitchId | String | Yes | No | The ID of the vSwitch to attach. | None. |
Return values
Fn::GetAtt
- RouteTableId: The ID of the route table.
- VSwitchId: The ID of the attached vSwitch.
Examples
JSONformat{ "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" ] } } } }
该文章对您有帮助吗?