Querying a Precise Protection Rule
Function
This API is used to query a precise protection rule.
Calling Method
For details, see Calling APIs.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.
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 ListWafCustomRule objects | Data item |
| Parameter | Type | Description |
|---|---|---|
| id | String | id |
| name | String | name |
| time | Boolean | Time the precise protection rule takes effect. |
| timestamp | Long | Time when a precise protection rule is created. |
| 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 |
Example Requests
Query the Chinese mainland precise protection rule whose domain name is test.com.
GET https://{endpoint}/v2/aad/policies/waf/custom-rule?domain_name=test.com&overseas_type=0 Example Responses
Status code: 200
{
"total" : 1,
"items" : [ {
"id" : "f2a59811-7073-xxx-xxx-xxx",
"name" : "test",
"time" : false,
"priority" : 10,
"conditions" : [ {
"category" : "cookie",
"index" : "123123",
"contents" : [ "231231" ],
"logic_operation" : "contain"
} ],
"action" : {
"category" : "block"
}
} ]
} Status Codes
| Status Code | Description |
|---|---|
| 200 | OK |
Error Codes
See Error Codes.
What is your overall rating for this page?
Thank 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