All Products
Search
Document Center

Cloud Config:GetAggregateConfigRule

Last Updated:Sep 02, 2026

Queries the details of a specified rule in a specified account group.

Operation description

This topic provides an example on how to query the details of the rule cr-7f7d626622af0041**** in the account group ca-7f00626622af0041****.

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:GetAggregateConfigRule

get

*AggregateConfigRule

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

None None

Request parameters

Parameter

Type

Required

Description

Example

ConfigRuleId

string

Yes

The rule ID.

For information about how to obtain a rule ID, see ListAggregateConfigRules.

cr-7f7d626622af0041****

AggregatorId

string

Yes

The account group ID.

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

ca-7f00626622af0041****

Tag deprecated

array<object>

No

The tags. This parameter is deprecated and does not take effect.

object

No

The tags of the resource. This parameter is deprecated and does not take effect.

A maximum of 20 tags can be added.

Key

string

No

The tag key of the resource.

A maximum of 20 tag keys can be added.

key-1

Value

string

No

The tag value of the resource.

A maximum of 20 tag values can be added.

value-1

For information about common request parameters, see Common parameters.

Response elements

Element

Type

Description

Example

object

None.

RequestId

string

The request ID.

811234F4-C3AB-4D15-B90B-F55016D1B5AA

ConfigRule

object

The rule list.

RiskLevel

integer

The risk level of the rule. Valid values:

  • 1: high risk.

  • 2: medium risk.

  • 3: low risk.

1

InputParameters

object

The rule parameter information.

{"tag1Key":"ECS","tag1Value":"test"}

Source

object

The rule source information.

SourceDetails

array<object>

The rule source details.

object

None.

MessageType

string

The trigger mechanism of the rule. Valid values:

  • ConfigurationItemChangeNotification: configuration change.

  • ScheduledNotification: periodic execution.

ConfigurationItemChangeNotification

EventSource

string

The event source.

Note

Currently, only Cloud Config events are supported: aliyun.config.

aliyun.config

MaximumExecutionFrequency

string

The execution frequency of the rule. Valid values:

  • One_Hour: 1 hour.

  • Three_Hours: 3 hours.

  • Six_Hours: 6 hours.

  • Twelve_Hours: 12 hours.

  • TwentyFour_Hours: 24 hours.

One_Hour

Owner

string

The owner of the rule source. Valid values:

  • CUSTOM_FC: custom rule.

  • ALIYUN: rule template.

ALIYUN

Identifier

string

The rule identifier.

  • If the rule is based on a rule template, this parameter specifies the rule template identifier.

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

acs:fc:cn-hangzhou:100931896542****:services/ConfigService.LATEST/functions/specific-config

ConfigRuleState

string

The running status of the rule. Valid values:

  • ACTIVE: active.

  • DELETING: being deleted.

  • EVALUATING: being evaluated.

  • INACTIVE: disabled.

ACTIVE

MaximumExecutionFrequency

string

The execution frequency of the rule. Valid values:

  • One_Hour: 1 hour.

  • Three_Hours: 3 hours.

  • Six_Hours: 6 hours.

  • Twelve_Hours: 12 hours.

  • TwentyFour_Hours: 24 hours.

One_Hour

ManagedRule

object

The rule template details.

SourceDetails

array<object>

The rule template source details.

object

The rule source details.

MessageType

string

The trigger mechanism of the rule. Valid values:

  • ConfigurationItemChangeNotification: configuration change.

  • ScheduledNotification: periodic execution.

ConfigurationItemChangeNotification

EventSource

string

The event source.

Note

Currently, only Cloud Config events are supported: aliyun.config.

aliyun.config

MaximumExecutionFrequency

string

The execution frequency of the rule. Valid values:

  • One_Hour: 1 hour.

  • Three_Hours: 3 hours.

  • Six_Hours: 6 hours.

  • Twelve_Hours: 12 hours.

  • TwentyFour_Hours: 24 hours.

One_Hour

Description

string

The description of the rule template.

An ECS disk that is not locked due to overdue payments or security reasons is considered "compliant"

Labels

array

The tag list of the rule template.

string

The tag of the rule template.

["RAM","USer"]

Identifier

string

The identifier of the rule template.

ram-user-mfa-check

OptionalInputParameterDetails

object

The optional parameter details of the rule template.

{}

ManagedRuleName

string

The name of the rule template.

MFA enabled for RAM users

CompulsoryInputParameterDetails

object

The required parameter details of the rule template.

{}

ConfigRuleArn

string

The ARN of the rule template.

acs:config::100931896542****:rule/cr-7f7d626622af0041****

Description

string

The description of the rule template.

If MFA is enabled for RAM users, the resource is considered "compliant"

CreateBy

object

The information about the rule creator.

CompliancePackId

string

The compliance package ID.

cp-541e626622af008****

AggregatorName

string

The account group name.

Test_Group

CompliancePackName

string

The compliance package name.

