All Products
Search
Document Center

Cloud Config:ListConfigRules

Last Updated:Sep 08, 2026

Queries all rules in the rule list.

Operation description

This topic provides an example on how to query the rule list in the current account. The response shows that the total number of rules in the rule list is 1, the number of evaluated resources is 3, and the compliance 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:ListConfigRules

list

*Rule

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

None None

Request parameters

Parameter

Type

Required

Description

Example

ResourceTypes

string

No

The resource type evaluated by the rule.

ACS::ECS::Instance

PageSize

integer

No

The number of entries per page.

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

10

CompliancePackId

string

No

The compliance package ID.

cp-fe416457e0d90022****

ComplianceType

string

No

The compliance evaluation result of the rule. Valid values:

  • COMPLIANT: Compliant.

  • NON_COMPLIANT: Non-compliant.

  • NOT_APPLICABLE: Not applicable.

  • INSUFFICIENT_DATA: No data.

Valid values:

  • NOT_APPLICABLE :

    Not applicable.

  • COMPLIANT :

    Compliant.

  • NON_COMPLIANT :

    Non-compliant.

  • INSUFFICIENT_DATA :

    No data.

  • IGNORED :

    Ignored.

COMPLIANT

PageNumber

integer

No

The page number.

Minimum value: 1. Default value: 1.

1

Keyword

string

No

The query keyword.

Supports fuzzy match on the rule ID, rule name, rule description, and rule template identifier.

ecs

ConfigRuleState

string

No

The running status of the rule. Valid values:

  • ACTIVE: Active.

  • DELETING: Being deleted.

  • EVALUATING: Being evaluated.

  • INACTIVE: Inactive.

Valid values:

  • EVALUATING :

    Being evaluated.

  • ACTIVE :

    Active.

  • INACTIVE :

    Inactive.

  • DELETING :

    Being deleted.

ACTIVE

ConfigRuleName

string

No

The rule name.

The name of the rule.

RiskLevel

integer

No

The risk level of the rule. Valid values:

  • 1: High risk.

  • 2: Medium risk.

  • 3: Low risk.

1

SortBy

string

No

By default, no value is passed. Currently supported: CreateDate-Desc, which sorts rules by creation time in descending order.

CreateDate-Desc

Tag

array<object>

No

The tags of the resource.

A maximum of 20 tags can be bound.

object

No

The tags of the resource.

A maximum of 20 tags can be bound.

Key

string

No

The tag key.

key-1

Value

string

No

The tag value.

value-1

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

AC3A7E12-72E6-5CC9-A5C1-D8D8919829A7

ConfigRules

object

The rule list.

ConfigRuleList

array<object>

The details of the rule list.

array<object>

The details of the rule list.

RiskLevel

integer

The risk level of the rule. Valid values:

  • 1: High risk.

  • 2: Medium risk.

  • 3: Low risk.

1

SourceOwner

string

The owner of the rule source. Valid values:

  • CUSTOM_FC: Custom rule.

  • ALIYUN: Rule template.

ALIYUN

AccountId

integer

The ID of the account to which the rule belongs.

100931896542****

ConfigRuleState

string

The running status of the rule. Valid values:

  • ACTIVE: Active.

  • DELETING: Being deleted.

  • EVALUATING: Being evaluated.

  • INACTIVE: Inactive.

ACTIVE

Compliance

object

The aggregated compliance 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: No data.

COMPLIANT

Count

integer

The number of evaluations that correspond to the summary compliance result of the rule.

2

SourceIdentifier

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.

eip-bandwidth-limit

ConfigRuleArn

string

The ARN of the rule.

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

Description

string

The description of the rule.

The description of the rule.

CreateBy

object

The information about the rule creator.

CompliancePackId

string

The compliance package ID.

cp-fdc8626622af00f9****

CompliancePackName

string

The name of the compliance package.

The name of the compliance package.

AutomationType

string

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

OOS

ConfigRuleName

string

The rule name.

The name of the rule.

ConfigRuleId

string

The rule ID.

cr-fdc8626622af00f9****

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

ResourceTypesScope

string

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

ACS::EIP::EipAddress

CreateDate

string

The time when the rule was created (UTC+8).

2025-09-19T15:51:00

PageSize

integer

The number of entries per page.

10

PageNumber

integer

The page number.

1

TotalCount

integer

The total number of rules.

1

Examples

Success response

JSON format

{
  "RequestId": "AC3A7E12-72E6-5CC9-A5C1-D8D8919829A7",
  "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 rule.",
        "CreateBy": {
          "CompliancePackId": "cp-fdc8626622af00f9****",
          "CompliancePackName": "The name of the compliance package."
        },
        "AutomationType": "OOS",
        "ConfigRuleName": "The name of the rule.",
        "ConfigRuleId": "cr-fdc8626622af00f9****",
        "Tags": [
          {
            "Key": "env",
            "Value": "prod"
          }
        ],
        "ResourceTypesScope": "ACS::EIP::EipAddress",
        "CreateDate": "2025-09-19T15:51:00"
      }
    ],
    "PageSize": 10,
    "PageNumber": 1,
    "TotalCount": 1
  }
}

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.