Queries the precise access control rules configured for a website.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-ddoscoo:DescribeWebPreciseAccessRule |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ResourceGroupId |
string |
No |
The ID of the resource group to which the Anti-DDoS Pro instance belongs in Resource Management. This parameter is empty by default, which indicates that the instance belongs to the default resource group. |
default |
| Domains |
array |
Yes |
The domain name of the website. Note
A forwarding rule must be configured for the domain name. You can call DescribeDomains to query all domain names. |
www.aliyun.com |
|
string |
No |
The domain name of the website. |
www.test****.com |
|
| Owner |
string |
No |
The source of the rule. Valid values:
|
manual |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. |
209EEFBF-B0C7-441E-8C28-D0945A57A638 |
| PreciseAccessConfigList |
array<object> |
The precise access control rules for the website. |
|
|
array<object> |
|||
| Domain |
string |
The domain name of the website. |
www.aliyun.com |
| RuleList |
array<object> |
The list of rules. |
|
|
array<object> |
|||
| Action |
string |
The action that is performed on requests that match the rule. Valid values:
|
accept |
| Owner |
string |
The source of the rule. Valid values:
|
manual |
| ExpirePeriod |
integer |
The validity period of the rule. This value is a UNIX timestamp. Unit: seconds. |
1598889600 |
| Name |
string |
The name of the rule. |
testrule |
| ConditionList |
array<object> |
The list of match conditions. |
|
|
object |
|||
| MatchMethod |
string |
The logical operator. |
belong |
| Field |
string |
The match field. |
ip |
| Content |
string |
The match content. |
1.1.1.1 |
| HeaderName |
string |
The name of the custom HTTP header field. Note
This parameter is required only when Field is set to header. |
null |
| ContentList |
array |
The match conditions of the rule. The value is a JSON string. The value contains the following fields: Note
If you specify multiple match conditions, the logical relation between these conditions is AND.
|
|
|
string |
The match condition. |
{"field":"uri","match_method":"contain","content":"/test/123"} |
|
| Expires |
integer |
The validity period of the rule. Unit: seconds. This parameter is required only when the action of the rule is block. Requests that match the rule are blocked within the validity period. A value of 0 indicates that the rule is permanently valid. |
0 |
Additional information about field and match_method
| Match field (field) | Description | Applicable logical operator (match_method) |
| ip | The source IP address of the request. | belong: belongs to nbelong: does not belong to |
| uri | The URI of the request. | contain: contains ncontain: does not contain equal: equals nequal: does not equal lless: length is less than lequal: length equals lgreat: length is greater than regular: matches a regular expression |
| referer | The Referer header of the request, which indicates the source from which the request is redirected. | contain: contains ncontain: does not contain equal: equals nequal: does not equal lless: length is less than lequal: length equals lgreat: length is greater than nexist: does not exist regular: matches a regular expression |
| user-agent | The User-Agent header of the request, which includes information such as the browser identifier, rendering engine, and version. | contain: contains ncontain: does not contain equal: equals nequal: does not equal lless: length is less than lequal: length equals lgreat: length is greater than regular: matches a regular expression |
| params | The parameters in the URL of the request. This refers to the part of the URL that follows the question mark (?). For example, in demo.aliyundoc.com/index.html?action=login, action=login is the parameter part. | contain: contains ncontain: does not contain equal: equals nequal: does not equal lless: length is less than lequal: length equals lgreat: length is greater than |
| cookie | The Cookie header of the request. | contain: contains ncontain: does not contain equal: equals nequal: does not equal lless: length is less than lequal: length equals lgreat: length is greater than nexist: does not exist |
| content-type | The Content-Type header of the request, which specifies the Multipurpose Internet Mail Extensions (MIME) type of the HTTP content. | contain: contains ncontain: does not contain equal: equals nequal: does not equal lless: length is less than lequal: length equals lgreat: length is greater than |
| x-forwarded-for | The real IP address of the client that initiated the request. The X-Forwarded-For (XFF) header field is used to identify the original IP address of a client that connects to a web server through an HTTP proxy or a Server Load Balancer (SLB) instance. This header is included only in requests that are forwarded by an HTTP proxy or an SLB instance. | contain: contains ncontain: does not contain equal: equals nequal: does not equal lless: length is less than lequal: length equals lgreat: length is greater than nexist: does not exist regular: matches a regular expression |
| content-length | The number of bytes in the request body. | vless: value is less than vequal: value equals vgreat: value is greater than |
| post-body | The content of the request body. | contain: contains ncontain: does not contain equal: equals nequal: does not equal regular: matches a regular expression |
| http-method | The HTTP method of the request, such as GET or POST. | equal: equals nequal: does not equal |
| header | The header of the request. You can specify a custom HTTP header field. | contain: contains ncontain: does not contain equal: equals nequal: does not equal lless: length is less than lequal: length equals lgreat: length is greater than nexist: does not exist |
Examples
Success response
JSON format
{
"RequestId": "209EEFBF-B0C7-441E-8C28-D0945A57A638",
"PreciseAccessConfigList": [
{
"Domain": "www.aliyun.com",
"RuleList": [
{
"Action": "accept",
"Owner": "manual",
"ExpirePeriod": 1598889600,
"Name": "testrule",
"ConditionList": [
{
"MatchMethod": "belong",
"Field": "ip",
"Content": "1.1.1.1",
"HeaderName": "null",
"ContentList": [
"{\"field\":\"uri\",\"match_method\":\"contain\",\"content\":\"/test/123\"}"
]
}
],
"Expires": 0
}
]
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.