Creates a network access control list (ACL).

You can create multiple network ACLs. Each network ACL can contain one or more IP addresses or CIDR blocks. Before you create a network ACL, take note of the following limits:

  • You can create a maximum of 50 network ACLs in each region with each account.
  • You can add a maximum of 50 IP entries in each request with each account.
  • You can add a maximum of 300 IP entries to each network ACL.
  • You can associate a maximum of 50 network ACLs with each listener.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateAccessControlList

The operation that you want to perform. Set the value to CreateAccessControlList.

AclName String Yes rule1

The name of the network ACL. The name must be 1 to 80 characters in length, and can contain only letters, digits, periods (.), hyphens (-), forward slashes (/), and underscores (_). The name of the network ACL that you create must be unique within each region.

RegionId String Yes cn-hangzhou

The ID of the region where you want to create the network ACL.

AddressIPVersion String No ipv4

The IP version. Valid values: ipv4 and ipv6.

Note You can create high-performance IPv6 SLB instances in only the following zones: Hangzhou Zone E and Hangzhou Zone F, Beijing Zone F and Beijing Zone G, Shenzhen Zone D and Shenzhen Zone E, and all zones in the China (Shanghai) region.
ResourceGroupId String No rg-atstuj3rt******

The ID of the resource group to which the network ACL belongs.

Response parameters

Parameter Type Example Description
AclId String acl-rj9xpxzcwxrukois*******

The ID of the network ACL.

RequestId String 988CB45E-1643-48C0-87B4-928DDF77EA49

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=CreateAccessControlList
&AclName=rule1
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<CreateAccessControlListResponse>
    <RequestId>988CB45E-1643-48C0-87B4-928DDF77EA49</RequestId>
    <AclId>acl-rj9xpxzcwxrukois******</AclId>
</CreateAccessControlListResponse>

JSON format

{
    "AclId": "acl-rj9xpxzcwxrukoi******",
    "RequestId": "988CB45E-1643-48C0-87B4-928DDF77EA49"
}

Error codes

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