Queries information about route entries in a route table.
Operation description
Before you call the DeleteRouteEntry operation to delete a route, you can call this operation to query the next hop of the route that you want to delete.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the route table. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
RouteTableId | string | Yes | The ID of the route table that you want to query. | vtb-bp1r9pvl4xen8s9ju**** |
RouteEntryId | string | No | The ID of the route that you want to query. | rte-bp1mnnr2al0naomnp**** |
DestinationCidrBlock | string | No | The destination CIDR block of the route. IPv4 and IPv6 CIDR blocks are supported. | 192.168.2.0/24 |
RouteEntryName | string | No | The name of the route entry. The name must be 1 to 128 characters in length and cannot start with | abc |
IpVersion | string | No | The IP version. Valid values:
| IPv4 |
RouteEntryType | string | No | The route type. Valid values:
| System |
NextHopId | string | No | The ID of the next hop. | vpn-bp10zyaph5cc8b7c7**** |
NextHopType | string | No | The next hop type. Valid values:
| Instance |
MaxResult | integer | No | The number of entries per page. Valid values: 1 to 100. Default value: 10. | 10 |
NextToken | string | No | The pagination token that is used in the next request to retrieve a new page of results. Valid values:
| FFmyTO70tTpLG6I3FmYAXGKPd**** |
ServiceType | string | No | Specifies whether to host the route. If the parameter is empty, the route is not hosted. Set the value to TR, which specifies that the route is hosted by a transit router. | TR |
DestCidrBlockList | array | No | The destination CIDR blocks of the routes. | |
string | No | The destination CIDR blocks of the routes. You can specify at most 20 destination CIDR blocks. | 192.168.0.0/24 |
Response parameters
Examples
Sample success responses
JSON
format
{
"NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
"RequestId": "14A07460-EBE7-47CA-9757-12CC4761D47A",
"RouteEntrys": {
"RouteEntry": [
{
"Status": "Available",
"Type": "Custom",
"IpVersion": "IPv4",
"Description": "RouteEntryDescription",
"RouteEntryName": "aaa",
"DestinationCidrBlock": "192.168.2.0/24",
"RouteEntryId": "rte-bp1mnnr2al0naomnp****",
"RouteTableId": "vtb-bp15w5q90d2rk3bww****",
"GmtModified": "2022-05-09T03:00:07Z",
"NextHops": {
"NextHop": [
{
"NextHopRegionId": "cn-hangzhou",
"Weight": 100,
"NextHopId": "vpn-bp10zyaph5cc8b7c7****",
"Enabled": 1,
"NextHopType": "Instance",
"NextHopRelatedInfo": {
"InstanceId": "vpc-bp1t36rn9l53iwbsf****",
"InstanceType": "VPC",
"RegionId": "ch-hangzhou"
}
}
]
},
"ServiceType": "TR",
"Origin": "RoutePropagation"
}
]
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidRouteTable.NotFound | %s | - |
400 | IllegalParam.RouteEntryType | %s | - |
400 | MissingParam.context | %s | - |
400 | MissingParam.aliUid | %s | - |
400 | MissingParam.bid | %s | - |
400 | IllegalParam.IpVersion | %s | - |
400 | OperationFailed.FilterParamUnderWrongRouteType | %s | - |
400 | IllegalParam.NextToken | User nextToken is illegal. | - |
400 | IllegalParam.NextTokenExpired | %s | - |
400 | InvalidNextHop.NotFound | The specified route entry nexthop does not exist in our records. | - |
400 | OperationFailed.QueryCenEntry | Operation is denied because getting CEN route entry has failed. | Operation is denied because getting CEN route entry has failed. |
400 | OperationDenied.UseGatewayRouteEntryQueryInterface | Use listGatewayRouteTableEntries to describe gateway route entries. | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-08-26 | The Error code has changed | View Change Details |
2024-01-05 | API Description Update. The Error code has changed. The response structure of the API has changed | View Change Details |
2023-07-03 | The Error code has changed | View Change Details |