Deletes one or more compliance packages.

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


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 token, but you must make sure that the value is unique among different requests. The value of this parameter can contain only ASCII characters and cannot exceed 64 characters in length.

DeleteRule Boolean No false

Specifies whether to delete the rules in the compliance package. Valid values:

  • true: deletes the rules.
  • false: retains the rules. This is the default value.

For more 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.

  • 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 operation is successful. Valid values:

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


Sample requests

&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK


JSON format

HTTP/1.1 200 OK

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

Error codes

HttpCode 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.