All Products
Search
Document Center

Cloud Config:ListManagedRules

Last Updated:Mar 01, 2024

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.

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:ListManagedRulesList
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
KeywordstringNo

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

CDN
PageSizeintegerNo

The number of entries per page.

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

10
PageNumberintegerNo

The page number.

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

None.

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
ManagedRuleListobject []

The name of the remediation template.

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.

The description of the test rule.
Labelsarray

Classification description of the managed rule.

string

Classification description 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 type of resource to which the managed rule applies.

string

The type of resource to which the managed rule applies.

ACS::CDN::Domain
SupportPreviewManagedRuleboolean

Whether pre-check is supported. Value:

  • true: Supported

  • false: not supported

true
RemediationTemplateIdentifierstring

Supported remediation template id.

ACS-CDN-SetDomainServerCertificate
RemediationTemplateNamestring

Supported remediation template name.

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