tag_associations
Creates, updates, deletes or gets a tag_association
resource or lists tag_associations
in a region
Overview
Name | tag_associations |
Type | Resource |
Description | A resource schema representing a Lake Formation Tag Association. While tag associations are not explicit Lake Formation resources, this CloudFormation resource can be used to associate tags with Lake Formation entities. |
Id | aws.lakeformation.tag_associations |
Fields
Name | Datatype | Description |
---|---|---|
resource | object | Resource to tag with the Lake Formation Tags |
lf_tags | array | List of Lake Formation Tags to associate with the Lake Formation Resource |
resource_identifier | string | Unique string identifying the resource. Used as primary identifier, which ideally should be a string |
tags_identifier | string | Unique string identifying the resource's tags. Used as primary identifier, which ideally should be a string |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Resource, LFTags, region |
delete_resource | DELETE | data__Identifier, region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all properties from an individual tag_association
.
SELECT
region,
resource,
lf_tags,
resource_identifier,
tags_identifier
FROM aws.lakeformation.tag_associations
WHERE region = 'us-east-1' AND data__Identifier = '<ResourceIdentifier>|<TagsIdentifier>';
INSERT
example
Use the following StackQL query and manifest file to create a new tag_association
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.lakeformation.tag_associations (
Resource,
LFTags,
region
)
SELECT
'{{ Resource }}',
'{{ LFTags }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.lakeformation.tag_associations (
Resource,
LFTags,
region
)
SELECT
'{{ Resource }}',
'{{ LFTags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: tag_association
props:
- name: Resource
value:
Catalog: {}
Database:
CatalogId: '{{ CatalogId }}'
Name: '{{ Name }}'
Table:
CatalogId: null
DatabaseName: null
Name: null
TableWildcard: {}
TableWithColumns:
CatalogId: null
DatabaseName: null
Name: null
ColumnNames:
- null
- name: LFTags
value:
- CatalogId: null
TagKey: '{{ TagKey }}'
TagValues:
- '{{ TagValues[0] }}'
DELETE
example
/*+ delete */
DELETE FROM aws.lakeformation.tag_associations
WHERE data__Identifier = '<ResourceIdentifier|TagsIdentifier>'
AND region = 'us-east-1';
Permissions
To operate on the tag_associations
resource, the following permissions are required:
Create
lakeformation:AddLFTagsToResource,
glue:GetDatabase,
glue:GetTable
Read
lakeformation:GetResourceLFTags,
glue:GetDatabase,
glue:GetTable
Delete
lakeformation:RemoveLFTagsFromResource,
glue:GetDatabase,
glue:GetTable