All Products
Search
Document Center

Cloud Config:ListRecommendManagedRules

Last Updated:Oct 16, 2025

This operation obtains a list of recommended managed rules.

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

list

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

NextToken

string

No

The token that specifies the position from which to start the query. If this parameter is left empty, the query starts from the beginning.

IWBjqMYSy0is7zSMGu16****

MaxResults

integer

No

The maximum number of entries to return on each page. Default value: 200.

200

RegionIdsScope

string

No

The scope of region IDs. Separate multiple region IDs with commas (,).

cn-hangzhou

ExcludeRegionIdsScope

string

No

The rule does not take effect on resources in the specified regions. The resources in the specified regions are not evaluated. Separate multiple region IDs with commas (,).

cn-shanghai

ResourceGroupIdsScope

string

No

The rule takes effect only on resources in the specified resource groups. Separate multiple resource group IDs with commas (,).

rg-aekzc7r7rhx****

ExcludeResourceGroupIdsScope

string

No

The rule does not take effect on resources in the specified resource groups. The resources in the specified resource groups are not evaluated. Separate multiple resource group IDs with commas (,).

rg-bnczc6r7rml****

ResourceIdsScope

string

No

The rule takes effect on the specified resources. Separate multiple resource IDs with commas (,).

lb-5cmbowstbkss9ta03****

ExcludeResourceIdsScope

string

No

The rule does not take effect on the specified resources. The specified resources are not evaluated. Separate multiple resource IDs with commas (,).

23642660635687****

SelectedManagedRuleIdentifiers

string

No

The managed rules that have been selected. Separate multiple rule identifiers with commas (,). The system does not recommend managed rules that are of the same resource type as the selected managed rules.

ram-user-last-login-expired-check

Response elements

Parameter

Type

Description

Example

object

Schema of Response

RequestId

string

The request ID.

DC300244-FCE3-5061-8214-C27ECB66****

RecommendedManagedRules

object

The list of rules.

NextToken

string

The token that is used to initiate the next query.

Note

If this parameter is left empty, no more results are returned.

zXZXbg4Mra0kOrhpwl21****

MaxResults

integer

The maximum number of entries returned for the request.

200

TotalCount

integer

The total number of rules.

39

RecommendedManagedRuleList

array<object>

The list of managed rules.

object

ResourceTypeScope

string

The resource type.

ACS::OSS::Bucket

Identifier

string

The rule identifier.

oss-bucket-referer-limit

Description

string

The description of the managed rule.

If the hotlink protection feature is enabled for the OSS bucket and the Referer is added to a specified whitelist, the configuration is considered compliant.

ConfigRuleName

string

The rule name.

oss-bucket-referer-limit

Examples

Success response

JSON format

{
  "RequestId": "DC300244-FCE3-5061-8214-C27ECB66****",
  "RecommendedManagedRules": {
    "NextToken": "zXZXbg4Mra0kOrhpwl21****",
    "MaxResults": 200,
    "TotalCount": 39,
    "RecommendedManagedRuleList": [
      {
        "ResourceTypeScope": "ACS::OSS::Bucket",
        "Identifier": "oss-bucket-referer-limit",
        "Description": "If the hotlink protection feature is enabled for the OSS bucket and the Referer is added to a specified whitelist, the configuration is considered compliant.",
        "ConfigRuleName": "oss-bucket-referer-limit"
      }
    ]
  }
}

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.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.