Moves a replication task from its current replication instance to a different target replication instance using the specified parameters. The target replication instance must be created with the same or later DMS version as the current replication instance.
Parameters:
-
replication_task_arn
(String)
–
The Amazon Resource Name (ARN) of the task that you want to move.
-
target_replication_instance_arn
(String)
–
The ARN of the replication instance where you want to move the task to.
Raises:
Source code in docs_src/capo_database_migration_service/_services/database_migration_service.py
| def move_replication_task(
self,
replication_task_arn: "capo_database_migration_service.types.string.String",
target_replication_instance_arn: "capo_database_migration_service.types.string.String",
*,
config_overrides: Optional[DatabaseMigrationServiceClientConfig] = None,
) -> "capo_database_migration_service.types.move_replication_task_response.MoveReplicationTaskResponse":
"""<p>Moves a replication task from its current replication instance to a different target replication instance using the specified parameters. The target replication instance must be created with the same or later DMS version as the current replication instance.</p>
Args:
replication_task_arn: <p>The Amazon Resource Name (ARN) of the task that you want to move.</p>
target_replication_instance_arn: <p>The ARN of the replication instance where you want to move the task to.</p>
Raises:
capo_database_migration_service.errors.access_denied_fault.AccessDeniedFault: <p>DMS was denied access to the endpoint. Check that the role is correctly configured.</p>
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.kms_key_not_accessible_fault.KMSKeyNotAccessibleFault: <p>DMS cannot access the KMS key.</p>
capo_database_migration_service.errors.resource_not_found_fault.ResourceNotFoundFault: <p>The resource could not be found.</p>
capo_database_migration_service.errors.resource_quota_exceeded_fault.ResourceQuotaExceededFault: <p>The quota for this resource quota has been exceeded.</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.move_replication_task_message.MoveReplicationTaskMessage]",
) -> OperationResponse[
"capo_database_migration_service.types.move_replication_task_response.MoveReplicationTaskResponse"
]:
import capo_database_migration_service._operations.amazon_dm_sv20160101.move_replication_task
output, http_response = (
capo_database_migration_service._operations.amazon_dm_sv20160101.move_replication_task.move_replication_task(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("MoveReplicationTask")
)
input_: capo_database_migration_service.types.move_replication_task_message.MoveReplicationTaskMessage = {
"replication_task_arn": replication_task_arn,
"target_replication_instance_arn": target_replication_instance_arn,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|