All Products
Search
Document Center

Server Load Balancer:AddAccessControlListEntry

Last Updated:Mar 14, 2024

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

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
slb:AddAccessControlListEntryWRITE
  • acl
    acs:slb:{#regionId}:{#accountId}:acl/{#aclId}
  • slb:tag
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the network ACL.

cn-hangzhou
AclIdstringYes

The ID of the network ACL.

acl-bp1l0kk4gxce43kze*****
AclEntrysstringNo

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 parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

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

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError messageDescription
400InvalidParam.AclEntryExistsThe specified aclEntry already exists in the acl.-
400IllegalEntryEntry version is conflict to the acl version.-
400AclEntryIllegal%s.The ACL entry is invalid.
400InvalidEntry%s.-
400InvalidParam.CommentThe specified comment is invalid.The specified comment is invalid.
400AclEntryExceedLimitThe maximum number of ACL entries is exceeded.-
400InvalidParam.AclEntryExistsThe specified aclEntry already exists in current acl or other acl associate with current acl.The specified entry already exists in the current ACL or an ACL that is associated with the current ACL.
400SystemBusyThe system is busy.The service is unavailable. Please try again later.
503ServiceUnavailableService is unavailable now.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2022-12-06The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 500
    delete Error Codes: 503
2022-12-06The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 503
    Added Error Codes: 500