Queries the compliance evaluation results of resources.
Operation description
In this example, the compliance evaluation result of the 23642660635396****
resource is queried and 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
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 ListDiscoveredResources . | ACS::RAM::User |
ResourceId | string | No | The ID of the resource. For more information about how to obtain the ID of a resource, see ListDiscoveredResources . | 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 in a request. Valid values: 1 to 100. | 10 |
Region | string | No | The ID of the region where one or more resources you want to query reside. For example, the value For more information about how to obtain the ID of the region where a resource resides, see ListDiscoveredResources . | global |
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": "Alice",
"RegionId": "global",
"IgnoreDate": "2022-06-01"
}
},
"RemediationEnabled": true
}
]
}
}
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 | 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.