Skip to content

refresh_schemas async

refresh_schemas(
    endpoint_arn: String,
    replication_instance_arn: String,
    *,
    config_overrides: Optional[AsyncDatabaseMigrationServiceClientConfig] = None,
) -> RefreshSchemasResponse

Populates the schema for the specified endpoint. This is an asynchronous operation and can take several minutes. You can check the status of this operation by calling the DescribeRefreshSchemasStatus operation.

Parameters:

  • endpoint_arn (String) –

    The Amazon Resource Name (ARN) string that uniquely identifies the endpoint.

  • replication_instance_arn (String) –

    The Amazon Resource Name (ARN) of the replication instance.

Raises:

Examples:

Refresh schema Populates the schema for the specified endpoint. This is an asynchronous operation and can take several minutes. You can check the status of this operation by calling the describe-refresh-schemas-status operation.

>>> await client.refresh_schemas(endpoint_arn='', replication_instance_arn='')
Source code in docs_src/capo_database_migration_service/_services/async_database_migration_service.py
async def refresh_schemas(
    self,
    endpoint_arn: "capo_database_migration_service.types.string.String",
    replication_instance_arn: "capo_database_migration_service.types.string.String",
    *,
    config_overrides: Optional[AsyncDatabaseMigrationServiceClientConfig] = None,
) -> "capo_database_migration_service.types.refresh_schemas_response.RefreshSchemasResponse":
    """<p>Populates the schema for the specified endpoint. This is an asynchronous operation and can take several minutes. You can check the status of this operation by calling the DescribeRefreshSchemasStatus operation.</p>

    Args:
        endpoint_arn: <p>The Amazon Resource Name (ARN) string that uniquely identifies the endpoint.</p>
        replication_instance_arn: <p>The Amazon Resource Name (ARN) of the replication instance.</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.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.

    Examples:
        Refresh schema
        Populates the schema for the specified endpoint. This is an asynchronous operation and can take several minutes. You can check the status of this operation by calling the describe-refresh-schemas-status operation.

        >>> await client.refresh_schemas(endpoint_arn='', replication_instance_arn='')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_database_migration_service.types.refresh_schemas_message.RefreshSchemasMessage]",
    ) -> AsyncOperationResponse[
        "capo_database_migration_service.types.refresh_schemas_response.RefreshSchemasResponse"
    ]:
        import capo_database_migration_service._operations.amazon_dm_sv20160101.refresh_schemas

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("RefreshSchemas")
    )
    input_: capo_database_migration_service.types.refresh_schemas_message.RefreshSchemasMessage = {
        "endpoint_arn": endpoint_arn,
        "replication_instance_arn": replication_instance_arn,
    }

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