Queries the rules for the current account.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
config:ListConfigRules |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ConfigRuleState |
string |
No |
The status of the rule. Valid values:
|
ACTIVE |
| ComplianceType |
string |
No |
The compliance evaluation result of the rule. Valid values:
|
COMPLIANT |
| RiskLevel |
integer |
No |
The risk level of the rule. Valid values:
|
1 |
| PageNumber |
integer |
No |
The page number. Pages start from page 1. |
1 |
| PageSize |
integer |
No |
The number of entries to return on each page. Valid values: 1 to 100. |
20 |
| MultiAccount |
boolean |
No |
This parameter is scheduled to be deprecated at 00:00:00 on June 30, 2021. The API of the account group feature that is used to replace this parameter will be available at 00:00:00 on May 30, 2021. If you are using this parameter, we recommend that you switch to the API of the account group feature after 00:00:00 on May 30, 2021. For more information about account groups, see Account groups. |
true |
| MemberId |
integer |
No |
This parameter is scheduled to be deprecated at 00:00:00 on June 30, 2021. The API of the account group feature that is used to replace this parameter will be available at 00:00:00 on May 30, 2021. If you are using this parameter, we recommend that you switch to the API of the account group feature after 00:00:00 on May 30, 2021. For more information about account groups, see Account groups. |
123456789 |
| ConfigRuleName |
string |
No |
The name of the rule. |
OSS合规管理最佳实践-OSS存储空间ACL禁止公共读访问 |
| CompliancePackId |
string |
No |
The ID of the compliance package to which the rule belongs. |
cp-8d5c6457e0d9002a**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
N/A |
||
| ConfigRules |
object |
The list of rules. |
|
| ConfigRuleList |
array<object> |
The list of rules. |
|
|
array<object> |
N/A |
||
| AccountId |
integer |
The ID of the Alibaba Cloud account to which the rule belongs. |
987654321 |
| AutomationType |
string |
The type of the remediation template. The value is LC. Note
LC: Logic Composer. |
LC |
| Compliance |
object |
The compliance statistics of the rule. |
|
| ComplianceType |
string |
The compliance evaluation result of the rule. Valid values:
|
COMPLIANT |
| Count |
integer |
The number of resources that have the specified compliance evaluation result. |
161 |
| CompliancePackId |
string |
The ID of the compliance package to which the rule belongs. |
cp-8d5c6457e0d9002a**** |
| ConfigRuleArn |
string |
The ARN of the rule. |
acs:config::120886317861****:rule/cr-8d5c6457e0d9002a**** |
| ConfigRuleId |
string |
The rule ID. |
cr-8d5c6457e0d9002a**** |
| ConfigRuleName |
string |
The name of the rule. |
OSS合规管理最佳实践-OSS存储空间ACL禁止公共读访问 |
| ConfigRuleState |
string |
The status of the rule. Valid values:
|
ACTIVE |
| CreateBy |
object |
The information about the creator of the rule. |
|
| CompliancePackId |
string |
The ID of the compliance package. |
cp-8d5c6457e0d9002a**** |
| CompliancePackName |
string |
The name of the compliance package. |
OSS合规管理最佳实践 |
| Description |
string |
The description of the rule. |
OSS存储空间的ACL策略禁止公共读访问,视为“合规”。 |
| RiskLevel |
integer |
The risk level of the rule. Valid values:
|
1 |
| SourceIdentifier |
string |
The identifier of the rule.
|
oss-bucket-public-read-prohibited |
| SourceOwner |
string |
The owner of the rule. Valid values:
|
ALIYUN |
| Tags |
array<object> |
The tags of the rule. |
|
|
object |
The tag of the rule. |
||
| Key |
string |
The tag key. |
Key1 |
| Value |
string |
The tag value. |
Value1 |
| PageNumber |
integer |
The page number. Pages start from page 1. |
1 |
| PageSize |
integer |
The number of entries returned per page. Valid values: 1 to 100. |
20 |
| TotalCount |
integer |
The total number of rules. |
1 |
| RequestId |
string |
The request ID. |
8195B664-9565-4685-89AC-8B5F04B44B92 |
Examples
Success response
JSON format
{
"ConfigRules": {
"ConfigRuleList": [
{
"AccountId": 987654321,
"AutomationType": "LC",
"Compliance": {
"ComplianceType": "COMPLIANT",
"Count": 161
},
"CompliancePackId": "cp-8d5c6457e0d9002a****",
"ConfigRuleArn": "acs:config::120886317861****:rule/cr-8d5c6457e0d9002a****",
"ConfigRuleId": "cr-8d5c6457e0d9002a****",
"ConfigRuleName": "OSS合规管理最佳实践-OSS存储空间ACL禁止公共读访问",
"ConfigRuleState": "ACTIVE",
"CreateBy": {
"CompliancePackId": "cp-8d5c6457e0d9002a****",
"CompliancePackName": "OSS合规管理最佳实践"
},
"Description": "OSS存储空间的ACL策略禁止公共读访问,视为“合规”。",
"RiskLevel": 1,
"SourceIdentifier": "oss-bucket-public-read-prohibited",
"SourceOwner": "ALIYUN",
"Tags": [
{
"Key": "Key1",
"Value": "Value1"
}
]
}
],
"PageNumber": 1,
"PageSize": 20,
"TotalCount": 1
},
"RequestId": "8195B664-9565-4685-89AC-8B5F04B44B92"
}
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. |
| 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 for a complete list.
Release notes
See Release Notes for a complete list.