lf_tag_expressions
Creates, updates, deletes, gets or lists a lf_tag_expressions resource.
Overview
| Name | lf_tag_expressions |
| Type | Resource |
| Id | aws.lakeformation.lf_tag_expressions |
Fields
The following fields are returned by SELECT queries:
- get_lf_tag_expression
| Name | Datatype | Description |
|---|---|---|
catalog_id | string | The 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>) |
description | string | The description with information about the LF-Tag expression. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>) |
expression | array | The body of the LF-Tag expression. It is composed of one or more LF-Tag key-value pairs. |
name | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_lf_tag_expression | select | region | 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. | |
create_lf_tag_expression | insert | region | 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. | |
update_lf_tag_expression | update | region | 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. | |
delete_lf_tag_expression | delete | region | 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. | |
list_lf_tag_expressions | exec | region | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_lf_tag_expression
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
- create_lf_tag_expression
- Manifest
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 }}'
;
# Description fields are for documentation purposes
- name: lf_tag_expressions
props:
- name: region
value: "{{ region }}"
description: Required parameter for the lf_tag_expressions resource.
- name: Name
value: "{{ Name }}"
- name: Description
value: "{{ Description }}"
- name: CatalogId
value: "{{ CatalogId }}"
- name: Expression
value:
- TagKey: "{{ TagKey }}"
TagValues: "{{ TagValues }}"
UPDATE examples
- update_lf_tag_expression
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
- delete_lf_tag_expression
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
- list_lf_tag_expressions
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 }}"
}'
;