CreateLakeFormationOptInCommand

Enforce Lake Formation permissions for the given databases, tables, and principals.

Example Syntax

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

import { LakeFormationClient, CreateLakeFormationOptInCommand } from "@aws-sdk/client-lakeformation"; // ES Modules import
// const { LakeFormationClient, CreateLakeFormationOptInCommand } = require("@aws-sdk/client-lakeformation"); // CommonJS import
const client = new LakeFormationClient(config);
const input = { // CreateLakeFormationOptInRequest
  Principal: { // DataLakePrincipal
    DataLakePrincipalIdentifier: "STRING_VALUE",
  },
  Resource: { // Resource
    Catalog: { // CatalogResource
      Id: "STRING_VALUE",
    },
    Database: { // DatabaseResource
      CatalogId: "STRING_VALUE",
      Name: "STRING_VALUE", // required
    },
    Table: { // TableResource
      CatalogId: "STRING_VALUE",
      DatabaseName: "STRING_VALUE", // required
      Name: "STRING_VALUE",
      TableWildcard: {},
    },
    TableWithColumns: { // TableWithColumnsResource
      CatalogId: "STRING_VALUE",
      DatabaseName: "STRING_VALUE", // required
      Name: "STRING_VALUE", // required
      ColumnNames: [ // ColumnNames
        "STRING_VALUE",
      ],
      ColumnWildcard: { // ColumnWildcard
        ExcludedColumnNames: [
          "STRING_VALUE",
        ],
      },
    },
    DataLocation: { // DataLocationResource
      CatalogId: "STRING_VALUE",
      ResourceArn: "STRING_VALUE", // required
    },
    DataCellsFilter: { // DataCellsFilterResource
      TableCatalogId: "STRING_VALUE",
      DatabaseName: "STRING_VALUE",
      TableName: "STRING_VALUE",
      Name: "STRING_VALUE",
    },
    LFTag: { // LFTagKeyResource
      CatalogId: "STRING_VALUE",
      TagKey: "STRING_VALUE", // required
      TagValues: [ // TagValueList // required
        "STRING_VALUE",
      ],
    },
    LFTagPolicy: { // LFTagPolicyResource
      CatalogId: "STRING_VALUE",
      ResourceType: "DATABASE" || "TABLE", // required
      Expression: [ // Expression
        { // LFTag
          TagKey: "STRING_VALUE", // required
          TagValues: [ // required
            "STRING_VALUE",
          ],
        },
      ],
      ExpressionName: "STRING_VALUE",
    },
    LFTagExpression: { // LFTagExpressionResource
      CatalogId: "STRING_VALUE",
      Name: "STRING_VALUE", // required
    },
  },
  Condition: { // Condition
    Expression: "STRING_VALUE",
  },
};
const command = new CreateLakeFormationOptInCommand(input);
const response = await client.send(command);
// {};

CreateLakeFormationOptInCommand Input

Parameter
Type
Description
Principal
Required
DataLakePrincipal | undefined

The Lake Formation principal. Supported principals are IAM users or IAM roles.

Resource
Required
Resource | undefined

A structure for the resource.

Condition
Condition | undefined

A Lake Formation condition, which applies to permissions and opt-ins that contain an expression.

CreateLakeFormationOptInCommand Output

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

Throws

Name
Fault
Details
AccessDeniedException
client

Access to a resource was denied.

ConcurrentModificationException
client

Two processes are trying to modify a resource simultaneously.

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.