CreateLFTagExpressionCommand

Creates a new LF-Tag expression with the provided name, description, catalog ID, and expression body. This call fails if a LF-Tag expression with the same name already exists in the caller’s account or if the underlying LF-Tags don't exist. To call this API operation, caller needs the following Lake Formation permissions:

CREATE_LF_TAG_EXPRESSION on the root catalog resource.

GRANT_WITH_LF_TAG_EXPRESSION on all underlying LF-Tag key:value pairs included in the expression.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { LakeFormationClient, CreateLFTagExpressionCommand } from "@aws-sdk/client-lakeformation"; // ES Modules import
// const { LakeFormationClient, CreateLFTagExpressionCommand } = require("@aws-sdk/client-lakeformation"); // CommonJS import
const client = new LakeFormationClient(config);
const input = { // CreateLFTagExpressionRequest
  Name: "STRING_VALUE", // required
  Description: "STRING_VALUE",
  CatalogId: "STRING_VALUE",
  Expression: [ // Expression // required
    { // LFTag
      TagKey: "STRING_VALUE", // required
      TagValues: [ // TagValueList // required
        "STRING_VALUE",
      ],
    },
  ],
};
const command = new CreateLFTagExpressionCommand(input);
const response = await client.send(command);
// {};

CreateLFTagExpressionCommand Input

Parameter
Type
Description
Expression
Required
LFTag[] | undefined

A list of LF-Tag conditions (key-value pairs).

Name
Required
string | undefined

A name for the expression.

CatalogId
string | undefined

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.

Description
string | undefined

A description with information about the LF-Tag expression.

CreateLFTagExpressionCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.

Throws

Name
Fault
Details
AccessDeniedException
client

Access to a resource was denied.

EntityNotFoundException
client

A specified entity does not exist.

InternalServiceException
server

An internal service error occurred.

InvalidInputException
client

The input provided was not valid.

OperationTimeoutException
client

The operation timed out.

ResourceNumberLimitExceededException
client

A resource numerical limit was exceeded.

LakeFormationServiceException
Base exception class for all service exceptions from LakeFormation service.