Delete a Network ACL

Last updated: 2019-11-29 10:58:35

PDF

1. API Description

This API (DeleteNetworkAcl) is used to delete network ACLs.
API request domain name: vpc.api.qcloud.com

A network ACL associated with subnets cannot be deleted unless it is disassociated from the subnets.

2. Input Parameters

Below is a list of API request parameters. You need to add common request parameters to your request when calling this API. For more information, see the Common Request Parameters page. The Action field for this API is DeleteNetworkAcl.

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-erxok83l. You can query this ID through the API DescribeVpcEx.
networkAclId Yes String Network ACL ID assigned by the system, for example: acl-jk7weyp2. You can query this ID through the API DescribeNetworkAcl.

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 resource 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.
InvalidNetworkAclID.NotFound Invalid network ACL ID. This error code indicates that the Network ACL 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 DescribeNetworkAcl.
NetworkAclID InUse A network ACL that has been associated with subnets cannot be deleted.

5. Sample

Input

  https://vpc.api.qcloud.com/v2/index.php?Action=DeleteNetworkAcl
  &<Common Request Parameters>
  &vpcId=vpc-erxok83l
  &networkAclId=acl-jk7weyp2

Output


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