Delete VPCs

Last updated: 2018-06-25 18:15:21

1. API Description

This API (DeleteVpc) is used to delete VPCs.
Domain for API request:vpc.api.qcloud.com

1) Before deleting a VPC, please make sure that there is no relevant resource in the VPC, such as CVMs, Cloud Databases, NoSQL, VPN gateways, Direct Connect gateways, cloud load balancers, peering connections, and linked basic network devices.
2) Once deleted, the VPC CANNOT be recovered. Please be careful.

2. Input Parameters

The following request parameter list only provides API request parameters. Common request parameters need to be added when the API is called. For more information, refer to Common Request Parameters. The Action field for this API is DeleteVpc.

Parameter Name Required Type Description
vpcId Yes String VPC ID assigned by the system. Support both vpcId before the upgrade and unVpcId after the upgrade.

3. Output Parameters

Parameter Name Type Description
code Int Common error code; 0: Succeeded; other values: Failed. For more information, please see Common Error Codes on the Error Code page.
message String Module error message description depending on API.

4. Error Codes

The following error code list only provides the business logic error codes for this API. For common error codes, please see VPC Error Codes.

Error Code Description
InvalidVpc.NotFound The VPC does not exist. Please check the information you entered.
InvalidVpc.CannotDelete The VPC cannot be deleted because there are still resources under the VPC.

5. Example

Input


  https://vpc.api.qcloud.com/v2/index.php?Action=DeleteVpc
    &<Common request parameters>
  &vpcId=vpc-2ari9m7h

Output


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