ALIYUN::ECS::Route is used to create a custom route entry.
Syntax
{
"Type": "ALIYUN::ECS::Route",
"Properties": {
"DestinationCidrBlock": String,
"RouteTableId": String,
"NextHopId": String,
"NextHopType": String,
"NextHopList": List
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
DestinationCidrBlock | String | Yes | No | The destination CIDR block of the custom route entry. | None |
RouteTableId | String | Yes | No | The ID of the route table. | None |
NextHopId | String | No | No | The ID of the next-hop instance for the custom route entry. | None |
NextHopType | String | No | No | The type of the next hop. | Default value: Instance. Valid values:
|
NextHopList | List | No | No | The list of next hops of the custom route entry. | If you set the NextHopList property, the route entry is an equal-cost multipath (ECMP) route. Valid values: 2 to 4. For more information, see NextHopList properties. |
NextHopList syntax
"NextHopList": [
{
"NextHopId": String,
"NextHopType": String
}
]
NextHopList properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
NextHopId | String | Yes | No | The ID of the next-hop instance for the ECMP route entry. | None |
NextHopType | String | No | No | The type of the next hop for the ECMP route entry. | Set the value to RouterInterface. |
Return values
Fn::GetAtt
None
Examples
JSON
format{ "ROSTemplateFormatVersion": "2015-09-01", "Resources": { "ECSRoute": { "Type": "ALIYUN::ECS::Route", "Properties": { "RouteTableId": "vtb-25oud****", "DestinationCidrBlock": "172.16.XX.XX/24", "NextHopId": "i-25xzy****" } } } }
To view more examples, visit Route.json and Route.yml. In the examples, the ALIYUN::ECS::AssignIpv6Addresses and ALIYUN::ECS::Route resource types are used.