Skip to main content

tags

Creates, updates, deletes or gets a tag resource or lists tags in a region

Overview

Nametags
TypeResource
DescriptionA resource schema representing a Lake Formation Tag.
Idaws.lakeformation.tags

Fields

NameDatatypeDescription
catalog_idstringThe 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_keystringThe key-name for the LF-tag.
tag_valuesarrayA list of possible values an attribute can take.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTTagKey, TagValues, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all tags in a region.

SELECT
region,
catalog_id,
tag_key,
tag_values
FROM aws.lakeformation.tags
WHERE region = 'us-east-1';

Gets all properties from an individual tag.

SELECT
region,
catalog_id,
tag_key,
tag_values
FROM aws.lakeformation.tags
WHERE region = 'us-east-1' AND data__Identifier = '<TagKey>';

INSERT example

Use the following StackQL query and manifest file to create a new tag resource, using stack-deploy.

/*+ create */
INSERT INTO aws.lakeformation.tags (
TagKey,
TagValues,
region
)
SELECT
'{{ TagKey }}',
'{{ TagValues }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.lakeformation.tags
WHERE data__Identifier = '<TagKey>'
AND region = 'us-east-1';

Permissions

To operate on the tags resource, the following permissions are required:

Create

lakeformation:CreateLFTag

Read

lakeformation:GetLFTag

Update

lakeformation:UpdateLFTag

Delete

lakeformation:DeleteLFTag

List

lakeformation:ListLFTags