Queries the rules in an account group.

In this topic, the ca-f632626622af0079**** account group is used as an example. The return result shows a total of one rule and two evaluated resources. The resources are both evaluated as 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 ListAggregateConfigRules

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

ConfigRuleState String No ACTIVE

The status of the one or more rules to be queried. Valid values:

  • ACTIVE: The rules are being used to monitor resource configurations.
  • DELETING: The rules are being deleted.
  • EVALUATING: The rules are triggered and are being used to monitor resource configurations.
  • INACTIVE: The rule are disabled and are no longer used to monitor resource configurations.
ComplianceType String No COMPLIANT

The compliance evaluation result returned by the one or more rules to be queried. Valid values:

  • COMPLIANT: The relevant resources are evaluated as compliant.
  • NON_COMPLIANT: The relevant resources are evaluated as non-compliant.
  • NOT_APPLICABLE: The rules do not apply to your resources.
  • INSUFFICIENT_DATA: No resource data is available.
RiskLevel Integer No 1

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

  • 1: high risk level.
  • 2: medium risk level.
  • 3: low risk level.
ConfigRuleName String No eip-bandwidth-limit

The name of the rule to be queried.

AggregatorId String Yes ca-f632626622af0079****

The ID of the account group.

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

PageSize Integer No 10

The number of entries to return on each page.

Valid values: 1 to 100. Default value: 10.

PageNumber Integer No 1

The number of the page to return.

Pages start from page 1. Default value: 1.

For information about common request parameters, see Common parameters.

Response parameters

Parameter Type Example Description
RequestId String 22EF8287-2C9A-4F1F-80A6-CEFA7612689D

The ID of the request.

ConfigRules Object

The information about the rules returned.

ConfigRuleList Array of ConfigRule

The details of the rule.

RiskLevel Integer 1

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

  • 1: high risk level.
  • 2: medium risk level.
  • 3: low risk level.
SourceOwner String ALIYUN

The way in which the rule was created. Valid values:

  • CUSTOM_FC: The rule is a custom rule.
  • ALIYUN: The rule was created based on a managed rule of Alibaba Cloud.
AccountId Long 100931896542****

The ID of the management account to which the rule belongs.

ConfigRuleState String ACTIVE

The status of the rule. Valid values:

  • ACTIVE: The rule is being used to monitor resource configurations.
  • DELETING: The rule is being deleted.
  • EVALUATING: The rule is triggered and is being used to monitor resource configurations.
  • INACTIVE: The rule is disabled and is no longer used to monitor resource configurations.
Compliance Object

The information about the compliance package.

ComplianceType String COMPLIANT

The compliance evaluation result returned by the rule. Valid values:

  • COMPLIANT: The relevant resources are evaluated as compliant.
  • NON_COMPLIANT: The relevant resources are evaluated as non-compliant.
  • NOT_APPLICABLE: The rule does not apply to your resources.
  • INSUFFICIENT_DATA: No resource data is available.
Count Integer 2

The number of resources evaluated by the rule.

SourceIdentifier String eip-bandwidth-limit

The identifier of the rule.

  • If the rule was created based on a managed rule, the value of this parameter is the name of the managed rule.
  • If the rule is a custom rule, the value of this parameter is the Alibaba Cloud Resource Name (ARN) of the relevant function in Function Compute.
ConfigRuleArn String acs:config::100931896542****:rule/cr-fdc8626622af00f9****

The ARN of the rule.

Description String If the available bandwidth of an elastic IP address is greater than or equal to the specified parameter value, the configuration is considered compliant. Default value: 10 MB.

The description of the rule.

CreateBy Object

The information about the creation of the rule.

CompliancePackId String cp-fdc8626622af00f9****

The ID of the compliance package.

AggregatorName String Test_Group

The name of the account group.

CompliancePackName String ClassifiedProtectionPreCheck

The name of the compliance package.

CreatorName String Alice

The name of the management account that created the rule.

CreatorType String AGGREGATOR

The type of the creator of the rule. Valid value: AGGREGATOR, which indicates an account group.

CreatorId String 100931896542****

The ID of the management account that created the rule.

AggregatorId String ca-f632626622af0079****

