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
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
slb:AddAccessControlListEntry | create |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the network ACL. | cn-hangzhou |
AclId | string | Yes | The ID of the network ACL. | acl-bp1l0kk4gxce43kze***** |
AclEntrys | string | No | The configuration of the network ACL. Valid values:
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
Examples
Sample success responses
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 | InvalidParam.AclEntryExists | The 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. |
400 | SystemBusy | The system is busy. | The service is unavailable. Please try again later. |
503 | ServiceUnavailable | Service is unavailable now. | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2022-12-06 | The Error code has changed | View Change Details |
2022-12-06 | The Error code has changed | View Change Details |