Queries the summary of compliance evaluation results by rule risk level in an account group.

In this topic, the ca-3a58626622af0005**** account group is used as an example. The return result shows four rules that are specified with the high risk level. One of them detects non-compliant resources, and the resources evaluated by the remaining three are all compliant.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes GetAggregateConfigRuleSummaryByRiskLevel

The operation that you want to perform. Set the value to GetAggregateConfigRuleSummaryByRiskLevel.

AggregatorId String Yes ca-3a58626622af0005****

The ID of the account group.

For more information about how to obtain the ID of an account group, see ListAggregators.

For information about common request parameters, see Common parameters.

Response parameters

Parameter Type Example Description
RequestId String A3CDD98C-DE65-46AC-B2D2-04A4A9AB5B73

The ID of the request.

ConfigRuleSummaries Array of Data

The summary of compliance evaluation results by rule risk level.

RiskLevel Integer 1

The risk level of the resources that are not compliant with the rules. Valid values:

  • 1: high risk level.
  • 2: medium risk level.
  • 3: low risk level.
CompliantCount Integer 3

The number of rules against which specific resources are evaluated as compliant.

NonCompliantCount Integer 1

The number of rules against which specific resources are evaluated as non-compliant.

Examples

Sample requests

http(s)://[Endpoint]/?Action=GetAggregateConfigRuleSummaryByRiskLevel
&AggregatorId=ca-3a58626622af0005****
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<GetAggregateConfigRuleSummaryByRiskLevelResponse>
    <RequestId>A3CDD98C-DE65-46AC-B2D2-04A4A9AB5B73</RequestId>
    <ConfigRuleSummaries>
        <RiskLevel>1</RiskLevel>
        <CompliantCount>3</CompliantCount>
        <NonCompliantCount>1</NonCompliantCount>
    </ConfigRuleSummaries>
</GetAggregateConfigRuleSummaryByRiskLevelResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "A3CDD98C-DE65-46AC-B2D2-04A4A9AB5B73",
  "ConfigRuleSummaries" : [ {
    "RiskLevel" : 1,
    "CompliantCount" : 3,
    "NonCompliantCount" : 1
  } ]
}

Error codes

HTTP status code Error code Error message Description
400 Invalid.AggregatorId.Value The specified AggregatorId is invalid. The error message returned because the specified account group ID does not exist or you are not authorized to use the account group.
503 ServiceUnavailable The request has failed due to a temporary failure of the server. The error message returned because the service is unavailable.

For a list of error codes, visit the API Error Center.