Skip to content

start_data_migration async

start_data_migration(
    data_migration_identifier: String,
    start_type: StartReplicationMigrationTypeValue,
    *,
    config_overrides: Optional[AsyncDatabaseMigrationServiceClientConfig] = None,
) -> StartDataMigrationResponse

Starts the specified data migration.

Parameters:

  • data_migration_identifier (String) –

    The identifier (name or ARN) of the data migration to start.

  • start_type (StartReplicationMigrationTypeValue) –

    Specifies the start type for the data migration. Valid values include start-replication, reload-target, and resume-processing.

Raises:

Source code in docs_src/capo_database_migration_service/_services/async_database_migration_service.py
async def start_data_migration(
    self,
    data_migration_identifier: "capo_database_migration_service.types.string.String",
    start_type: "capo_database_migration_service.types.start_replication_migration_type_value.StartReplicationMigrationTypeValue",
    *,
    config_overrides: Optional[AsyncDatabaseMigrationServiceClientConfig] = None,
) -> "capo_database_migration_service.types.start_data_migration_response.StartDataMigrationResponse":
    """<p>Starts the specified data migration.</p>

    Args:
        data_migration_identifier: <p>The identifier (name or ARN) of the data migration to start.</p>
        start_type: <p>Specifies the start type for the data migration. Valid values include <code>start-replication</code>, <code>reload-target</code>, and <code>resume-processing</code>.</p>

    Raises:
        capo_database_migration_service.errors.failed_dependency_fault.FailedDependencyFault: <p>A dependency threw an exception.</p>
        capo_database_migration_service.errors.invalid_operation_fault.InvalidOperationFault: <p>The action or operation requested isn't valid.</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.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.start_data_migration_message.StartDataMigrationMessage]",
    ) -> AsyncOperationResponse[
        "capo_database_migration_service.types.start_data_migration_response.StartDataMigrationResponse"
    ]:
        import capo_database_migration_service._operations.amazon_dm_sv20160101.start_data_migration

        (
            output,
            http_response,
        ) = await capo_database_migration_service._operations.amazon_dm_sv20160101.start_data_migration.async_start_data_migration(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_database_migration_service.types.start_data_migration_response.StartDataMigrationResponse",
    ) -> dict[str, Any]:
        import capo_database_migration_service.types.start_data_migration_response

        return capo_database_migration_service.types.start_data_migration_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("StartDataMigration", redact_output=_redact_output),
    )
    input_: capo_database_migration_service.types.start_data_migration_message.StartDataMigrationMessage = {
        "data_migration_identifier": data_migration_identifier,
        "start_type": start_type,
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output