deleteHsm method

Future<DeleteHsmResponse> deleteHsm({
  1. required String hsmArn,
})

This is documentation for AWS CloudHSM Classic. For more information, see AWS CloudHSM Classic FAQs, the AWS CloudHSM Classic User Guide, and the AWS CloudHSM Classic API Reference.

For information about the current version of AWS CloudHSM, see AWS CloudHSM, the AWS CloudHSM User Guide, and the AWS CloudHSM API Reference.

Deletes an HSM. After completion, this operation cannot be undone and your key material cannot be recovered.

May throw CloudHsmServiceException. May throw CloudHsmInternalException. May throw InvalidRequestException.

Parameter hsmArn : The ARN of the HSM to delete.

Implementation

Future<DeleteHsmResponse> deleteHsm({
  required String hsmArn,
}) async {
  ArgumentError.checkNotNull(hsmArn, 'hsmArn');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'CloudHsmFrontendService.DeleteHsm'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'HsmArn': hsmArn,
    },
  );

  return DeleteHsmResponse.fromJson(jsonResponse.body);
}