Queries the list of rule templates supported by Cloud Config.
Operation description
Background information
For more information about the definition and running principles of rules and rule templates, see Definition and running principles of rules.
Usage notes
This topic provides an example on how to query all rule templates whose keyword is CDN. The return result shows a total of 21 rule templates.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
config:ListManagedRules |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Keyword |
string |
No |
The keyword of the rule template. |
CDN |
| PageSize |
integer |
No |
The number of entries per page. Valid values: 1 to 100. Minimum value: 1. Default value: 10. |
10 |
| PageNumber |
integer |
No |
The page number. Minimum value: 1. Default value: 1. |
1 |
| RiskLevel |
integer |
No |
The risk level of the rule template. Valid values:
|
1 |
| ResourceTypes |
string |
No |
The resource type evaluated by the rule. |
ACS::ECS::Instance |
| FilterType |
string |
No |
The filter scope. Valid values:
|
The filter scope for managed rules. You can filter managed rules that have uncovered resources. Valid values: - ALL: all. - UNCOVERED_RESOURCE: managed rules with uncovered resources |
For more information about common request parameters, see Common parameters.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
None. |
||
| RequestId |
string |
The request ID. |
B3E605AB-63D5-1EE0-BFA6-0BAC247B0461 |
| ManagedRules |
object |
The rule templates. |
|
| PageSize |
integer |
The number of entries per page in a paged query. This is the paging settings. Valid values: 1 to 500. |
1 |
| PageNumber |
integer |
The page number of the rule template list. Minimum value: 1. |
10 |
| TotalCount |
integer |
The total number of rule templates. |
21 |
| ManagedRuleList |
array<object> |
The details of the rule templates. |
|
|
array<object> |
The rule template list. |
||
| RiskLevel |
integer |
The risk level of the rule. Valid values:
|
1 |
| Description |
string |
The description of the rule template. |
A CDN domain name with HTTPS encryption enabled is considered "compliant" |
| Labels |
array |
The tag information list of the rule template. |
|
|
string |
The tag information of the rule template. |
CDN |
|
| Identifier |
string |
The unique identifier of the rule template. |
cdn-domain-https-enabled |
| ConfigRuleName |
string |
The name of the rule template. |
HTTPS encryption enabled for CDN domain name |
| HelpUrls |
string |
The documentation link for the remediation guidance of the rule template. |
https://example.aliyundoc.com |
| Scope |
object |
The evaluation scope of the rule template. |
|
| ComplianceResourceTypes |
array |
The resource types evaluated by the rule template. |
|
|
string |
The resource type evaluated by the rule template. |
ACS::CDN::Domain |
|
| SupportPreviewManagedRule |
boolean |
Indicates whether the rule supports dry run. Valid values:
|
true |
| RemediationTemplateIdentifier |
string |
The identifier of the supported remediation template. |
ACS-CDN-SetDomainServerCertificate |
| RemediationTemplateName |
string |
The name of the supported remediation template. |
Enable HTTPS listener for CDN domain name |
Examples
Success response
JSON format
{
"RequestId": "B3E605AB-63D5-1EE0-BFA6-0BAC247B0461",
"ManagedRules": {
"PageSize": 1,
"PageNumber": 10,
"TotalCount": 21,
"ManagedRuleList": [
{
"RiskLevel": 1,
"Description": "CDN域名开启HTTPS协议加密,视为“合规”。",
"Labels": [
"CDN"
],
"Identifier": "cdn-domain-https-enabled",
"ConfigRuleName": "CDN域名开启HTTPS加密",
"HelpUrls": "https://example.aliyundoc.com",
"Scope": {
"ComplianceResourceTypes": [
"ACS::CDN::Domain"
]
},
"SupportPreviewManagedRule": true,
"RemediationTemplateIdentifier": "ACS-CDN-SetDomainServerCertificate",
"RemediationTemplateName": "开启CDN域名HTTPS监听"
}
]
}
}
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. |
| 503 | ServiceUnavailable | The request has failed due to a temporary failure of the server. | The request has failed due to a temporary failure of the server. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.