查询频率控制规则列表 - ListFrequencyControlRuleV2
功能介绍
查询频率控制规则列表。
调用方法
请参见如何调用API。
授权信息
账号具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备调用API所需的权限。
- 如果使用角色与策略授权,具体权限要求请参见权限和授权项。
- 如果使用身份策略授权,当前API调用无需身份策略权限。
URI
GET /v2/aad/policies/waf/frequency-control-rule
请求参数
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| X-Auth-Token | 是 | String | 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 |
| Content-Type | 是 | String | Content-Type |
响应参数
状态码:200
| 参数 | 参数类型 | 描述 |
|---|---|---|
| total | Integer | 总数。 |
| items | Array of FrequencyControlRule objects | 项目。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| id | String | id |
| name | String | 规则名称。 |
| limit_num | Integer | 限制频率。 |
| limit_period | Integer | 限速周期。 |
| lock_time | Integer | 阻断时长。 |
| tag_type | String | 限速模式:源限速、目的限速。 源限速: 目的限速: |
| tag_index | String | 用户标识,当限速模式为用户限速(cookie或header)时。 选择cookie时,为cookie字段名。 选择header时,为需要防护的自定义HTTP首部。 |
| tag_condition | TagCondition object | 用户标识。 |
| action | ActionInfo object | 防护动作。 |
| conditions | Array of FrequencyControlCondition objects | 限速条件。 |
| unlock_num | Integer | 放行频率。 |
| domain_aggregation | Boolean | 域名聚合统计。 |
| region_aggregation | Boolean | 全局计数。 |
| captcha_lock_time | Integer | 锁定验证。 |
| grayscale_time | Boolean | 是否灰度生效。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| category | String | 防护动作类型。源限速-其他模式下,不支持人机验证(captcha)和仅记((log)。 |
| detail | DetailInfo object | 阻断页面信息。仅支持防护动作类型为阻断(block)和动态阻断(dynamic_block)。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| content_type | String | 阻断页面类型。自定义阻断页面时。 |
| content | String | 阻断页面内容。自定义阻断页面时必填,最长8192字符。 |
状态码:400
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 错误码 |
| error_description | String | 错误描述 |
请求示例
查询域名为74af0d26xxxxxxxxx579b0ccd的频率控制规则列表。
GET https://{endpoint}/v2/aad/policies/waf/frequency-control-rule?domain_name=74af0d26xxxxxxxxx579b0ccd 响应示例
状态码: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
} ]
} 状态码
| 状态码 | 描述 |
|---|---|
| 200 | OK |
| 400 | Error response |
错误码
请参见错误码。