Calls DeleteRouteEntries to batch delete custom route entries.
Operation description
When you call this operation to delete routing entries, note the following items:
-
Only routing entries in the Available state can be deleted.
-
Routing entries cannot be deleted if the VPC that contains the route table is creating or deleting a vSwitch or routing entry.
-
The DeleteRouteEntries operation is asynchronous. After you send a request, the system returns a request ID, but the routing entry is not yet deleted. The deletion task is still running in the background. You can call DescribeRouteEntryList to query the deletion status of the routing entry:
If the routing entry is in the Deleting state, the routing entry is being deleted.
If the specified routing entry cannot be found, the routing entry is deleted.
-
The DeleteRouteEntries operation does not support concurrent batch deletion of routing entries in route tables within the same VPC.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vpc:DeleteRouteEntries |
delete |
*RouteTable
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The ID of the region where the route table resides. You can call DescribeRegions to query the region ID. |
cn-hangzhou |
| RouteEntries |
array<object> |
No |
The information about the route entries to delete. |
|
|
object |
No |
The information about the route entries to delete. |
||
| RouteTableId |
string |
Yes |
The ID of the route table that contains the route entry to delete. You can specify up to 50 route table IDs. |
vtb-2ze3jgygk9bmsj23s**** |
| RouteEntryId |
string |
No |
The ID of the route entry to delete. You can specify up to 50 route entry IDs. Note
If the RouteEntryId parameter is not specified, the DstCidrBlock and NextHop parameters are required. |
rte-bp1mnnr2al0naomnpv**** |
| DstCidrBlock |
string |
No |
The destination CIDR block of the route entry to delete. IPv4 CIDR blocks, IPv6 CIDR blocks, and prefix list CIDR blocks are supported. You can specify up to 50 destination CIDR blocks. Note
If the RouteEntryId parameter is not specified, the DstCidrBlock and NextHop parameters are required. |
47.100.XX.XX/24 |
| NextHop |
string |
No |
The ID of the next hop instance to delete. You can specify up to 50 instance IDs. Note
If the RouteEntryId parameter is not specified, the DstCidrBlock and NextHop parameters are required. |
i-j6c2fp57q8rr4jlu**** |
| DryRun |
boolean |
No |
Specifies whether to perform a dry run. Valid values: true: performs a dry run without deleting routes. The system checks the AccessKey pair, the authorization of the Resource Access Management (RAM) user, and the required parameters. If the check fails, the corresponding error is returned. If the check passes, the error code false (default): sends a normal request. If the check passes, a 2xx HTTP status code is returned and the routes are deleted. |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
0ED8D006-F706-4D23-88ED-E11ED28DCAC0 |
| SuccessCount |
integer |
The number of route entries that were successfully deleted. |
2 |
| FailedCount |
integer |
The number of route entries that failed to be deleted. |
2 |
| FailedRouteEntries |
array<object> |
The information about the route entries that failed to be deleted. |
|
|
object |
The information about the route entries that failed to be deleted. |
||
| RouteEntryId |
string |
The ID of the route entry that failed to be deleted. |
rte-bp1mnnr2al0naomnpv**** |
| DstCidrBlock |
string |
The destination CIDR block of the route entry that failed to be deleted. IPv4 CIDR blocks, IPv6 CIDR blocks, and prefix list CIDR blocks are supported. |
47.100.XX.XX/24 |
| NextHop |
string |
The instance ID of the next hop that failed to be deleted. |
i-j6c2fp57q8rr4jlu**** |
| FailedCode |
string |
The error code of the failure. |
VPC_ROUTER_ENTRY_NOT_EXIST |
| FailedMessage |
string |
The error message of the failure. |
vRouterEntry not exists |
Examples
Success response
JSON format
{
"RequestId": "0ED8D006-F706-4D23-88ED-E11ED28DCAC0",
"SuccessCount": 2,
"FailedCount": 2,
"FailedRouteEntries": [
{
"RouteEntryId": "rte-bp1mnnr2al0naomnpv****",
"DstCidrBlock": "47.100.XX.XX/24",
"NextHop": "i-j6c2fp57q8rr4jlu****",
"FailedCode": "VPC_ROUTER_ENTRY_NOT_EXIST",
"FailedMessage": "vRouterEntry not exists"
}
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | DryRunOperation | Request validation has been passed with DryRun flag set. | The request passed the dry run. |
| 400 | TaskConflict | The operation is too frequent. Please wait a moment and try again. | The system is unavailable. Try again later. |
| 400 | MissingParam.RouteTableId | The parameter RouteTableId is missing. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.