Querying a Precise Protection Rule
Function
This API is used to query a precise protection rule.
Calling Method
For details, see Calling APIs.
URI
GET /v2/aad/policies/waf/custom-rule
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
domain_name |
Yes |
String |
Domain name |
|
overseas_type |
Yes |
Integer |
Protection region. 0: regions in the Chinese mainland. 1: regions outside the Chinese mainland. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
token |
|
Content-Type |
Yes |
String |
Content-Type |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
total |
Integer |
Total |
|
items |
Array of WafCustomRule objects |
Data item |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
id |
|
name |
String |
name |
|
time |
Boolean |
Time the precise protection rule takes effect. true: custom. false: immediate. |
|
start |
Long |
Timestamp (s) when the precise protection rule takes effect. |
|
terminal |
Long |
Timestamp (s) when the precise protection rule expires. |
|
priority |
Integer |
Priority of the rule. A smaller value indicates a higher priority. Value range: 0 to 1,000. |
|
conditions |
Array of WafCustomCondition objects |
condition |
|
action |
WafCustomRuleAction object |
action |
|
domain_name |
String |
Domain name |
|
overseas_type |
Integer |
Protection region. 0: regions in the Chinese mainland. 1: regions outside the Chinese mainland. |
|
Parameter |
Type |
Description |
|---|---|---|
|
category |
String |
Field type Enumeration values: url: path ip: IPv4 user-agent: User Agent method: Method referer: Referer params: Params cookie: Cookie header: Header request_line: Request Line request: Request |
|
index |
String |
Subfield.
client-ip: client IP addresses. x-forwarded-for: X-Forwarded-For $remote_addr: TCP connection IP addresses |
|
logic_operation |
String |
Condition matching logic. If category is set to url, user-agent, or referer, the matching logic can be contain, not_contain, equal, not_equal, prefix, not_prefix, suffix, not_suffix, len_greater, len_less, len_equal, or len_not_equal. If category is set to ip, ipv6, or method, the matching logic can be equal or not_equal. If category is set to request_line or request, the matching logic can be len_greater, len_less, len_equal, or len_not_equal. If category is set to params, cookie, or header, the matching logic can be contain, not_contain, equal, not_equal, prefix, not_prefix, suffix, not_suffix, len_greater, len_less, len_equal, len_not_equal, num_greater, num_less, num_equal, num_not_equal, exist, or not_exist. |
|
contents |
Array of strings |
Content for the matching logic in the condition list.
|
Example Requests
None
Example Responses
None
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot