Skip to content

create_catalog async

create_catalog(
    name: CatalogNameString,
    catalog_input: CatalogInput,
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
    tags: Optional[TagsMap] = None,
) -> CreateCatalogResponse

Creates a new catalog in the Glue Data Catalog.

Parameters:

  • name (CatalogNameString) –

    The name of the catalog to create.

  • catalog_input (CatalogInput) –

    A CatalogInput object that defines the metadata for the catalog.

  • tags (Optional[TagsMap], default: None ) –

    A map array of key-value pairs, not more than 50 pairs. Each key is a UTF-8 string, not less than 1 or more than 128 bytes long. Each value is a UTF-8 string, not more than 256 bytes long. The tags you assign to the catalog.

Raises:

Source code in docs_src/capo_glue/_services/async_glue.py
async def create_catalog(
    self,
    name: "capo_glue.types.catalog_name_string.CatalogNameString",
    catalog_input: "capo_glue.types.catalog_input.CatalogInput",
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
    tags: Optional["capo_glue.types.tags_map.TagsMap"] = None,
) -> "capo_glue.types.create_catalog_response.CreateCatalogResponse":
    """<p>Creates a new catalog in the Glue Data Catalog.</p>

    Args:
        name: <p>The name of the catalog to create.</p>
        catalog_input: <p>A <code>CatalogInput</code> object that defines the metadata for the catalog.</p>
        tags: <p>A map array of key-value pairs, not more than 50 pairs. Each key is a UTF-8 string, not less than 1 or more than 128 bytes long. Each value is a UTF-8 string, not more than 256 bytes long. The tags you assign to the catalog.</p>

    Raises:
        capo_glue.errors.access_denied_exception.AccessDeniedException: <p>Access to a resource was denied.</p>
        capo_glue.errors.already_exists_exception.AlreadyExistsException: <p>A resource to be created or added already exists.</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.federated_resource_already_exists_exception.FederatedResourceAlreadyExistsException: <p>A federated resource already exists.</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.resource_number_limit_exceeded_exception.ResourceNumberLimitExceededException: <p>A resource numerical limit was exceeded.</p>
        capo_glue.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_glue.types.create_catalog_request.CreateCatalogRequest]",
    ) -> AsyncOperationResponse[
        "capo_glue.types.create_catalog_response.CreateCatalogResponse"
    ]:
        import capo_glue._operations.aws_glue.create_catalog

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateCatalog")
    )
    input_: capo_glue.types.create_catalog_request.CreateCatalogRequest = {
        "name": name,
        "catalog_input": catalog_input,
    }
    if tags is not None:
        input_["tags"] = tags

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