Skip to main content

tag_associations

Creates, updates, deletes or gets a tag_association resource or lists tag_associations in a region

Overview

Nametag_associations
TypeResource
DescriptionA 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.
Idawscc.lakeformation.tag_associations

Fields

NameDatatypeDescription
resourceobjectResource to tag with the Lake Formation Tags
lf_tagsarrayList of Lake Formation Tags to associate with the Lake Formation Resource
resource_identifierstringUnique string identifying the resource. Used as primary identifier, which ideally should be a string
tags_identifierstringUnique string identifying the resource's tags. Used as primary identifier, which ideally should be a string
regionstringAWS region.

For more information, see AWS::LakeFormation::TagAssociation.

Methods

NameAccessible byRequired Params
create_resourceINSERTResource, LFTags, region
delete_resourceDELETEIdentifier, region
get_resourceSELECTIdentifier, region

SELECT examples

Gets all properties from an individual tag_association.

SELECT
region,
resource,
lf_tags,
resource_identifier,
tags_identifier
FROM awscc.lakeformation.tag_associations
WHERE
region = 'us-east-1' AND
Identifier = '{{ resource_identifier }}|{{ tags_identifier }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.lakeformation.tag_associations (
Resource,
LFTags,
region
)
SELECT
'{{ resource }}',
'{{ lf_tags }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM awscc.lakeformation.tag_associations
WHERE
Identifier = '{{ resource_identifier }}|{{ tags_identifier }}' AND
region = 'us-east-1';

Permissions

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

lakeformation:AddLFTagsToResource,
glue:GetDatabase,
glue:GetTable