All Products
Search
Document Center

Virtual Private Cloud:DeleteRouteEntries

Last Updated:Aug 18, 2026

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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

vpc:DeleteRouteEntries

delete

*RouteTable

acs:vpc:{#regionId}:{#accountId}:routetable/{#routetableId}

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 DryRunOperation is returned.

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.