All Products
Document Center

Virtual Private Cloud:DeleteRouteTable

Last Updated:Dec 02, 2023

Deletes a custom route table.

Operation Description


  • DeleteRouteTable 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 DescribeRouteTableList operation to query the status of the task.

    • If the custom route table is in the Deleting state, the custom route table is being deleted.
    • If you cannot query the custom route table, the custom route table is deleted.
  • You cannot repeatedly call the DeleteRouteTable operation to delete a custom route table within the specified period of time.


You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.


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
  • RouteTable

Request parameters


The region ID of the virtual private cloud (VPC) to which the custom route table belongs.

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


The ID of the custom route table.


Response parameters


The request ID.



Sample success responses


  "RequestId": "DC668356-BCB4-42FD-9BC3-FA2B2E04B634"

Error codes

HTTP status codeError codeError messageDescription
400OperationDenied.GatewayAssociatedYou cannot delete the specified route table because it still associates with gateway.You cannot delete the route table because it is associated with a gateway.
400MissingParam.RouteTableIdThe param of RouteTableId is missing.-
400IncorrectRouteTableTypeRoute table can be deleted by this action only when it's type is custom.-
400IncorrectVSwitchStatusThe current virtual switch status does not support this operation.The error message returned because the vSwitch is in the Pending state and cannot be deleted.
400IncorrectRouteTableStatus.RouteEntryExistYou cannot delete the specified route table because it still has custom route entry.You cannot delete the route table because custom routes exist in the route table.
400IncorrectStatus.cbnStatusCurrent CBN status does not support this operation.The status of the CEN instance is invalid.
404InvalidRegionId.NotFoundSpecified value of RegionId is not supported.-
404InvalidParameter.ActionThis vpc feature is not supported in this region-
404IncorrectRouteTableStatusThe current status of the route table does not support this operation.You cannot delete the route table in the current state.
404DependencyViolation.RouteEntryVpc route table has route entry.-

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