Delete a Route Table

Last updated: 2019-11-27 15:57:43

PDF

1. API Description

This API (DeleteRouteTable) is used to delete route tables.
Domain name for API requests: vpc.api.qcloud.com

2. Input Parameters

The following request parameter list only provides API request parameters. Common request parameters are required when the API is called. For more information, see the Common Request Parameters page. The Action field for this API is DeleteRouteTable.

Parameter name Required Type Description
vpcId Yes String ID of the VPC to which the subnet belongs, which can be the vpcId or unVpcId (recommended), for example vpc-rqndayhs. You can query this ID through the API DescribeVpcEx.
routeTableId Yes String The route table ID assigned by the system, which can be routeTableId or unRouteTableId (recommended), for example rtb-rqndayhs. You can query this ID through the API DescribeRouteTable.

3. Output Parameters

Parameter name Type Description
code Int Error code. 0: Successful; other values: Failed.
message String Error message.

4. Error Codes

The following error codes only include business logic error codes for this API. For additional common error codes, see VPC Error Codes.

Error code Description
InvalidVpc.NotFound Invalid VPC. This error code indicates that the VPC does not exist. In this case, verify whether the resource information that you entered is correct. You can query the VPC through the API DescribeVpcEx.
InvalidRouteTableId.NotFound Invalid route table. This error code indicates that the route table ID does not exist. In this case, verify whether the resource information that you entered is correct. You can query this ID through the API DescribeRouteTable.

5. Example

Input

  https://vpc.api.qcloud.com/v2/index.php?Action=DeleteRouteTable
  &<Common Request Parameters>
  &vpcId=vpc-amhnnao5
  &routeTableId=rtb-4ahe1qy2

Output

{
    "code": 0,
    "message": ""
}