huawei-cloud-api-definitions-WAF 0.1.20260403

Huawei Cloud API definitions, generated from OpenAPI spec
Documentation
1
{"base_path":"/","components":null,"consumes":"","definitions":{"BatchUpdateCcRulesRequestBody":{"example":{"action":{"category":"dynamic_block","detail":{"response":{"content":"481","content_type":"application/json"}}},"conditions":[{"category":"url","contents":["/test"],"index":null,"logic_operation":"contain"}],"description":"","limit_num":10,"limit_period":60,"mode":1,"name":"test","policy_rule_ids":[{"policy_id":"4a34899ab17a4811a6da57742f69135a","rule_ids":["ed37d85a925d469bb01986d06291d15f"]}],"tag_index":"test","tag_type":"cookie","unlock_num":1},"properties":{"action":{"$ref":"#/definitions/CreateCcRuleRequestBodyAction"},"conditions":{"description":"cc规则防护规则限速条件,当cc防护规则为高级模式(mode参数值为1)时,该参数必填。","items":{"$ref":"#/definitions/CcCondition"},"type":"array"},"description":{"description":"规则描述","type":"string"},"domain_aggregation":{"description":"是否开启域名聚合统计。","type":"boolean"},"limit_num":{"description":"限制频率,单位为次,范围为1~2147483647","type":"integer"},"limit_period":{"description":"限速周期,单位为秒,范围1~3600","type":"integer"},"lock_time":{"description":"阻断时间,单位为秒,范围为0~65535。当“防护动作”选择“阻断”时,可设置阻断后恢复正常访问页面的时间。","type":"integer"},"mode":{"description":"cc规则防护模式,对应console上的mode,现在只支持创建高级cc规则防护模式。 \n - 0:标准,只支持对域名的防护路径做限制。\n - 1:高级,支持对路径、IP、Cookie、Header、Params字段做限制。","enum":[0,1],"type":"integer"},"name":{"description":"规则名称","type":"string"},"policy_rule_ids":{"description":"**参数解释:**\n策略和规则id数组,关联防护策略与对应的规则集合\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","items":{"properties":{"policy_id":{"description":"**参数解释:**\n策略id,唯一标识一条防护策略,可从\"查询防护策略列表\"(ListPolicy)接口获取\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","type":"string"},"rule_ids":{"description":"**参数解释:**\n规则id数组,包含当前防护策略下的单个CC规则id,您可以通过调用查询CC防护规则列表(ListCcRules)获取CC规则id\n**约束限制:**\n单条规则ID\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","items":{"type":"string"},"maxItems":1,"minItems":1,"type":"array","uniqueItems":true}},"required":["policy_id","rule_ids"]},"type":"array"},"region_aggregation":{"description":"是否开启全局计数。","type":"boolean"},"tag_condition":{"description":"用户标识,当限速模式为other时,需要传该参数。根据Referer(自定义请求访问的来源)字段区分单个Web访问者","properties":{"category":{"description":"用户标识字段,其值固定为referer","type":"string"},"contents":{"description":"用户标识字段内容","items":{"type":"string"},"type":"array"}}},"tag_index":{"description":"用户标识,当限速模式为用户限速(cookie或header)时,需要传该参数。 \n - 选择cookie时,设置cookie字段名,即用户需要根据网站实际情况配置唯一可识别Web访问者的cookie中的某属性变量名。用户标识的cookie,不支持正则,必须完全匹配。例如:如果网站使用cookie中的某个字段name唯一标识用户,那么可以选取name字段来区分Web访问者。 \n - 选择header时,设置需要防护的自定义HTTP首部,即用户需要根据网站实际情况配置可识别Web访问者的HTTP首部。","type":"string"},"tag_type":{"description":"**参数解释:**\n限速模式标识,用于指定区分单个Web访问者的判断依据\n**约束限制:**\n不涉及\n**取值范围:**\n - ip:IP限速,根据IP区分单个Web访问者\n - cookie:用户限速,根据Cookie键值区分单个Web访问者\n - header:用户限速,根据Header区分单个Web访问者\n - other:根据Referer(自定义请求访问的来源)字段区分单个Web访问者\n - policy:策略限速\n - domain:域名限速\n - url:url限速\n**默认取值:**\n不涉及","enum":["ip","cookie","header","other","policy","domain","url"],"type":"string"},"unlock_num":{"description":"放行频率,单位为次,范围为0~2147483647。只有当防护动作类型为dynamic_block时,才需要传该参数。","type":"integer"},"url":{"description":"需要防护的域名路径,当cc防护规则为标准模式(mode参数值为0)时,该参数必填。","type":"string"}},"required":["limit_num","limit_period","mode","tag_type","conditions","action","policy_rule_ids"],"type":"object"},"CcCondition":{"properties":{"category":{"description":"**参数解释:**\n字段类型\n**约束限制:**\n不涉及\n**取值范围:**\n - url\n - ip\n - ipv6\n - asn\n - params\n - cookie\n - referer\n - user-agent\n - header\n - response_code\n - response_header\n - response_body\n - request_body\n - method\n - tls_fingerprint\n - tls_ja3_fingerprint\n**默认取值:**\n不涉及","enum":["url","ip","ipv6","asn","params","cookie","referer","user-agent","header","response_code","response_header","response_body","request_body","method","tls_fingerprint","tls_ja3_fingerprint"],"type":"string"},"contents":{"description":"条件列表逻辑匹配内容。当logic_operation参数不以any或者all结尾时,需要传该参数。","items":{"type":"string"},"type":"array"},"index":{"description":"子字段,当字段类型(category)选择“params”、“cookie”、“header”时,请根据实际需求配置子字段且该参数必填。","type":"string"},"logic_operation":{"description":"条件列表匹配逻辑。 \n -  如果字段类型category是url, 匹配逻辑可以为:contain、 not_contain、 equal、 not_equal、 prefix、 not_prefix、 suffix、 not_suffix、 contain_any、 not_contain_all、 equal_any、 not_equal_all、 equal_any、 not_equal_all、 prefix_any、 not_prefix_all、 suffix_any、 not_suffix_all、 len_greater、 len_less、len_equal或者len_not_equal \n - 如果字段类型category是ip或者ipv6,匹配逻辑可以为: equal、not_equal、equal_any或者not_equal_all \n - 如果字段类型category是params、cookie或者header, 匹配逻辑可以为:contain、 not_contain、 equal、 not_equal、 prefix、 not_prefix、 suffix、 not_suffix、 contain_any、 not_contain_all、 equal_any、not_equal_all、 equal_any、 not_equal_all、 prefix_any、 not_prefix_all、 suffix_any、 not_suffix_all、 len_greater、 len_less、len_equal、len_not_equal、、num_greater、num_less、num_equal、num_not_equal、exist或者not_exist","type":"string"},"value_list_id":{"description":"引用表id。当logic_operation参数以any或者all结尾时,需要传该参数。此外,引用表类型要与category类型保持一致。","type":"string"}},"required":["category","logic_operation"]},"CreateCcRuleRequestBodyAction":{"description":"请求次数限制到达后采取的防护动作","properties":{"category":{"description":"动作类型:\n - captcha:人机验证,阻断后用户需要输入正确的验证码,恢复正确的访问页面。\n - block:阻断。 \n - log: 仅记录 \n - dynamic_block: 上一个限速周期内,请求频率超过“限速频率”将被阻断,那么在下一个限速周期内,请求频率超过“放行频率”将被阻断。注:只有当cc防护规则模式为高级模式时才支持设置dynamic_block防护动作。","enum":["captcha","block","log","dynamic_block"],"type":"string"},"detail":{"description":"阻断页面信息。当防护动作(category)选择阻断(block)或者动态阻断(dynamic_block)时,需要设置返回的阻断页面。\n - 如果需要返回的阻断页面为系统默认的阻断页面,不需要传该参数。\n - 如果用户想防护自定义的阻断页面,可以通过此参数设置","properties":{"response":{"description":"返回页面","properties":{"content":{"description":"防护页面内容","type":"string"},"content_type":{"description":"**参数解释:**\n内容类型\n**约束限制:**\n不涉及\n**取值范围:**\n - text/html\n - text/xml\n - application/json\n**默认取值:**\n不涉及","enum":["application/json","text/html","text/xml"],"type":"string"}},"type":"object"}}}},"required":["category"]},"IAM5ErrorDetails":{"description":"调用下游服务的报错信息集合,IAM5鉴权错误时才会返回此信息0。","properties":{"error_code":{"description":"下游服务错误码","type":"string"},"error_msg":{"description":"下游服务报错信息","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":"f3ede9580250475bad01e65e7d5d84e6","info_version":"v1","method":"post","name":"BatchUpdateCcRules","parameters":{},"paths":{"/v1/{project_id}/waf/rule/cc/batch-update":{"post":{"description":"批量修改CC防护规则","operationId":"BatchUpdateCcRules","parameters":[{"description":"**参数解释:**\n您可以通过调用企业项目管理服务(EPS)的查询企业项目列表接口(ListEnterpriseProject)查询企业项目ID。若需要查询当前用户所有企业项目绑定的资源信息,请传参all_granted_eps。\n**约束限制:**\n不涉及\n**取值范围:**\n - 0:代表default企业项目\n - all_granted_eps:代表所有企业项目\n - 其它企业项目ID:长度为36个字符\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"},{"default":"","description":"**参数解释:**\n项目ID,对应控制台用户名->我的凭证->项目列表->项目ID。\n**约束限制:**\n不涉及\n**取值范围:**\n只能由英文字母、数字组成,且长度为32个字符。\n**默认取值:**\n不涉及","in":"path","name":"project_id","required":true,"type":"string"},{"description":"**参数解释:**\n批量修CC准防护问控制规则body\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","in":"body","name":"BatchUpdateCcRulesRequestBody","schema":{"$ref":"#/definitions/BatchUpdateCcRulesRequestBody"}}],"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":"批量修改CC防护规则","tags":["策略规则管理"],"x-apidesigner":58,"x-is-registered":"Y","x-request-examples-description-1":"批量修改CC防护规则","x-request-examples-text-1":{"action":{"category":"dynamic_block","detail":{"response":{"content":"481","content_type":"application/json"}}},"conditions":[{"category":"url","contents":["/test"],"index":null,"logic_operation":"contain"}],"description":"","limit_num":10,"limit_period":60,"mode":1,"name":"test","policy_rule_ids":[{"policy_id":"4a34899ab17a4811a6da57742f69135a","rule_ids":["ed37d85a925d469bb01986d06291d15f"]}],"tag_index":"test","tag_type":"cookie","unlock_num":1},"x-request-examples-url-1":"POST https://{endpoint}/v1/{project_id}/waf/rule/cc/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":"批量修改CC防护规则","tags":"策略规则管理","uri":null,"version":"2.0"}