分页查询当前账号规则,支持按名称、风险等级、状态、执行效果、模板和合规包筛选;返回规则摘要与下一页游标。
下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。
参数 | 类型 | 是否必填 | 示例值 | 描述 |
|---|---|---|---|---|
Action | String | 是 | ListRules | 要执行的操作,取值:ListRules。 |
Version | String | 是 | 2025-01-01 | API的版本,取值:2025-01-01。 |
RuleName | String | 否 | example-rule | 规则名称模糊匹配条件 |
RiskLevel | Array of String | 否 | ["Low"] | 风险等级,可选值:Low,Medium,High |
RuleStatus | Array of String | 否 | ["Enabled"] | 规则启用状态过滤条件,可选值:Enabled,Disabled |
TemplateId | String | 否 | rt-123456 | 规则模板 ID |
NextToken | String | 否 | abcd | 分页游标;首次查询不传 |
ConformancePackId | String | 否 | cp-123456 | 合规包 ID |
MaxResults | Integer | 否 | 10 | 每页返回数量,取值范围 1 到 100 |
Effect | Array of String | 否 | ["Audit"] | 规则执行效果过滤条件,可选值:Audit,Modify |
下表仅列出本接口特有的返回参数。更多信息请参见返回结构。
参数 | 类型 | 示例值 | 描述 |
|---|---|---|---|
Rules | Array of Object | [{"RuleId":"rule-123456","RuleName":"example-rule","Description":"example description","RuleStatus":"Enabled","RiskLevel":"Low","RuleTemplateId":"rt-123456","CreatedTime":"2026-05-18T16:46:49Z"}] | 规则详情列表 |
NextToken | String | abcd | 分页游标;首次查询不传 |
MaxResults | Integer | 10 | 每页返回数量,取值范围 1 到 100 |
POST /?Action=ListRules&Version=2025-01-01 HTTP/1.1 Host: config.volcengineapi.com Content-Type: application/json; charset=UTF-8 X-Date: 20260518T164649Z X-Content-Sha256: 287e874e******d653b44d21e Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20260518/cn-beijing/config/request, SignedHeaders=host;x-content-sha256;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f { "RuleName": "example-rule", "RiskLevel": [ "Low" ], "RuleStatus": [ "Enabled" ], "TemplateId": "rt-123456", "NextToken": "", "MaxResults": 10 }
{ "ResponseMetadata": { "RequestId": "202605181646490000000000000000", "Action": "ListRules", "Version": "2025-01-01", "Service": "config", "Region": "cn-beijing" }, "Result": { "Rules": [ { "RuleId": "rule-123456", "RuleName": "example-rule", "Description": "example description", "RuleStatus": "Enabled", "RiskLevel": "Low", "RuleTemplateId": "rt-123456", "CreatedTime": "2026-05-18T16:46:49Z" } ], "NextToken": "", "MaxResults": 10 } }
您可访问公共错误码,获取更多错误码信息。