AWS::LakeFormation::Tag - AWS CloudFormation

AWS::LakeFormation::Tag

The AWS::LakeFormation::Tag resource represents an LF-tag, which consists of a key and one or more possible values for the key. During a stack operation, AWS CloudFormation calls the AWS Lake Formation CreateLFTag API to create a tag, and UpdateLFTag API to update a tag resource, and a DeleteLFTag to delete it.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::LakeFormation::Tag", "Properties" : { "CatalogId" : String, "TagKey" : String, "TagValues" : [ String, ... ] } }

YAML

Type: AWS::LakeFormation::Tag Properties: CatalogId: String TagKey: String TagValues: - String

Properties

CatalogId

Catalog id string, not less than 1 or more than 255 bytes long, matching the single-line string pattern.

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 AWS Lake Formation environment.

Required: No

Type: String

Minimum: 12

Maximum: 12

Update requires: Replacement

TagKey

UTF-8 string, not less than 1 or more than 255 bytes long, matching the single-line string pattern.

The key-name for the LF-tag.

For more information about using the Ref function, see Ref.

Required: Yes

Type: String

Pattern: ^([{a-zA-Z}{\s}{0-9}_.:\/=+\-@%]*)$

Minimum: 1

Maximum: 128

Update requires: Replacement

TagValues

An array of UTF-8 strings, not less than 1 or more than 50 strings.

A list of possible values of the corresponding TagKey of an LF-tag key-value pair.

Required: Yes

Type: Array of String

Minimum: 1

Maximum: 50

Update requires: No interruption

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the Tag’s TagKey property value.

For example: tagKeyName

Remarks

Note the following:

Only data lake administrators can create LF-tags.

An LF-tag can be assigned to Data Catalog resources (databases, tables, and columns) via AWS::LakeFormation::TagAssociation to implement tag-based access control.

Examples

Creating a tag resource in a template

The following example demonstrates how to define a tag resource in a template.

JSON

{ "SampleTag": { "Type": "AWS::LakeFormation::Tag", "Properties": { "TagKey": "sample_tag_key", "TagValues": ["sample_tag_value1", "sample_tag_value2"] } } }

YAML

SampleTag: Type: AWS::LakeFormation::Tag Properties: TagKey: "sample_tag_key" TagValues: - "sample_tag_value1" - "sample_tag_value2"

See also

Assign an LF-tag to a Data Catalog resource - AWS::LakeFormation::TagAssociation.