ListAclRule 接口用于查询访问管控规则信息详情,您需要明确查询的规则类型是禁止访问名单还是允许访问名单。
下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。
参数 | 类型 | 是否必填 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | ListAclRule | 要执行的操作,取值:ListAclRule。 |
Version | String | 是 | 2023-12-25 | API的版本,取值:2023-12-25。 |
参数 | 类型 | 是否必填 | 示例值 | 描述 |
---|---|---|---|---|
AclType | String | 是 | Block | 访问管控规则类型。
|
Action | Array of String | 否 | observe | 执行动作。
|
DefenceHost | Array of String | 否 | example.volcwaf002.com | 查询的域名列表。 |
Enable | Array of Integer | 否 | 1 | 规则的启用状态,
|
Page | Integer | 否 | 1 | 查询页码,默认为 1。 |
PageSize | Integer | 否 | 10 | 单页条数,默认为 10。范围为 1 ~ 100。 |
RuleName | String | 否 | 访问控制1 | 规则名称,模糊搜索。 |
RuleTag | String | 否 | B000000116869 | 规则唯一标识符,精确搜索。 |
TimeOrderBy | String | 否 | ASC | 列表展示时序。
|
ProjectName | String | 否 | default | 所属项目资源名称,获取方式可参考ListDomain-查询云 WAF 实例防护网站信息。 |
下表仅列出本接口特有的返回参数。更多信息请参见返回结构。
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
Rules | Array of Object | -- | 访问管控规则详情。 |
Count | Integer | 1 | 当前页面条数。 |
CurrentPage | Integer | 1 | 当前页码。 |
PageSize | Integer | 10 | 单页条数。 |
TotalCount | Integer | 1 | 总条数。 |
POST /?Action=ListAclRule&Version=2023-12-25 HTTP/1.1 Host: open.volcengineapi.com Content-Type: application/json; charset=UTF-8 X-Date: 20250328T120006Z X-Content-Sha256: 287e874e******d653b44d21e Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20250328/cn-beijing/waf/request, SignedHeaders=host;x-content-sha256;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f { "AclType": "Block", "Action": [ "observe" ], "DefenceHost": [ "example.volcwaf002.com" ], "Enable": [ 1 ], "Page": 1, "PageSize": 10, "RuleName": "访问控制1", "RuleTag": "B000000116869", "TimeOrderBy": "ASC", "ProjectName": "default" }
{ "ResponseMetadata": { "RequestId": "20241120210453150078004033B173CB", "Action": "ListAclRule", "Version": "2023-12-25", "Service": "waf", "Region": "cn-beijing" }, "Result": { "Rules": [ { "AccurateGroup": { "Logic": 1, "AccurateRules": [ { "ValueString": "HTTP", "Opretar": 2, "ObjType": 0, "HttpObj": "request.schema", "Property": 0 } ] }, "Action": "observe", "Advanced": 0, "Description": "禁止特定 IP 访问。", "Enable": 1, "Host": "HOSTGROUP_1744808532", "HostAddType": 3, "HostGroupId": [ 7515 ], "HostGroups": [ { "HostGroupId": 7515, "Name": "重点防护域名" } ], "HostList": [ "example.volcwaf002.com" ], "ID": 116869, "IpGroups": 2, "IpList": [ "6291" ], "IpLocationCountry": [ "US" ], "Name": [ "访问控制1" ], "PrefixSwitch": [ "0" ], "RuleTag": "B000000116869", "UpdateTime": "2024-08-30T15:40:39+08:00", "ClientIp": "IPGROUP_2511009118" } ], "Count": 1, "CurrentPage": 1, "PageSize": 10, "TotalCount": 1 } }
您可访问公共错误码,获取更多错误码信息。