Queries all compliance package templates provided by Cloud Config and the details of the compliance package templates.
Operation description
This topic provides an example on how to query the details of a compliance package template whose ID is ct-d254ff4e06a300cf****
. The returned result indicates that the template name is BestPracticesForNetwork
, the template ID is ct-d254ff4e06a300cf****
, and the ID of the managed rule of the template is slb-servercertificate-expired-check
.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
CompliancePackTemplateId | string | No | The ID of the compliance package template. | ct-d254ff4e06a300cf**** |
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. Pages start from page 1. Default value: 1 | 1 |
ResourceTypes | string | No | The types of the resources evaluated based on the rule. If you configure this parameter, only the rules that include the resource types in the compliance package template are returned. | ACS::ECS::Instance |
For more information about common request parameters, see Common parameters.
Response parameters
Examples
Sample success responses
JSON
format
{
"CompliancePackTemplatesResult": {
"PageSize": 10,
"PageNumber": 1,
"TotalCount": 1,
"CompliancePackTemplates": [
{
"RiskLevel": 1,
"Description": "",
"ConfigRules": [
{
"Description": "",
"ManagedRuleIdentifier": "slb-servercertificate-expired-check",
"ManagedRuleName": "",
"ConfigRuleParameters": [
{
"Required": true,
"ParameterName": "days",
"ParameterValue": "90"
}
],
"RiskLevel": 1,
"ControlId": "3.1",
"ControlDescription": "No classic networks exist.",
"DefaultEnable": false,
"ResourceTypesScope": "ACS::SLB::ServerCertificate"
}
],
"CompliancePackTemplateName": "",
"CompliancePackTemplateId": "ct-d254ff4e06a300cf****",
"Labels": "",
"LastUpdate": 1663408308
}
]
},
"RequestId": "D67FC82F-25AE-4268-A94C-3348340748F9"
}
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. |
404 | AccountNotExisted | Your account does not exist. | The specified account does not exist. |
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. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
2023-06-04 | The Error code has changed. The response structure of the API has changed | see changesets | ||||||||||
|