All Products
Search
Document Center

Cloud Config:ListManagedRules

Last Updated:Jun 21, 2024

Queries a list of managed rules supported by Cloud Config.

Operation description

Background information

For more information about how to define, execute, and integrate an evaluation rule, see Definition and execution of evaluation rules.

Usage notes

This topic provides an example on how to query all managed rules whose keyword is CDN. The response shows that 21 managed rules exist.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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 keyAssociated operation
config:ListManagedRulesRead
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
KeywordstringNo

The keyword of the managed rule.

CDN
PageSizeintegerNo

The number of entries per page.

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

10
PageNumberintegerNo

The page number.

Page start from page 1. Default value: 1.

1
RiskLevelintegerNo

The risk level of the managed rule. Valid values:

  • 1: high
  • 2: medium
  • 3: low
1
ResourceTypesstringNo

The type of the resources to be evaluated based on the rule.

ACS::ECS::Instance

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

Response parameters

ParameterTypeDescriptionExample
object

This operation does not return any operation-specific parameters.

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.

Page start from page 1.

10
TotalCountlong

The total number of entries returned.

1
ManagedRuleListobject []

The details of the managed rule.

RiskLevelinteger

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

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

The description of the managed rule.

The description of the test rule.
Labelsarray

The classification description of the managed rule.

string

The classification information of the managed rule.

CDN
Identifierstring

The unique identifier of the managed rule.

cdn-domain-https-enabled
ConfigRuleNamestring

The name of the managed rule.

test-rule-name
HelpUrlsstring

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

https://example.aliyundoc.com
Scopeobject

The effective scope of the managed rule.

ComplianceResourceTypesarray

The types of resources to which the managed rule applies.

string

The type of the resource to which the managed rule applies.

ACS::CDN::Domain
SupportPreviewManagedRuleboolean

Indicates whether precheck is supported. Valid values:

  • true
  • false
true
RemediationTemplateIdentifierstring

The ID of the remediation template.

ACS-CDN-SetDomainServerCertificate
RemediationTemplateNamestring

The name of the remediation template.

Configure encryption rules for OSS buckets

Examples

Sample success responses

JSONformat

{
  "RequestId": "B3E605AB-63D5-1EE0-BFA6-0BAC247B0461",
  "ManagedRules": {
    "PageSize": 1,
    "PageNumber": 10,
    "TotalCount": 1,
    "ManagedRuleList": [
      {
        "RiskLevel": 1,
        "Description": "The description of the test rule.",
        "Labels": [
          "CDN"
        ],
        "Identifier": "cdn-domain-https-enabled",
        "ConfigRuleName": "test-rule-name",
        "HelpUrls": "https://example.aliyundoc.com",
        "Scope": {
          "ComplianceResourceTypes": [
            "ACS::CDN::Domain"
          ]
        },
        "SupportPreviewManagedRule": true,
        "RemediationTemplateIdentifier": "ACS-CDN-SetDomainServerCertificate",
        "RemediationTemplateName": "Configure encryption rules for OSS buckets"
      }
    ]
  }
}

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.

Change history

Change timeSummary of changesOperation
2023-04-13The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 503
Output ParametersThe response structure of the API has changed.
2023-03-08The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 503