ListConfigRules
Queries all rules in the rule list.
Operation description
This topic provides an example of querying the rule list within the current account. The response shows that the rule list contains 1 rule, 3 evaluated resources, and the evaluation result is COMPLIANT.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
config:ListConfigRules |
list |
*Rule
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ResourceTypes |
string |
No |
The resource types evaluated by the rule. |
ACS::ECS::Instance |
| PageSize |
integer |
No |
The number of entries to return on each page. Valid values: 1 to 100. Starting value: 1. Default value: 10. |
10 |
| CompliancePackId |
string |
No |
The ID of the compliance package. |
cp-fe416457e0d90022**** |
| ComplianceType |
string |
No |
The compliance evaluation result of the rule. Valid values:
Valid values:
|
COMPLIANT |
| PageNumber |
integer |
No |
The page number. Starting value: 1. Default value: 1. |
1 |
| Keyword |
string |
No |
The search keyword. Fuzzy match is supported for rule IDs, rule names, rule descriptions, and rule template identifiers. |
ecs |
| ConfigRuleState |
string |
No |
The running status of the rule. Valid values:
Valid values:
|
ACTIVE |
| ConfigRuleName |
string |
No |
The name of the rule. |
The name of the rule. |
| RiskLevel |
integer |
No |
The risk level of the rule. Valid values:
|
1 |
| SortBy |
string |
No |
Specifies whether to filter rules based on whether remediation is configured. A value of true indicates that rules with remediation configured are queried. A value of false indicates that rules without remediation configured are queried. If this parameter is not specified, rules are not filtered based on this condition. |
true |
| Tag |
array<object> |
No |
The sort criterion. By default, this parameter is not specified. Currently, only |
CreateDate-Desc |
|
object |
No |
The tags of the resource. A maximum of 20 tags can be bound. |
||
| Key |
string |
No |
The tag key. |
key-1 |
| Value |
string |
No |
The tag value. |
value-1 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| ConfigRules |
object |
The rule list. |
|
| ConfigRuleList |
array<object> |
The details of the rule list. |
|
|
array<object> |
The details of the rule list. |
||
| AccountId |
integer |
The ID of the account to which the rule belongs. |
100931896542**** |
| AutomationType |
string |
The remediation type. Only Operation Orchestration Service (OOS) is supported. |
OOS |
| Compliance |
object |
The aggregated compliance result of the rule. |
|
| ComplianceType |
string |
The summary result of the compliance evaluation for the rule. Valid values:
|
COMPLIANT |
| Count |
integer |
The number of evaluations corresponding to the summary result of the rule evaluation. |
2 |
| ConfigRuleArn |
string |
The ARN of the rule. |
acs:config::100931896542****:rule/cr-fdc8626622af00f9**** |
| ConfigRuleId |
string |
The ID of the rule. |
cr-fdc8626622af00f9**** |
| ConfigRuleName |
string |
The name of the rule. |
The name of the rule. |
| ConfigRuleState |
string |
The running status of the rule. Valid values:
|
ACTIVE |
| CreateBy |
object |
The creation information of the rule. |
|
| CompliancePackId |
string |
The ID of the compliance package. |
cp-fdc8626622af00f9**** |
| CompliancePackName |
string |
The name of the compliance package. |
The name of the compliance package. |
| CreateDate |
string |
The time when the rule was created (UTC+8). |
2025-09-19T15:51:00 |
| Description |
string |
The description of the rule. |
The description of the rule. |
| ResourceTypesScope |
string |
The resource types evaluated by the rule. Multiple resource types are separated by commas (,). |
ACS::EIP::EipAddress |
| RiskLevel |
integer |
The risk level of the rule. Valid values:
|
1 |
| SourceIdentifier |
string |
The identifier of the rule.
|
eip-bandwidth-limit |
| SourceOwner |
string |
The source of the rule. Valid values:
|
ALIYUN |
| Tags |
array<object> |
The tags of the rule. |
|
|
object |
The tags of the rule. |
||
| Key |
string |
The tag key of the rule. |
env |
| Value |
string |
The tag value of the rule. |
prod |
| PageNumber |
integer |
The page number. |
1 |
| PageSize |
integer |
The number of entries returned per page. |
10 |
| TotalCount |
integer |
The total number of rules. |
1 |
| RequestId |
string |
The request ID. |
AC3A7E12-72E6-5CC9-A5C1-D8D8919829A7 |
Examples
Success response
JSON format
{
"ConfigRules": {
"ConfigRuleList": [
{
"AccountId": 0,
"AutomationType": "OOS",
"Compliance": {
"ComplianceType": "COMPLIANT",
"Count": 2
},
"ConfigRuleArn": "acs:config::100931896542****:rule/cr-fdc8626622af00f9****",
"ConfigRuleId": "cr-fdc8626622af00f9****",
"ConfigRuleName": "The name of the rule.",
"ConfigRuleState": "ACTIVE",
"CreateBy": {
"CompliancePackId": "cp-fdc8626622af00f9****",
"CompliancePackName": "The name of the compliance package."
},
"CreateDate": "2025-09-19T15:51:00",
"Description": "The description of the rule.",
"ResourceTypesScope": "ACS::EIP::EipAddress",
"RiskLevel": 1,
"SourceIdentifier": "eip-bandwidth-limit",
"SourceOwner": "ALIYUN",
"Tags": [
{
"Key": "env",
"Value": "prod"
}
]
}
],
"PageNumber": 1,
"PageSize": 10,
"TotalCount": 1
},
"RequestId": "AC3A7E12-72E6-5CC9-A5C1-D8D8919829A7"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | NoPermission | You are not authorized to perform this operation. | You are not authorized to perform this operation. |
| 400 | Invalid.AggregatorId.Value | The specified AggregatorId is invalid. | The specified aggregator ID does not exist or you are not authorized to use the aggregator. |
| 404 | AccountNotExisted | Your account does not exist. | |
| 503 | ServiceUnavailable | The request has failed due to a temporary failure of the server. | The request has failed due to a temporary failure of the server. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.