Skip to content

create_glossary_term async

create_glossary_term(
    glossary_identifier: GlossaryId,
    name: GlossaryTermName,
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
    short_description: Optional[GlossaryShortDescription] = None,
    long_description: Optional[GlossaryLongDescription] = None,
    client_token: Optional[HashString] = None,
) -> CreateGlossaryTermResponse

Creates a glossary term within a business glossary in Glue Data Catalog.

Parameters:

  • glossary_identifier (GlossaryId) –

    The unique identifier of the glossary in which to create the term.

  • name (GlossaryTermName) –

    The name of the glossary term.

  • short_description (Optional[GlossaryShortDescription], default: None ) –

    A short description of the glossary term.

  • long_description (Optional[GlossaryLongDescription], default: None ) –

    A long description of the glossary term.

  • client_token (Optional[HashString], default: None ) –

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

Raises:

Source code in docs_src/capo_glue/_services/async_glue.py
async def create_glossary_term(
    self,
    glossary_identifier: "capo_glue.types.glossary_id.GlossaryId",
    name: "capo_glue.types.glossary_term_name.GlossaryTermName",
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
    short_description: Optional[
        "capo_glue.types.glossary_short_description.GlossaryShortDescription"
    ] = None,
    long_description: Optional[
        "capo_glue.types.glossary_long_description.GlossaryLongDescription"
    ] = None,
    client_token: Optional["capo_glue.types.hash_string.HashString"] = None,
) -> "capo_glue.types.create_glossary_term_response.CreateGlossaryTermResponse":
    """<p>Creates a glossary term within a business glossary in Glue Data Catalog.</p>

    Args:
        glossary_identifier: <p>The unique identifier of the glossary in which to create the term.</p>
        name: <p>The name of the glossary term.</p>
        short_description: <p>A short description of the glossary term.</p>
        long_description: <p>A long description of the glossary term.</p>
        client_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</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.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.throttling_exception.ThrottlingException: <p>The throttling threshhold 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_glossary_term_request.CreateGlossaryTermRequest]",
    ) -> AsyncOperationResponse[
        "capo_glue.types.create_glossary_term_response.CreateGlossaryTermResponse"
    ]:
        import capo_glue._operations.aws_glue.create_glossary_term

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateGlossaryTerm")
    )
    input_: capo_glue.types.create_glossary_term_request.CreateGlossaryTermRequest = {
        "glossary_identifier": glossary_identifier,
        "name": name,
    }
    if short_description is not None:
        input_["short_description"] = short_description
    if long_description is not None:
        input_["long_description"] = long_description
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

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