Removes the specified catalog from the Glue Data Catalog.
After completing this operation, you no longer have access to the databases, tables (and all table versions and partitions that might belong to the tables) and the user-defined functions in the deleted catalog. Glue deletes these "orphaned" resources asynchronously in a timely manner, at the discretion of the service.
To ensure the immediate deletion of all related resources before calling the DeleteCatalog operation, use DeleteTableVersion (or BatchDeleteTableVersion), DeletePartition (or BatchDeletePartition), DeleteTable (or BatchDeleteTable), DeleteUserDefinedFunction and DeleteDatabase to delete any resources that belong to the catalog.
Parameters:
Raises:
Source code in docs_src/capo_glue/_services/glue.py
| def delete_catalog(
self,
catalog_id: "capo_glue.types.catalog_id_string.CatalogIdString",
*,
config_overrides: Optional[GlueClientConfig] = None,
) -> "capo_glue.types.delete_catalog_response.DeleteCatalogResponse":
"""<p>Removes the specified catalog from the Glue Data Catalog.</p> <p>After completing this operation, you no longer have access to the databases, tables (and all table versions and partitions that might belong to the tables) and the user-defined functions in the deleted catalog. Glue deletes these "orphaned" resources asynchronously in a timely manner, at the discretion of the service.</p> <p>To ensure the immediate deletion of all related resources before calling the <code>DeleteCatalog</code> operation, use <code>DeleteTableVersion</code> (or <code>BatchDeleteTableVersion</code>), <code>DeletePartition</code> (or <code>BatchDeletePartition</code>), <code>DeleteTable</code> (or <code>BatchDeleteTable</code>), <code>DeleteUserDefinedFunction</code> and <code>DeleteDatabase</code> to delete any resources that belong to the catalog.</p>
Args:
catalog_id: <p>The ID of the catalog.</p>
Raises:
capo_glue.errors.access_denied_exception.AccessDeniedException: <p>Access to a resource was denied.</p>
capo_glue.errors.concurrent_modification_exception.ConcurrentModificationException: <p>Two processes are trying to modify a resource simultaneously.</p>
capo_glue.errors.entity_not_found_exception.EntityNotFoundException: <p>A specified entity does not exist</p>
capo_glue.errors.federation_source_exception.FederationSourceException: <p>A federation source failed.</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.
"""
def _handler(
req: "OperationRequest[capo_glue.types.delete_catalog_request.DeleteCatalogRequest]",
) -> OperationResponse[
"capo_glue.types.delete_catalog_response.DeleteCatalogResponse"
]:
import capo_glue._operations.aws_glue.delete_catalog
output, http_response = (
capo_glue._operations.aws_glue.delete_catalog.delete_catalog(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteCatalog")
)
input_: capo_glue.types.delete_catalog_request.DeleteCatalogRequest = {
"catalog_id": catalog_id
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|