Reloads the target database table with the source data for a given DMS Serverless replication configuration.
You can only use this operation with a task in the RUNNING state, otherwise the service will throw an InvalidResourceStateFault exception.
Parameters:
-
replication_config_arn
(String)
–
The Amazon Resource Name of the replication config for which to reload tables.
-
tables_to_reload
(TableListToReload)
–
The list of tables to reload.
-
reload_option
(Optional[ReloadOptionValue], default:
None
)
–
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 replication.
Raises:
Source code in docs_src/capo_database_migration_service/_services/database_migration_service.py
| def reload_replication_tables(
self,
replication_config_arn: "capo_database_migration_service.types.string.String",
tables_to_reload: "capo_database_migration_service.types.table_list_to_reload.TableListToReload",
*,
config_overrides: Optional[DatabaseMigrationServiceClientConfig] = None,
reload_option: Optional[
"capo_database_migration_service.types.reload_option_value.ReloadOptionValue"
] = None,
) -> "capo_database_migration_service.types.reload_replication_tables_response.ReloadReplicationTablesResponse":
"""<p>Reloads the target database table with the source data for a given DMS Serverless replication configuration.</p> <p>You can only use this operation with a task in the RUNNING state, otherwise the service will throw an <code>InvalidResourceStateFault</code> exception.</p>
Args:
replication_config_arn: <p>The Amazon Resource Name of the replication config for which to reload tables.</p>
tables_to_reload: <p>The list of tables to reload.</p>
reload_option: <p>Options for reload. Specify <code>data-reload</code> to reload the data and re-validate it if validation is enabled. Specify <code>validate-only</code> to re-validate the table. This option applies only when validation is enabled for the replication. </p>
Raises:
capo_database_migration_service.errors.invalid_resource_state_fault.InvalidResourceStateFault: <p>The resource is in a state that prevents it from being used for database migration.</p>
capo_database_migration_service.errors.resource_not_found_fault.ResourceNotFoundFault: <p>The resource could not be found.</p>
capo_database_migration_service.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_database_migration_service.types.reload_replication_tables_message.ReloadReplicationTablesMessage]",
) -> OperationResponse[
"capo_database_migration_service.types.reload_replication_tables_response.ReloadReplicationTablesResponse"
]:
import capo_database_migration_service._operations.amazon_dm_sv20160101.reload_replication_tables
output, http_response = (
capo_database_migration_service._operations.amazon_dm_sv20160101.reload_replication_tables.reload_replication_tables(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ReloadReplicationTables")
)
input_: capo_database_migration_service.types.reload_replication_tables_message.ReloadReplicationTablesMessage = {
"replication_config_arn": replication_config_arn,
"tables_to_reload": tables_to_reload,
}
if reload_option is not None:
input_["reload_option"] = reload_option
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|