All Products
Search
Document Center

Server Load Balancer:AddAccessControlListEntry

Last Updated:Mar 02, 2026

Adds IP entries to an access control list (ACL).

Operation description

Each network ACL can contain one or more IP addresses or CIDR blocks. Take note of the following limits on network ACLs:

  • The number of IP entries that can be added to a network ACL with each Alibaba Cloud account at a time: 50

  • The maximum number of IP entries that each network ACL can contain: 300

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:AddAccessControlListEntry

create

*acl

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

  • slb:tag
  • slb:AclName
None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID of the network ACL.

cn-hangzhou

AclId

string

No

The ID of the network ACL.

acl-bp1l0kk4gxce43kze*****

AclEntrys

string

No

The configuration of the network ACL. Valid values:

  • entry: the IP entries that you want to add to the network ACL. You can add CIDR blocks. Separate multiple CIDR blocks with commas (,).

  • comment: the comment on the network ACL.

Note

You can add at most 50 IP entries to a network ACL in each call. If the IP entry that you want to add to a network ACL already exists, the IP entry is not added. The IP entries that you add must be CIDR blocks.

[{"entry":"10.0.**.**/24","comment":"privaterule1"},{"entry":"192.168.**.**/16","comment":"privaterule2"}]

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

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

Examples

Success response

JSON format

{
  "RequestId": "988CB45E-1643-48C0-87B4-928DDF77EA4"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParam.AclEntryExists The specified aclEntry already exists in the acl.
400 IllegalEntry Entry version is conflict to the acl version.
400 AclEntryIllegal %s. The ACL entry is invalid.
400 InvalidEntry %s.
400 InvalidParam.Comment The specified comment is invalid. The specified comment is invalid.
400 AclEntryExceedLimit The maximum number of ACL entries is exceeded.
400 SystemBusy The system is busy. System Busy
503 ServiceUnavailable Service is unavailable now.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.