ListAggregateConfigRules

Updated at:

Queries the rules in a specified account group.

Operation description

This topic provides an example to query the rules in the account group ca-f632626622af0079****. The response shows that the total number of rules is 1, the number of evaluated resources is 2, and the evaluation result is COMPLIANT.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

config:ListAggregateConfigRules

list

*AggregateConfigRule

acs:config:*:{#accountId}:aggregateconfigrule/*

None None

Request parameters

Parameter

Type

Required

Description

Example

ConfigRuleState

string

No

The running status of the rule. Valid values:

  • ACTIVE: active

  • DELETING: deleting

  • EVALUATING: evaluating

  • INACTIVE: inactive

Valid values:

  • EVALUATING :

    evaluating.

  • ACTIVE :

    active.

  • INACTIVE :

    inactive.

  • DELETING :

    deleting.

ACTIVE

ComplianceType

string

No

The compliance evaluation result of the rule. Valid values:

  • COMPLIANT: compliant

  • NON_COMPLIANT: non-compliant

  • NOT_APPLICABLE: not applicable

  • INSUFFICIENT_DATA: insufficient data

Valid values:

  • NOT_APPLICABLE :

    not applicable.

  • COMPLIANT :

    compliant.

  • NON_COMPLIANT :

    non-compliant.

  • INSUFFICIENT_DATA :

    insufficient data.

  • IGNORED :

    ignored.

COMPLIANT

RiskLevel

integer

No

The risk level of the rule. Valid values:

  • 1: high risk

  • 2: medium risk

  • 3: low risk

1

CompliancePackId

string

No

The ID of the compliance package.

cp-fe416457e0d90022****

ConfigRuleName

string

No

The name of the rule.

The name of the rule.

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-f632626622af0079****

PageSize

integer

No

The number of entries to return on each page.

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

10

PageNumber

integer

No

The page number.

Minimum value: 1. Default value: 1.

1

Tag

array<object>

No

The tags of the resource.

Up to 20 tags are supported.

object

No

The tags of the resource.

Up to 20 tags are supported.

Key

string

No

The tag key of the resource.

Up to 20 tag keys are supported.

key-1

Value

string

No

The tag value of the resource.

Up to 20 tag values are supported.

value-1

Keyword

string

No

The search keyword.

Fuzzy match is supported for rule IDs, rule names, rule descriptions, and rule template identifiers.

ecs

ResourceTypes

string

No

The type of the resource evaluated by the rule.

ACS::ECS::Instance

SortBy

string

No

Specifies whether to filter rules based on whether remediation is configured. Valid values:

  • true: queries rules for which remediation is configured.

  • false: queries rules for which remediation is not configured. If you do not specify this parameter, rules are not filtered based on this condition.

true

For more information about common request parameters, see Common parameters.

Response elements

Element

Type

Description

Example

object

The response.

ConfigRules

object

The list of rules.

ConfigRuleList

array<object>

The details of the rule list.

array<object>

None.

AccountId

integer

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

100931896542****

AutomationType

string

The remediation type. Only Operation Orchestration Service (OOS) is supported.

OOS

Compliance

object

The compliance evaluation result of the rule.

ComplianceType

string

The summary compliance evaluation result of the rule. Valid values:

  • COMPLIANT: compliant

  • NON_COMPLIANT: non-compliant

  • NOT_APPLICABLE: not applicable

  • INSUFFICIENT_DATA: insufficient data

COMPLIANT

Count

integer

The number of evaluated resources corresponding to the summary evaluation result of the rule.

2

ConfigRuleArn

string

The ARN of the rule.

acs:config::100931896542****:rule/cr-fdc8626622af00f9****

ConfigRuleId

string

The ID of the rule.

cr-fdc8626622af00f9****

ConfigRuleName

string

The name of the rule.

The name of the rule.

ConfigRuleState

string

The running status of the rule. Valid values:

  • ACTIVE: active

  • DELETING: deleting

  • EVALUATING: evaluating

  • INACTIVE: inactive

ACTIVE

CreateBy

object

The information about the creator of the rule.

AggregatorId

string

The ID of the account group.

ca-f632626622af0079****

AggregatorName

string

The name of the account group.

Test_Group

CompliancePackId

string

The ID of the compliance package.

cp-fdc8626622af00f9****

CompliancePackName

string

The name of the compliance package.

The name of the compliance package.

CreatorId

string

The ID of the management account that created the rule.

100931896542****

CreatorName

string

The name of the management account that created the rule.

Alice

CreatorType

string

The type of the creator. Only AGGREGATOR (account group) is supported.

AGGREGATOR

CreateDate

string

The time when the rule was created. The time is displayed in UTC+8.

2025-09-19T15:51:00

Description

string

The description of the rule.

The description of the rule.

ResourceTypesScope

string

The types of resources evaluated by the rule. Multiple resource types are separated by commas (,).

ACS::EIP::EipAddress

RiskLevel

integer

The risk level of the rule. Valid values:

  • 1: high risk

  • 2: medium risk

  • 3: low risk

1

SourceIdentifier

string

The identifier of the rule.

  • If the rule is created from a rule template, this parameter indicates the identifier of the rule template.

  • If the rule is a custom rule, this parameter indicates the ARN of the function.

eip-bandwidth-limit

SourceOwner

string

The source of the rule. Valid values:

  • CUSTOM_FC: custom rule.

  • ALIYUN: rule template.

ALIYUN

Tags

array<object>

The tags of the rule.

object

The tags of the rule.

Key

string

The tag key of the rule.

env

Value

string

The tag value of the rule.

prod

PageNumber

integer

The page number.

1

PageSize

integer

The number of entries returned per page.

10

TotalCount

integer

The total number of rules.

1

RequestId

string

The request ID.

22EF8287-2C9A-4F1F-80A6-CEFA7612689D

Examples

Success response

JSON format

{
  "ConfigRules": {
    "ConfigRuleList": [
      {
        "AccountId": 0,
        "AutomationType": "OOS",
        "Compliance": {
          "ComplianceType": "COMPLIANT",
          "Count": 2
        },
        "ConfigRuleArn": "acs:config::100931896542****:rule/cr-fdc8626622af00f9****",
        "ConfigRuleId": "cr-fdc8626622af00f9****",
        "ConfigRuleName": "The name of the rule.",
        "ConfigRuleState": "ACTIVE",
        "CreateBy": {
          "AggregatorId": "ca-f632626622af0079****",
          "AggregatorName": "Test_Group",
          "CompliancePackId": "cp-fdc8626622af00f9****",
          "CompliancePackName": "The name of the compliance package.\n",
          "CreatorId": "100931896542****",
          "CreatorName": "Alice",
          "CreatorType": "AGGREGATOR"
        },
        "CreateDate": "2025-09-19T15:51:00",
        "Description": "The description of the rule.",
        "ResourceTypesScope": "ACS::EIP::EipAddress",
        "RiskLevel": 1,
        "SourceIdentifier": "eip-bandwidth-limit",
        "SourceOwner": "ALIYUN",
        "Tags": [
          {
            "Key": "env",
            "Value": "prod"
          }
        ]
      }
    ],
    "PageNumber": 1,
    "PageSize": 10,
    "TotalCount": 1
  },
  "RequestId": "22EF8287-2C9A-4F1F-80A6-CEFA7612689D"
}

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 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 Error Codes for a complete list.

Release notes

See Release Notes for a complete list.