restoreBackup method

Future<RestoreBackupResponse> restoreBackup({
  1. required String backupId,
})

Restores a specified CloudHSM backup that is in the PENDING_DELETION state. For more information on deleting a backup, see DeleteBackup.

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 restored. To find the ID of a backup, use the DescribeBackups operation.

Implementation

Future<RestoreBackupResponse> restoreBackup({
  required String backupId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'BaldrApiService.RestoreBackup'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'BackupId': backupId,
    },
  );

  return RestoreBackupResponse.fromJson(jsonResponse.body);
}