All Products
Search
Document Center

Cloud Config:ListAggregateConfigRules

Last Updated:Mar 01, 2024

Queries a list of 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 returned 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.

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 keyAssociated operation
config:ListAggregateConfigRulesList
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ConfigRuleStatestringNo

The status of the rule. Valid values:

  • ACTIVE: The rule is enabled.
  • DELETING: The rule is being deleted.
  • EVALUATING: The rule is being used to evaluate resource configurations.
  • INACTIVE: The rule is disabled.
ACTIVE
ComplianceTypestringNo

The compliance evaluation result. Valid values:

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

The risk level of the resources that do not comply with the rule. Valid values:

  • 1: high
  • 2: medium
  • 3: low
1
ConfigRuleNamestringNo

The name of the rule.

test-rule-name
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 per page.

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

10
PageNumberintegerNo

The page number.

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
ResourceTypesstringNo

Resource type for the rule to evaluate.

ACS::ECS::Instance

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

Response parameters

ParameterTypeDescriptionExample
object

None.

RequestIdstring

The request ID.

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

The queried rules.

ConfigRuleListobject []

The details of the rule.

RiskLevelinteger

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

  • 1: high
  • 2: medium
  • 3: low
1
SourceOwnerstring

The type of the rule. Valid values:

  • CUSTOM_FC: custom rule
  • ALIYUN: managed rule
ALIYUN
AccountIdlong

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

100931896542****
ConfigRuleStatestring

The status of the rule. Valid values:

  • ACTIVE: The rule is enabled.
  • 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 compliance evaluation result.

ComplianceTypestring

The compliance evaluation result. Valid values:

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

The number of evaluated resources.

2
SourceIdentifierstring

The ID of the rule.

  • If the rule is 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.

The description of the test 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.

test-pack-name
CreatorNamestring

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

Alice
CreatorTypestring

The type of the creator of the rule. Valid value: 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 indicates Operation Orchestration Service.

OOS
ConfigRuleNamestring

The rule name.

test-rule-name
ConfigRuleIdstring

The rule ID.

cr-fdc8626622af00f9****
Tagsobject []

The tags of the rule.

Keystring

The tag key of the rule.

env
Valuestring

The tag value of the rule.

prod
ResourceTypesScopestring

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

ACS::EIP::EipAddress
PageSizeinteger

The number of entries returned per page.

10
PageNumberinteger

The number of the page returned.

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": "The description of the test rule.",
        "CreateBy": {
          "CompliancePackId": "cp-fdc8626622af00f9****",
          "AggregatorName": "Test_Group",
          "CompliancePackName": "test-pack-name",
          "CreatorName": "Alice",
          "CreatorType": "AGGREGATOR",
          "CreatorId": "100931896542****",
          "AggregatorId": "ca-f632626622af0079****"
        },
        "AutomationType": "OOS",
        "ConfigRuleName": "test-rule-name",
        "ConfigRuleId": "cr-fdc8626622af00f9****",
        "Tags": [
          {
            "Key": "env",
            "Value": "prod"
          }
        ],
        "ResourceTypesScope": "ACS::EIP::EipAddress"
      }
    ],
    "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.

Change history

Change timeSummary of changesOperation
2023-06-04The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 404
    delete Error Codes: 503
Output ParametersThe response structure of the API has changed.