Skip to content

delete_data_catalog async

delete_data_catalog(
    name: CatalogNameString,
    *,
    config_overrides: Optional[AsyncAthenaClientConfig] = None,
    delete_catalog_only: Optional[Boolean] = None,
) -> DeleteDataCatalogOutput

Deletes a data catalog.

Parameters:

  • name (CatalogNameString) –

    The name of the data catalog to delete.

  • delete_catalog_only (Optional[Boolean], default: None ) –

    Deletes the Athena Data Catalog. You can only use this with the FEDERATED catalogs. You usually perform this before registering the connector with Glue Data Catalog. After deletion, you will have to manage the Glue Connection and Lambda function.

Raises:

  • InternalServerException –

    Indicates a platform issue, which may be due to a transient condition or outage.

  • InvalidRequestException –

    Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_athena/_services/async_athena.py
async def delete_data_catalog(
    self,
    name: "capo_athena.types.catalog_name_string.CatalogNameString",
    *,
    config_overrides: Optional[AsyncAthenaClientConfig] = None,
    delete_catalog_only: Optional["capo_athena.types.boolean.Boolean"] = None,
) -> "capo_athena.types.delete_data_catalog_output.DeleteDataCatalogOutput":
    """<p>Deletes a data catalog.</p>

    Args:
        name: <p>The name of the data catalog to delete.</p>
        delete_catalog_only: <p>Deletes the Athena Data Catalog. You can only use this with the <code>FEDERATED</code> catalogs. You usually perform this before registering the connector with Glue Data Catalog. After deletion, you will have to manage the Glue Connection and Lambda function. </p>

    Raises:
        capo_athena.errors.internal_server_exception.InternalServerException: <p>Indicates a platform issue, which may be due to a transient condition or outage.</p>
        capo_athena.errors.invalid_request_exception.InvalidRequestException: <p>Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.</p>
        capo_athena.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_athena.types.delete_data_catalog_input.DeleteDataCatalogInput]",
    ) -> AsyncOperationResponse[
        "capo_athena.types.delete_data_catalog_output.DeleteDataCatalogOutput"
    ]:
        import capo_athena._operations.amazon_athena.delete_data_catalog

        (
            output,
            http_response,
        ) = await capo_athena._operations.amazon_athena.delete_data_catalog.async_delete_data_catalog(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteDataCatalog")
    )
    input_: capo_athena.types.delete_data_catalog_input.DeleteDataCatalogInput = {
        "name": name
    }
    if delete_catalog_only is not None:
        input_["delete_catalog_only"] = delete_catalog_only

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