{"base_path":"/","components":null,"consumes":"","definitions":{"BatchUpdateIgnoreRuleRequestBody":{"description":"更新误报屏蔽规则请求体","example":{"conditions":[{"category":"url","contents":["/test"],"index":null,"logic_operation":"contain"}],"description":"","domain":[],"mode":1,"policy_rule_ids":[{"policy_id":"4a34899ab17a4811a6da57742f69135a","rule_ids":["ed37d85a925d469bb01986d06291d15f"]}],"rule":"091004"},"properties":{"advanced":{"$ref":"#/definitions/IgnoreAdvanced","description":"高级配置项"},"conditions":{"description":"条件列表","items":{"$ref":"#/definitions/CreateCondition"},"type":"array"},"description":{"description":"屏蔽规则描述","type":"string"},"domain":{"description":"防护域名或防护网站,数组长度为0时,代表规则对全部域名或防护网站生效","items":{"type":"string"},"type":"array"},"mode":{"description":"固定值为1,代表v2版本误报屏蔽规则,v1版本仅用于兼容旧版本,不支持创建","type":"integer"},"policy_rule_ids":{"description":"**参数解释:**\n策略ID和规则id数组,规则ID与规则所属的策略ID\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","items":{"properties":{"policy_id":{"description":"**参数解释:**\n策略id,唯一标识一条防护策略.策略id从\"查询防护策略列表\"(ListPolicy)接口获取\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","type":"string"},"rule_ids":{"description":"**参数解释:**\n规则id数组,包含当前防护策略下的单条规则ID,可通过ListIgnoreRule接口获取规则ID\n**约束限制:**\n单条规则ID\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","items":{"type":"string"},"type":"array"}},"required":["policy_id","rule_ids"]},"type":"array"},"rule":{"description":"**参数解释:**\n需要屏蔽的规则\n**约束限制:**\n参数值根据\"不检测模块\"变化\n**取值范围:**\n不检测模块:\n- 所有模块: bypass\n- Web基础防护模块按照规则类型划分:\n - ID: 内置规则id,通过ListWebBasicProtectionRules接口获取ID,多个id以分号;分隔,比如:\"000000;111111\"\n - 类别: 多个类型以分号;分隔,比如:\"xss;webshell\"\n - xss:XSS攻击\n - webshell:网站木马\n - vuln:其他类型攻击\n - sqli:SQL注入攻击\n - robot:恶意爬虫\n - rfi:远程文件包含\n - lfi:本地文件包含\n - cmdi:命令注入攻击\n - 所有内置规则\n- 非法请求: illegal\n**默认取值:**\n不涉及","type":"string"}},"required":["domain","conditions","mode","rule","policy_rule_ids"],"type":"object"},"CreateCondition":{"description":"条件列表参数较为复杂,存在级联关系,建议同时使用控制台上的添加误报屏蔽规则,单击F12键查看路径后缀为/ignore,方法为POST的请求参数,便于理解参数的填写","properties":{"category":{"description":"**参数解释:**\n字段类型\n**约束限制:**\n不涉及\n**取值范围:**\n- url: 路径\n- custom_geoip: 客户端IP所属的地理位置\n- robot: 已知特征爬虫\n- user-agent: User Agent\n- ip: IPv4\n- ipv6: IPv6\n- params: Params\n- cookie: Cookie\n- referer: Referer\n- header: Header\n- method: Method\n- request_line: Request Line\n- request: Request\n- protocol: Protocol\n- request_body: Request Body\n\n**默认取值:**\n不涉及","enum":["url","custom_geo","robot","user-agent","ip","ipv6","params","cookie","referer","header","method","request_line","request","protocol","request_body"],"type":"string"},"check_all_indexes_logic":{"description":"**参数解释:**\n需要检查所有子字段或检查任意子字段时传此参数\n**约束限制:**\n仅当category为params/cookie/header时支持\n**取值范围:**\n- 1:所有子字段\n- 2:任意子字段\n\n**默认取值:**\n不涉及","type":"integer"},"contents":{"description":"**参数解释:**\n条件列表逻辑匹配内容\n**约束限制:**\n当logic_operation参数不以any或者all结尾时,需要传该参数\n**取值范围:**\n匹配内容字符串长度范围:[1, 4096]\n内容格式根据参数category和logic_operation变化:\n- logic_operation为数值比较类型:纯数字\n- url: URL格式;仅支持单个匹配内容\n- custom_geoip: 客户端IP所属国家或省份,多个位置以|分隔,比如:\"BJ|SH\"\n- robot: 已知特征爬虫列表,可选择多个\n - crawler_engine:搜索引擎\n - crawler_scanner:扫描器\n - crawler_script:脚本工具\n - crawler_other:其他爬虫\n- ip: IPv4\n- ipv6: IPv6\n- referer: 例如:http://test.com\n- params:不包含&\n- user-agent/cookie/header/request_body: 无限制\n- method: HTTP协议支持的method,字母大写\n- protocol: \n - http\n - https\n\n**默认取值:**\n不涉及","items":{"type":"string"},"type":"array"},"index":{"description":"**参数解释:**\n子字段\n**约束限制:**\n随字段类型变化\n**取值范围:**\n- custom_geoip: \n - v4:ipv4\n - v6:ipv6\n - any:ipv4或ipv6\n- ip/ipv6: \n - null:客户端IP\n - x-forwarded-for:请求header中X-Forwarded-For记录的IP\n - $remote_addr:TCP连接IP\n - $remote_sockaddr:3层源IP\n- params/cookie/header:\n - check_all_indexes_logic为null: 可自定义子字段名称\n - check_all_indexes_logic不为null:必须为null\n- 其他字段类型:不支持,默认为null\n\n**默认取值:**\n不涉及","type":"string"},"logic_operation":{"description":"**参数解释:**\n匹配逻辑\n**约束限制:**\n匹配逻辑根据字段类型变化\n**取值范围:**\n- url/user-agent/referer: \n - contain_any: 包含任意一个\n - not_contain_all: 不包含全部\n - equal_any: 等于任意一个\n - not_equal_all: 不等于全部\n - prefix_any: 前缀匹配任意一个\n - not_prefix_all: 前缀不匹配全部\n - suffix_any: 后缀匹配任意一个\n - not_suffix_all: 后缀不匹配全部\n - contain: 包含\n - not_contain: 不包含\n - equal: 等于\n - not_equal: 不等于\n - prefix: 前缀匹配\n - not_prefix: 前缀不匹配\n - suffix: 后缀匹配\n - not_suffix: 后缀不匹配\n - len_equal: 长度等于\n - len_not_equal: 长度不等于\n - len_greater: 长度大于\n - len_less: 长度小于\n - len_greater_equal: 长度大于等于\n - len_less_equal: 长度小于等于\n - regular_match: 正则匹配\n - regular_not_match: 正则不匹配\n- custom_geoip: \n - belong: 属于\n - not_belong: 不属于\n- robot: \n - match: 匹配\n - not_match: 不匹配\n- ip/ipv6:\n - equal_any: 等于任意一个\n - not_equal_all: 不等于全部\n - equal: 等于\n - not_equal: 不等于\n- params/cookie/header:\n - contain_any: 包含任意一个\n - not_contain_all: 不包含全部\n - equal_any: 等于任意一个\n - not_equal_all: 不等于全部\n - prefix_any: 前缀匹配任意一个\n - not_prefix_all: 前缀不匹配全部\n - suffix_any: 后缀匹配任意一个\n - not_suffix_all: 后缀不匹配全部\n - contain: 包含\n - not_contain: 不包含\n - equal: 等于\n - not_equal: 不等于\n - prefix: 前缀匹配\n - not_prefix: 前缀不匹配\n - suffix: 后缀匹配\n - not_suffix: 后缀不匹配\n - len_equal: 长度等于\n - len_not_equal: 长度不等于\n - len_greater: 长度大于\n - len_less: 长度小于\n - len_greater_equal: 长度大于等于\n - len_less_equal: 长度小于等于\n - num_equal: 数字等于\n - num_not_equal: 数字不等于\n - num_greater: 数字大于\n - num_less: 数字小于\n - exist: 存在\n - not_exist: 不存在\n - regular_match: 正则匹配\n - regular_not_match: 正则不匹配\n- method/protocol:\n - equal: 等于\n - not_equal: 不等于\n- request_line:\n - len_equal: 长度等于\n - len_not_equal: 长度不等于\n - len_greater: 长度大于\n - len_less: 长度小于\n - len_greater_equal: 长度大于等于\n - len_less_equal: 长度小于等于\n- request:\n - len_equal: 长度等于\n - len_not_equal: 长度不等于\n - len_greater: 长度大于\n - len_less: 长度小于\n - len_greater_equal: 长度大于等于\n - len_less_equal: 长度小于等于\n - regular_match: 正则匹配\n - regular_not_match: 正则不匹配\n- request_body:\n - contain: 包含\n - contain_any: 包含任意一个\n - not_contain: 不包含\n - not_contain_all: 不包含全部\n - regular_match: 正则匹配\n - regular_not_match: 正则不匹配\n\n**默认取值:**\n不涉及","enum":["len_equal","len_not_equal","len_greater","len_less","len_greater_equal","len_less_equal","regular_match","regular_not_match","match","not_match","num_equal","num_not_equal","num_greater","num_less","exist","not_exist","equal","not_equal","equal_any","not_equal_all","prefix","prefix_any","not_prefix","not_prefix_all","suffix","suffix_any","not_suffix","not_suffix_all","contain","contain_any","not_contain","not_contain_all"],"type":"string"},"value_list_id":{"description":"**参数解释:**\n引用表ID\n**约束限制:**\n当logic_operation参数以any或者all结尾时,需要传该参数;引用表类型要与category类型保持一致\n**取值范围:**\n通过ListValueList接口获取引用表ID\n\n**默认取值:**\n不涉及","type":"string"}},"required":["category","logic_operation"],"type":"object"},"IAM5ErrorDetails":{"description":"调用下游服务的报错信息集合,IAM5鉴权错误时才会返回此信息0。","properties":{"error_code":{"description":"下游服务错误码","type":"string"},"error_msg":{"description":"下游服务报错信息","type":"string"}}},"IgnoreAdvanced":{"description":"若想忽略来源于某攻击事件下指定字段的攻击,可在“高级设置”里选择指定字段进行配置,配置完成后,WAF将不再拦截指定字段的攻击事件。当时,当不检测模块为所有检测模块时,不支持配置该高级配置。","properties":{"contents":{"description":"指定字段类型的子字段,默认值为“全部”","items":{"type":"string"},"type":"array"},"index":{"description":"字段类型,支持的字段类型有:Params、Cookie、Header、Body、Multipart。 \n - 当选择“Params”、“Cookie”或者“Header”字段时,可以配置“全部”或根据需求配置子字段 \n - 当选择“Body”或“Multipart”字段时,可以配置“全部”","type":"string"}}},"PolicyRuleIdResponseBody":{"example":{"policy_rule_ids":[{"policy_id":"4a34899ab17a4811a6da57742f69135a","rule_ids":["ed37d85a925d469bb01986d06291d15f"]}]},"properties":{"policy_rule_ids":{"description":"**参数解释:**\n策略和规则id数组,返回防护策略与对应规则的ID关联关系\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","items":{"properties":{"policy_id":{"description":"**参数解释:**\n策略id,唯一标识一条防护策略\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","type":"string"},"rule_ids":{"description":"**参数解释:**\n规则id数组,返回当前防护策略下的多条规则ID\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","items":{"type":"string"},"type":"array"}}},"type":"array"}},"type":"object"},"RestErrorResponse":{"properties":{"details":{"description":"调用下游服务的报错信息集合,IAM5鉴权错误时才会返回此字段。","items":{"$ref":"#/definitions/IAM5ErrorDetails"},"type":"array"},"encoded_authorization_message":{"description":"编码 (加密) 后的详细拒绝原因,用户可以自行调用 STS 服务的decode-authorization-message接口进行解码,可参考STS5联调自验证。IAM5鉴权错误时才会返回此字段。","type":"string"},"error_code":{"description":"错误码","type":"string"},"error_msg":{"description":"错误信息","type":"string"}},"title":"RestErrorResponse","type":"object"}},"description":null,"group_id":"29975c0bd7ce463ca70ad5c074e3974b","host":"waf.cn-north-4.myhuaweicloud.com","id":"1e93f918b21848e18232f347c6ea83a5","info_version":"v1","method":"post","name":"BatchUpdateIgnoreRules","parameters":{},"paths":{"/v1/{project_id}/waf/rule/ignore/batch-update":{"post":{"description":"批量更新全局白名单规则","operationId":"BatchUpdateIgnoreRules","parameters":[{"description":"**参数解释:**\n用户Token,通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","in":"header","name":"X-Auth-Token","required":true,"type":"string"},{"default":"application/json;charset=utf8","description":"**参数解释:**\n内容类型\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\napplication/json;charset=utf8","in":"header","name":"Content-Type","required":true,"type":"string"},{"default":"","description":"**参数解释:**\n项目ID,对应控制台用户名->我的凭证->项目列表->项目ID。\n**约束限制:**\n不涉及\n**取值范围:**\n只能由英文字母、数字组成,且长度为32个字符。\n**默认取值:**\n不涉及","in":"path","name":"project_id","required":true,"type":"string"},{"description":"**参数解释:**\n批量修改全局白名单规则body\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","in":"body","name":"BatchUpdateIgnoreRuleRequestBody","schema":{"$ref":"#/definitions/BatchUpdateIgnoreRuleRequestBody"}}],"produces":["application/json"],"responses":{"200":{"description":"**参数解释:**\nOK\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","examples":{"application/json":{"policy_rule_ids":[{"policy_id":"4a34899ab17a4811a6da57742f69135a","rule_ids":["ed37d85a925d469bb01986d06291d15f"]}]}},"schema":{"$ref":"#/definitions/PolicyRuleIdResponseBody"}},"400":{"description":"**参数解释:**\n请求失败\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","schema":{"$ref":"#/definitions/RestErrorResponse"}},"401":{"description":"**参数解释:**\ntoken权限不足\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","schema":{"$ref":"#/definitions/RestErrorResponse"}},"500":{"description":"**参数解释:**\n服务器内部错误\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","schema":{"$ref":"#/definitions/RestErrorResponse"}}},"summary":"批量更新全局白名单规则","tags":["策略规则管理"],"x-apidesigner":58,"x-is-registered":"Y","x-request-examples-description-1":"批量更新全局白名单规则","x-request-examples-text-1":{"conditions":[{"category":"url","contents":["/test"],"index":null,"logic_operation":"contain"}],"description":"","domain":[],"mode":1,"policy_rule_ids":[{"policy_id":"4a34899ab17a4811a6da57742f69135a","rule_ids":["ed37d85a925d469bb01986d06291d15f"]}],"rule":"091004"},"x-request-examples-url-1":"POST https://{endpoint}/v1/{project_id}/waf/rule/ignore/batch-update?enterprise_project_id=0","x-support-international":true,"x-support-sdk":"Y"}}},"product_short":"WAF","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":null,"summary":"批量更新全局白名单规则","tags":"策略规则管理","uri":null,"version":"2.0"}