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.
Idawscc.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.

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

Methods

NameResourceAccessible byRequired Params
create_resourcetagsINSERTTagKey, TagValues, region
delete_resourcetagsDELETEIdentifier, region
update_resourcetagsUPDATEIdentifier, PatchDocument, region
list_resourcestags_list_onlySELECTregion
get_resourcetagsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual tag.

SELECT
region,
catalog_id,
tag_key,
tag_values
FROM awscc.lakeformation.tags
WHERE
region = '{{ region }}' AND
Identifier = '{{ tag_key }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.lakeformation.tags (
TagKey,
TagValues,
region
)
SELECT
'{{ tag_key }}',
'{{ tag_values }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

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

/*+ update */
UPDATE awscc.lakeformation.tags
SET PatchDocument = string('{{ {
"TagValues": tag_values
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ tag_key }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.lakeformation.tags
WHERE
Identifier = '{{ tag_key }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

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

lakeformation:CreateLFTag,
lakeformation:GetLFTag