tags
Creates, updates, deletes or gets a tag
resource or lists tags
in a region
Overview
Name | tags |
Type | Resource |
Description | A resource schema representing a Lake Formation Tag. |
Id | aws.lakeformation.tags |
Fields
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. |
tag_key | string | The key-name for the LF-tag. |
tag_values | array | A list of possible values an attribute can take. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | TagKey, TagValues, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.lakeformation.tags (
TagKey,
TagValues,
region
)
SELECT
'{{ TagKey }}',
'{{ TagValues }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.lakeformation.tags (
CatalogId,
TagKey,
TagValues,
region
)
SELECT
'{{ CatalogId }}',
'{{ TagKey }}',
'{{ TagValues }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: tag
props:
- name: CatalogId
value: '{{ CatalogId }}'
- name: TagKey
value: '{{ TagKey }}'
- name: TagValues
value:
- '{{ TagValues[0] }}'
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