All Products
Search
Document Center

Server Load Balancer:CreateAccessControlList

Last Updated:Mar 02, 2026

Creates an access control list (ACL).

Operation description

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

  • An account can have a maximum of 50 ACLs in each region.

  • You can add a maximum of 50 IP addresses or CIDR blocks at a time within an account.

  • Each ACL can contain a maximum of 300 IP addresses or CIDR blocks.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

slb:CreateAccessControlList

create

*AccessControlList

acs:slb:{#regionId}:{#accountId}:acl/*

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID of the ACL.

cn-hangzhou

AclName

string

Yes

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

rule1

AddressIPVersion

string

No

The IP version. Valid values: ipv4 and ipv6.

ipv4

ResourceGroupId

string

No

The resource group ID.

rg-atstuj3rt******

Tag

array<object>

No

The tags.

object

No

The tags.

Key

string

No

The key of tag N. Valid values of N: 1 to 20. The tag key cannot be an empty string. The tag key can be up to 128 characters in length, and cannot contain http:// or https://. It cannot start with acs: or aliyun.

TestKey

Value

string

No

The value of tag N. Valid values of N: 1 to 20. The tag value can be an empty string. The tag value must be 0 to 128 characters in length, and cannot start with acs:. It cannot contain http:// or https://.

TestValue

Response elements

Element

Type

Description

Example

object

AclId

string

The IP version. Valid values: ipv4 and ipv6.

acl-rj9xpxzcwxrukois****

RequestId

string

The request ID.

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

Examples

Success response

JSON format

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

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidAction.RegionNotSupport The region does not support this action.
400 AclNumberOverLimit The Acl number has reached to the max quota limit.
400 InvalidResourceGroupId.NotFound The specified ResourceGroupId is not found.
400 ResourceInConfiguring.Acl The specified resource is configuring, please try again later.
400 InvalidParam.TagValue %s.
400 InvalidParam.TagKey %s.
400 SizeLimitExceeded.Tag %s.
400 MissingParam.TagKey The param MissingParam.TagKey is missing.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.