CreateRouteEntry
Description
call the CreateRouteEntry interface to create a custom routing entry on a VPC router or border router.
Request Method
POST
Request Path
/apsara/route/Vpc/CreateRouteEntry
Request Parameters Common Parameters
Name | Location | Type | Required | Sample value | Description |
---|---|---|---|---|---|
NextHopList.N.NextHopId | BODY | string | No | ri-2zeo3xzyf3cd8r4**** | the ID of the next hop instance of the ECMP route. |
RouteTableId | BODY | string | Yes | vtb-bp145q7glnuzd**** | the routing table ID to create a custom routing entry. |
Description | BODY | string | No | abc | custom routing entry description information. |
NextHopList.N.Weight | BODY | integer | No | 10 | the route weight of the next hop of the ECMP route. Value range:0~100. |
NextHopId | BODY | string | No | ri-2zeo3xzyf38r4**** | the ID of the next hop instance of the custom routing entry. |
DestinationCidrBlock | BODY | string | Yes | 192.168.0.0/24 | customize the target network segment of the routing entry, supporting the target network segments of IPv4 and IPv6. The following requirements must be met: the target network segment cannot point to 100.64.0.0/10 or be included in 100.64.0.0/10. The destination CIDR blocks of different route entries in the same routing table cannot be the same. If the provided target network segment is an IPv4 address, the mask will be processed as 32 bits. if the provided target network segment is an IPv6 address, the mask will be processed as 128 bits. |
version | BODY | string | No | 2016-01-01 | version of api |
NextHopType | BODY | string | No | RouterInterface | customize the type of next hop of the routing entry, value: Instance:ECS instance (default). HaVip: highly available virtual IP. RouterInterface: router interface. NetworkInterface: ENI. VpnGateway:VPN gateway. IPv6Gateway:IPv6 gateway. |
regionId | BODY | string | Yes | No sample value for this parameter. | region id |
RouteEntryName | BODY | string | No | test | the name of the custom route entry to be created. The name is between 2 and 128 characters in length, starting with English letters or Chinese, and can contain numbers, dashes (-), and underscores (_). |
RegionId | BODY | string | Yes | cn-qingdao-env17-d01 | ID of the region to which the routing table belongs. You can obtain the region ID by calling the DescribeRegions interface. |
ClientToken | BODY | string | No | 02fb3da4-130e-11e9-8e44-001**** | Ensure request idempotence. Generate a parameter value from your client to ensure that the parameter value is unique between different requests. ClientToken only supports ASCII characters and cannot exceed 64 characters. |
NextHopList.N.NextHopType | BODY | string | No | RouterInterface | The type of the next hop of the ECMP route can only be taken at present:RouterInterface(router interface). |
Return data
Name | Type | Sample value | Description |
---|---|---|---|
RequestID | string | 1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC | Request id |
Example
Successful Response example
{
"RequestID":"1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC"
}
Failed Response example
{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}
}