Skip to content

get_table_versions async

get_table_versions(
    database_name: NameString,
    table_name: NameString,
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
    catalog_id: Optional[CatalogIdString] = None,
    next_token: Optional[Token] = None,
    max_results: Optional[CatalogGetterPageSize] = None,
    audit_context: Optional[AuditContext] = None,
) -> GetTableVersionsResponse

Retrieves a list of strings that identify available versions of a specified table.

Parameters:

  • catalog_id (Optional[CatalogIdString], default: None ) –

    The ID of the Data Catalog where the tables reside. If none is provided, the Amazon Web Services account ID is used by default.

  • database_name (NameString) –

    The database in the catalog in which the table resides. For Hive compatibility, this name is entirely lowercase.

  • table_name (NameString) –

    The name of the table. For Hive compatibility, this name is entirely lowercase.

  • next_token (Optional[Token], default: None ) –

    A continuation token, if this is not the first call.

  • max_results (Optional[CatalogGetterPageSize], default: None ) –

    The maximum number of table versions to return in one response.

Raises:

Source code in docs_src/capo_glue/_services/async_glue.py
async def get_table_versions(
    self,
    database_name: "capo_glue.types.name_string.NameString",
    table_name: "capo_glue.types.name_string.NameString",
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
    catalog_id: Optional[
        "capo_glue.types.catalog_id_string.CatalogIdString"
    ] = None,
    next_token: Optional["capo_glue.types.token.Token"] = None,
    max_results: Optional[
        "capo_glue.types.catalog_getter_page_size.CatalogGetterPageSize"
    ] = None,
    audit_context: Optional["capo_glue.types.audit_context.AuditContext"] = None,
) -> "capo_glue.types.get_table_versions_response.GetTableVersionsResponse":
    """<p>Retrieves a list of strings that identify available versions of a specified table.</p>

    Args:
        catalog_id: <p>The ID of the Data Catalog where the tables reside. If none is provided, the Amazon Web Services account ID is used by default.</p>
        database_name: <p>The database in the catalog in which the table resides. For Hive compatibility, this name is entirely lowercase.</p>
        table_name: <p>The name of the table. For Hive compatibility, this name is entirely lowercase.</p>
        next_token: <p>A continuation token, if this is not the first call.</p>
        max_results: <p>The maximum number of table versions to return in one response.</p>

    Raises:
        capo_glue.errors.entity_not_found_exception.EntityNotFoundException: <p>A specified entity does not exist</p>
        capo_glue.errors.glue_encryption_exception.GlueEncryptionException: <p>An encryption operation failed.</p>
        capo_glue.errors.internal_service_exception.InternalServiceException: <p>An internal service error occurred.</p>
        capo_glue.errors.invalid_input_exception.InvalidInputException: <p>The input provided was not valid.</p>
        capo_glue.errors.operation_timeout_exception.OperationTimeoutException: <p>The operation timed out.</p>
        capo_glue.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_glue.types.get_table_versions_request.GetTableVersionsRequest]",
    ) -> AsyncOperationResponse[
        "capo_glue.types.get_table_versions_response.GetTableVersionsResponse"
    ]:
        import capo_glue._operations.aws_glue.get_table_versions

        (
            output,
            http_response,
        ) = await capo_glue._operations.aws_glue.get_table_versions.async_get_table_versions(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetTableVersions")
    )
    input_: capo_glue.types.get_table_versions_request.GetTableVersionsRequest = {
        "database_name": database_name,
        "table_name": table_name,
    }
    if catalog_id is not None:
        input_["catalog_id"] = catalog_id
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if audit_context is not None:
        input_["audit_context"] = audit_context

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