Queries compliance packages.
This topic provides an example of how to query compliance packages. The return result
shows the details of the cp-fdc8626622af00f9****
compliance package.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ListCompliancePacks |
The operation that you want to perform. Set the value to ListCompliancePacks. |
Status | String | No | ACTIVE |
The status of the compliance package to be queried. Valid values:
|
PageSize | Integer | No | 10 |
The number of entries to return on each page. Valid values: 1 to 100. Pages start from page 1. Default value: 10. |
PageNumber | Integer | No | 1 |
The number of the page to return. Pages start from page 1. Default value: 1. |
For information about common request parameters, see Common parameters.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 6EC7AED1-172F-42AE-9C12-295BC2ADB751 |
The ID of the request. |
CompliancePacksResult | Object |
The compliance packages returned. |
|
CompliancePacks | Array of CompliancePacks |
The details of the compliance package. |
|
Status | String | ACTIVE |
The status of the compliance package. Valid values:
|
CompliancePackId | String | cp-fdc8626622af00f9**** |
The ID of the compliance package. |
RiskLevel | Integer | 1 |
The risk level of the resources that are not compliant with the managed rules in the compliance package. Valid values:
|
Description | String | The compliance package continuously monitors your resources to check whether the resources are compliant with MLPS 2.0 Level 3. This allows you to perform self-service prechecks and handle resource non-compliance to pass the formal compliance evaluation with efficiency. |
The description of the compliance package. |
CompliancePackName | String | ClassifiedProtectionPreCheck |
The name of the compliance package. |
AccountId | Long | 120886317861**** |
The ID of the Alibaba Cloud account to which the compliance package belongs. |
CompliancePackTemplateId | String | ct-5f26ff4e06a300c4**** |
The ID of the compliance package template based on which the compliance package was created. |
CreateTimestamp | Long | 1621325046000 |
The timestamp when the compliance package was created. Unit: milliseconds. |
PageSize | Integer | 10 |
The number of entries returned per page. |
PageNumber | Integer | 1 |
The page number of the returned page. |
TotalCount | Long | 1 |
The total number of compliance packages returned. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=ListCompliancePacks
&Status=ACTIVE
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ListCompliancePacksResponse>
<RequestId>6EC7AED1-172F-42AE-9C12-295BC2ADB751</RequestId>
<CompliancePacksResult>
<TotalCount>1</TotalCount>
<PageSize>10</PageSize>
<PageNumber>1</PageNumber>
<CompliancePacks>
<Status>ACTIVE</Status>
<CompliancePackId>cp-fdc8626622af00f9****</CompliancePackId>
<Description>The compliance package continuously monitors your resources to check whether the resources are compliant with MLPS 2.0 Level 3. This allows you to perform self-service prechecks and handle resource non-compliance to pass the formal compliance evaluation with efficiency. </Description>
<CompliancePackName> ClassifiedProtectionPreCheck </CompliancePackName>
<AccountId>120886317861****</AccountId>
<CompliancePackTemplateId>ct-5f26ff4e06a300c4****</CompliancePackTemplateId>
<RiskLevel>1</RiskLevel>
</CompliancePacks>
</CompliancePacksResult>
</ListCompliancePacksResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "6EC7AED1-172F-42AE-9C12-295BC2ADB751",
"CompliancePacksResult" : {
"TotalCount" : 1,
"PageSize" : 10,
"PageNumber" : 1,
"CompliancePacks" : [ {
"Status" : "ACTIVE",
"CompliancePackId" : "cp-fdc8626622af00f9****",
"Description" : "The compliance package continuously monitors your resources to check whether the resources are compliant with MLPS 2.0 Level 3. This allows you to perform self-service prechecks and handle resource non-compliance to pass the formal compliance evaluation with efficiency.",
"CompliancePackName" : "ClassifiedProtectionPreCheck",
"AccountId" : "120886317861****",
"CompliancePackTemplateId" : "ct-5f26ff4e06a300c4****",
"RiskLevel" : 1
} ]
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | NoPermission | You are not authorized to perform this operation. | The error message returned because you are not authorized to perform the specified operation. |
404 | AccountNotExisted | Your account does not exist. | The error message returned because your account does not exist. |
503 | ServiceUnavailable | The request has failed due to a temporary failure of the server. | The error message returned because the service is unavailable. |
For a list of error codes, visit the API Error Center.