Deletes multiple custom route entries at a time.
Usage notes
When you call this operation, take note of the following items:
- You can delete only route entries that are in the Available state.
- You cannot delete a route entry of a virtual private cloud (VPC) in which a vSwitch or another route entry is being created or deleted.
- DeleteRouteEntries is an asynchronous operation. After you call this operation, the system returns a request ID and runs the task in the background. You can call the DescribeRouteEntryList operation to query the status of a route entry.
- If the route entry is in the Deleting state, the route entry is being deleted.
- If you cannot query the route entry, the route entry is deleted.
- You cannot repeatedly call DeleteRouteEntries within a specific period of time.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DeleteRouteEntries | The operation that you want to perform. Set the value to DeleteRouteEntries. |
RegionId | String | Yes | cn-hangzhou | The region ID of the route table. You can call the DescribeRegions operation to query the most recent region list. |
RouteEntries.N.RouteTableId | String | Yes | vtb-2ze3jgygk9bmsj23s**** | The ID of the route table in which the route entry to be deleted resides. You can specify up to 50 route table IDs. |
RouteEntries.N.RouteEntryId | String | No | rte-bp1mnnr2al0naomnpv**** | The ID of the route entry that you want to delete. You can specify up to 50 route entry IDs. Note If the RouteEntryId parameter is not specified, you must specify the DstCidrBlock and NextHop parameters. |
RouteEntries.N.DstCidrBlock | String | No | 47.100.XX.XX/24 | The destination CIDR block of the route entry that you want to delete. IPv4 and IPv6 CIDR blocks are supported. You can specify up to 50 destination CIDR blocks. Note If the RouteEntryId parameter is not specified, you must specify the DstCidrBlock and NextHop parameters. |
RouteEntries.N.NextHop | String | No | i-j6c2fp57q8rr4jlu**** | The ID of the next hop that you want to delete. You can specify up to 50 next hop IDs. Note If the RouteEntryId parameter is not specified, you must specify the DstCidrBlock and NextHop parameters. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 0ED8D006-F706-4D23-88ED-E11ED28DCAC0 | The ID of the request. |
SuccessCount | Integer | 2 | The number of route entries that were deleted. |
FailedCount | Integer | 2 | The number of route entries that failed to be deleted. |
FailedRouteEntries | Array of FailedRouteEntries | The information about the route entry that failed to be deleted. |
|
RouteEntryId | String | rte-bp1mnnr2al0naomnpv**** | The ID of the route entry that failed to be deleted. |
DstCidrBlock | String | 47.100.XX.XX/24 | The destination CIDR block of the route entry that failed to be deleted. IPv4 and IPv6 CIDR blocks are supported. |
NextHop | String | i-j6c2fp57q8rr4jlu**** | The ID of the next hop that failed to be deleted. |
FailedCode | String | VPC_ROUTER_ENTRY_NOT_EXIST | The error code. |
FailedMessage | String | vRouterEntry not exists | The error message. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=DeleteRouteEntries
&RegionId=cn-hangzhou
&RouteEntries=[{"RouteTableId":"vtb-2ze3jgygk9bmsj23s****","RouteEntryId":"rte-bp1mnnr2al0naomnpv****","DstCidrBlock":"47.100.XX.XX/24","NextHop":"i-j6c2fp57q8rr4jlu****"}]
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DeleteRouteEntriesResponse>
<RequestId>0ED8D006-F706-4D23-88ED-E11ED28DCAC0</RequestId>
<SuccessCount>2</SuccessCount>
<FailedCount>2</FailedCount>
<FailedRouteEntries>
<RouteEntryId>rte-bp1mnnr2al0naomnpv****</RouteEntryId>
<DstCidrBlock>47.100.XX.XX/24</DstCidrBlock>
<NextHop>i-j6c2fp57q8rr4jlu****</NextHop>
<FailedCode>VPC_ROUTER_ENTRY_NOT_EXIST</FailedCode>
<FailedMessage>vRouterEntry not exists</FailedMessage>
</FailedRouteEntries>
</DeleteRouteEntriesResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"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 error message returned because the DryRun parameter is set to true. |
For a list of error codes, visit the API Error Center.