reloadTables method
Reloads the target database table with the source data.
You can only use this operation with a task in the RUNNING
state, otherwise the service will throw an
InvalidResourceStateFault exception.
May throw InvalidResourceStateFault.
May throw ResourceNotFoundFault.
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 {
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.value,
},
);
return ReloadTablesResponse.fromJson(jsonResponse.body);
}