All Products
Search
Document Center

Cloud Config:ListManagedRules

Last Updated:Mar 08, 2023

Queries managed rules.

Operation Description

This topic describes how to query the managed rules of Alibaba Cloud CDN by using the CDN keyword. The returned result shows that only one managed rule exists. You can view the rule details in the result.

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 keyAssociation operation
config:ListManagedRulesList
  • Config
    acs:config:*:{#accountId}:*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
KeywordstringNo

The keyword that you want to use to filter managed rules.

CDN
PageSizeintegerNo

The number of entries to return on each page.

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

10
PageNumberintegerNo

The number of the page to return.

Pages start from page 1. Default value: 1.

1
RiskLevelintegerNo

The risk level that you want to use to filter managed rules. Valid values:

  • 1: high risk level
  • 2: medium risk level
  • 3: low risk level
1

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

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

B3E605AB-63D5-1EE0-BFA6-0BAC247B0461
ManagedRulesobject

The managed rules.

PageSizeinteger

The number of entries returned per page. Valid values: 1 to 500.

1
PageNumberinteger

The page number of the returned page. Minimum value: 1.

10
TotalCountlong

The total number of managed rules returned.

1
ManagedRuleListarray

The details of the managed rules.

object
RiskLevelinteger

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

  • 1: high risk level
  • 2: medium risk level
  • 3: low risk level
1
Descriptionstring

The description of the managed rule.

Labelsarray

The tags of the managed rule.

string
CDN
Identifierstring

The unique identifier of the managed rule.

cdn-domain-https-enabled
ConfigRuleNamestring

The name of the managed rule.

HelpUrlsstring

The URL of the topic that describes how the managed rule remediates the incompliant configurations.

https://example.aliyundoc.com

Examples

Sample success responses

JSONformat

{
  "RequestId": "B3E605AB-63D5-1EE0-BFA6-0BAC247B0461",
  "ManagedRules": {
    "PageSize": 1,
    "PageNumber": 10,
    "TotalCount": 1,
    "ManagedRuleList": [
      {
        "RiskLevel": 1,
        "Description": "",
        "Labels": [
          "CDN"
        ],
        "Identifier": "cdn-domain-https-enabled",
        "ConfigRuleName": "",
        "HelpUrls": "https://example.aliyundoc.com"
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400NoPermissionYou are not authorized to perform this operation.You are not authorized to perform this operation.
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.