Deletes a custom route table.

Before you begin

Before deleting a custom route table, you must disassociate the custom route table from the associated VSwitch.

Make the API call

You can use OpenAPI Explorer to make API calls, search for API calls, perform debugging, and generate SDK example code.

Request parameters

Parameter Type Required? Example value Description
Action String  Yes DeleteRouteTable

The name of this action. Value: DeleteRouteTable

RegionId String  Yes cn-hangzhou

The region ID of the VPC to which the route table belongs. To query the region ID, call DescribeRegions.

RouteTableId String  Yes vtb-bp145q7glnuzdvzu2****

The ID of the route table to be deleted.

Response parameters

Parameter Type Example value Description
RequestId String  DC668356-BCB4-42FD-9BC3-FA2B2E04B634

The ID of the request.

Examples

Request example


https://vpc.aliyuncs.com/?Action=DeleteRouteTable
&RegionId=cn-hangzhou
&RouteTableId=vtb-bp145q7glnuzdvzu2****
&<CommonParameters>

Response example

XML format

<DeleteRouteTableResponse>
      <RequestId>DC668356-BCB4-42FD-9BC3-FA2B2E04B634</RequestId>
</DeleteRouteTableResponse>

JSON format

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

Errors

HTTP status code Error code Error message Description
400 IncorrectVSwitchStatus The current virtual switch status does not support this operation. The specified VSwitch is in the pending state. The route table cannot be deleted.

For a list of error codes, visit the API Error Center.