Queries the compliance evaluation report that is generated based on a compliance package.

Note Before you call this operation, you must call the GenerateCompliancePackReport operation to generate the latest compliance evaluation report based on a compliance package as required. For more information, see GenerateCompliancePackReport.

In this topic, the cp-fdc8626622af00f9**** compliance package is used as an example.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes GetCompliancePackReport

The operation that you want to perform. Set the value to GetCompliancePackReport.

CompliancePackId String Yes cp-fdc8626622af00f9****

The ID of the compliance package.

For more information about how to obtain the ID of a compliance package, see ListCompliancePacks.

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.

CompliancePackReport Object

The information about the compliance evaluation report.

ReportUrl String https://cloud-config-compliance-report.oss-cn-shanghai.aliyuncs.com/CompliancePackReports/120886317861****/cp-fdc8626622af00f9****/120886317861****-cp-fdc8626622af00f9****-report-202106221046.xls?Expires=162442****&OSSAccessKeyId=LTAIs86R8H59****&Signature=sWmz4fq7eJEyDoho%2FoDOReZ3s****

The URL that is used to download the compliance evaluation report.

ReportStatus String COMPLETE

The status of the compliance evaluation report. Valid values:

  • NONE: The compliance evaluation report is not generated.
  • CREATING: The compliance evaluation report is being generated.
  • COMPLETE: The compliance evaluation report is generated.
CompliancePackId String cp-fdc8626622af00f9****

The ID of the compliance package.

AccountId Long 120886317861****

The ID of the Alibaba Cloud account to which the compliance package belongs.

ReportCreateTimestamp Long 1624329965857

The timestamp when the compliance evaluation report was generated. Unit: milliseconds.

Examples

Sample requests

http(s)://[Endpoint]/?Action=GetCompliancePackReport
&CompliancePackId=cp-fdc8626622af00f9****
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<GetCompliancePackReportResponse>
	<RequestId>6EC7AED1-172F-42AE-9C12-295BC2ADB751</RequestId>
	<CompliancePackReport>
		<CompliancePackId>cp-fdc8626622af00f9****</CompliancePackId>
		<AccountId>120886317861****</AccountId>
		<ReportUrl>https://cloud-config-compliance-report.oss-cn-shanghai.aliyuncs.com/CompliancePackReports/120886317861****/cp-fdc8626622af00f9****/120886317861****-cp-fdc8626622af00f9****-report-202106221046.xls?Expires=162442****&amp;OSSAccessKeyId=LTAIs86R8H59****&amp;Signature=sWmz4fq7eJEyDoho%2FoDOReZ3s****</ReportUrl>
		<ReportStatus>COMPLETE</ReportStatus>
		<ReportCreateTimestamp>1624329965857</ReportCreateTimestamp>
	</CompliancePackReport>
</GetCompliancePackReportResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "6EC7AED1-172F-42AE-9C12-295BC2ADB751",
  "CompliancePackReport" : {
    "CompliancePackId" : "cp-fdc8626622af00f9****",
    "AccountId" : "120886317861****",
    "ReportUrl" : "https://cloud-config-compliance-report.oss-cn-shanghai.aliyuncs.com/CompliancePackReports/120886317861****/cp-fdc8626622af00f9****/120886317861****-cp-fdc8626622af00f9****-report-202106221046.xls?Expires=162442****&OSSAccessKeyId=LTAIs86R8H59****&Signature=sWmz4fq7eJEyDoho%2FoDOReZ3s****",
    "ReportStatus" : "COMPLETE",
    "ReportCreateTimestamp" : 1624329965857
  }
}

Error codes

HTTP status code Error code Error message Description
400 Invalid.CompliancePackId.Value The specified CompliancePackId does not exist. The error message returned because the specified compliance package ID does not exist.
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.