Skip to content

move_replication_task async

move_replication_task(
    replication_task_arn: String,
    target_replication_instance_arn: String,
    *,
    config_overrides: Optional[AsyncDatabaseMigrationServiceClientConfig] = None,
) -> MoveReplicationTaskResponse

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/async_database_migration_service.py
async 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[AsyncDatabaseMigrationServiceClientConfig] = 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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_database_migration_service.types.move_replication_task_message.MoveReplicationTaskMessage]",
    ) -> AsyncOperationResponse[
        "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,
        ) = await capo_database_migration_service._operations.amazon_dm_sv20160101.move_replication_task.async_move_replication_task(
            req.options, req.input
        )
        return AsyncOperationResponse(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 = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output