huawei-cloud-api-definitions-WAF 0.1.20260403

Huawei Cloud API definitions, generated from OpenAPI spec
Documentation
1
{"base_path":"/","components":null,"consumes":"","definitions":{"BatchCreateIgnoreRuleRequestBody":{"description":"创建误报屏蔽规则请求体","example":{"advanced":{"contents":["sss"],"index":"params"},"conditions":[{"category":"ip","contents":["dd"],"logic_operation":"equal","value_list_id":"9a1cf1b140c645288c1a68ca56ec66a8"}],"description":"ss","domain":["www.aaa.com"],"mode":1,"policy_ids":["c467ec81836e4e9391102ad5e5949bb9"],"rule":1618},"properties":{"advanced":{"$ref":"#/definitions/IgnoreAdvanced","description":"高级配置项"},"conditions":{"description":"条件列表","items":{"$ref":"#/definitions/CreateCondition"},"type":"array"},"description":{"description":"屏蔽规则描述","type":"string"},"domain":{"description":"防护域名或防护网站,数组长度为0时,代表规则对全部域名或防护网站生效。当防护域名的接入模式为云模式-ELB接入时,该参数需以<域名>:\\<id\\>格式填写(如www.example.com:b061fb5b-8ea0-4357-b0f4-cb6178ab378a),若域名绑定的负载均衡器(ELB)下所有监听器都接入WAF防护,填入的id为负载均衡器(ELB)id,否则填入的id为指定监听器id;可通过ShowPremiumHost接口查询与该域名绑定的ELB实例id,在帮助中心-ELB服务-API文档下查询监听器id","items":{"type":"string"},"type":"array"},"mode":{"description":"固定值为1,代表v2版本误报屏蔽规则,v1版本仅用于兼容旧版本,不支持创建","type":"integer"},"policy_ids":{"description":"**参数解释:**\n添加规则的策略id列表。策略id从\"查询防护策略列表\"(ListPolicy)接口获取,多个策略之间用“,”隔开\n**约束限制:**\n不能为空\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","example":["a29c412353594920bfe1bf8a799f7b5a","3d36b2f3f482462390f882bfb7460ca7"],"items":{"type":"string"},"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_ids"],"type":"object"},"Condition":{"properties":{"category":{"description":"字段类型,可选值有ip、url、params、cookie、header","type":"string"},"check_all_indexes_logic":{"description":"字段类型为url或ip时不存在check_all_indexes_logic字段,其它情况下(1:检查所有子字段,2:检查任意子字段,null:使用自定义子字段)","type":"integer"},"contents":{"description":"内容,数组长度限制为1,内容格式根据字段类型变化,例如,字段类型为ip时,contents内容格式需为ip地址或ip地址段;字段类型为url时,contents内容格式需为标准url格式;字段类型为params、cookie、header时,内容的格式不做限制","items":{"type":"string"},"type":"array"},"index":{"description":"字段类型为ip且子字段为客户端ip时,不存在index参数;子字段类型为X-Forwarded-For时,值为x-forwarded-for,字段类型为params、header、cookie并且子字段为自定义时,index的值为自定义子字段","type":"string"},"logic_operation":{"description":"匹配逻辑,匹配逻辑根据字段类型变化,字段类型为ip时,匹配逻辑支持(equal:等于,not_equal:不等于),字段类型为url、header、params、cookie时,匹配逻辑支持(equal:等于,not_equal:不等于,contain:包含,not_contain:不包含,prefix:前缀为,not_prefix:前缀不为,suffix:后缀为,not_suffix:后缀不为,regular_match:正则匹配,regular_not_match:正则不匹配)","type":"string"}},"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"},"CreateIgnoreRulesResponseBody":{"properties":{"advanced":{"$ref":"#/definitions/IgnoreAdvanced","description":"高级配置项"},"conditions":{"description":"条件列表","items":{"$ref":"#/definitions/Condition"},"type":"array"},"description":{"description":"规则描述","type":"string"},"domain":{"description":"防护域名或防护网站","items":{"type":"string"},"type":"array"},"id":{"description":"规则id","type":"string"},"mode":{"description":"版本号固定值为1,代表v2版本误报屏蔽规则,v1版本仅支持兼容旧版本,不支持创建","type":"integer"},"multiCondition":{"description":"附加条件","type":"boolean"},"policyid":{"description":"策略id","type":"string"},"producer":{"description":"引用表来源,1代表用户创建,其它值代表modulleX自动生成","format":"int32","type":"integer"},"rule":{"description":"被屏蔽检测的规则类型或规则ID","type":"string"},"status":{"description":"**参数解释:**\n规则状态标识,用于指定规则的启用或关闭状态\n**约束限制:**\n不涉及\n**取值范围:**\n - 0:关闭\n - 1:开启\n**默认取值:**\n不涉及","enum":[0,1],"type":"integer"},"timestamp":{"description":"创建规则的时间戳","format":"int64","type":"integer"}}},"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"}}},"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":"cd7b23e81ea04c9384913dd993009827","info_version":"v1","method":"post","name":"BatchCreateIgnoreRule","parameters":{},"paths":{"/v1/{project_id}/waf/rule/ignore":{"post":{"description":"选中多个策略为这些策略批量添加全局白名单规则","operationId":"BatchCreateIgnoreRule","parameters":[{"description":"**参数解释:**\n项目ID,对应控制台用户名->我的凭证->项目列表->项目ID。\n**约束限制:**\n不涉及\n**取值范围:**\n只能由英文字母、数字组成,且长度为32个字符。\n**默认取值:**\n不涉及","in":"path","name":"project_id","required":true,"type":"string"},{"description":"**参数解释:**\n防护策略id,您可以通过调用查询防护策略列表(ListPolicy)获取策略id\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","in":"query","name":"policyids","required":false,"type":"string"},{"description":"**参数解释:**\n您可以通过调用企业项目管理服务(EPS)的查询企业项目列表接口(ListEnterpriseProject)查询企业项目ID。若需要查询当前用户所有企业项目绑定的资源信息,请传参all_granted_eps。\n**约束限制:**\n不涉及\n**取值范围:**\n - 0:代表default企业项目\n - all_granted_eps:代表所有企业项目\n - 其它企业项目ID:长度为36个字符\n\n**默认取值:**\n0","in":"query","name":"enterprise_project_id","required":false,"type":"string"},{"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"},{"description":"批量创建全局白名单防护规则","in":"body","name":"BatchCreateIgnoreRuleRequestBody","required":true,"schema":{"$ref":"#/definitions/BatchCreateIgnoreRuleRequestBody"}}],"responses":{"200":{"description":"**参数解释:**\nOK\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","examples":{"application/json":{"advanced":{"contents":["sss"],"index":"params"},"conditions":[{"category":"url","contents":["dd"],"logic_operation":"contain"}],"description":"ss","domain":["www.aaa.com"],"mode":1,"multiCondition":false,"producer":1,"rule":1618}},"schema":{"$ref":"#/definitions/CreateIgnoreRulesResponseBody"}},"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-api-type":"open-api","x-hybridcloud":true,"x-is-registered":"Y","x-order":85,"x-request-examples-1":{"advanced":{"contents":["sss"],"index":"params"},"conditions":[{"category":"url","contents":["dd"],"index":null,"logic_operation":"contain"}],"description":"ss","domain":["www.aaa.com"],"mode":1,"policy_ids":["c467ec81836e4e9391102ad5e5949bb9"],"rule":1618},"x-request-examples-description-1":"选中多个策略为这些策略批量添加全局白名单规则","x-request-examples-text-1":{"advanced":{"contents":["sss"],"index":"params"},"conditions":[{"category":"url","contents":["dd"],"index":null,"logic_operation":"contain"}],"description":"ss","domain":["www.aaa.com"],"mode":1,"policy_ids":["c467ec81836e4e9391102ad5e5949bb9"],"rule":1618},"x-request-examples-url-1":"POST https://{endpoint}/v1/{project_id}/waf/rule/ignore?enterprise_project_id=0","x-support-sdk":"Y"}}},"product_short":"WAF","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":null,"summary":"选中多个策略批量添加全局白名单规则","tags":"策略规则管理","uri":null,"version":"2.0"}