lf_tags
Creates, updates, deletes, gets or lists a lf_tags resource.
Overview
| Name | lf_tags |
| Type | Resource |
| Id | aws.lakeformation.lf_tags |
Fields
The following fields are returned by SELECT queries:
- get_lf_tag
- list_lf_tags
| Name | Datatype | Description |
|---|---|---|
catalog_id | string | 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. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\t]*</code>) |
tag_key | string | The key-name for the LF-tag. (pattern: <code>^([\p{L}\p{Z}\p{N}_.:/=+-@%]*)$</code>) |
tag_values | array | A list of possible values an attribute can take. |
| Name | Datatype | Description |
|---|---|---|
catalog_id | string | 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. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\t]*</code>) |
tag_key | string | The key-name for the LF-tag. (pattern: <code>^([\p{L}\p{Z}\p{N}_.:/=+-@%]*)$</code>) |
tag_values | array | A list of possible values an attribute can take. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_lf_tag | select | region | Returns an LF-tag definition. | |
list_lf_tags | select | region | Lists LF-tags that the requester has permission to view. | |
create_lf_tag | insert | region, TagKey, TagValues | Creates an LF-tag with the specified name and values. | |
update_lf_tag | update | region, TagKey | Updates the list of possible values for the specified LF-tag key. If the LF-tag does not exist, the operation throws an EntityNotFoundException. The values in the delete key values will be deleted from list of possible values. If any value in the delete key values is attached to a resource, then API errors out with a 400 Exception - "Update not allowed". Untag the attribute before deleting the LF-tag key's value. | |
delete_lf_tag | delete | region | Deletes an LF-tag by its key name. The operation fails if the specified tag key doesn't exist. When you delete an LF-Tag: The associated LF-Tag policy becomes invalid. Resources that had this tag assigned will no longer have the tag policy applied to them. |
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
- list_lf_tags
Returns an LF-tag definition.
SELECT
catalog_id,
tag_key,
tag_values
FROM aws.lakeformation.lf_tags
WHERE region = '{{ region }}' -- required
;
Lists LF-tags that the requester has permission to view.
SELECT
catalog_id,
tag_key,
tag_values
FROM aws.lakeformation.lf_tags
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_lf_tag
- Manifest
Creates an LF-tag with the specified name and values.
INSERT INTO aws.lakeformation.lf_tags (
CatalogId,
TagKey,
TagValues,
region
)
SELECT
'{{ CatalogId }}',
'{{ TagKey }}' /* required */,
'{{ TagValues }}' /* required */,
'{{ region }}'
;
# Description fields are for documentation purposes
- name: lf_tags
props:
- name: region
value: "{{ region }}"
description: Required parameter for the lf_tags resource.
- name: CatalogId
value: "{{ CatalogId }}"
- name: TagKey
value: "{{ TagKey }}"
- name: TagValues
value:
- "{{ TagValues }}"
UPDATE examples
- update_lf_tag
Updates the list of possible values for the specified LF-tag key. If the LF-tag does not exist, the operation throws an EntityNotFoundException. The values in the delete key values will be deleted from list of possible values. If any value in the delete key values is attached to a resource, then API errors out with a 400 Exception - "Update not allowed". Untag the attribute before deleting the LF-tag key's value.
UPDATE aws.lakeformation.lf_tags
SET
CatalogId = '{{ CatalogId }}',
TagKey = '{{ TagKey }}',
TagValuesToDelete = '{{ TagValuesToDelete }}',
TagValuesToAdd = '{{ TagValuesToAdd }}'
WHERE
region = '{{ region }}' --required
AND TagKey = '{{ TagKey }}' --required;
DELETE examples
- delete_lf_tag
Deletes an LF-tag by its key name. The operation fails if the specified tag key doesn't exist. When you delete an LF-Tag: The associated LF-Tag policy becomes invalid. Resources that had this tag assigned will no longer have the tag policy applied to them.
DELETE FROM aws.lakeformation.lf_tags
WHERE region = '{{ region }}' --required
;