Skip to main content

lf_tag_expressions

Creates, updates, deletes, gets or lists a lf_tag_expressions resource.

Overview

Namelf_tag_expressions
TypeResource
Idaws.lakeformation.lf_tag_expressions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
catalog_idstringThe identifier for the Data Catalog. By default, the account ID in which the LF-Tag expression is saved. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\t]*</code>)
descriptionstringThe description with information about the LF-Tag expression. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>)
expressionarrayThe body of the LF-Tag expression. It is composed of one or more LF-Tag key-value pairs.
namestringThe name for the LF-Tag expression. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\t]*</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_lf_tag_expressionselectregionReturns the details about the LF-Tag expression. The caller must be a data lake admin or must have DESCRIBE permission on the LF-Tag expression resource.
create_lf_tag_expressioninsertregionCreates a new LF-Tag expression with the provided name, description, catalog ID, and expression body. This call fails if a LF-Tag expression with the same name already exists in the caller’s account or if the underlying LF-Tags don't exist. To call this API operation, caller needs the following Lake Formation permissions: CREATE_LF_TAG_EXPRESSION on the root catalog resource. GRANT_WITH_LF_TAG_EXPRESSION on all underlying LF-Tag key:value pairs included in the expression.
update_lf_tag_expressionupdateregionUpdates the name of the LF-Tag expression to the new description and expression body provided. Updating a LF-Tag expression immediately changes the permission boundaries of all existing LFTagPolicy permission grants that reference the given LF-Tag expression.
delete_lf_tag_expressiondeleteregionDeletes the LF-Tag expression. The caller must be a data lake admin or have DROP permissions on the LF-Tag expression. Deleting a LF-Tag expression will also delete all LFTagPolicy permissions referencing the LF-Tag expression.
list_lf_tag_expressionsexecregionReturns the LF-Tag expressions in caller’s account filtered based on caller's permissions. Data Lake and read only admins implicitly can see all tag expressions in their account, else caller needs DESCRIBE permissions on tag expression.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Returns the details about the LF-Tag expression. The caller must be a data lake admin or must have DESCRIBE permission on the LF-Tag expression resource.

SELECT
catalog_id,
description,
expression,
name
FROM aws.lakeformation.lf_tag_expressions
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a new LF-Tag expression with the provided name, description, catalog ID, and expression body. This call fails if a LF-Tag expression with the same name already exists in the caller’s account or if the underlying LF-Tags don't exist. To call this API operation, caller needs the following Lake Formation permissions: CREATE_LF_TAG_EXPRESSION on the root catalog resource. GRANT_WITH_LF_TAG_EXPRESSION on all underlying LF-Tag key:value pairs included in the expression.

INSERT INTO aws.lakeformation.lf_tag_expressions (
Name,
Description,
CatalogId,
Expression,
region
)
SELECT
'{{ Name }}',
'{{ Description }}',
'{{ CatalogId }}',
'{{ Expression }}',
'{{ region }}'
;

UPDATE examples

Updates the name of the LF-Tag expression to the new description and expression body provided. Updating a LF-Tag expression immediately changes the permission boundaries of all existing LFTagPolicy permission grants that reference the given LF-Tag expression.

UPDATE aws.lakeformation.lf_tag_expressions
SET
Name = '{{ Name }}',
Description = '{{ Description }}',
CatalogId = '{{ CatalogId }}',
Expression = '{{ Expression }}'
WHERE
region = '{{ region }}' --required;

DELETE examples

Deletes the LF-Tag expression. The caller must be a data lake admin or have DROP permissions on the LF-Tag expression. Deleting a LF-Tag expression will also delete all LFTagPolicy permissions referencing the LF-Tag expression.

DELETE FROM aws.lakeformation.lf_tag_expressions
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Returns the LF-Tag expressions in caller’s account filtered based on caller's permissions. Data Lake and read only admins implicitly can see all tag expressions in their account, else caller needs DESCRIBE permissions on tag expression.

EXEC aws.lakeformation.lf_tag_expressions.list_lf_tag_expressions
@region='{{ region }}' --required
@@json=
'{
"CatalogId": "{{ CatalogId }}",
"MaxResults": {{ MaxResults }},
"NextToken": "{{ NextToken }}"
}'
;