Deletes a route entry from a route table of a VRouter or virtual border router (VBR).
Operation description
When you call this operation, take note of the following items:
-
You can delete only routes 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.
-
Before you call this operation to delete a route of a VBR route table, call the DescribeRouteEntryList operation to query the NextHopId of the route first.
-
DeleteRouteEntry is an asynchronous operation. After a request is sent, the system returns a request ID and runs the task in the background. You can call the DescribeRouteEntryList operation to query the status of the task.
- If the route is in the Deleting state, the route is being deleted.
- If you cannot query the route entry, the route entry is deleted.
-
You cannot repeatedly call the DeleteRouteEntry operation to delete a route from the route table of a vRouter or a VBR within the specified period of time.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
vpc:DeleteRouteEntry | delete |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | No | The region ID of the route table. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
RouteTableId | string | No | The ID of the route table to which the route belongs. | vtb-2ze3jgygk9bmsj23s**** |
RouteEntryId | string | No | The ID of the route that you want to delete. | rte-bp1mnnr2al0naomnpv**** |
DestinationCidrBlock | string | No | The destination CIDR block of the route. Only IPv4 CIDR blocks, IPv6 CIDR blocks, and prefix lists are supported. | 47.100.XX.XX/16 |
NextHopId | string | No | The ID of the next hop.
| ri-2zeo3xzyf38r4urzd**** |
NextHopList | array<object> | No | The list of the next hop of the ECMP route. | |
object | No | The information about the next hop of the ECMP route. | ||
NextHopId | string | No | The ID of the next hop that is configured for ECMP routing. You can specify information about at most 16 next hops. | ri-2zeo3xzyf38r43cd**** |
NextHopType | string | No | The type of the next hop that is configured for ECMP routing. Set the value to RouterInterface. You can specify information about at most 16 next hops. | RouterInterface |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "0ED8D006-F706-4D23-88ED-E11ED28DCAC0"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | MissingParameter | Miss mandatory parameter. | Some required parameters are not specified. Specify all required parameters and try again. |
400 | IncorrcetRouteEntryStatus | Some route entry status blocked this operation. | One or more routes in the route table are in the Pending or Modifying state. |
400 | InvalidCidrBlock.Malformed | Specified CIDR block is not valid. | The format of the CIDR block is invalid. |
400 | OperationDenied | Specified operation is denied as route entry type is system. | The specified route is a system route. |
400 | InvalidRouteEntry.NotFound | Route entry not exists. | The route entry does not exist. |
400 | InvalidVRouter.NotFound | vRouter not exists. | The specified vRouter does not exist. Check whether the specified vRouter is valid. |
400 | IncorrectRouteEntryStatus | Some route entry status blocked this operation. | The operation is not supported because the route table contains routes in the Pending or Modifying state. |
400 | IncorrectRouteEntryStatus | VBR has NotStable route entry. | The operation is not supported because the route table contains routes in the Pending or Modifying state. |
400 | IncorrectRouteEntryStatus | Specified routeEntry status error. | The operation is not supported because the route table contains routes in the Pending or Modifying state. |
400 | Forbbiden | Specified RouteEntry cannot allowed delete by openApi. | You cannot call this operation to delete the specified route. |
400 | InvalidNextHop | Specified nexthop and nexthop list cannot both null. | The next hop and next hop list cannot be empty at the same time. |
400 | InvalidRouteEntry | Specified routeEntry not exist. | The specified route entry does not exist. |
400 | Forbidden.VRouterNotFound | pecified virtual switch is not found during access authentication. | - |
400 | TaskConflict | The operation is too frequent, TaskConflict. | The system is unavailable. Try again later. |
400 | InvalidRouteEntryId.NotFound | Specified RouteEntryId does not exist. | The specified route is not found. |
400 | IncorrectVpcStatus | Current VPC status does not support this operation. | This operation cannot be performed when the VPC is in the current state. |
400 | InvalidVpnInstanceId.NotFound | %s | - |
400 | ParamExclusive.RouteEntryIdAndRouteTableIdOrDestCidrBlock | %s | - |
400 | InvalidNextHopList.Size | Nexthop list size should be between 2 and 16 | - |
400 | ParamExclusive.NextHopIdAndList | NextHopId and NextHopList cannot both be not null. | - |
400 | OperationFailed.DeleteMultiScopeEntry | Multi or ecmp scope must delete with force. | - |
400 | OperationFailed.DistibuteLock | Distibute lock fail. | The operation is locked by another request; |
400 | OperationDenied.DeleteManagedRouteEntry | The operation is not allowed because of route entry is managed. | You cannot delete hosted routes. |
400 | OperationDenied.RouteTableTypeNotPermitted | The operation is not allowed because the type of route table is not permitted. | You cannot create routes for route tables of the specified type. |
400 | IncorrectStatus.VpcRouteEntry | The status of the specified routeEntry is invalid. | The status of the VPC route entry is invalid. |
400 | OperationDenied.NextHopNotChanged | The operation is not allowed because of NextHopNotChanged. | The operation is not allowed because the next hop is not changed. |
400 | OperationDenied.DeleteGatewayEndpointRoute | The operation is not allowed to delete route entry pointing gateway endpoint.. | You cannot delete a route that points to a gateway endpoint. |
400 | IncorrectStatus.PrefixList | The status of prefixList is incorrect. | The prefix list is in an unstable state. |
404 | InvalidRouteTableId.NotFound | Specified route table does not exist. | The specified route table does not exist. |
404 | InvalidVpcId.NotFound | Specified value of VpcId is not found in our record. | The VPC does not exist. Check whether the specified VPC is valid. |
500 | Vpc.Error | error code 500,Internal server error. | - |
500 | Internal.Error | The request processing has failed due to some unknown error, exception or failure. | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-06-19 | The Error code has changed | View Change Details |
2024-06-05 | The Error code has changed | View Change Details |
2024-06-03 | The Error code has changed | View Change Details |
2023-09-06 | The Error code has changed | View Change Details |
2023-08-15 | The Error code has changed | View Change Details |
2023-08-03 | The Error code has changed | View Change Details |
2023-07-20 | API Description Update. The Error code has changed | View Change Details |
2023-05-08 | The Error code has changed | View Change Details |