The ID of the account group.

AutomationType String OOS

The type of the remediation template. Valid value: OOS, which stands for Operation Orchestration Service.

ConfigRuleName String eip-bandwidth-limit

The name of the rule.

ConfigRuleId String cr-fdc8626622af00f9****

The ID of the rule.

PageSize Integer 10

The number of entries returned per page.

PageNumber Integer 1

The page number of the returned page.

TotalCount Long 1

The total number of rules returned.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListAggregateConfigRules
&AggregatorId=ca-f632626622af0079****
&<Common request parameters>

Sample success responses

XML format

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

<ListAggregateConfigRulesResponse>
	<RequestId>22EF8287-2C9A-4F1F-80A6-CEFA7612689D</RequestId>
	<ConfigRules>
		<TotalCount>1</TotalCount>
		<PageSize>10</PageSize>
		<PageNumber>1</PageNumber>
		<ConfigRuleList>
			<ConfigRuleId>cr-fdc8626622af00f9****</ConfigRuleId>
			<AccountId>100931896542****</AccountId>
			<Description>If the available bandwidth of an elastic IP address is greater than or equal to the specified parameter value, the configuration is considered compliant. Default value: 10 MB. </Description>
			<Compliance>
				<ComplianceType>COMPLIANT</ComplianceType>
				<Count>2</Count>
			</Compliance>
			<ConfigRuleArn>acs:config::100931896542****:rule/cr-fdc8626622af00f9****</ConfigRuleArn>
			<SourceOwner>ALIYUN</SourceOwner>
			<SourceIdentifier>eip-bandwidth-limit</SourceIdentifier>
			<CreateBy>
				<CompliancePackId>cp-fdc8626622af00f9****</CompliancePackId>
				<AggregatorName>Test_Group</AggregatorName>
				<CompliancePackName>ClassifiedProtectionPreCheck</CompliancePackName>
				<CreatorId>100931896542****</CreatorId>
				<CreatorType>AGGREGATOR</CreatorType>
				<CreatorName>Alice</CreatorName>
				<AggregatorId>ca-f632626622af0079****</AggregatorId>
			</CreateBy>
			<ConfigRuleName>eip-bandwidth-limit</ConfigRuleName>
			<RiskLevel>1</RiskLevel>
			<ConfigRuleState>ACTIVE</ConfigRuleState>
		</ConfigRuleList>
	</ConfigRules>
</ListAggregateConfigRulesResponse>

JSON format

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

{
  "RequestId" : "22EF8287-2C9A-4F1F-80A6-CEFA7612689D",
  "ConfigRules" : {
    "TotalCount" : 1,
    "PageSize" : 10,
    "PageNumber" : 1,
    "ConfigRuleList" : [ {
      "ConfigRuleId" : "cr-fdc8626622af00f9****",
      "AccountId" : "100931896542****",
      "Description": "If the available bandwidth of an elastic IP address is greater than or equal to the specified parameter value, the configuration is considered compliant. Default value: 10 MB.",
      "Compliance" : {
        "ComplianceType" : "COMPLIANT",
        "Count" : 2
      },
      "ConfigRuleArn" : "acs:config::100931896542****:rule/cr-fdc8626622af00f9****",
      "SourceOwner" : "ALIYUN",
      "SourceIdentifier" : "eip-bandwidth-limit",
      "CreateBy" : {
        "CompliancePackId" : "cp-fdc8626622af00f9****",
        "AggregatorName" : "Test_Group",
        "CompliancePackName": "ClassifiedProtectionPreCheck",
        "CreatorId" : "100931896542****",
        "CreatorType" : "AGGREGATOR",
        "CreatorName" : "Alice",
        "AggregatorId" : "ca-f632626622af0079****"
      },
      "ConfigRuleName": "eip-bandwidth-limit",
      "RiskLevel" : 1,
      "ConfigRuleState" : "ACTIVE"
    } ]
  }
}

Error codes

HTTP status code Error code Error message Description
400 NoPermission You are not authorized to perform this operation. The error message returned because you are not authorized to perform the specified operation.
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.
404 AccountNotExisted Your account does not exist. The error message returned because your account does not exist.
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.