Queries an access control list (ACL).

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates a sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes GetAcl

The operation that you want to perform. Set the value to GetAcl.

RegionId String Yes cn-hangzhou

The ID of the region where the Global Accelerator (GA) instance is deployed. Set the value to cn-hangzhou.

AclId String Yes nacl-hp34s2h0xx1ht4nwo****

The ID of the ACL.

Response parameters

Parameter Type Example Description
RequestId String CEF72CEB-54B6-4AE8-B225-F876FF7BA984

The ID of the request.

AclId String nacl-hp34s2h0xx1ht4nwo****

The ID of the ACL.

AddressIPVersion String IPv4

The IP version of the ACL. Valid value: IPv4.

AclStatus String Available

The state of the ACL. Valid values:

  • Provisioning: The ACL is being created.
  • Available: The ACL is available.
  • Configuring: The ACL is being configured.
AclEntries Array of AclEntries

The IP entries in the ACL. A maximum of 20 IP entries can be returned.

Entry String 10.0.1.1/24

The IP entry in the ACL.

EntryDescription String test-entry

The description of the IP entry. The description must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.),and underscores (_).

RelatedListeners Array of RelatedListeners

The listeners that associated with the ACL.

ListenerId String lsr-bp1bpn0kn908w4nbw****

The ID of the listener.

AclType String White

The type of the ACL. Valid values:

  • White: a whitelist. Only requests from the IP addresses or CIDR blocks in the ACL are forwarded. Whitelists are applicable to scenarios in which you want to allow only specific IP addresses to access an application. Exercise caution when you configure a whitelist. Otherwise, risks may occur. After you configure a whitelist for a listener, only requests from the IP addresses that are added to the whitelist are distributed by the listener. If the whitelist is enabled but no IP addresses are added to the ACL, the listener does not forward requests.
  • Black: a blacklist. All requests from the IP addresses or CIDR blocks in the ACL are denied. Blacklists are applicable to scenarios in which you want to deny requests from specific IP addresses to an application. If the blacklist is enabled but no IP addresses are added to the ACL, the listener forwards all requests.
AcceleratorId String ga-bp1odcab8tmno0hdq****

The ID of the GA instance.

AclName String test-acl

The name of the ACL. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), hyphens (-) and underscores (_). It must start with a letter.

Examples

Sample requests

http(s)://[Endpoint]/?Action=GetAcl
&RegionId=cn-hangzhou
&AclId=nacl-hp34s2h0xx1ht4nwo****
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<GetAclResponse>
    <RequestId>CEF72CEB-54B6-4AE8-B225-F876FF7BA984</RequestId>
    <AclId>nacl-hp34s2h0xx1ht4nwo****</AclId>
    <AddressIPVersion>IPv4</AddressIPVersion>
    <AclStatus>Available</AclStatus>
    <AclEntries>
        <Entry>10.0.1.1/24</Entry>
        <EntryDescription>test-entry</EntryDescription>
    </AclEntries>
    <RelatedListeners>
        <ListenerId>lsr-bp1bpn0kn908w4nbw****</ListenerId>
        <AclType>White</AclType>
        <AcceleratorId>ga-bp1odcab8tmno0hdq****</AcceleratorId>
    </RelatedListeners>
    <AclName>test-acl</AclName>
</GetAclResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "CEF72CEB-54B6-4AE8-B225-F876FF7BA984",
  "AclId" : "nacl-hp34s2h0xx1ht4nwo****",
  "AddressIPVersion" : "IPv4",
  "AclStatus" : "Available",
  "AclEntries" : [ {
    "Entry" : "10.0.1.1/24",
    "EntryDescription" : "test-entry"
  } ],
  "RelatedListeners" : [ {
    "ListenerId" : "lsr-bp1bpn0kn908w4nbw****",
    "AclType" : "White",
    "AcceleratorId" : "ga-bp1odcab8tmno0hdq****"
  } ],
  "AclName" : "test-acl"
}

Error codes

For a list of error codes, visit the API Error Center.