Querying Details About an ACL
Function
This API is used to query the access control list (ACL) configured for a domain name.
URI
GET /v1.0/cdn/domains/{domain_id}/ip-acl
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| domain_id | Yes | String | Specifies the ID of the domain name whose ACL is to be queried. For details, see Querying Details About a Domain Name. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| enterprise_project_id | No | String | Enterprise project that the resource belongs to. This parameter is valid only when the enterprise project function is enabled. The value all indicates all projects. This parameter is mandatory when you use an IAM user to call this API. Obtain the enterprise project ID by calling the ListEnterpriseProject API of Enterprise Project Management Service (EPS). |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Specifies the user token. The token can be obtained by calling the IAM API used to obtain a user token. The value of **X-Subject-Token** in the response header is the user token. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| type | Integer | Specifies the type of the IP address filtering rule. Possible values: 0 (no blacklist or whitelist), 1 (blacklist), and 2 (whitelist). |
| ip_list | Array of strings | Specifies the blacklisted or whitelisted IP addresses. If the mask is supported and available, the IP address portion of the subnet must be the first IP address on that block. |
Example Requests
GET https://cdn.myhuaweicloud.com/v1.0/cdn/domains/ff8080***********************d71/ip-acl?enterprise_project_id=0
Example Responses
Status code: 200
OK
{
"type" : 1,
"ip_list" : [ "10.23.3.3", "10.12.3.0/24" ]
} Status Codes
| Status Code | Description |
|---|---|
| 200 | OK |
Error Codes
See Error Codes.
Last Article: Querying a Referer List
Next Article: Setting an ACL
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.