All Products
Search
Document Center

Virtual Private Cloud:DeleteRouteEntries

Last Updated:Aug 29, 2024

Deletes multiple custom route entries at a time.

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 of a virtual private cloud (VPC) in which a vSwitch or another route is being created or deleted.

  • DeleteRouteEntries 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, the route is deleted.
  • You cannot repeatedly call DeleteRouteEntries within a specific period of time.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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.
OperationAccess levelResource typeCondition keyAssociated operation
vpc:DeleteRouteEntriesdelete
  • RouteTable
    acs:vpc:{#regionId}:{#accountId}:routetable/{#routetableId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the route table.

You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
RouteEntriesarray<object>No

The information about the routes that you want to delete.

objectNo
RouteTableIdstringYes

The ID of the route table to which the routes to be deleted belongs. You can specify up to 50 route table IDs.

vtb-2ze3jgygk9bmsj23s****
RouteEntryIdstringNo

The ID of the route that you want to delete. You can specify up to 50 route IDs.

Note If RouteEntryId is not specified, DstCidrBlock and NextHop are required.
rte-bp1mnnr2al0naomnpv****
DstCidrBlockstringNo

The destination CIDR block of the route that you want to delete. IPv4 and IPv6 CIDR blocks are supported. You can specify up to 50 destination CIDR blocks.

Note If RouteEntryId is not specified, DstCidrBlock and NextHop are required.
47.100.XX.XX/24
NextHopstringNo

The ID of the next hop that you want to delete. You can specify up to 50 next hop IDs.

Note If RouteEntryId is not specified, DstCidrBlock and NextHop are required.
i-j6c2fp57q8rr4jlu****

Response parameters

ParameterTypeDescriptionExample
object

The returned data.

RequestIdstring

The request ID.

0ED8D006-F706-4D23-88ED-E11ED28DCAC0
SuccessCountinteger

The number of route entries that were deleted.

2
FailedCountinteger

The number of route entries that failed to be deleted.

2
FailedRouteEntriesarray<object>

The information about the route entry that failed to be deleted.

object
RouteEntryIdstring

The ID of the route entry that failed to be deleted.

rte-bp1mnnr2al0naomnpv****
DstCidrBlockstring

The destination CIDR block of the route entry that failed to be deleted. IPv4 and IPv6 CIDR blocks are supported.

47.100.XX.XX/24
NextHopstring

The ID of the next hop that failed to be deleted.

i-j6c2fp57q8rr4jlu****
FailedCodestring

The error code.

VPC_ROUTER_ENTRY_NOT_EXIST
FailedMessagestring

The error message.

vRouterEntry not exists

Examples

Sample success responses

JSONformat

{
  "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 codeError codeError messageDescription
400DryRunOperationRequest validation has been passed with DryRun flag set.The request passed the dry run.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-08-07API Description Update. The Error code has changedView Change Details