restoreFromRecoveryPoint method

Future<RestoreFromRecoveryPointResponse> restoreFromRecoveryPoint({
  1. required String namespaceName,
  2. required String recoveryPointId,
  3. required String workgroupName,
})

Restore the data from a recovery point.

May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter namespaceName : The name of the namespace to restore data into.

Parameter recoveryPointId : The unique identifier of the recovery point to restore from.

Parameter workgroupName : The name of the workgroup used to restore data.

Implementation

Future<RestoreFromRecoveryPointResponse> restoreFromRecoveryPoint({
  required String namespaceName,
  required String recoveryPointId,
  required String workgroupName,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'RedshiftServerless.RestoreFromRecoveryPoint'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'namespaceName': namespaceName,
      'recoveryPointId': recoveryPointId,
      'workgroupName': workgroupName,
    },
  );

  return RestoreFromRecoveryPointResponse.fromJson(jsonResponse.body);
}