deleteBackup method
Deletes a specified CloudHSM backup. A backup can be restored up to 7 days after the DeleteBackup request is made. For more information on restoring a backup, see RestoreBackup.
Cross-account use: No. You cannot perform this operation on an CloudHSM backup in a different Amazon Web Services account.
May throw CloudHsmAccessDeniedException.
May throw CloudHsmInternalFailureException.
May throw CloudHsmInvalidRequestException.
May throw CloudHsmResourceNotFoundException.
May throw CloudHsmServiceException.
Parameter backupId :
The ID of the backup to be deleted. To find the ID of a backup, use the
DescribeBackups operation.
Implementation
Future<DeleteBackupResponse> deleteBackup({
required String backupId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'BaldrApiService.DeleteBackup'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'BackupId': backupId,
},
);
return DeleteBackupResponse.fromJson(jsonResponse.body);
}