deleteCluster method
Deletes the specified CloudHSM cluster. Before you can delete a cluster, you must delete all HSMs in the cluster. To see if the cluster contains any HSMs, use DescribeClusters. To delete an HSM, use DeleteHsm.
Cross-account use: No. You cannot perform this operation on an CloudHSM cluster in a different Amazon Web Services account.
May throw CloudHsmAccessDeniedException.
May throw CloudHsmInternalFailureException.
May throw CloudHsmInvalidRequestException.
May throw CloudHsmResourceNotFoundException.
May throw CloudHsmServiceException.
May throw CloudHsmTagException.
Parameter clusterId :
The identifier (ID) of the cluster that you are deleting. To find the
cluster ID, use DescribeClusters.
Implementation
Future<DeleteClusterResponse> deleteCluster({
required String clusterId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'BaldrApiService.DeleteCluster'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ClusterId': clusterId,
},
);
return DeleteClusterResponse.fromJson(jsonResponse.body);
}