Skip to main content

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

NameLocationTypeRequiredSample valueDescription
NextHopList.N.NextHopIdBODYstringNori-2zeo3xzyf3cd8r4****the ID of the next hop instance of the ECMP route.
RouteTableIdBODYstringYesvtb-bp145q7glnuzd****the routing table ID to create a custom routing entry.
DescriptionBODYstringNoabccustom routing entry description information.
NextHopList.N.WeightBODYintegerNo10the route weight of the next hop of the ECMP route. Value range:0~100.
NextHopIdBODYstringNori-2zeo3xzyf38r4****the ID of the next hop instance of the custom routing entry.
DestinationCidrBlockBODYstringYes192.168.0.0/24customize 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.
versionBODYstringNo2016-01-01version of api
NextHopTypeBODYstringNoRouterInterfacecustomize 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.
regionIdBODYstringYesNo sample value for this parameter.region id
RouteEntryNameBODYstringNotestthe 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 (_).
RegionIdBODYstringYescn-qingdao-env17-d01ID of the region to which the routing table belongs. You can obtain the region ID by calling the DescribeRegions interface.
ClientTokenBODYstringNo02fb3da4-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.NextHopTypeBODYstringNoRouterInterfaceThe type of the next hop of the ECMP route can only be taken at present:RouterInterface(router interface).

Return data

NameTypeSample valueDescription
RequestIDstring1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DCRequest id

Example

Successful Response example

{
"RequestID":"1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC"
}

Failed Response example

{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}

}