Adds IP entries to an access control list (ACL).
Description
- The AddEntriesToAcl operation is asynchronous. After you send a request, the system returns a request
ID, but the operation is still being performed in the background. You can call the
GetAcl or ListAcls operation to query the status of an ACL:
- If an ACL is in the configuring state, the IP entries are being added. In this case, you can perform only query operations.
- If an ACL is in the active state, the IP entries are added.
- You cannot repeatedly call the AddEntriesToAcl operation for the same Global Accelerator (GA) instance within the specified period of time.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | AddEntriesToAcl |
The operation that you want to perform. Set the value to AddEntriesToAcl. |
RegionId | String | Yes | cn-hangzhou |
The ID of the region where the GA instance is deployed. Set the value to cn-hangzhou. |
AclId | String | Yes | nacl-hp34s2h0xx1ht4nwo**** |
The ID of the ACL. |
AclEntries.N.Entry | String | No | 10.0.XX.XX/24 |
The IP address or CIDR block that you want to add to the network ACL. You can add at most 20 entries in each request. Note This parameter is required.
|
AclEntries.N.EntryDescription | String | No | test-entry |
The description of the entry. You can add at most 20 entry descriptions in each request. The description must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_). |
ClientToken | String | No | 5A2CFF0E-5718-45B5-9D4D-70B3FF3898 |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that it is unique among all requests. The client token can contain only ASCII characters. Note If you do not set this parameter, ClientToken is set to the value of RequestId. The value of RequestId may be different for each API request.
|
DryRun | Boolean | No | false |
Specifies whether to check the request without performing the operation. Valid values:
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 365F4154-92F6-4AE4-92F8-7FF34B540710 |
The ID of the request. |
AclId | String | nacl-hp34s2h0xx1ht4nwo**** |
The ID of the ACL. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=AddEntriesToAcl
&RegionId=cn-hangzhou
&AclId=nacl-hp34s2h0xx1ht4nwo****
&AclEntries=[{"Entry":"10.0.XX.XX/24","EntryDescription":"test-entry"}]
&ClientToken=5A2CFF0E-5718-45B5-9D4D-70B3FF3898
&DryRun=false
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<AddEntriesToAclResponse>
<RequestId>365F4154-92F6-4AE4-92F8-7FF34B540710</RequestId>
<AclId>nacl-hp34s2h0xx1ht4nwo****</AclId>
</AddEntriesToAclResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "365F4154-92F6-4AE4-92F8-7FF34B540710",
"AclId" : "nacl-hp34s2h0xx1ht4nwo****"
}
Error code
For a list of error codes, visit the API Error Center.