Deletes one or more compliance packages.

In this topic, the cp-541e626622af0087**** 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 DeleteCompliancePacks

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

CompliancePackIds String Yes cp-541e626622af0087****

The ID of the compliance package. Separate multiple compliance package IDs with commas (,).

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

ClientToken String No AAAAAdDWBF2****

The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that it is unique among different requests. The client token can contain only ASCII characters. It cannot exceed 64 characters in length.

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.

OperateCompliancePacksResult Object

The results of the delete operations.

OperateCompliancePacks Array of OperateCompliancePacks

The result of the delete operation.

CompliancePackId String cp-541e626622af0087****

The ID of the compliance package.

ErrorCode String CompliancePackAlreadyPending

The error code returned.

  • If the compliance package is deleted, no error code is returned.
  • If the compliance package fails to be deleted, an error code is returned. For more information about error codes, visit the API Error Center.
Success Boolean true

Indicates whether the delete operation is successful. Valid values:

  • true: The delete operation is successful.
  • false: The delete operation fails.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DeleteCompliancePacks
&CompliancePackIds=cp-541e626622af0087****
&<Common request parameters>

Sample success responses

XML format

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

<DeleteCompliancePacksResponse>
    <RequestId>6EC7AED1-172F-42AE-9C12-295BC2ADB751</RequestId>
    <OperateCompliancePacksResult>
        <OperateCompliancePacks>
            <CompliancePackId>cp-541e626622af0087****</CompliancePackId>
            <ErrorCode></ErrorCode>
            <Success>true</Success>
        </OperateCompliancePacks>
    </OperateCompliancePacksResult>
</DeleteCompliancePacksResponse>

JSON format

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

{
  "RequestId" : "6EC7AED1-172F-42AE-9C12-295BC2ADB751",
  "OperateCompliancePacksResult" : {
    "OperateCompliancePacks" : [ {
      "CompliancePackId" : "cp-541e626622af0087****",
      "ErrorCode" : "",
      "Success" : true
    } ]
  }
}

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.
400 Invalid.CompliancePackIds.SizeExceed The maximum number of CompliancePackIds is 5. The error message returned because the number of specified compliance package IDs exceeds five.
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.