查询cc规则列表
功能介绍
查询cc规则列表
URI
GET /v1/edgesec/configuration/http/policies/{policy_id}/cc-rule
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| policy_id | 是 | String | 策略id |
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| name | 否 | String | 规则名称 |
| page | 否 | Integer | 分页查询参数,第page页 |
| pagesize | 否 | Integer | 分页查询参数,每页显示pagesize条记录 |
请求参数
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| X-Auth-Token | 是 | String | auth token |
响应参数
状态码:200
| 参数 | 参数类型 | 描述 |
|---|---|---|
| total | Integer | 策略下cc规则数量 |
| items | Array of ShowHttpCcRuleResponseBody objects | cc规则列表 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| id | String | 规则id |
| name | String | 规则名称 |
| priority | Integer | cc规则优先级,越大优先级越高,默认1 |
| policy_id | String | 规则所在策略id |
| policy_name | String | 规则所在策略名称 |
| timestamp | Long | 创建规则时间戳 |
| description | String | 规则描述 |
| status | Integer | 规则开关状态 |
| mode | Integer | 规则类型(0:标准/1:高级) |
| total_num | Integer | 所有用户的周期内请求次数 |
| limit_num | Integer | 单个用户的周期内请求次数 |
| limit_period | Integer | 限速周期 |
| lock_time | Integer | 锁定时长 |
| tag_type | String | 防护模式 |
| tag_index | String | 防护模式标签 |
| tag_condition | HttpCcRuleCondition object | 防护规则条件 |
| unlock_num | Integer | 放行次数 |
| domain_aggregation | Boolean | 是否聚合域名 |
| conditions | Array of HttpCcRuleCondition objects | 条件列表参数较为复杂,存在级联关系,建议同时使用控制台上的添加误报屏蔽规则,单击F12键查看路径后缀为/cc-rule,方法为POST的请求参数,便于理解参数的填写 |
| action | HttpRuleAction object | 防护规则动作 |
| producer | Integer | 创建来源 |
| time_mode | String | 生效模式 |
| start | Long | customize生效时间区间开始 |
| terminal | Long | customize生效时间区间结束 |
| period_type | String | period每日生效时间类型,目前只有day |
| time_range | Array of TimeRangeItem objects | period每日生效时间区间 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| category | String | 防护规则字段 |
| index | String | 子字段,当字段类型(category)选择“params”、“cookie”、“header”时,请根据实际需求配置子字段且该参数必填。 |
| contents | Array of strings | 条件列表逻辑匹配内容。当logic_operation参数不以any或者all结尾时,需要传该参数。 |
| logic_operation | String | 条件列表匹配逻辑。
|
| value_list_id | String | 引用表id。当logic_operation参数以any或者all结尾时,需要传该参数。此外,引用表类型要与category类型保持一致。 |
| size | Long | 若防护规则涉及阈值,即使用该字段 |
| check_all_indexes_logic | Integer |
|
| 参数 | 参数类型 | 描述 |
|---|---|---|
| category | String | 操作类型。
|
| followed_action_id | String | 攻击惩罚规则id,只有当category参数值为block时才可配置该参数 |
| detail | HttpRuleActionDetail object | 防护规则动作 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| redirect_url | String | 返回页面重定向的url |
| response | HttpRuleActionResponse object | 防护规则返回页面 |
状态码:400
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 标准化错误码:服务名.八位数字编码 |
| error_msg | String | 清晰的错误信息 |
| encoded_authorization_message | String | 对接IAM5.0的服务,拒绝访问时需要返回IAM的相关响应 |
状态码:401
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 标准化错误码:服务名.八位数字编码 |
| error_msg | String | 清晰的错误信息 |
| encoded_authorization_message | String | 对接IAM5.0的服务,拒绝访问时需要返回IAM的相关响应 |
状态码:500
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 标准化错误码:服务名.八位数字编码 |
| error_msg | String | 清晰的错误信息 |
| encoded_authorization_message | String | 对接IAM5.0的服务,拒绝访问时需要返回IAM的相关响应 |
请求示例
无
响应示例
无
状态码
| 状态码 | 描述 |
|---|---|
| 200 | OK |
| 400 | 请求失败 |
| 401 | token权限不足 |
| 500 | 服务器内部错误 |
错误码
请参见错误码。