All Products
Search
Document Center

Cloud Config:ListAggregateRecommendManagedRules

Last Updated:Oct 16, 2025

This operation retrieves the list of recommended managed rules for an account group.

Operation description

For more information about the concepts, working principles, and integration process of dry run rules, see Definition and working principles of dry run rules.

Dry run rules and rule templates are based on the same underlying rule definitions. After you create a resource, a dry run rule continuously checks the resource for compliance.

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

list

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

NextToken

string

No

The pagination token that is used in the next request to retrieve a new page of results. It indicates the position where the current query begins. If you leave this parameter empty, the query starts from the beginning.

caeba0bbb2be03f84eb48b699f0a****

MaxResults

integer

No

The maximum number of entries to return for a single request. Default value: 200.

200

RegionIdsScope

string

No

The rule is effective only for resources in the specified region. Separate multiple region IDs with commas (,).

Note

This parameter applies only to rule templates.

cn-hangzhou

ExcludeRegionIdsScope

string

No

The compliance package is invalid for resources in the specified region. The resources in the specified region are not evaluated. Separate multiple region IDs with commas (,).

cn-shanghai

ResourceGroupIdsScope

string

No

The rule is effective only for resources in the specified resource group. Separate multiple resource group IDs with commas (,).

rg-aekzc7r7rhx****

ExcludeResourceGroupIdsScope

string

No

The rule is invalid for resources in the specified resource group. The resources in the specified resource group are not evaluated. Separate multiple resource group IDs with commas (,).

rg-bnczc6r7rml****

ResourceIdsScope

string

No

The rule is effective for the specified resource. Separate multiple resource IDs with commas (,).

lb-5cmbowstbkss9ta03****

ExcludeResourceIdsScope

string

No

The rule is invalid for the specified resource. The specified resource is not evaluated. Separate multiple resource IDs with commas (,).

Note

This parameter applies only to rule templates.

lb-t4nbowvtbkss7t326****

SelectedManagedRuleIdentifiers

string

No

The selected managed rules.

ram-user-mfa-check-v2,ram-user-last-login-expired-check

AggregatorId

string

No

The ID of the account group.

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

ca-f632626622af0079****

Response elements

Parameter

Type

Description

Example

object

Schema of Response

RecommendedManagedRules

object

The list of rules.

MaxResults

integer

The maximum number of entries returned per page.

200

NextToken

string

If the return results are truncated, you can use NextToken to initiate another request to retrieve the remaining results.

zXZXbg4Mra0kOrhpwl21****

RecommendedManagedRuleList

array<object>

The list of managed rules.

object

ConfigRuleName

string

The name of the rule.

ram-policy-in-use-check

Description

string

The description of the rule.

If the permission policy is bound to one or more RAM user groups, RAM roles, or RAM users, the configuration is considered compliant.

Identifier

string

The identifier of the rule.

ram-policy-in-use-check

ResourceTypeScope

string

The resource type.

ACS::RAM::Policy

TotalCount

integer

The total number of rule templates.

1

RequestId

string

The request ID.

6CE4ABA1-9A57-41A9-8EA9-E8B17D46****

Examples

Success response

JSON format

{
  "RecommendedManagedRules": {
    "MaxResults": 200,
    "NextToken": "zXZXbg4Mra0kOrhpwl21****",
    "RecommendedManagedRuleList": [
      {
        "ConfigRuleName": "ram-policy-in-use-check",
        "Description": "If the permission policy is bound to one or more RAM user groups, RAM roles, or RAM users, the configuration is considered compliant.",
        "Identifier": "ram-policy-in-use-check",
        "ResourceTypeScope": "ACS::RAM::Policy"
      }
    ],
    "TotalCount": 1
  },
  "RequestId": "6CE4ABA1-9A57-41A9-8EA9-E8B17D46****"
}

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.AggregatorIds.Empty You must specify AggregatorIds. You must specify AggregatorIds.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.