All Products
Search
Document Center

Cloud Config:ListAggregateConfigRules

Last Updated:Mar 08, 2023

Queries the rules in an account group.

Operation Description

This topic provides an example on how to query the rules in an account group whose ID is ca-f632626622af0079****. The return result shows a total of one rule and two evaluated resources. The resources are both evaluated as COMPLIANT.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociation operation
config:ListAggregateConfigRulesList
  • Config
    acs:config:*:{#accountId}:*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ConfigRuleStatestringNo

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.
ACTIVE
ComplianceTypestringNo

The compliance evaluation result. Valid values:

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

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
1
ConfigRuleNamestringNo

The name of the rule.

AggregatorIdstringYes

The ID of the account group.

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

ca-f632626622af0079****
PageSizeintegerNo

The number of entries to return on each page.

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

10
PageNumberintegerNo

The number of the page to return.

Pages start from page 1. Default value: 1.

1
KeywordstringNo

The keyword that you want to use to query the rules.

You can perform a fuzzy search by rule ID, rule name, rule description, or managed rule ID.

ecs

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

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

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

The rules.

ConfigRuleListarray

The details of the rules.

object
RiskLevelinteger

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
1
SourceOwnerstring

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

  • CUSTOM_FC: The rule is a custom rule.
  • ALIYUN: The rule is created based on a managed rule of Alibaba Cloud.
ALIYUN
AccountIdlong

The ID of the management account to which the rules belong.

100931896542****
ConfigRuleStatestring

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.
ACTIVE
Complianceobject

The information about the compliance package.

ComplianceTypestring

The compliance evaluation result. Valid values:

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

The number of resources evaluated by the rule.

2
SourceIdentifierstring

The ID 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.
eip-bandwidth-limit
ConfigRuleArnstring

The ARN of the rule.

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

The description of the rule.

CreateByobject

The information about the creation of the rule.

CompliancePackIdstring

The ID of the compliance package.

cp-fdc8626622af00f9****
AggregatorNamestring

The name of the account group.

Test_Group
CompliancePackNamestring

The name of the compliance package.

CreatorNamestring

The name of the management account that was used to create the rule.

Alice
CreatorTypestring

The type of the creator of the rule. The value is fixed to AGGREGATOR, which indicates an account group.

AGGREGATOR
CreatorIdstring

The ID of the management account that was used to create the rule.

100931896542****
AggregatorIdstring

The ID of the account group.

ca-f632626622af0079****
AutomationTypestring

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

OOS
ConfigRuleNamestring

The name of the rule.

ConfigRuleIdstring

The ID of the rule.

cr-fdc8626622af00f9****
Tagsarray

The tag of the rule.

object
Keystring

The tag key of the rule.

env
Valuestring

The tag value of the rule.

prod
PageSizeinteger

The number of entries returned per page.

10
PageNumberinteger

The page number of the returned page.

1
TotalCountlong

The total number of rules.

1

Examples

Sample success responses

JSONformat

{
  "RequestId": "22EF8287-2C9A-4F1F-80A6-CEFA7612689D",
  "ConfigRules": {
    "ConfigRuleList": [
      {
        "RiskLevel": 1,
        "SourceOwner": "ALIYUN",
        "AccountId": 0,
        "ConfigRuleState": "ACTIVE",
        "Compliance": {
          "ComplianceType": "COMPLIANT",
          "Count": 2
        },
        "SourceIdentifier": "eip-bandwidth-limit",
        "ConfigRuleArn": "acs:config::100931896542****:rule/cr-fdc8626622af00f9****",
        "Description": "",
        "CreateBy": {
          "CompliancePackId": "cp-fdc8626622af00f9****",
          "AggregatorName": "Test_Group",
          "CompliancePackName": "",
          "CreatorName": "Alice",
          "CreatorType": "AGGREGATOR",
          "CreatorId": "100931896542****",
          "AggregatorId": "ca-f632626622af0079****"
        },
        "AutomationType": "OOS",
        "ConfigRuleName": "",
        "ConfigRuleId": "cr-fdc8626622af00f9****",
        "Tags": [
          {
            "Key": "env",
            "Value": "prod"
          }
        ]
      }
    ],
    "PageSize": 10,
    "PageNumber": 1,
    "TotalCount": 1
  }
}

Error codes

HTTP status codeError codeError messageDescription
400NoPermissionYou are not authorized to perform this operation.You are not authorized to perform this operation.
400Invalid.AggregatorId.ValueThe specified AggregatorId is invalid.The specified aggregator ID does not exist or you are not authorized to use the aggregator.
404AccountNotExistedYour account does not exist.The specified account does not exist.
503ServiceUnavailableThe 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.