Skip to content

create_lf_tag async

create_lf_tag(
    tag_key: LFTagKey,
    tag_values: TagValueList,
    *,
    config_overrides: Optional[AsyncLakeFormationClientConfig] = None,
    catalog_id: Optional[CatalogIdString] = None,
) -> CreateLFTagResponse

Creates an LF-tag with the specified name and values.

Parameters:

  • catalog_id (Optional[CatalogIdString], default: None ) –

    The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment.

  • tag_key (LFTagKey) –

    The key-name for the LF-tag.

  • tag_values (TagValueList) –

    A list of possible values an attribute can take.

Raises:

Source code in docs_src/capo_lakeformation/_services/async_lake_formation.py
async def create_lf_tag(
    self,
    tag_key: "capo_lakeformation.types.lf_tag_key.LFTagKey",
    tag_values: "capo_lakeformation.types.tag_value_list.TagValueList",
    *,
    config_overrides: Optional[AsyncLakeFormationClientConfig] = None,
    catalog_id: Optional[
        "capo_lakeformation.types.catalog_id_string.CatalogIdString"
    ] = None,
) -> "capo_lakeformation.types.create_lf_tag_response.CreateLFTagResponse":
    """<p>Creates an LF-tag with the specified name and values.</p>

    Args:
        catalog_id: <p>The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment. </p>
        tag_key: <p>The key-name for the LF-tag.</p>
        tag_values: <p>A list of possible values an attribute can take.</p>

    Raises:
        capo_lakeformation.errors.access_denied_exception.AccessDeniedException: <p>Access to a resource was denied.</p>
        capo_lakeformation.errors.entity_not_found_exception.EntityNotFoundException: <p>A specified entity does not exist.</p>
        capo_lakeformation.errors.internal_service_exception.InternalServiceException: <p>An internal service error occurred.</p>
        capo_lakeformation.errors.invalid_input_exception.InvalidInputException: <p>The input provided was not valid.</p>
        capo_lakeformation.errors.operation_timeout_exception.OperationTimeoutException: <p>The operation timed out.</p>
        capo_lakeformation.errors.resource_number_limit_exceeded_exception.ResourceNumberLimitExceededException: <p>A resource numerical limit was exceeded.</p>
        capo_lakeformation.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_lakeformation.types.create_lf_tag_request.CreateLFTagRequest]",
    ) -> AsyncOperationResponse[
        "capo_lakeformation.types.create_lf_tag_response.CreateLFTagResponse"
    ]:
        import capo_lakeformation._operations.aws_lake_formation.create_lf_tag

        (
            output,
            http_response,
        ) = await capo_lakeformation._operations.aws_lake_formation.create_lf_tag.async_create_lf_tag(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateLFTag")
    )
    input_: capo_lakeformation.types.create_lf_tag_request.CreateLFTagRequest = {
        "tag_key": tag_key,
        "tag_values": tag_values,
    }
    if catalog_id is not None:
        input_["catalog_id"] = catalog_id

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