ALIYUN::ECS::Route is used to create a custom Route.

Statement

{
  "Type": "ALIYUN::ECS::Route",
  "Properties": {
    "DestinationCidrBlock": String,
    "RouteTableId": String,
    "NextHopId": String,
    "NextHopType": String,
    "RouteId": String,
    "NextHopList": List
  }
}

Properties

Parameter Type Required Editable Description Constraint
DestinationCidrBlock String No No The destination CIDR block of the RouteEntry. None
RouteTableId String No No The ID of the routing table. None
NextHopId String Yes Released The ID of the next-hop instance. Non-ECMP route entry.
RouteId String No No The ID of the route. None
NextHopType String Yes Released The type of the next hop. Default value: Instance.

Valid values: Instance, Tunnel, HaVip, and RouterInterface.

Default value: Instance. A value of Instance indicates that the next hop is an ECS Instance.

NextHopList List Erased Released The list of next hops of the route entry. You must specify the NextHopType and NextHopId parameters to specify the next hops. If you specify the NextHopList parameter, the route is an ECMP route. The list contains multiple next hops of the ECMP route entry. The NextHopList parameter can contain two to four next hops. The NextHopList parameter can be specified only when the route entry belongs to a VRouter. In addition, the next hops must be the router interfaces pointing to the connected VBRs. If you do not specify the NextHopList parameter, the route is a non-ECMP route.

NextHopList syntax

"NextHopList": [
  {
    "NextHopId": String,
    "NextHopType": String
  }
]

NextHopList properties

Parameter Type Required Editable Description Constraint
NextHopId String No No The ID of the next-hop instance. None
NextHopType String Yes Released The type of the next hop. Default value: Instance.

Valid values: Instance, Tunnel, HaVip, and RouterInterface.

Default value: RouterInterface.

Response parameters

Fn::GetAtt

None

Sample request

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "ECSRoute": {
      "Type": "ALIYUN::ECS::Route",
      "Properties": {
        "RouteId": "vrt-25mz0****",
        "RouteTableId": "vtb-25oud****",
        "DestinationCidrBlock": "172.16.XX.XX/24",
        "NextHopId": "i-25xzy****"
      }
    }
  }
}