Deletes one or more compliance packages.
In this topic, the cp-541e626622af0087****
compliance package is used as an example.
Debugging
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:
|
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.
|
Success | Boolean | true |
Indicates whether the operation is successful. Valid values:
|
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
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.