Querying the Frequency Control Rule List
Function
This API is used to query the frequency control rule list.
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/frequency-control-rule
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | User token. The token can be obtained through the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
| Content-Type | Yes | String | Content-Type |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| total | Integer | Total number. |
| items | Array of FrequencyControlRule objects | Project. |
| Parameter | Type | Description |
|---|---|---|
| id | String | id |
| name | String | Rule name. |
| limit_num | Integer | Rate limit frequency. |
| limit_period | Integer | Rate limit period. |
| lock_time | Integer | Blocking duration. |
| tag_type | String | Rate limiting mode: source rate limiting and destination rate limiting. Source traffic limiting
Destination traffic limiting: |
| tag_index | String | User ID. This parameter is required if you set the user-based rate limiting (cookie or header). If you select cookie, enter the cookie field name. If you select header, enter the custom HTTP header to be protected. |
| tag_condition | TagCondition object | User ID. |
| action | ActionInfo object | Protection action. |
| conditions | Array of FrequencyControlCondition objects | Rate limit condition |
| unlock_num | Integer | Allowable frequency. |
| domain_aggregation | Boolean | Domain name request aggregation statistics. |
| region_aggregation | Boolean | Global request counting. |
| captcha_lock_time | Integer | Lock verification. |
| grayscale_time | Boolean | Whether to take effect in gray mode. |
| Parameter | Type | Description |
|---|---|---|
| category | String | User identifier field. The value is fixed at referer. |
| contents | Array of strings | User identifier field content. |
| Parameter | Type | Description |
|---|---|---|
| category | String | Protection type. Source traffic rate limiting. In other modes, CAPTCHA and log-only are not supported. |
| detail | DetailInfo object | Block page information. Only the protection actions block and dynamic_block are supported. |
| Parameter | Type | Description |
|---|---|---|
| content_type | String | Block page type. Custom block page. The value can be: |
| content | String | Block page content. Mandatory for custom block pages. The value can contain a maximum of 8192 characters. |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_description | String | Error description. |
Example Requests
Query the frequency control rule list for the domain name 74af0d26xxxxxxxxx579b0ccd.
GET https://{endpoint}/v2/aad/policies/waf/frequency-control-rule?domain_name=74af0d26xxxxxxxxx579b0ccd Example Responses
Status code: 200
{
"total" : 1,
"items" : [ {
"id" : "09e8cab1-xxxx-xxxx-xxxx-57f9fc851118",
"name" : "test",
"action" : {
"category" : "captcha"
},
"conditions" : [ {
"category" : "url",
"contents" : [ "100" ],
"logic_operation" : "contain"
}, {
"category" : "ip",
"index" : "client-ip",
"contents" : [ "1.x.x.1" ],
"logic_operation" : "equal"
} ],
"limit_num" : "2",
"limit_period" : "60",
"lock_time" : "0",
"tag_type" : "ip",
"domain_aggregation" : true,
"region_aggregation" : true,
"captcha_lock_time" : 60,
"grayscale_time" : false
} ]
} Status Codes
| Status Code | Description |
|---|---|
| 200 | OK |
| 400 | Error response |
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