Queries the compliance evaluation results of resources in an account group.
Operation description
This example shows how to query the compliance evaluation result of the 23642660635396****
resource in the ca-7f00626622af0041****
account group. The resource is a RAM user. The returned result indicates that the resource is evaluated as NON_COMPLIANT
by using the cr-7f7d626622af0041****
rule.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
config:ListAggregateResourceEvaluationResults | List |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ResourceType | string | No | The type of the resource. For more information about how to query the type of a resource, see ListAggregateDiscoveredResources . | ACS::RAM::User |
ResourceId | string | No | The ID of the resource. For more information about how to obtain the ID of a resource, see ListAggregateDiscoveredResources . | 23642660635396**** |
ComplianceType | string | No | The compliance evaluation result of the resource. Valid values:
| NON_COMPLIANT |
NextToken | string | No | The token that you want to use to initiate the current request. If the response of the previous request is truncated, you can use this token to initiate another request and obtain the remaining entries.`` | IWBjqMYSy0is7zSMGu16**** |
MaxResults | integer | No | The maximum number of entries to return for a single request. Valid values: 1 to 100. | 10 |
Region | string | No | The ID of the region where one or more resources that you want to query reside. For example, the value For more information about how to obtain the ID of a region, see ListAggregateDiscoveredResources . | global |
AggregatorId | string | Yes | The ID of the account group. For more information about how to obtain the ID of an account group, see ListAggregators . | ca-7f00626622af0041**** |
For more information about common request parameters, see Common parameters.
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "25C89DDB-BB79-487D-88C3-4A561F21EFC4",
"EvaluationResults": {
"NextToken": "IWBjqMYSy0is7zSMGu16****",
"MaxResults": 10,
"EvaluationResultList": [
{
"RiskLevel": 1,
"ComplianceType": "NON_COMPLIANT",
"ResultRecordedTimestamp": 1624932227595,
"Annotation": "{\\\"configuration\\\":\\\"false\\\",\\\"desiredValue\\\":\\\"True\\\",\\\"operator\\\":\\\"StringEquals\\\",\\\"property\\\":\\\"$.LoginProfile.MFABindRequired\\\"}",
"ConfigRuleInvokedTimestamp": 1624932227157,
"InvokingEventMessageType": "ScheduledNotification",
"EvaluationResultIdentifier": {
"OrderingTimestamp": 1624932227157,
"EvaluationResultQualifier": {
"ConfigRuleArn": "acs:config::100931896542****:rule/cr-7f7d626622af0041****",
"ResourceType": "ACS::RAM::User",
"ConfigRuleName": "test-rule-name",
"ResourceId": "23642660635396****",
"ConfigRuleId": "cr-7f7d626622af0041****",
"ResourceName": "rd_member",
"RegionId": "global",
"IgnoreDate": "2022-06-01"
}
},
"RemediationEnabled": false
}
]
}
}
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 | CloudConfigServiceRoleNotExisted | The CloudConfigServiceRole does not exist. | The CloudConfig service role does not exist. |
404 | AccountNotExisted | Your account does not exist. | The specified 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. |
For a list of error codes, visit the Service error codes.