Calls DescribeRouteEntryList to query the list of route entries.
Operation description
Before calling the DeleteRouteEntry operation to delete a route entry, you can call this operation to query the next hop information of the route entry to be deleted.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vpc:DescribeRouteEntryList |
get |
*RouteTable
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the route table to which the route entry belongs. You can call the DescribeRegions operation to query the region ID. |
cn-hangzhou |
| RouteTableId |
string |
Yes |
The ID of the route table to query. |
vtb-bp1r9pvl4xen8s9ju**** |
| RouteEntryId |
string |
No |
The ID of the route entry to query. |
rte-bp1mnnr2al0naomnp**** |
| DestinationCidrBlock |
string |
No |
The destination CIDR block of the route entry. Both 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 version of the IP protocol. Valid values:
|
ipv4 |
| RouteEntryType |
string |
No |
The type of the route. Valid values:
|
System |
| NextHopId |
string |
No |
The ID of the next hop instance. |
vpn-bp10zyaph5cc8b7c7**** |
| NextHopType |
string |
No |
The type of the next hop. Valid values:
|
Instance |
| MaxResult |
integer |
No |
The number of entries to return per page during a paged query. Valid values: 1 to 100. Default value: 10. |
10 |
| NextToken |
string |
No |
Specifies whether a next query token (Token) exists. Valid values:
|
FFmyTO70tTpLG6I3FmYAXGKPd**** |
| RegionId |
string |
Yes |
The region ID of the route table to which the route entry belongs. You can call the DescribeRegions operation to query the region ID. |
cn-hangzhou |
| ServiceType |
string |
No |
The type of route service. If this field is empty, it indicates that the route is not managed. Valid value: TR, which indicates that the managed type is transit router. |
TR |
| DestCidrBlockList |
array |
No |
The list of destination CIDR blocks of route entries. |
|
|
string |
No |
The destination CIDR block list information of route entries. A maximum of 20 destination CIDR blocks can be specified. |
192.168.0.0/24 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The detailed information about route entries. |
||
| NextToken |
string |
Indicates whether a next query token (Token) exists. Valid values:
|
FFmyTO70tTpLG6I3FmYAXGKPd**** |
| RequestId |
string |
The request ID. |
14A07460-EBE7-47CA-9757-12CC4761D47A |
| RouteEntrys |
object |
||
| RouteEntry |
array<object> |
The route entry information. |
|
|
array<object> |
The route entry information. |
||
| Status |
string |
The status of the route entry. Valid values:
|
Available |
| Type |
string |
The route type. Valid values:
|
System |
| IpVersion |
string |
The IP version. Valid values: Valid values:
|
ipv4 |
| Description |
string |
The description of the route. |
RouteEntryDescription |
| RouteEntryName |
string |
The name of the route. |
aaa |
| DestinationCidrBlock |
string |
The destination CIDR block of the route. |
192.168.2.0/24 |
| RouteEntryId |
string |
The ID of the route. |
rte-bp1mnnr2al0naomnp**** |
| RouteTableId |
string |
The ID of the route table. |
vtb-bp15w5q90d2rk3bww**** |
| GmtModified |
string |
The time when the route was modified. The time follows the ISO 8601 standard in the |
2022-05-09T03:00:07Z |
| NextHops |
object |
||
| NextHop |
array<object> |
The information about the next hops. |
|
|
array<object> |
|||
| NextHopRegionId |
string |
The ID of the region where the next hop is deployed. Note
This parameter is returned when the next hop type is set to RouterInterface. |
cn-hangzhou |
| Weight |
integer |
The weight of the route. Note
This parameter is returned when the next hop type is set to RouterInterface. |
100 |
| NextHopId |
string |
The ID of the next hop. |
vpn-bp10zyaph5cc8b7c7**** |
| Enabled |
integer |
Indicates whether the route is available. Valid values:
Note
This parameter is returned when the next hop type is set to RouterInterface. |
1 |
| NextHopType |
string |
The next hop type. Valid values:
|
Instance |
| NextHopRelatedInfo |
object |
The information about the next hop. |
|
| InstanceId |
string |
The ID of the instance that is associated with the next hop. |
vpc-bp1t36rn9l53iwbsf**** |
| InstanceType |
string |
The type of the instance associated with the next hop. Valid values:
|
VPC |
| RegionId |
string |
The region ID of the instance associated with the next hop. Valid values: |
ch-hangzhou |
| ServiceType |
string |
Indicates whether the route is hosted. If the parameter is empty, the route is not hosted. If TR is returned, the route is hosted by a transit router. |
TR |
| Origin |
string |
The route origin. Valid values:
|
RoutePropagation |
Examples
Success response
JSON format
{
"NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
"RequestId": "14A07460-EBE7-47CA-9757-12CC4761D47A",
"RouteEntrys": {
"RouteEntry": [
{
"Status": "Available",
"Type": "System",
"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 | IllegalParam.NextToken | User nextToken is illegal. | |
| 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. | |
| 400 | InvalidRouteTable.NotFound | The specified RouteTable was not found. | |
| 400 | IllegalParam.RouteEntryType | The parameter of RouteEntryType is illegal. | |
| 400 | MissingParam.context | The param of context is missing. | |
| 400 | MissingParam.aliUid | The param of aliUid is missing. | |
| 400 | MissingParam.bid | The param of bid is missing. | |
| 400 | IllegalParam.IpVersion | Param IpVersion illegal. | Illegal parameter: IpVersion |
| 400 | OperationFailed.FilterParamUnderWrongRouteType | Operation failed because only custom type support filter by routeEntryId or routeEntryName | The operation failed because only custom routes support search by route ID or route name. |
| 400 | IllegalParam.NextTokenExpired | The parameter of NextTokenExpired is illegal. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.