OSS compliance baseline

CreatorName

string

The name of the rule creator.

Alice

CreatorType

string

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

AGGREGATOR

CreatorId

string

The account ID of the rule creator.

100931896542****

AggregatorId

string

The account group ID.

ca-04b3fd170e340007****

ConfigRuleName

string

The rule name.

MFA enabled for RAM users

ConfigRuleEvaluationStatus

object

The execution status of the rule.

LastErrorCode

string

The error code from the most recent rule execution.

TimeOut

LastSuccessfulEvaluationTimestamp

integer

The end timestamp of the most recent successful rule invocation. Unit: milliseconds.

1624932227486

FirstActivatedTimestamp

integer

The timestamp when the rule was first activated. This value is a UNIX timestamp in milliseconds.

1624932221993

FirstEvaluationStarted

boolean

Indicates whether the rule has been evaluated. Valid values:

  • true: The rule has been evaluated.

  • false: The rule has not been evaluated.

true

LastSuccessfulInvocationTimestamp

integer

The start timestamp of the most recent successful rule invocation. Unit: milliseconds.

1624932227476

LastErrorMessage

string

The error message from the most recent rule execution.

time out

LastFailedEvaluationTimestamp

integer

The end timestamp of the most recent failed rule invocation. Unit: milliseconds.

1614687022000

LastFailedInvocationTimestamp

integer

The start timestamp of the most recent failed rule invocation. Unit: milliseconds.

1614687022000

ConfigRuleId

string

The rule ID.

cr-7f7d626622af0041****

ModifiedTimestamp

integer

The timestamp when the rule was last updated. Unit: milliseconds.

1614687022000

CreateTimestamp

integer

The timestamp when the rule was created. Unit: milliseconds.

1604684022000

ResourceTypesScope

string

The resource types evaluated by the rule.

ACS::RAM::User

ExcludeRegionIdsScope

string

The region IDs excluded from the rule evaluation. The rule does not evaluate resources in the specified regions. Separate multiple region IDs with commas (,).

cn-hangzhou

RegionIdsScope

string

The region ID of the resources that the rule evaluates.

global

ExcludeResourceIdsScope

string

The resource IDs excluded from the rule evaluation.

23642660635687****

ResourceIdsScope

string

The resource IDs to which the rule applies. Separate multiple resource IDs with commas (,).

eip-8vbf3x310fn56ijfd****

ResourceGroupIdsScope

string

The resource group ID of the resources that the rule evaluates.

rg-aekzdibsjjc****

ExcludeResourceGroupIdsScope

string

The resource group IDs excluded from the rule evaluation. The rule does not evaluate resources in the specified resource groups. Separate multiple resource group IDs with commas (,).

rg-aekzdibsjjc****

TagKeyScope deprecated

string

[Deprecated] Use the TagsScope field instead.

The tag key of the resources that the rule evaluates.

RAM

TagValueScope deprecated

string

[Deprecated] Use the TagsScope field instead.

The tag value of the resources that the rule evaluates.

MFA

TagsScope

array<object>

The tag scope.

object

TagKey

string

The tag key.

key-1

TagValue

string

The tag value.

value-1

ExcludeTagsScope

array<object>

The excluded tag scope.

object

TagKey

string

The tag key.

key-2

TagValue

string

The tag value.

value-2

ConfigRuleTriggerTypes

string

The trigger mechanism of the rule. Valid values:

  • ConfigurationItemChangeNotification: configuration change.

  • ScheduledNotification: periodic execution.

ConfigurationItemChangeNotification

TagKeyLogicScope

string

This field is not returned for rules created by using the TagsScope parameter.

This field is used to retrieve rules created by using the deprecated TagKeyScope field (not recommended). For example, if the TagKeyScope parameter is set to ECS,OSS and this parameter is set to AND, the rule applies only to resources that are bound to both the ECS and OSS tags.

Valid values:

  • AND: logical AND.

  • OR: logical OR.

AND

FolderIdsScope

string

The resource directory folder IDs. The rule applies only to resources within the member accounts under the specified folders.

fd-ZtHsRH****

ExcludeFolderIdsScope

string

The resource directory folder IDs excluded from the rule evaluation. The rule does not evaluate resources within the member accounts under the specified folders.

fd-pWmkqZ****

ExcludeAccountIdsScope

string

The member accounts excluded from the rule evaluation. The rule does not execute evaluation on resources within the specified accounts.

120886317861****

ResourceNameScope

string

The resource name to which the rule applies.

i-xxx

Compliance

object

The compliance statistics of the rule.

ComplianceType

string

The compliance result. Valid values:

  • COMPLIANT: compliant.

  • NON_COMPLIANT: non-compliant.

  • NOT_APPLICABLE: not applicable.

  • INSUFFICIENT_DATA: insufficient data.

NON_COMPLIANT

Count

integer

The resource count of evaluated resources that correspond to the compliance result.

3

AccountId

