Queries the rule templates that are supported by Cloud Config.
Operation description
Background information
For more information about rule definitions, working principles, and templates, see Definition and working principles of rules.
Usage notes
This topic provides an example of how to query all rule templates that contain the keyword CDN. The sample response shows that a total of 21 rule templates are returned.
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 to return on each page. Valid values: 1 to 100. Default value: 10. |
10 |
| PageNumber |
integer |
No |
The page number. The value must be greater than or equal to 1. Default value: 1. |
1 |
| RiskLevel |
integer |
No |
The risk level of the rule template. Valid values:
|
1 |
| ResourceTypes |
string |
No |
The resource type that is evaluated by the rule. |
ACS::ECS::Instance |
| FilterType |
string |
No |
The scope of the filter. |
托管规则筛选范围,可以筛选无资源覆盖的托管规则。取值: - ALL 全部 - UNCOVERED_RESOURCE 筛选有资源未覆盖的托管规则 |
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 returned per page. Valid values: 1 to 500. |
1 |
| PageNumber |
integer |
The page number of the returned page. The value must be greater than or equal to 1. |
10 |
| TotalCount |
integer |
The total number of rule templates. |
21 |
| ManagedRuleList |
array<object> |
The details of the rule templates. |
|
|
array<object> |
The list of rule templates. |
||
| RiskLevel |
integer |
The risk level of the rule. Valid values:
|
1 |
| Description |
string |
The description of the rule template. |
CDN域名开启HTTPS协议加密,视为“合规”。 |
| Labels |
array |
The list of labels of the rule template. |
|
|
string |
The label 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. |
CDN域名开启HTTPS加密 |
| HelpUrls |
string |
The URL of the document that provides remediation guidance. |
https://example.aliyundoc.com |
| Scope |
object |
The effective scope of the rule template. |
|
| ComplianceResourceTypes |
array |
The types of resources that are evaluated based on the rule template. |
|
|
string |
The type of resource that is evaluated based on the rule template. |
ACS::CDN::Domain |
|
| SupportPreviewManagedRule |
boolean |
Indicates whether the rule supports dry runs. Valid values:
|
true |
| RemediationTemplateIdentifier |
string |
The identifier of the supported remediation template. |
ACS-CDN-SetDomainServerCertificate |
| RemediationTemplateName |
string |
The name of the supported remediation template. |
开启CDN域名HTTPS监听 |
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.