{"base_path":"/","components":null,"consumes":"","definitions":{"IAM5ErrorDetails":{"description":"调用下游服务的报错信息集合,IAM5鉴权错误时才会返回此信息0。","properties":{"error_code":{"description":"下游服务错误码","type":"string"},"error_msg":{"description":"下游服务报错信息","type":"string"}}},"Ip_group":{"properties":{"id":{"description":"Ip地址组id,在新增Ip地址组时系统自动生成的唯一标识","type":"string"},"name":{"description":"Ip地址组名","type":"string"},"size":{"description":"Ip地址组中包含Ip/Ip段的数量","format":"int64","type":"integer"}},"type":"object"},"ListWhiteBlackipRuleResponseBody":{"properties":{"items":{"description":"黑白名单规则列表信息","items":{"$ref":"#/definitions/WhiteBlackIpResponseBody"},"type":"array"},"size":{"description":"ip地址总数","type":"integer"},"total":{"description":"黑白名单规则条数","type":"integer"}},"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"},"WhiteBlackIpResponseBody":{"properties":{"addr":{"description":"Ip/Ip段","type":"string"},"description":{"description":"规则描述","format":"int64","type":"string"},"id":{"description":"规则id","type":"string"},"ip_group":{"$ref":"#/definitions/Ip_group","description":"Ip地址组"},"name":{"description":"黑白名单规则名称","type":"string"},"policyid":{"description":"策略id","type":"string"},"start":{"description":"规则生效的开始时间,生效模式为自定义时,此字段才有效","format":"int64","type":"integer"},"status":{"description":"规则状态,0:关闭,1:开启","type":"integer"},"terminal":{"description":"规则生效的结束时间,生效模式为自定义时,此字段才有效","format":"int64","type":"integer"},"time_mode":{"description":"生效模式,默认为permanent(立即生效)","type":"string"},"timestamp":{"description":"创建规则的时间戳(毫秒)","format":"int64","type":"integer"},"white":{"description":"防护动作:\n - 0拦截\n - 1放行\n - 2仅记录","type":"integer"}},"type":"object"}},"description":null,"group_id":"29975c0bd7ce463ca70ad5c074e3974b","host":"waf.cn-north-4.myhuaweicloud.com","id":"7b78dc3cd81f4c6dad03f8b06a9bca44","info_version":"v1","method":"get","name":"ListWhiteblackipPolicyRules","parameters":{},"paths":{"/v1/{project_id}/waf/rule/whiteblackip":{"get":{"description":"查询所有策略黑白名单防护规则","operationId":"ListWhiteblackipPolicyRules","parameters":[{"description":"**参数解释:**\n项目ID,对应控制台用户名->我的凭证->项目列表->项目ID。\n**约束限制:**\n不涉及\n**取值范围:**\n只能由英文字母、数字组成,且长度为32个字符。\n**默认取值:**\n不涉及","in":"path","name":"project_id","required":true,"type":"string"},{"description":"**参数解释:**\n策略id列表。策略id从\"查询防护策略列表\"(ListPolicy)接口获取,多个策略之间用“,”隔开\n**约束限制:**\n不涉及\n**取值范围:**\n策略id只能由英文字母、数字组成,且长度为32个字符。\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"},{"default":1,"description":"**参数解释:**\n分页查询的起始位置,表示从第几条记录开始返回(从1开始计数)。\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n1","in":"query","name":"page","required":false,"type":"integer"},{"default":1000,"description":"**参数解释:**\n分页查询时,每页包含多少条结果。\n**约束限制:**\n不涉及\n**默认取值:**\n1000","in":"query","name":"pagesize","required":false,"type":"integer"},{"description":"**参数解释:**\n用户Token,通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","in":"header","name":"X-Auth-Token","required":false,"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"}],"responses":{"200":{"description":"请求成功","examples":{"application/json":{"items":[{"addr":"192.168.1.0/24,192.168.2.0/24","id":"wbip-rule-001","ip_group":{"id":"ip-group-001","ip_count":512,"name":"办公网IP组"},"name":"办公网IP放行规则","policyid":"policy-wbip-202406","status":1,"time_mode":"permanent","timestamp":1717248000000,"white":1}],"size":12,"total":3}},"schema":{"$ref":"#/definitions/ListWhiteBlackipRuleResponseBody"}},"400":{"description":"请求失败","schema":{"$ref":"#/definitions/RestErrorResponse"}},"401":{"description":"token权限不足","schema":{"$ref":"#/definitions/RestErrorResponse"}},"500":{"description":"服务器内部错误","schema":{"$ref":"#/definitions/RestErrorResponse"}}},"summary":"查询所有策略黑白名单防护规则","tags":["策略规则管理"],"x-api-type":"open-api","x-hybridcloud":true,"x-is-registered":"Y","x-order":81,"x-request-examples-description-1":"查询所有策略黑白名单防护规则","x-request-examples-url-1":"GET https://{endpoint}/v1/{project_id}/waf/rule/whiteblackip?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"}