All Products
Search
Document Center

Cloud Config:ListCompliancePackTemplates

Last Updated:Dec 12, 2024

Queries all compliance package templates provided by Cloud Config and the details of the compliance package templates.

Operation description

A compliance package template is a collection of rules that Cloud Config can create based on compliance scenarios.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
CompliancePackTemplateIdstringNo

The ID of the compliance package template.

ct-d254ff4e06a300cf****
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
ResourceTypesstringNo

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

ParameterTypeDescriptionExample
object

This operation does not return any operation-specific parameters.

CompliancePackTemplatesResultobject

The information about the compliance package templates returned.

PageSizeinteger

The number of entries per page.

10
PageNumberinteger

The page number.

1
TotalCountlong

The total number of the compliance package templates returned.

1
CompliancePackTemplatesarray<object>

The compliance package templates.

CompliancePackTemplateobject

N/A.

RiskLevelinteger

The risk level of the managed rule in the compliance package. Valid values:

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

The description of the compliance package.

example-description
ConfigRulesarray<object>

The default rules in the compliance package.

ConfigRulesobject

N/A.

Descriptionstring

The description of the rule.

If the expiration time of the SLB certificate is later than the specified number of days after the check time, the configuration is considered compliant. Default value: 90 days.
ManagedRuleIdentifierstring

The identifier of the managed rule.

slb-servercertificate-expired-check
ManagedRuleNamestring

The name of the managed rule.

slb-servercertificate-expired-check
ConfigRuleParametersarray<object>

The input parameter of the managed rule.

ConfigRuleParametersobject

N/A.

Requiredboolean

Indicates whether the parameter is required in the managed rule. Valid values:

  • true: required
  • false: optional
true
ParameterNamestring

The name of the input parameter of the managed rule.

days
ParameterValuestring

The value of the input parameter of the managed rule.

90
RiskLevelinteger

The risk level of the managed rule. Valid values:

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

The regulation ID.

Note This parameter is available only for regulation compliance packages.
3.1
ControlDescriptionstring

The description of the regulation. This parameter is available only for regulation compliance packages.

No classic networks exist.
DefaultEnableboolean

Indicates whether the rules are enabled together with the compliance package. Valid values:

  • true
  • false
false
ResourceTypesScopestring

The types of the resources evaluated based on the rule.

ACS::SLB::ServerCertificate
CompliancePackTemplateNamestring

The name of the compliance package template.

BestPracticesForResourceStability
CompliancePackTemplateIdstring

The ID of the compliance package template.

ct-d254ff4e06a300cf****
Labelsstring

The tag of the compliance package.

tagKey-1
LastUpdateinteger

The time when the compliance package was last updated.

1663408308
RequestIdstring

The request ID.

D67FC82F-25AE-4268-A94C-3348340748F9

Examples

Sample success responses

JSONformat

{
  "CompliancePackTemplatesResult": {
    "PageSize": 10,
    "PageNumber": 1,
    "TotalCount": 1,
    "CompliancePackTemplates": [
      {
        "RiskLevel": 1,
        "Description": "example-description",
        "ConfigRules": [
          {
            "Description": "If the expiration time of the SLB certificate is later than the specified number of days after the check time, the configuration is considered compliant. Default value: 90 days.",
            "ManagedRuleIdentifier": "slb-servercertificate-expired-check",
            "ManagedRuleName": "\nslb-servercertificate-expired-check",
            "ConfigRuleParameters": [
              {
                "Required": true,
                "ParameterName": "days",
                "ParameterValue": "90"
              }
            ],
            "RiskLevel": 1,
            "ControlId": "3.1",
            "ControlDescription": "No classic networks exist.",
            "DefaultEnable": false,
            "ResourceTypesScope": "ACS::SLB::ServerCertificate"
          }
        ],
        "CompliancePackTemplateName": "BestPracticesForResourceStability",
        "CompliancePackTemplateId": "ct-d254ff4e06a300cf****",
        "Labels": "tagKey-1",
        "LastUpdate": 1663408308
      }
    ]
  },
  "RequestId": "D67FC82F-25AE-4268-A94C-3348340748F9"
}

Error codes

HTTP status codeError codeError messageDescription
400NoPermissionYou are not authorized to perform this operation.You are not authorized to perform this operation.
404AccountNotExistedYour account does not exist.-
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-06-04The Error code has changed. The response structure of the API has changedView Change Details