integer

The Alibaba Cloud account ID to which the rule belongs.

120886317861****

ExtendContent

string

The extended content. Currently, this parameter is used only to set the trigger time for the 24-hour periodic trigger.

{"fixedHour":"12"}

Tags

array<object>

The resource tags.

object

The resource tags.

TagKey

string

The tag key.

key-1

TagValue

string

The tag value.

value-1

AccountIdsScope

string

The member account IDs to which the rule applies. The rule takes effect only on resources within the specified member accounts. Separate multiple member account IDs with commas (,).

120886317861****

Examples

Success response

JSON format

{
  "RequestId": "811234F4-C3AB-4D15-B90B-F55016D1B5AA",
  "ConfigRule": {
    "RiskLevel": 1,
    "InputParameters": {
      "tag1Key": "ECS",
      "tag1Value": "test"
    },
    "Source": {
      "SourceDetails": [
        {
          "MessageType": "ConfigurationItemChangeNotification",
          "EventSource": "aliyun.config",
          "MaximumExecutionFrequency": "One_Hour"
        }
      ],
      "Owner": "ALIYUN",
      "Identifier": "acs:fc:cn-hangzhou:100931896542****:services/ConfigService.LATEST/functions/specific-config"
    },
    "ConfigRuleState": "ACTIVE",
    "MaximumExecutionFrequency": "One_Hour",
    "ManagedRule": {
      "SourceDetails": [
        {
          "MessageType": "ConfigurationItemChangeNotification",
          "EventSource": "aliyun.config",
          "MaximumExecutionFrequency": "One_Hour"
        }
      ],
      "Description": "ECS磁盘未因欠费或安全等原因而被锁定,视为“合规”。",
      "Labels": [
        "[\"RAM\",\"USer\"]"
      ],
      "Identifier": "ram-user-mfa-check",
      "OptionalInputParameterDetails": {},
      "ManagedRuleName": "RAM用户开启MFA",
      "CompulsoryInputParameterDetails": {}
    },
    "ConfigRuleArn": "acs:config::100931896542****:rule/cr-7f7d626622af0041****",
    "Description": "RAM用户开启MFA,视为“合规”。",
    "CreateBy": {
      "CompliancePackId": "cp-541e626622af008****",
      "AggregatorName": "Test_Group",
      "CompliancePackName": "OSS合规基线",
      "CreatorName": "Alice",
      "CreatorType": "AGGREGATOR",
      "CreatorId": "100931896542****",
      "AggregatorId": "ca-04b3fd170e340007****"
    },
    "ConfigRuleName": "RAM用户开启MFA",
    "ConfigRuleEvaluationStatus": {
      "LastErrorCode": "TimeOut",
      "LastSuccessfulEvaluationTimestamp": 1624932227486,
      "FirstActivatedTimestamp": 1624932221993,
      "FirstEvaluationStarted": true,
      "LastSuccessfulInvocationTimestamp": 1624932227476,
      "LastErrorMessage": "time out",
      "LastFailedEvaluationTimestamp": 1614687022000,
      "LastFailedInvocationTimestamp": 1614687022000
    },
    "ConfigRuleId": "cr-7f7d626622af0041****",
    "ModifiedTimestamp": 1614687022000,
    "CreateTimestamp": 1604684022000,
    "ResourceTypesScope": "ACS::RAM::User",
    "ExcludeRegionIdsScope": "cn-hangzhou",
    "RegionIdsScope": "global",
    "ExcludeResourceIdsScope": "23642660635687****",
    "ResourceIdsScope": "eip-8vbf3x310fn56ijfd****\n",
    "ResourceGroupIdsScope": "rg-aekzdibsjjc****",
    "ExcludeResourceGroupIdsScope": "rg-aekzdibsjjc****",
    "TagKeyScope": "RAM",
    "TagValueScope": "MFA",
    "TagsScope": [
      {
        "TagKey": "key-1",
        "TagValue": "value-1"
      }
    ],
    "ExcludeTagsScope": [
      {
        "TagKey": "key-2",
        "TagValue": "value-2"
      }
    ],
    "ConfigRuleTriggerTypes": "ConfigurationItemChangeNotification",
    "TagKeyLogicScope": "AND",
    "FolderIdsScope": "fd-ZtHsRH****",
    "ExcludeFolderIdsScope": "fd-pWmkqZ****",
    "ExcludeAccountIdsScope": "120886317861****",
    "ResourceNameScope": "i-xxx",
    "Compliance": {
      "ComplianceType": "NON_COMPLIANT",
      "Count": 3
    },
    "AccountId": 0,
    "ExtendContent": "{\"fixedHour\":\"12\"}",
    "Tags": [
      {
        "TagKey": "key-1",
        "TagValue": "value-1"
      }
    ],
    "AccountIdsScope": "120886317861****\n"
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 ConfigRuleNotExists The ConfigRule does not exist. The rule does not exist.
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.