ListConfigRules

Updated at:

Queries the rules for the current account.

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

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

ConfigRuleState

string

No

The status of the rule. Valid values:

  • ACTIVE: Active.

  • EVALUATING: Evaluating.

  • INACTIVE: Inactive.

Valid values:

  • EVALUATING :

    Evaluating.

  • ACTIVE :

    Active.

  • INACTIVE :

    Inactive.

  • DELETING :

    Deleting.

ACTIVE

ComplianceType

string

No

The compliance type 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

PageNumber

integer

No

The page number of the rule list. Starting value: 1.

1

PageSize

integer

No

The number of entries to return per page in a paging query. Valid values: 1 to 100.

20

MultiAccount

boolean

No

This parameter is scheduled to be deprecated before 00:00:00 on June 30, 2021. Its replacement, the account group API, was launched before 00:00:00 on May 30, 2021. If you are using this parameter, switch to the account group API after 00:00:00 on May 30, 2021. For more information about account groups, see Account groups.

true

MemberId

integer

No

This parameter is scheduled to be deprecated before 00:00:00 on June 30, 2021. Its replacement, the account group API, was launched before 00:00:00 on May 30, 2021. If you are using this parameter, switch to the account group API after 00:00:00 on May 30, 2021. For more information about account groups, see Account groups.

123456789

ConfigRuleName

string

No

The name of the rule.

OSS Compliance Management Best Practices - Disable Public Read Access for OSS Bucket ACL

CompliancePackId

string

No

The ID of the compliance package to which the rule belongs.

cp-8d5c6457e0d9002a****

Response elements

Element

Type

Description

Example

object

None.

ConfigRules

object

The list of rules.

ConfigRuleList

array<object>

The list of rules.

array<object>

None.

AccountId

integer

The Alibaba Cloud account ID to which the rule belongs.

987654321

AutomationType

string

The remediation templatetype. Valid values: LC.

Note

LC: Logic Composer.

LC

Compliance

object

The compliance statistics of the rule.

ComplianceType

string

The compliance type 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 resources that match the specified compliance type for the rule.

161

CompliancePackId

string

The ID of the compliance package to which the rule belongs.

cp-8d5c6457e0d9002a****

ConfigRuleArn

string

The ARN of the rule.

acs:config::120886317861****:rule/cr-8d5c6457e0d9002a****

ConfigRuleId

string

The ID of the rule.

cr-8d5c6457e0d9002a****

ConfigRuleName

string

The name of the rule.

OSS Compliance Management Best Practices - Disable Public Read Access for OSS Bucket ACL

ConfigRuleState

string

The running status of the rule. Valid values:

  • ACTIVE: Active.

  • EVALUATING: Evaluating.

  • INACTIVE: Inactive.

ACTIVE

CreateBy

object

The creation information of the rule.

CompliancePackId

string

The ID of the compliance package.

cp-8d5c6457e0d9002a****

CompliancePackName

string

The name of the compliance package.

OSS Compliance Management Best Practices

Description

string

The description of the rule.

If the ACL policy of the OSS bucket prohibits public read access, the configuration is considered compliant

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 uses a managed rule, this parameter specifies the name of the managed rule.

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

oss-bucket-public-read-prohibited

SourceOwner

string

The owner of the rule source. Valid values:

  • CUSTOM_FC: custom function.

  • ALIYUN: managed rule.

ALIYUN

Tags

array<object>

The tags.

object

The tags.

Key

string

The tag key.

Key1

Value

string

The tag value.

Value1

PageNumber

integer

The page number of the rule list. Starting value: 1.

1

PageSize

integer

The number of entries to return per page in a paging query. Valid values: 1 to 100.

20

TotalCount

integer

The total number of rules.

1

RequestId

string

The request ID.

8195B664-9565-4685-89AC-8B5F04B44B92

Examples

Success response

JSON format

{
  "ConfigRules": {
    "ConfigRuleList": [
      {
        "AccountId": 987654321,
        "AutomationType": "LC",
        "Compliance": {
          "ComplianceType": "COMPLIANT",
          "Count": 161
        },
        "CompliancePackId": "cp-8d5c6457e0d9002a****",
        "ConfigRuleArn": "acs:config::120886317861****:rule/cr-8d5c6457e0d9002a****",
        "ConfigRuleId": "cr-8d5c6457e0d9002a****",
        "ConfigRuleName": "OSS合规管理最佳实践-OSS存储空间ACL禁止公共读访问",
        "ConfigRuleState": "ACTIVE",
        "CreateBy": {
          "CompliancePackId": "cp-8d5c6457e0d9002a****",
          "CompliancePackName": "OSS合规管理最佳实践"
        },
        "Description": "OSS存储空间的ACL策略禁止公共读访问,视为“合规”。",
        "RiskLevel": 1,
        "SourceIdentifier": "oss-bucket-public-read-prohibited",
        "SourceOwner": "ALIYUN",
        "Tags": [
          {
            "Key": "Key1",
            "Value": "Value1"
          }
        ]
      }
    ],
    "PageNumber": 1,
    "PageSize": 20,
    "TotalCount": 1
  },
  "RequestId": "8195B664-9565-4685-89AC-8B5F04B44B92"
}

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