查询频率控制规则列表 - ListFrequencyControlRuleV2
功能介绍
查询频率控制规则列表。
调用方法
请参见如何调用API。
授权信息
账号具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备调用API所需的权限。
- 如果使用角色与策略授权,具体权限要求请参见权限和授权项。
- 如果使用身份策略授权,当前API调用无需身份策略权限。
URI
GET /v2/aad/policies/waf/frequency-control-rule
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| domain_name | 是 | String | 域名 |
请求参数
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| 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 | 限制频率,单位为次,范围为1~2147483647。 |
| limit_period | Integer | 限速周期,单位为秒,范围1~3600。 |
| lock_time | Integer | 阻断时长,单位为秒,范围1~65535。 |
| tag_type | String | 限速模式:源限速、目的限速。 源限速: 目的限速: |
| tag_index | String | 用户标识,当限速模式为用户限速(cookie或header)时,需要传该参数。只能由字母、数字、下划线、连字符和英文句号组成,且不能超过2048个字符长度。 选择cookie时,设置cookie字段名,即用户需要根据网站实际情况配置唯一可识别Web访问者的cookie中的某属性变量名。用户标识的cookie,不支持正则,必须完全匹配。例如:如果网站使用cookie中的某个字段name唯一标识用户,那么可以选取name字段来区分Web访问者。 选择header时,设置需要防护的自定义HTTP首部,即用户需要根据网站实际情况配置可识别Web访问者的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 | 是否灰度生效。 |
状态码:400
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 错误码 |
| error_description | String | 错误描述 |
请求示例
查询域名为74af0d26xxxxxxxxx579b0ccd的频率控制规则列表。
GET https://{endpoint}/v2/aad/policies/waf/frequency-control-rule?domain_name=74af0d26xxxxxxxxx579b0ccd 响应示例
状态码:200
OK
{
"total" : 1,
"items" : [ {
"id" : "09e8cab1-xxxx-xxxx-xxxx-57f9fc851118",
"timestamp" : 1774350380859,
"producer" : 1,
"name" : "test",
"action" : {
"category" : "captcha"
},
"mode" : 1,
"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 |
错误码
请参见错误码。