reloadTables method
Future<ReloadTablesResponse>
reloadTables({
- required String replicationTaskArn,
- required List<
TableToReload> tablesToReload, - ReloadOptionValue? reloadOption,
Reloads the target database table with the source data.
May throw ResourceNotFoundFault. May throw InvalidResourceStateFault.
Parameter replicationTaskArn
:
The Amazon Resource Name (ARN) of the replication task.
Parameter tablesToReload
:
The name and schema of the table to be reloaded.
Parameter reloadOption
:
Options for reload. Specify data-reload
to reload the data
and re-validate it if validation is enabled. Specify
validate-only
to re-validate the table. This option applies
only when validation is enabled for the task.
Valid values: data-reload, validate-only
Default value is data-reload.
Implementation
Future<ReloadTablesResponse> reloadTables({
required String replicationTaskArn,
required List<TableToReload> tablesToReload,
ReloadOptionValue? reloadOption,
}) async {
ArgumentError.checkNotNull(replicationTaskArn, 'replicationTaskArn');
ArgumentError.checkNotNull(tablesToReload, 'tablesToReload');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonDMSv20160101.ReloadTables'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ReplicationTaskArn': replicationTaskArn,
'TablesToReload': tablesToReload,
if (reloadOption != null) 'ReloadOption': reloadOption.toValue(),
},
);
return ReloadTablesResponse.fromJson(jsonResponse.body);
}