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 | Allow updates | Description | Constraint |
DestinationCidrBlock | String | Yes | No | The destination CIDR block of the custom route entry. | Supports IPv4, IPv6, prefix list destination CIDR blocks, and prefix list instance IDs. Make sure that the following requirements are met:
|
RouteTableId | String | Yes | No | The ID of the route table to which you want to add a custom route entry. | None |
NextHopId | String | No | No | The ID of the next-hop instance of the custom route entry. | If you select Ecr for NextHopType, you can obtain the AssociationId as the next hop ID by calling the DescribeExpressConnectRouterAssociation operation. |
NextHopType | String | No | No | The type of the next hop of the custom route entry. | Valid values:
|
NextHopList | List | No | No | The next hops of the custom route entry. | If NextHopList is specified, the route entry is an equal-cost multi-path (ECMP) route entry. The number of child items is less than or equal to 16. For more information, see NextHopList properties. |
DryRun | boolean | No | No | Specifies whether to perform only a dry run without performing the actual request. | Valid values:
|
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 of the ECMP route entry. | None |
Weight | integer<int32> | No | No | The routing weight of the next hop of the ECMP route. | None |
NextHopType | String | No | No | The type of the next hop of the ECMP route entry. | Set the value to RouterInterface. |
Return values
Fn::GetAtt
RouteEntryId: the ID of the custom route entry.
Examples
ROSTemplateFormatVersion: '2015-09-01'
Resources:
ECSRoute:
Type: ALIYUN::ECS::Route
Properties:
RouteTableId: vtb-25oud****
DestinationCidrBlock: 172.16.XX.XX/24
NextHopId: i-25xzy****
{
"ROSTemplateFormatVersion": "2015-09-01",
"Resources": {
"ECSRoute": {
"Type": "ALIYUN::ECS::Route",
"Properties": {
"RouteTableId": "vtb-25oud****",
"DestinationCidrBlock": "172.16.XX.XX/24",
"NextHopId": "i-25xzy****"
}
}
}
}
For more information, see the combined example of assigning an IPv6 address to an elastic network interface and creating a custom route entry: YAML example.