Skip to content

associate_glossary_terms async

associate_glossary_terms(
    asset_identifier: AssetId,
    glossary_term_identifiers: GlossaryTermIdList,
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
    iterable_form_name: Optional[IterableFormName] = None,
    item_identifier: Optional[ItemIdentifier] = None,
    client_token: Optional[HashString] = None,
) -> AssociateGlossaryTermsResponse

Associates one or more glossary terms with an asset in Glue Data Catalog.

Parameters:

  • asset_identifier (AssetId) –

    The unique identifier of the asset to associate glossary terms with.

  • iterable_form_name (Optional[IterableFormName], default: None ) –

    The name of the iterable form. When specified along with itemIdentifier, the glossary terms are associated with an item within the iterable form rather than the asset itself.

  • item_identifier (Optional[ItemIdentifier], default: None ) –

    The identifier of the item within the iterable form. Required when iterableFormName is specified.

  • glossary_term_identifiers (GlossaryTermIdList) –

    The list of glossary term identifiers to associate with the asset.

  • 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 associate_glossary_terms(
    self,
    asset_identifier: "capo_glue.types.asset_id.AssetId",
    glossary_term_identifiers: "capo_glue.types.glossary_term_id_list.GlossaryTermIdList",
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
    iterable_form_name: Optional[
        "capo_glue.types.iterable_form_name.IterableFormName"
    ] = None,
    item_identifier: Optional[
        "capo_glue.types.item_identifier.ItemIdentifier"
    ] = None,
    client_token: Optional["capo_glue.types.hash_string.HashString"] = None,
) -> "capo_glue.types.associate_glossary_terms_response.AssociateGlossaryTermsResponse":
    """<p>Associates one or more glossary terms with an asset in Glue Data Catalog.</p>

    Args:
        asset_identifier: <p>The unique identifier of the asset to associate glossary terms with.</p>
        iterable_form_name: <p>The name of the iterable form. When specified along with <code>itemIdentifier</code>, the glossary terms are associated with an item within the iterable form rather than the asset itself.</p>
        item_identifier: <p>The identifier of the item within the iterable form. Required when <code>iterableFormName</code> is specified.</p>
        glossary_term_identifiers: <p>The list of glossary term identifiers to associate with the asset.</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.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.associate_glossary_terms_request.AssociateGlossaryTermsRequest]",
    ) -> AsyncOperationResponse[
        "capo_glue.types.associate_glossary_terms_response.AssociateGlossaryTermsResponse"
    ]:
        import capo_glue._operations.aws_glue.associate_glossary_terms

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("AssociateGlossaryTerms")
    )
    input_: capo_glue.types.associate_glossary_terms_request.AssociateGlossaryTermsRequest = {
        "asset_identifier": asset_identifier,
        "glossary_term_identifiers": glossary_term_identifiers,
    }
    if iterable_form_name is not None:
        input_["iterable_form_name"] = iterable_form_name
    if item_identifier is not None:
        input_["item_identifier"] = item_identifier
    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