Deletes one or more compliance packages from an account group.
The sample request in this topic shows you how to delete the cp-541e626622af0087****
compliance package from the ca-04b3fd170e340007****
account group.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DeleteAggregateCompliancePacks |
The operation that you want to perform. Set the value to DeleteAggregateCompliancePacks. |
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 ListAggregateCompliancePacks. |
ClientToken | String | No | 1594295238-f9361358-5843-4294-8d30-b5183fac**** |
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 token can contain only ASCII characters and cannot exceed 64 characters in length. |
AggregatorId | String | Yes | ca-04b3fd170e340007**** |
The ID of the account group. For more information about how to obtain the ID of an account group, see ListAggregators. |
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 | false |
Indicates whether the operation is successful. Valid values:
|
Examples
Sample requests
http(s)://[Endpoint]/?Action=DeleteAggregateCompliancePacks
&CompliancePackIds=cp-541e626622af0087****
&AggregatorId=ca-04b3fd170e340007****
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DeleteAggregateCompliancePacksResponse>
<RequestId>6EC7AED1-172F-42AE-9C12-295BC2ADB751</RequestId>
<OperateCompliancePacksResult>
<OperateCompliancePacks>
<CompliancePackId>cp-541e626622af0087****</CompliancePackId>
<ErrorCode>CompliancePackAlreadyPending</ErrorCode>
<Success>false</Success>
</OperateCompliancePacks>
</OperateCompliancePacksResult>
</DeleteAggregateCompliancePacksResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "6EC7AED1-172F-42AE-9C12-295BC2ADB751",
"OperateCompliancePacksResult" : {
"OperateCompliancePacks" : [ {
"CompliancePackId" : "cp-541e626622af0087****",
"ErrorCode" : "CompliancePackAlreadyPending",
"Success" : false
} ]
}
}
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.AggregatorId.Value | The specified AggregatorId is invalid. | The error message returned because the specified account group ID does not exist or you are not authorized to use the account group. |
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. |
403 | AggregatorMemberNoPermission | The aggregator member is not authorized to perform the operation. | The error message returned because you are using a member account and 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.