Skip to content

batch_delete_table_version

batch_delete_table_version(
    database_name: NameString,
    table_name: NameString,
    version_ids: BatchDeleteTableVersionList,
    *,
    config_overrides: Optional[GlueClientConfig] = None,
    catalog_id: Optional[CatalogIdString] = None,
) -> BatchDeleteTableVersionResponse

Deletes a specified batch of versions of a 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.

  • version_ids (BatchDeleteTableVersionList) –

    A list of the IDs of versions to be deleted. A VersionId is a string representation of an integer. Each version is incremented by 1.

Raises:

Source code in docs_src/capo_glue/_services/glue.py
def batch_delete_table_version(
    self,
    database_name: "capo_glue.types.name_string.NameString",
    table_name: "capo_glue.types.name_string.NameString",
    version_ids: "capo_glue.types.batch_delete_table_version_list.BatchDeleteTableVersionList",
    *,
    config_overrides: Optional[GlueClientConfig] = None,
    catalog_id: Optional[
        "capo_glue.types.catalog_id_string.CatalogIdString"
    ] = None,
) -> "capo_glue.types.batch_delete_table_version_response.BatchDeleteTableVersionResponse":
    """<p>Deletes a specified batch of versions of a 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>
        version_ids: <p>A list of the IDs of versions to be deleted. A <code>VersionId</code> is a string representation of an integer. Each version is incremented by 1.</p>

    Raises:
        capo_glue.errors.entity_not_found_exception.EntityNotFoundException: <p>A specified entity does not exist</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.
    """

    def _handler(
        req: "OperationRequest[capo_glue.types.batch_delete_table_version_request.BatchDeleteTableVersionRequest]",
    ) -> OperationResponse[
        "capo_glue.types.batch_delete_table_version_response.BatchDeleteTableVersionResponse"
    ]:
        import capo_glue._operations.aws_glue.batch_delete_table_version

        output, http_response = (
            capo_glue._operations.aws_glue.batch_delete_table_version.batch_delete_table_version(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("BatchDeleteTableVersion")
    )
    input_: capo_glue.types.batch_delete_table_version_request.BatchDeleteTableVersionRequest = {
        "database_name": database_name,
        "table_name": table_name,
        "version_ids": version_ids,
    }
    if catalog_id is not None:
        input_["catalog_id"] = catalog_id

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output