restoreTableFromRecoveryPoint method
- required String namespaceName,
- required String newTableName,
- required String recoveryPointId,
- required String sourceDatabaseName,
- required String sourceTableName,
- required String workgroupName,
- bool? activateCaseSensitiveIdentifier,
- String? sourceSchemaName,
- String? targetDatabaseName,
- String? targetSchemaName,
Restores a table from a recovery point to your Amazon Redshift Serverless instance. You can't use this operation to restore tables with interleaved sort keys.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ValidationException.
Parameter namespaceName :
Namespace of the recovery point to restore from.
Parameter newTableName :
The name of the table to create from the restore operation.
Parameter recoveryPointId :
The ID of the recovery point to restore the table from.
Parameter sourceDatabaseName :
The name of the source database that contains the table being restored.
Parameter sourceTableName :
The name of the source table being restored.
Parameter workgroupName :
The workgroup to restore the table to.
Parameter activateCaseSensitiveIdentifier :
Indicates whether name identifiers for database, schema, and table are
case sensitive. If true, the names are case sensitive. If false, the names
are not case sensitive. The default is false.
Parameter sourceSchemaName :
The name of the source schema that contains the table being restored.
Parameter targetDatabaseName :
The name of the database to restore the table to.
Parameter targetSchemaName :
The name of the schema to restore the table to.
Implementation
Future<RestoreTableFromRecoveryPointResponse> restoreTableFromRecoveryPoint({
required String namespaceName,
required String newTableName,
required String recoveryPointId,
required String sourceDatabaseName,
required String sourceTableName,
required String workgroupName,
bool? activateCaseSensitiveIdentifier,
String? sourceSchemaName,
String? targetDatabaseName,
String? targetSchemaName,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'RedshiftServerless.RestoreTableFromRecoveryPoint'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'namespaceName': namespaceName,
'newTableName': newTableName,
'recoveryPointId': recoveryPointId,
'sourceDatabaseName': sourceDatabaseName,
'sourceTableName': sourceTableName,
'workgroupName': workgroupName,
if (activateCaseSensitiveIdentifier != null)
'activateCaseSensitiveIdentifier': activateCaseSensitiveIdentifier,
if (sourceSchemaName != null) 'sourceSchemaName': sourceSchemaName,
if (targetDatabaseName != null)
'targetDatabaseName': targetDatabaseName,
if (targetSchemaName != null) 'targetSchemaName': targetSchemaName,
},
);
return RestoreTableFromRecoveryPointResponse.fromJson(jsonResponse.body);
}