From 85aa63fdf17f5b7f08389c70552af16ab65ca6ae Mon Sep 17 00:00:00 2001 From: awstools Date: Wed, 6 Nov 2024 19:42:42 +0000 Subject: [PATCH] feat(client-lakeformation): API changes for new named tag expressions feature. --- clients/client-lakeformation/README.md | 40 ++ .../client-lakeformation/src/LakeFormation.ts | 116 ++++ .../src/LakeFormationClient.ts | 27 + .../commands/AddLFTagsToResourceCommand.ts | 7 +- .../commands/BatchGrantPermissionsCommand.ts | 22 +- .../commands/BatchRevokePermissionsCommand.ts | 22 +- .../commands/CreateLFTagExpressionCommand.ts | 126 +++++ .../CreateLakeFormationOptInCommand.ts | 7 +- .../commands/DeleteLFTagExpressionCommand.ts | 107 ++++ .../DeleteLakeFormationOptInCommand.ts | 7 +- .../commands/GetDataLakeSettingsCommand.ts | 4 +- .../GetEffectivePermissionsForPathCommand.ts | 11 +- .../src/commands/GetLFTagExpressionCommand.ts | 119 +++++ .../src/commands/GetResourceLFTagsCommand.ts | 7 +- ...emporaryGluePartitionCredentialsCommand.ts | 2 +- ...GetTemporaryGlueTableCredentialsCommand.ts | 3 +- .../src/commands/GrantPermissionsCommand.ts | 11 +- .../commands/ListLFTagExpressionsCommand.ts | 124 +++++ .../ListLakeFormationOptInsCommand.ts | 14 +- .../src/commands/ListPermissionsCommand.ts | 20 +- .../commands/PutDataLakeSettingsCommand.ts | 4 +- .../src/commands/RegisterResourceCommand.ts | 2 +- .../RemoveLFTagsFromResourceCommand.ts | 7 +- .../src/commands/RevokePermissionsCommand.ts | 11 +- .../commands/UpdateLFTagExpressionCommand.ts | 119 +++++ .../src/commands/index.ts | 5 + .../src/models/models_0.ts | 250 ++++++++- .../ListLFTagExpressionsPaginator.ts | 24 + .../src/pagination/index.ts | 1 + .../src/protocols/Aws_restJson1.ts | 243 +++++++++ .../sdk-codegen/aws-models/lakeformation.json | 504 +++++++++++++++++- 31 files changed, 1914 insertions(+), 52 deletions(-) create mode 100644 clients/client-lakeformation/src/commands/CreateLFTagExpressionCommand.ts create mode 100644 clients/client-lakeformation/src/commands/DeleteLFTagExpressionCommand.ts create mode 100644 clients/client-lakeformation/src/commands/GetLFTagExpressionCommand.ts create mode 100644 clients/client-lakeformation/src/commands/ListLFTagExpressionsCommand.ts create mode 100644 clients/client-lakeformation/src/commands/UpdateLFTagExpressionCommand.ts create mode 100644 clients/client-lakeformation/src/pagination/ListLFTagExpressionsPaginator.ts diff --git a/clients/client-lakeformation/README.md b/clients/client-lakeformation/README.md index 0f33ea99869c..87a484f4b116 100644 --- a/clients/client-lakeformation/README.md +++ b/clients/client-lakeformation/README.md @@ -284,6 +284,14 @@ CreateLFTag [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/lakeformation/command/CreateLFTagCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lakeformation/Interface/CreateLFTagCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lakeformation/Interface/CreateLFTagCommandOutput/) + +
+ +CreateLFTagExpression + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/lakeformation/command/CreateLFTagExpressionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lakeformation/Interface/CreateLFTagExpressionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lakeformation/Interface/CreateLFTagExpressionCommandOutput/) +
@@ -316,6 +324,14 @@ DeleteLFTag [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/lakeformation/command/DeleteLFTagCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lakeformation/Interface/DeleteLFTagCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lakeformation/Interface/DeleteLFTagCommandOutput/) +
+
+ +DeleteLFTagExpression + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/lakeformation/command/DeleteLFTagExpressionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lakeformation/Interface/DeleteLFTagExpressionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lakeformation/Interface/DeleteLFTagExpressionCommandOutput/) +
@@ -404,6 +420,14 @@ GetLFTag [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/lakeformation/command/GetLFTagCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lakeformation/Interface/GetLFTagCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lakeformation/Interface/GetLFTagCommandOutput/) +
+
+ +GetLFTagExpression + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/lakeformation/command/GetLFTagExpressionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lakeformation/Interface/GetLFTagExpressionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lakeformation/Interface/GetLFTagExpressionCommandOutput/) +
@@ -492,6 +516,14 @@ ListLakeFormationOptIns [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/lakeformation/command/ListLakeFormationOptInsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lakeformation/Interface/ListLakeFormationOptInsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lakeformation/Interface/ListLakeFormationOptInsCommandOutput/) +
+
+ +ListLFTagExpressions + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/lakeformation/command/ListLFTagExpressionsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lakeformation/Interface/ListLFTagExpressionsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lakeformation/Interface/ListLFTagExpressionsCommandOutput/) +
@@ -620,6 +652,14 @@ UpdateLFTag [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/lakeformation/command/UpdateLFTagCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lakeformation/Interface/UpdateLFTagCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lakeformation/Interface/UpdateLFTagCommandOutput/) +
+
+ +UpdateLFTagExpression + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/lakeformation/command/UpdateLFTagExpressionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lakeformation/Interface/UpdateLFTagExpressionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lakeformation/Interface/UpdateLFTagExpressionCommandOutput/) +
diff --git a/clients/client-lakeformation/src/LakeFormation.ts b/clients/client-lakeformation/src/LakeFormation.ts index 848e8f9cd87f..46bed682b6ce 100644 --- a/clients/client-lakeformation/src/LakeFormation.ts +++ b/clients/client-lakeformation/src/LakeFormation.ts @@ -48,6 +48,11 @@ import { CreateLakeFormationOptInCommandOutput, } from "./commands/CreateLakeFormationOptInCommand"; import { CreateLFTagCommand, CreateLFTagCommandInput, CreateLFTagCommandOutput } from "./commands/CreateLFTagCommand"; +import { + CreateLFTagExpressionCommand, + CreateLFTagExpressionCommandInput, + CreateLFTagExpressionCommandOutput, +} from "./commands/CreateLFTagExpressionCommand"; import { DeleteDataCellsFilterCommand, DeleteDataCellsFilterCommandInput, @@ -64,6 +69,11 @@ import { DeleteLakeFormationOptInCommandOutput, } from "./commands/DeleteLakeFormationOptInCommand"; import { DeleteLFTagCommand, DeleteLFTagCommandInput, DeleteLFTagCommandOutput } from "./commands/DeleteLFTagCommand"; +import { + DeleteLFTagExpressionCommand, + DeleteLFTagExpressionCommandInput, + DeleteLFTagExpressionCommandOutput, +} from "./commands/DeleteLFTagExpressionCommand"; import { DeleteObjectsOnCancelCommand, DeleteObjectsOnCancelCommandInput, @@ -115,6 +125,11 @@ import { GetEffectivePermissionsForPathCommandOutput, } from "./commands/GetEffectivePermissionsForPathCommand"; import { GetLFTagCommand, GetLFTagCommandInput, GetLFTagCommandOutput } from "./commands/GetLFTagCommand"; +import { + GetLFTagExpressionCommand, + GetLFTagExpressionCommandInput, + GetLFTagExpressionCommandOutput, +} from "./commands/GetLFTagExpressionCommand"; import { GetQueryStateCommand, GetQueryStateCommandInput, @@ -170,6 +185,11 @@ import { ListLakeFormationOptInsCommandInput, ListLakeFormationOptInsCommandOutput, } from "./commands/ListLakeFormationOptInsCommand"; +import { + ListLFTagExpressionsCommand, + ListLFTagExpressionsCommandInput, + ListLFTagExpressionsCommandOutput, +} from "./commands/ListLFTagExpressionsCommand"; import { ListLFTagsCommand, ListLFTagsCommandInput, ListLFTagsCommandOutput } from "./commands/ListLFTagsCommand"; import { ListPermissionsCommand, @@ -242,6 +262,11 @@ import { UpdateLakeFormationIdentityCenterConfigurationCommandOutput, } from "./commands/UpdateLakeFormationIdentityCenterConfigurationCommand"; import { UpdateLFTagCommand, UpdateLFTagCommandInput, UpdateLFTagCommandOutput } from "./commands/UpdateLFTagCommand"; +import { + UpdateLFTagExpressionCommand, + UpdateLFTagExpressionCommandInput, + UpdateLFTagExpressionCommandOutput, +} from "./commands/UpdateLFTagExpressionCommand"; import { UpdateResourceCommand, UpdateResourceCommandInput, @@ -270,10 +295,12 @@ const commands = { CreateLakeFormationIdentityCenterConfigurationCommand, CreateLakeFormationOptInCommand, CreateLFTagCommand, + CreateLFTagExpressionCommand, DeleteDataCellsFilterCommand, DeleteLakeFormationIdentityCenterConfigurationCommand, DeleteLakeFormationOptInCommand, DeleteLFTagCommand, + DeleteLFTagExpressionCommand, DeleteObjectsOnCancelCommand, DeregisterResourceCommand, DescribeLakeFormationIdentityCenterConfigurationCommand, @@ -285,6 +312,7 @@ const commands = { GetDataLakeSettingsCommand, GetEffectivePermissionsForPathCommand, GetLFTagCommand, + GetLFTagExpressionCommand, GetQueryStateCommand, GetQueryStatisticsCommand, GetResourceLFTagsCommand, @@ -296,6 +324,7 @@ const commands = { GrantPermissionsCommand, ListDataCellsFilterCommand, ListLakeFormationOptInsCommand, + ListLFTagExpressionsCommand, ListLFTagsCommand, ListPermissionsCommand, ListResourcesCommand, @@ -312,6 +341,7 @@ const commands = { UpdateDataCellsFilterCommand, UpdateLakeFormationIdentityCenterConfigurationCommand, UpdateLFTagCommand, + UpdateLFTagExpressionCommand, UpdateResourceCommand, UpdateTableObjectsCommand, UpdateTableStorageOptimizerCommand, @@ -483,6 +513,23 @@ export interface LakeFormation { cb: (err: any, data?: CreateLFTagCommandOutput) => void ): void; + /** + * @see {@link CreateLFTagExpressionCommand} + */ + createLFTagExpression( + args: CreateLFTagExpressionCommandInput, + options?: __HttpHandlerOptions + ): Promise; + createLFTagExpression( + args: CreateLFTagExpressionCommandInput, + cb: (err: any, data?: CreateLFTagExpressionCommandOutput) => void + ): void; + createLFTagExpression( + args: CreateLFTagExpressionCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateLFTagExpressionCommandOutput) => void + ): void; + /** * @see {@link DeleteDataCellsFilterCommand} */ @@ -547,6 +594,23 @@ export interface LakeFormation { cb: (err: any, data?: DeleteLFTagCommandOutput) => void ): void; + /** + * @see {@link DeleteLFTagExpressionCommand} + */ + deleteLFTagExpression( + args: DeleteLFTagExpressionCommandInput, + options?: __HttpHandlerOptions + ): Promise; + deleteLFTagExpression( + args: DeleteLFTagExpressionCommandInput, + cb: (err: any, data?: DeleteLFTagExpressionCommandOutput) => void + ): void; + deleteLFTagExpression( + args: DeleteLFTagExpressionCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteLFTagExpressionCommandOutput) => void + ): void; + /** * @see {@link DeleteObjectsOnCancelCommand} */ @@ -732,6 +796,23 @@ export interface LakeFormation { cb: (err: any, data?: GetLFTagCommandOutput) => void ): void; + /** + * @see {@link GetLFTagExpressionCommand} + */ + getLFTagExpression( + args: GetLFTagExpressionCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getLFTagExpression( + args: GetLFTagExpressionCommandInput, + cb: (err: any, data?: GetLFTagExpressionCommandOutput) => void + ): void; + getLFTagExpression( + args: GetLFTagExpressionCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetLFTagExpressionCommandOutput) => void + ): void; + /** * @see {@link GetQueryStateCommand} */ @@ -906,6 +987,24 @@ export interface LakeFormation { cb: (err: any, data?: ListLakeFormationOptInsCommandOutput) => void ): void; + /** + * @see {@link ListLFTagExpressionsCommand} + */ + listLFTagExpressions(): Promise; + listLFTagExpressions( + args: ListLFTagExpressionsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listLFTagExpressions( + args: ListLFTagExpressionsCommandInput, + cb: (err: any, data?: ListLFTagExpressionsCommandOutput) => void + ): void; + listLFTagExpressions( + args: ListLFTagExpressionsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListLFTagExpressionsCommandOutput) => void + ): void; + /** * @see {@link ListLFTagsCommand} */ @@ -1163,6 +1262,23 @@ export interface LakeFormation { cb: (err: any, data?: UpdateLFTagCommandOutput) => void ): void; + /** + * @see {@link UpdateLFTagExpressionCommand} + */ + updateLFTagExpression( + args: UpdateLFTagExpressionCommandInput, + options?: __HttpHandlerOptions + ): Promise; + updateLFTagExpression( + args: UpdateLFTagExpressionCommandInput, + cb: (err: any, data?: UpdateLFTagExpressionCommandOutput) => void + ): void; + updateLFTagExpression( + args: UpdateLFTagExpressionCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateLFTagExpressionCommandOutput) => void + ): void; + /** * @see {@link UpdateResourceCommand} */ diff --git a/clients/client-lakeformation/src/LakeFormationClient.ts b/clients/client-lakeformation/src/LakeFormationClient.ts index 66779420f4ce..0e9b8a60f2cc 100644 --- a/clients/client-lakeformation/src/LakeFormationClient.ts +++ b/clients/client-lakeformation/src/LakeFormationClient.ts @@ -85,6 +85,10 @@ import { CreateLakeFormationOptInCommandOutput, } from "./commands/CreateLakeFormationOptInCommand"; import { CreateLFTagCommandInput, CreateLFTagCommandOutput } from "./commands/CreateLFTagCommand"; +import { + CreateLFTagExpressionCommandInput, + CreateLFTagExpressionCommandOutput, +} from "./commands/CreateLFTagExpressionCommand"; import { DeleteDataCellsFilterCommandInput, DeleteDataCellsFilterCommandOutput, @@ -98,6 +102,10 @@ import { DeleteLakeFormationOptInCommandOutput, } from "./commands/DeleteLakeFormationOptInCommand"; import { DeleteLFTagCommandInput, DeleteLFTagCommandOutput } from "./commands/DeleteLFTagCommand"; +import { + DeleteLFTagExpressionCommandInput, + DeleteLFTagExpressionCommandOutput, +} from "./commands/DeleteLFTagExpressionCommand"; import { DeleteObjectsOnCancelCommandInput, DeleteObjectsOnCancelCommandOutput, @@ -127,6 +135,7 @@ import { GetEffectivePermissionsForPathCommandOutput, } from "./commands/GetEffectivePermissionsForPathCommand"; import { GetLFTagCommandInput, GetLFTagCommandOutput } from "./commands/GetLFTagCommand"; +import { GetLFTagExpressionCommandInput, GetLFTagExpressionCommandOutput } from "./commands/GetLFTagExpressionCommand"; import { GetQueryStateCommandInput, GetQueryStateCommandOutput } from "./commands/GetQueryStateCommand"; import { GetQueryStatisticsCommandInput, GetQueryStatisticsCommandOutput } from "./commands/GetQueryStatisticsCommand"; import { GetResourceLFTagsCommandInput, GetResourceLFTagsCommandOutput } from "./commands/GetResourceLFTagsCommand"; @@ -150,6 +159,10 @@ import { ListLakeFormationOptInsCommandInput, ListLakeFormationOptInsCommandOutput, } from "./commands/ListLakeFormationOptInsCommand"; +import { + ListLFTagExpressionsCommandInput, + ListLFTagExpressionsCommandOutput, +} from "./commands/ListLFTagExpressionsCommand"; import { ListLFTagsCommandInput, ListLFTagsCommandOutput } from "./commands/ListLFTagsCommand"; import { ListPermissionsCommandInput, ListPermissionsCommandOutput } from "./commands/ListPermissionsCommand"; import { ListResourcesCommandInput, ListResourcesCommandOutput } from "./commands/ListResourcesCommand"; @@ -187,6 +200,10 @@ import { UpdateLakeFormationIdentityCenterConfigurationCommandOutput, } from "./commands/UpdateLakeFormationIdentityCenterConfigurationCommand"; import { UpdateLFTagCommandInput, UpdateLFTagCommandOutput } from "./commands/UpdateLFTagCommand"; +import { + UpdateLFTagExpressionCommandInput, + UpdateLFTagExpressionCommandOutput, +} from "./commands/UpdateLFTagExpressionCommand"; import { UpdateResourceCommandInput, UpdateResourceCommandOutput } from "./commands/UpdateResourceCommand"; import { UpdateTableObjectsCommandInput, UpdateTableObjectsCommandOutput } from "./commands/UpdateTableObjectsCommand"; import { @@ -216,10 +233,12 @@ export type ServiceInputTypes = | CommitTransactionCommandInput | CreateDataCellsFilterCommandInput | CreateLFTagCommandInput + | CreateLFTagExpressionCommandInput | CreateLakeFormationIdentityCenterConfigurationCommandInput | CreateLakeFormationOptInCommandInput | DeleteDataCellsFilterCommandInput | DeleteLFTagCommandInput + | DeleteLFTagExpressionCommandInput | DeleteLakeFormationIdentityCenterConfigurationCommandInput | DeleteLakeFormationOptInCommandInput | DeleteObjectsOnCancelCommandInput @@ -233,6 +252,7 @@ export type ServiceInputTypes = | GetDataLakeSettingsCommandInput | GetEffectivePermissionsForPathCommandInput | GetLFTagCommandInput + | GetLFTagExpressionCommandInput | GetQueryStateCommandInput | GetQueryStatisticsCommandInput | GetResourceLFTagsCommandInput @@ -243,6 +263,7 @@ export type ServiceInputTypes = | GetWorkUnitsCommandInput | GrantPermissionsCommandInput | ListDataCellsFilterCommandInput + | ListLFTagExpressionsCommandInput | ListLFTagsCommandInput | ListLakeFormationOptInsCommandInput | ListPermissionsCommandInput @@ -259,6 +280,7 @@ export type ServiceInputTypes = | StartTransactionCommandInput | UpdateDataCellsFilterCommandInput | UpdateLFTagCommandInput + | UpdateLFTagExpressionCommandInput | UpdateLakeFormationIdentityCenterConfigurationCommandInput | UpdateResourceCommandInput | UpdateTableObjectsCommandInput @@ -276,10 +298,12 @@ export type ServiceOutputTypes = | CommitTransactionCommandOutput | CreateDataCellsFilterCommandOutput | CreateLFTagCommandOutput + | CreateLFTagExpressionCommandOutput | CreateLakeFormationIdentityCenterConfigurationCommandOutput | CreateLakeFormationOptInCommandOutput | DeleteDataCellsFilterCommandOutput | DeleteLFTagCommandOutput + | DeleteLFTagExpressionCommandOutput | DeleteLakeFormationIdentityCenterConfigurationCommandOutput | DeleteLakeFormationOptInCommandOutput | DeleteObjectsOnCancelCommandOutput @@ -293,6 +317,7 @@ export type ServiceOutputTypes = | GetDataLakeSettingsCommandOutput | GetEffectivePermissionsForPathCommandOutput | GetLFTagCommandOutput + | GetLFTagExpressionCommandOutput | GetQueryStateCommandOutput | GetQueryStatisticsCommandOutput | GetResourceLFTagsCommandOutput @@ -303,6 +328,7 @@ export type ServiceOutputTypes = | GetWorkUnitsCommandOutput | GrantPermissionsCommandOutput | ListDataCellsFilterCommandOutput + | ListLFTagExpressionsCommandOutput | ListLFTagsCommandOutput | ListLakeFormationOptInsCommandOutput | ListPermissionsCommandOutput @@ -319,6 +345,7 @@ export type ServiceOutputTypes = | StartTransactionCommandOutput | UpdateDataCellsFilterCommandOutput | UpdateLFTagCommandOutput + | UpdateLFTagExpressionCommandOutput | UpdateLakeFormationIdentityCenterConfigurationCommandOutput | UpdateResourceCommandOutput | UpdateTableObjectsCommandOutput diff --git a/clients/client-lakeformation/src/commands/AddLFTagsToResourceCommand.ts b/clients/client-lakeformation/src/commands/AddLFTagsToResourceCommand.ts index 10d62711aa15..324bbe30f9ae 100644 --- a/clients/client-lakeformation/src/commands/AddLFTagsToResourceCommand.ts +++ b/clients/client-lakeformation/src/commands/AddLFTagsToResourceCommand.ts @@ -82,7 +82,7 @@ export interface AddLFTagsToResourceCommandOutput extends AddLFTagsToResourceRes * LFTagPolicy: { // LFTagPolicyResource * CatalogId: "STRING_VALUE", * ResourceType: "DATABASE" || "TABLE", // required - * Expression: [ // Expression // required + * Expression: [ // Expression * { // LFTag * TagKey: "STRING_VALUE", // required * TagValues: [ // required @@ -90,6 +90,11 @@ export interface AddLFTagsToResourceCommandOutput extends AddLFTagsToResourceRes * ], * }, * ], + * ExpressionName: "STRING_VALUE", + * }, + * LFTagExpression: { // LFTagExpressionResource + * CatalogId: "STRING_VALUE", + * Name: "STRING_VALUE", // required * }, * }, * LFTags: [ // LFTagsList // required diff --git a/clients/client-lakeformation/src/commands/BatchGrantPermissionsCommand.ts b/clients/client-lakeformation/src/commands/BatchGrantPermissionsCommand.ts index 899f0ec0c1d2..d619aa3c48eb 100644 --- a/clients/client-lakeformation/src/commands/BatchGrantPermissionsCommand.ts +++ b/clients/client-lakeformation/src/commands/BatchGrantPermissionsCommand.ts @@ -88,7 +88,7 @@ export interface BatchGrantPermissionsCommandOutput extends BatchGrantPermission * LFTagPolicy: { // LFTagPolicyResource * CatalogId: "STRING_VALUE", * ResourceType: "DATABASE" || "TABLE", // required - * Expression: [ // Expression // required + * Expression: [ // Expression * { // LFTag * TagKey: "STRING_VALUE", // required * TagValues: [ // required @@ -96,13 +96,18 @@ export interface BatchGrantPermissionsCommandOutput extends BatchGrantPermission * ], * }, * ], + * ExpressionName: "STRING_VALUE", + * }, + * LFTagExpression: { // LFTagExpressionResource + * CatalogId: "STRING_VALUE", + * Name: "STRING_VALUE", // required * }, * }, * Permissions: [ // PermissionList - * "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION", + * "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION" || "CREATE_LF_TAG_EXPRESSION", * ], * PermissionsWithGrantOption: [ - * "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION", + * "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION" || "CREATE_LF_TAG_EXPRESSION", * ], * }, * ], @@ -162,7 +167,7 @@ export interface BatchGrantPermissionsCommandOutput extends BatchGrantPermission * // LFTagPolicy: { // LFTagPolicyResource * // CatalogId: "STRING_VALUE", * // ResourceType: "DATABASE" || "TABLE", // required - * // Expression: [ // Expression // required + * // Expression: [ // Expression * // { // LFTag * // TagKey: "STRING_VALUE", // required * // TagValues: [ // required @@ -170,13 +175,18 @@ export interface BatchGrantPermissionsCommandOutput extends BatchGrantPermission * // ], * // }, * // ], + * // ExpressionName: "STRING_VALUE", + * // }, + * // LFTagExpression: { // LFTagExpressionResource + * // CatalogId: "STRING_VALUE", + * // Name: "STRING_VALUE", // required * // }, * // }, * // Permissions: [ // PermissionList - * // "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION", + * // "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION" || "CREATE_LF_TAG_EXPRESSION", * // ], * // PermissionsWithGrantOption: [ - * // "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION", + * // "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION" || "CREATE_LF_TAG_EXPRESSION", * // ], * // }, * // Error: { // ErrorDetail diff --git a/clients/client-lakeformation/src/commands/BatchRevokePermissionsCommand.ts b/clients/client-lakeformation/src/commands/BatchRevokePermissionsCommand.ts index 8656667874a5..8abef0137370 100644 --- a/clients/client-lakeformation/src/commands/BatchRevokePermissionsCommand.ts +++ b/clients/client-lakeformation/src/commands/BatchRevokePermissionsCommand.ts @@ -88,7 +88,7 @@ export interface BatchRevokePermissionsCommandOutput extends BatchRevokePermissi * LFTagPolicy: { // LFTagPolicyResource * CatalogId: "STRING_VALUE", * ResourceType: "DATABASE" || "TABLE", // required - * Expression: [ // Expression // required + * Expression: [ // Expression * { // LFTag * TagKey: "STRING_VALUE", // required * TagValues: [ // required @@ -96,13 +96,18 @@ export interface BatchRevokePermissionsCommandOutput extends BatchRevokePermissi * ], * }, * ], + * ExpressionName: "STRING_VALUE", + * }, + * LFTagExpression: { // LFTagExpressionResource + * CatalogId: "STRING_VALUE", + * Name: "STRING_VALUE", // required * }, * }, * Permissions: [ // PermissionList - * "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION", + * "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION" || "CREATE_LF_TAG_EXPRESSION", * ], * PermissionsWithGrantOption: [ - * "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION", + * "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION" || "CREATE_LF_TAG_EXPRESSION", * ], * }, * ], @@ -162,7 +167,7 @@ export interface BatchRevokePermissionsCommandOutput extends BatchRevokePermissi * // LFTagPolicy: { // LFTagPolicyResource * // CatalogId: "STRING_VALUE", * // ResourceType: "DATABASE" || "TABLE", // required - * // Expression: [ // Expression // required + * // Expression: [ // Expression * // { // LFTag * // TagKey: "STRING_VALUE", // required * // TagValues: [ // required @@ -170,13 +175,18 @@ export interface BatchRevokePermissionsCommandOutput extends BatchRevokePermissi * // ], * // }, * // ], + * // ExpressionName: "STRING_VALUE", + * // }, + * // LFTagExpression: { // LFTagExpressionResource + * // CatalogId: "STRING_VALUE", + * // Name: "STRING_VALUE", // required * // }, * // }, * // Permissions: [ // PermissionList - * // "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION", + * // "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION" || "CREATE_LF_TAG_EXPRESSION", * // ], * // PermissionsWithGrantOption: [ - * // "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION", + * // "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION" || "CREATE_LF_TAG_EXPRESSION", * // ], * // }, * // Error: { // ErrorDetail diff --git a/clients/client-lakeformation/src/commands/CreateLFTagExpressionCommand.ts b/clients/client-lakeformation/src/commands/CreateLFTagExpressionCommand.ts new file mode 100644 index 000000000000..cf20de8d7477 --- /dev/null +++ b/clients/client-lakeformation/src/commands/CreateLFTagExpressionCommand.ts @@ -0,0 +1,126 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { LakeFormationClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../LakeFormationClient"; +import { CreateLFTagExpressionRequest, CreateLFTagExpressionResponse } from "../models/models_0"; +import { de_CreateLFTagExpressionCommand, se_CreateLFTagExpressionCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link CreateLFTagExpressionCommand}. + */ +export interface CreateLFTagExpressionCommandInput extends CreateLFTagExpressionRequest {} +/** + * @public + * + * The output of {@link CreateLFTagExpressionCommand}. + */ +export interface CreateLFTagExpressionCommandOutput extends CreateLFTagExpressionResponse, __MetadataBearer {} + +/** + *

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 + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * 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); + * // {}; + * + * ``` + * + * @param CreateLFTagExpressionCommandInput - {@link CreateLFTagExpressionCommandInput} + * @returns {@link CreateLFTagExpressionCommandOutput} + * @see {@link CreateLFTagExpressionCommandInput} for command's `input` shape. + * @see {@link CreateLFTagExpressionCommandOutput} for command's `response` shape. + * @see {@link LakeFormationClientResolvedConfig | config} for LakeFormationClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

Access to a resource was denied.

+ * + * @throws {@link EntityNotFoundException} (client fault) + *

A specified entity does not exist.

+ * + * @throws {@link InternalServiceException} (server fault) + *

An internal service error occurred.

+ * + * @throws {@link InvalidInputException} (client fault) + *

The input provided was not valid.

+ * + * @throws {@link OperationTimeoutException} (client fault) + *

The operation timed out.

+ * + * @throws {@link ResourceNumberLimitExceededException} (client fault) + *

A resource numerical limit was exceeded.

+ * + * @throws {@link LakeFormationServiceException} + *

Base exception class for all service exceptions from LakeFormation service.

+ * + * @public + */ +export class CreateLFTagExpressionCommand extends $Command + .classBuilder< + CreateLFTagExpressionCommandInput, + CreateLFTagExpressionCommandOutput, + LakeFormationClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: LakeFormationClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSLakeFormation", "CreateLFTagExpression", {}) + .n("LakeFormationClient", "CreateLFTagExpressionCommand") + .f(void 0, void 0) + .ser(se_CreateLFTagExpressionCommand) + .de(de_CreateLFTagExpressionCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: CreateLFTagExpressionRequest; + output: {}; + }; + sdk: { + input: CreateLFTagExpressionCommandInput; + output: CreateLFTagExpressionCommandOutput; + }; + }; +} diff --git a/clients/client-lakeformation/src/commands/CreateLakeFormationOptInCommand.ts b/clients/client-lakeformation/src/commands/CreateLakeFormationOptInCommand.ts index 6d5988ac2827..7f4b00efd21d 100644 --- a/clients/client-lakeformation/src/commands/CreateLakeFormationOptInCommand.ts +++ b/clients/client-lakeformation/src/commands/CreateLakeFormationOptInCommand.ts @@ -84,7 +84,7 @@ export interface CreateLakeFormationOptInCommandOutput extends CreateLakeFormati * LFTagPolicy: { // LFTagPolicyResource * CatalogId: "STRING_VALUE", * ResourceType: "DATABASE" || "TABLE", // required - * Expression: [ // Expression // required + * Expression: [ // Expression * { // LFTag * TagKey: "STRING_VALUE", // required * TagValues: [ // required @@ -92,6 +92,11 @@ export interface CreateLakeFormationOptInCommandOutput extends CreateLakeFormati * ], * }, * ], + * ExpressionName: "STRING_VALUE", + * }, + * LFTagExpression: { // LFTagExpressionResource + * CatalogId: "STRING_VALUE", + * Name: "STRING_VALUE", // required * }, * }, * }; diff --git a/clients/client-lakeformation/src/commands/DeleteLFTagExpressionCommand.ts b/clients/client-lakeformation/src/commands/DeleteLFTagExpressionCommand.ts new file mode 100644 index 000000000000..ad6c8ca7060e --- /dev/null +++ b/clients/client-lakeformation/src/commands/DeleteLFTagExpressionCommand.ts @@ -0,0 +1,107 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { LakeFormationClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../LakeFormationClient"; +import { DeleteLFTagExpressionRequest, DeleteLFTagExpressionResponse } from "../models/models_0"; +import { de_DeleteLFTagExpressionCommand, se_DeleteLFTagExpressionCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link DeleteLFTagExpressionCommand}. + */ +export interface DeleteLFTagExpressionCommandInput extends DeleteLFTagExpressionRequest {} +/** + * @public + * + * The output of {@link DeleteLFTagExpressionCommand}. + */ +export interface DeleteLFTagExpressionCommandOutput extends DeleteLFTagExpressionResponse, __MetadataBearer {} + +/** + *

Deletes the LF-Tag expression. The caller must be a data lake admin or have DROP permissions on the LF-Tag expression. + * Deleting a LF-Tag expression will also delete all LFTagPolicy permissions referencing the LF-Tag expression.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { LakeFormationClient, DeleteLFTagExpressionCommand } from "@aws-sdk/client-lakeformation"; // ES Modules import + * // const { LakeFormationClient, DeleteLFTagExpressionCommand } = require("@aws-sdk/client-lakeformation"); // CommonJS import + * const client = new LakeFormationClient(config); + * const input = { // DeleteLFTagExpressionRequest + * Name: "STRING_VALUE", // required + * CatalogId: "STRING_VALUE", + * }; + * const command = new DeleteLFTagExpressionCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteLFTagExpressionCommandInput - {@link DeleteLFTagExpressionCommandInput} + * @returns {@link DeleteLFTagExpressionCommandOutput} + * @see {@link DeleteLFTagExpressionCommandInput} for command's `input` shape. + * @see {@link DeleteLFTagExpressionCommandOutput} for command's `response` shape. + * @see {@link LakeFormationClientResolvedConfig | config} for LakeFormationClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

Access to a resource was denied.

+ * + * @throws {@link EntityNotFoundException} (client fault) + *

A specified entity does not exist.

+ * + * @throws {@link InternalServiceException} (server fault) + *

An internal service error occurred.

+ * + * @throws {@link InvalidInputException} (client fault) + *

The input provided was not valid.

+ * + * @throws {@link OperationTimeoutException} (client fault) + *

The operation timed out.

+ * + * @throws {@link LakeFormationServiceException} + *

Base exception class for all service exceptions from LakeFormation service.

+ * + * @public + */ +export class DeleteLFTagExpressionCommand extends $Command + .classBuilder< + DeleteLFTagExpressionCommandInput, + DeleteLFTagExpressionCommandOutput, + LakeFormationClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: LakeFormationClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSLakeFormation", "DeleteLFTagExpression", {}) + .n("LakeFormationClient", "DeleteLFTagExpressionCommand") + .f(void 0, void 0) + .ser(se_DeleteLFTagExpressionCommand) + .de(de_DeleteLFTagExpressionCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: DeleteLFTagExpressionRequest; + output: {}; + }; + sdk: { + input: DeleteLFTagExpressionCommandInput; + output: DeleteLFTagExpressionCommandOutput; + }; + }; +} diff --git a/clients/client-lakeformation/src/commands/DeleteLakeFormationOptInCommand.ts b/clients/client-lakeformation/src/commands/DeleteLakeFormationOptInCommand.ts index 218766608a0d..a863b74160e7 100644 --- a/clients/client-lakeformation/src/commands/DeleteLakeFormationOptInCommand.ts +++ b/clients/client-lakeformation/src/commands/DeleteLakeFormationOptInCommand.ts @@ -84,7 +84,7 @@ export interface DeleteLakeFormationOptInCommandOutput extends DeleteLakeFormati * LFTagPolicy: { // LFTagPolicyResource * CatalogId: "STRING_VALUE", * ResourceType: "DATABASE" || "TABLE", // required - * Expression: [ // Expression // required + * Expression: [ // Expression * { // LFTag * TagKey: "STRING_VALUE", // required * TagValues: [ // required @@ -92,6 +92,11 @@ export interface DeleteLakeFormationOptInCommandOutput extends DeleteLakeFormati * ], * }, * ], + * ExpressionName: "STRING_VALUE", + * }, + * LFTagExpression: { // LFTagExpressionResource + * CatalogId: "STRING_VALUE", + * Name: "STRING_VALUE", // required * }, * }, * }; diff --git a/clients/client-lakeformation/src/commands/GetDataLakeSettingsCommand.ts b/clients/client-lakeformation/src/commands/GetDataLakeSettingsCommand.ts index 64123579f8d6..a51c08546f18 100644 --- a/clients/client-lakeformation/src/commands/GetDataLakeSettingsCommand.ts +++ b/clients/client-lakeformation/src/commands/GetDataLakeSettingsCommand.ts @@ -58,7 +58,7 @@ export interface GetDataLakeSettingsCommandOutput extends GetDataLakeSettingsRes * // DataLakePrincipalIdentifier: "STRING_VALUE", * // }, * // Permissions: [ // PermissionList - * // "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION", + * // "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION" || "CREATE_LF_TAG_EXPRESSION", * // ], * // }, * // ], @@ -68,7 +68,7 @@ export interface GetDataLakeSettingsCommandOutput extends GetDataLakeSettingsRes * // DataLakePrincipalIdentifier: "STRING_VALUE", * // }, * // Permissions: [ - * // "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION", + * // "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION" || "CREATE_LF_TAG_EXPRESSION", * // ], * // }, * // ], diff --git a/clients/client-lakeformation/src/commands/GetEffectivePermissionsForPathCommand.ts b/clients/client-lakeformation/src/commands/GetEffectivePermissionsForPathCommand.ts index f724c6233fe0..ad4d8b4933a3 100644 --- a/clients/client-lakeformation/src/commands/GetEffectivePermissionsForPathCommand.ts +++ b/clients/client-lakeformation/src/commands/GetEffectivePermissionsForPathCommand.ts @@ -100,7 +100,7 @@ export interface GetEffectivePermissionsForPathCommandOutput * // LFTagPolicy: { // LFTagPolicyResource * // CatalogId: "STRING_VALUE", * // ResourceType: "DATABASE" || "TABLE", // required - * // Expression: [ // Expression // required + * // Expression: [ // Expression * // { // LFTag * // TagKey: "STRING_VALUE", // required * // TagValues: [ // required @@ -108,13 +108,18 @@ export interface GetEffectivePermissionsForPathCommandOutput * // ], * // }, * // ], + * // ExpressionName: "STRING_VALUE", + * // }, + * // LFTagExpression: { // LFTagExpressionResource + * // CatalogId: "STRING_VALUE", + * // Name: "STRING_VALUE", // required * // }, * // }, * // Permissions: [ // PermissionList - * // "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION", + * // "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION" || "CREATE_LF_TAG_EXPRESSION", * // ], * // PermissionsWithGrantOption: [ - * // "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION", + * // "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION" || "CREATE_LF_TAG_EXPRESSION", * // ], * // AdditionalDetails: { // DetailsMap * // ResourceShare: [ // ResourceShareList diff --git a/clients/client-lakeformation/src/commands/GetLFTagExpressionCommand.ts b/clients/client-lakeformation/src/commands/GetLFTagExpressionCommand.ts new file mode 100644 index 000000000000..f218325585c9 --- /dev/null +++ b/clients/client-lakeformation/src/commands/GetLFTagExpressionCommand.ts @@ -0,0 +1,119 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { LakeFormationClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../LakeFormationClient"; +import { GetLFTagExpressionRequest, GetLFTagExpressionResponse } from "../models/models_0"; +import { de_GetLFTagExpressionCommand, se_GetLFTagExpressionCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link GetLFTagExpressionCommand}. + */ +export interface GetLFTagExpressionCommandInput extends GetLFTagExpressionRequest {} +/** + * @public + * + * The output of {@link GetLFTagExpressionCommand}. + */ +export interface GetLFTagExpressionCommandOutput extends GetLFTagExpressionResponse, __MetadataBearer {} + +/** + *

Returns the details about the LF-Tag expression. The caller must be a data lake admin or must have DESCRIBE permission on the LF-Tag expression resource. + *

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { LakeFormationClient, GetLFTagExpressionCommand } from "@aws-sdk/client-lakeformation"; // ES Modules import + * // const { LakeFormationClient, GetLFTagExpressionCommand } = require("@aws-sdk/client-lakeformation"); // CommonJS import + * const client = new LakeFormationClient(config); + * const input = { // GetLFTagExpressionRequest + * Name: "STRING_VALUE", // required + * CatalogId: "STRING_VALUE", + * }; + * const command = new GetLFTagExpressionCommand(input); + * const response = await client.send(command); + * // { // GetLFTagExpressionResponse + * // Name: "STRING_VALUE", + * // Description: "STRING_VALUE", + * // CatalogId: "STRING_VALUE", + * // Expression: [ // Expression + * // { // LFTag + * // TagKey: "STRING_VALUE", // required + * // TagValues: [ // TagValueList // required + * // "STRING_VALUE", + * // ], + * // }, + * // ], + * // }; + * + * ``` + * + * @param GetLFTagExpressionCommandInput - {@link GetLFTagExpressionCommandInput} + * @returns {@link GetLFTagExpressionCommandOutput} + * @see {@link GetLFTagExpressionCommandInput} for command's `input` shape. + * @see {@link GetLFTagExpressionCommandOutput} for command's `response` shape. + * @see {@link LakeFormationClientResolvedConfig | config} for LakeFormationClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

Access to a resource was denied.

+ * + * @throws {@link EntityNotFoundException} (client fault) + *

A specified entity does not exist.

+ * + * @throws {@link InternalServiceException} (server fault) + *

An internal service error occurred.

+ * + * @throws {@link InvalidInputException} (client fault) + *

The input provided was not valid.

+ * + * @throws {@link OperationTimeoutException} (client fault) + *

The operation timed out.

+ * + * @throws {@link LakeFormationServiceException} + *

Base exception class for all service exceptions from LakeFormation service.

+ * + * @public + */ +export class GetLFTagExpressionCommand extends $Command + .classBuilder< + GetLFTagExpressionCommandInput, + GetLFTagExpressionCommandOutput, + LakeFormationClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: LakeFormationClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSLakeFormation", "GetLFTagExpression", {}) + .n("LakeFormationClient", "GetLFTagExpressionCommand") + .f(void 0, void 0) + .ser(se_GetLFTagExpressionCommand) + .de(de_GetLFTagExpressionCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: GetLFTagExpressionRequest; + output: GetLFTagExpressionResponse; + }; + sdk: { + input: GetLFTagExpressionCommandInput; + output: GetLFTagExpressionCommandOutput; + }; + }; +} diff --git a/clients/client-lakeformation/src/commands/GetResourceLFTagsCommand.ts b/clients/client-lakeformation/src/commands/GetResourceLFTagsCommand.ts index cbff7c14f835..804cd02238b5 100644 --- a/clients/client-lakeformation/src/commands/GetResourceLFTagsCommand.ts +++ b/clients/client-lakeformation/src/commands/GetResourceLFTagsCommand.ts @@ -82,7 +82,7 @@ export interface GetResourceLFTagsCommandOutput extends GetResourceLFTagsRespons * LFTagPolicy: { // LFTagPolicyResource * CatalogId: "STRING_VALUE", * ResourceType: "DATABASE" || "TABLE", // required - * Expression: [ // Expression // required + * Expression: [ // Expression * { // LFTag * TagKey: "STRING_VALUE", // required * TagValues: [ // required @@ -90,6 +90,11 @@ export interface GetResourceLFTagsCommandOutput extends GetResourceLFTagsRespons * ], * }, * ], + * ExpressionName: "STRING_VALUE", + * }, + * LFTagExpression: { // LFTagExpressionResource + * CatalogId: "STRING_VALUE", + * Name: "STRING_VALUE", // required * }, * }, * ShowAssignedLFTags: true || false, diff --git a/clients/client-lakeformation/src/commands/GetTemporaryGluePartitionCredentialsCommand.ts b/clients/client-lakeformation/src/commands/GetTemporaryGluePartitionCredentialsCommand.ts index 7e6b57904418..9bd6f4c29c70 100644 --- a/clients/client-lakeformation/src/commands/GetTemporaryGluePartitionCredentialsCommand.ts +++ b/clients/client-lakeformation/src/commands/GetTemporaryGluePartitionCredentialsCommand.ts @@ -51,7 +51,7 @@ export interface GetTemporaryGluePartitionCredentialsCommandOutput * ], * }, * Permissions: [ // PermissionList - * "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION", + * "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION" || "CREATE_LF_TAG_EXPRESSION", * ], * DurationSeconds: Number("int"), * AuditContext: { // AuditContext diff --git a/clients/client-lakeformation/src/commands/GetTemporaryGlueTableCredentialsCommand.ts b/clients/client-lakeformation/src/commands/GetTemporaryGlueTableCredentialsCommand.ts index 7c9d2d1add05..1d4caed40a57 100644 --- a/clients/client-lakeformation/src/commands/GetTemporaryGlueTableCredentialsCommand.ts +++ b/clients/client-lakeformation/src/commands/GetTemporaryGlueTableCredentialsCommand.ts @@ -34,6 +34,7 @@ export interface GetTemporaryGlueTableCredentialsCommandOutput /** *

Allows a caller in a secure environment to assume a role with permission to access Amazon S3. In order to vend such credentials, Lake Formation assumes the role associated with a registered location, for example an Amazon S3 bucket, with a scope down policy which restricts the access to a single prefix.

+ *

To call this API, the role that the service assumes must have lakeformation:GetDataAccess permission on the resource.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript @@ -43,7 +44,7 @@ export interface GetTemporaryGlueTableCredentialsCommandOutput * const input = { // GetTemporaryGlueTableCredentialsRequest * TableArn: "STRING_VALUE", // required * Permissions: [ // PermissionList - * "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION", + * "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION" || "CREATE_LF_TAG_EXPRESSION", * ], * DurationSeconds: Number("int"), * AuditContext: { // AuditContext diff --git a/clients/client-lakeformation/src/commands/GrantPermissionsCommand.ts b/clients/client-lakeformation/src/commands/GrantPermissionsCommand.ts index 1c79a01ced27..2d0051cd5d89 100644 --- a/clients/client-lakeformation/src/commands/GrantPermissionsCommand.ts +++ b/clients/client-lakeformation/src/commands/GrantPermissionsCommand.ts @@ -86,7 +86,7 @@ export interface GrantPermissionsCommandOutput extends GrantPermissionsResponse, * LFTagPolicy: { // LFTagPolicyResource * CatalogId: "STRING_VALUE", * ResourceType: "DATABASE" || "TABLE", // required - * Expression: [ // Expression // required + * Expression: [ // Expression * { // LFTag * TagKey: "STRING_VALUE", // required * TagValues: [ // required @@ -94,13 +94,18 @@ export interface GrantPermissionsCommandOutput extends GrantPermissionsResponse, * ], * }, * ], + * ExpressionName: "STRING_VALUE", + * }, + * LFTagExpression: { // LFTagExpressionResource + * CatalogId: "STRING_VALUE", + * Name: "STRING_VALUE", // required * }, * }, * Permissions: [ // PermissionList // required - * "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION", + * "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION" || "CREATE_LF_TAG_EXPRESSION", * ], * PermissionsWithGrantOption: [ - * "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION", + * "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION" || "CREATE_LF_TAG_EXPRESSION", * ], * }; * const command = new GrantPermissionsCommand(input); diff --git a/clients/client-lakeformation/src/commands/ListLFTagExpressionsCommand.ts b/clients/client-lakeformation/src/commands/ListLFTagExpressionsCommand.ts new file mode 100644 index 000000000000..d463a812f283 --- /dev/null +++ b/clients/client-lakeformation/src/commands/ListLFTagExpressionsCommand.ts @@ -0,0 +1,124 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { LakeFormationClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../LakeFormationClient"; +import { ListLFTagExpressionsRequest, ListLFTagExpressionsResponse } from "../models/models_0"; +import { de_ListLFTagExpressionsCommand, se_ListLFTagExpressionsCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link ListLFTagExpressionsCommand}. + */ +export interface ListLFTagExpressionsCommandInput extends ListLFTagExpressionsRequest {} +/** + * @public + * + * The output of {@link ListLFTagExpressionsCommand}. + */ +export interface ListLFTagExpressionsCommandOutput extends ListLFTagExpressionsResponse, __MetadataBearer {} + +/** + *

Returns the LF-Tag expressions in caller’s account filtered based on caller's permissions. Data Lake and read only admins implicitly can see all tag expressions in their account, else caller needs DESCRIBE permissions on tag expression.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { LakeFormationClient, ListLFTagExpressionsCommand } from "@aws-sdk/client-lakeformation"; // ES Modules import + * // const { LakeFormationClient, ListLFTagExpressionsCommand } = require("@aws-sdk/client-lakeformation"); // CommonJS import + * const client = new LakeFormationClient(config); + * const input = { // ListLFTagExpressionsRequest + * CatalogId: "STRING_VALUE", + * MaxResults: Number("int"), + * NextToken: "STRING_VALUE", + * }; + * const command = new ListLFTagExpressionsCommand(input); + * const response = await client.send(command); + * // { // ListLFTagExpressionsResponse + * // LFTagExpressions: [ // LFTagExpressionsList + * // { // LFTagExpression + * // Name: "STRING_VALUE", + * // Description: "STRING_VALUE", + * // CatalogId: "STRING_VALUE", + * // Expression: [ // Expression + * // { // LFTag + * // TagKey: "STRING_VALUE", // required + * // TagValues: [ // TagValueList // required + * // "STRING_VALUE", + * // ], + * // }, + * // ], + * // }, + * // ], + * // NextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListLFTagExpressionsCommandInput - {@link ListLFTagExpressionsCommandInput} + * @returns {@link ListLFTagExpressionsCommandOutput} + * @see {@link ListLFTagExpressionsCommandInput} for command's `input` shape. + * @see {@link ListLFTagExpressionsCommandOutput} for command's `response` shape. + * @see {@link LakeFormationClientResolvedConfig | config} for LakeFormationClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

Access to a resource was denied.

+ * + * @throws {@link EntityNotFoundException} (client fault) + *

A specified entity does not exist.

+ * + * @throws {@link InternalServiceException} (server fault) + *

An internal service error occurred.

+ * + * @throws {@link InvalidInputException} (client fault) + *

The input provided was not valid.

+ * + * @throws {@link OperationTimeoutException} (client fault) + *

The operation timed out.

+ * + * @throws {@link LakeFormationServiceException} + *

Base exception class for all service exceptions from LakeFormation service.

+ * + * @public + */ +export class ListLFTagExpressionsCommand extends $Command + .classBuilder< + ListLFTagExpressionsCommandInput, + ListLFTagExpressionsCommandOutput, + LakeFormationClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: LakeFormationClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSLakeFormation", "ListLFTagExpressions", {}) + .n("LakeFormationClient", "ListLFTagExpressionsCommand") + .f(void 0, void 0) + .ser(se_ListLFTagExpressionsCommand) + .de(de_ListLFTagExpressionsCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: ListLFTagExpressionsRequest; + output: ListLFTagExpressionsResponse; + }; + sdk: { + input: ListLFTagExpressionsCommandInput; + output: ListLFTagExpressionsCommandOutput; + }; + }; +} diff --git a/clients/client-lakeformation/src/commands/ListLakeFormationOptInsCommand.ts b/clients/client-lakeformation/src/commands/ListLakeFormationOptInsCommand.ts index 1722e8657fc7..53cad5af7838 100644 --- a/clients/client-lakeformation/src/commands/ListLakeFormationOptInsCommand.ts +++ b/clients/client-lakeformation/src/commands/ListLakeFormationOptInsCommand.ts @@ -84,7 +84,7 @@ export interface ListLakeFormationOptInsCommandOutput extends ListLakeFormationO * LFTagPolicy: { // LFTagPolicyResource * CatalogId: "STRING_VALUE", * ResourceType: "DATABASE" || "TABLE", // required - * Expression: [ // Expression // required + * Expression: [ // Expression * { // LFTag * TagKey: "STRING_VALUE", // required * TagValues: [ // required @@ -92,6 +92,11 @@ export interface ListLakeFormationOptInsCommandOutput extends ListLakeFormationO * ], * }, * ], + * ExpressionName: "STRING_VALUE", + * }, + * LFTagExpression: { // LFTagExpressionResource + * CatalogId: "STRING_VALUE", + * Name: "STRING_VALUE", // required * }, * }, * MaxResults: Number("int"), @@ -147,7 +152,7 @@ export interface ListLakeFormationOptInsCommandOutput extends ListLakeFormationO * // LFTagPolicy: { // LFTagPolicyResource * // CatalogId: "STRING_VALUE", * // ResourceType: "DATABASE" || "TABLE", // required - * // Expression: [ // Expression // required + * // Expression: [ // Expression * // { // LFTag * // TagKey: "STRING_VALUE", // required * // TagValues: [ // required @@ -155,6 +160,11 @@ export interface ListLakeFormationOptInsCommandOutput extends ListLakeFormationO * // ], * // }, * // ], + * // ExpressionName: "STRING_VALUE", + * // }, + * // LFTagExpression: { // LFTagExpressionResource + * // CatalogId: "STRING_VALUE", + * // Name: "STRING_VALUE", // required * // }, * // }, * // Principal: { // DataLakePrincipal diff --git a/clients/client-lakeformation/src/commands/ListPermissionsCommand.ts b/clients/client-lakeformation/src/commands/ListPermissionsCommand.ts index cdf840930ffd..4edc5bc9d66d 100644 --- a/clients/client-lakeformation/src/commands/ListPermissionsCommand.ts +++ b/clients/client-lakeformation/src/commands/ListPermissionsCommand.ts @@ -42,7 +42,7 @@ export interface ListPermissionsCommandOutput extends ListPermissionsResponse, _ * Principal: { // DataLakePrincipal * DataLakePrincipalIdentifier: "STRING_VALUE", * }, - * ResourceType: "CATALOG" || "DATABASE" || "TABLE" || "DATA_LOCATION" || "LF_TAG" || "LF_TAG_POLICY" || "LF_TAG_POLICY_DATABASE" || "LF_TAG_POLICY_TABLE", + * ResourceType: "CATALOG" || "DATABASE" || "TABLE" || "DATA_LOCATION" || "LF_TAG" || "LF_TAG_POLICY" || "LF_TAG_POLICY_DATABASE" || "LF_TAG_POLICY_TABLE" || "LF_NAMED_TAG_EXPRESSION", * Resource: { // Resource * Catalog: {}, * Database: { // DatabaseResource @@ -88,7 +88,7 @@ export interface ListPermissionsCommandOutput extends ListPermissionsResponse, _ * LFTagPolicy: { // LFTagPolicyResource * CatalogId: "STRING_VALUE", * ResourceType: "DATABASE" || "TABLE", // required - * Expression: [ // Expression // required + * Expression: [ // Expression * { // LFTag * TagKey: "STRING_VALUE", // required * TagValues: [ // required @@ -96,6 +96,11 @@ export interface ListPermissionsCommandOutput extends ListPermissionsResponse, _ * ], * }, * ], + * ExpressionName: "STRING_VALUE", + * }, + * LFTagExpression: { // LFTagExpressionResource + * CatalogId: "STRING_VALUE", + * Name: "STRING_VALUE", // required * }, * }, * NextToken: "STRING_VALUE", @@ -155,7 +160,7 @@ export interface ListPermissionsCommandOutput extends ListPermissionsResponse, _ * // LFTagPolicy: { // LFTagPolicyResource * // CatalogId: "STRING_VALUE", * // ResourceType: "DATABASE" || "TABLE", // required - * // Expression: [ // Expression // required + * // Expression: [ // Expression * // { // LFTag * // TagKey: "STRING_VALUE", // required * // TagValues: [ // required @@ -163,13 +168,18 @@ export interface ListPermissionsCommandOutput extends ListPermissionsResponse, _ * // ], * // }, * // ], + * // ExpressionName: "STRING_VALUE", + * // }, + * // LFTagExpression: { // LFTagExpressionResource + * // CatalogId: "STRING_VALUE", + * // Name: "STRING_VALUE", // required * // }, * // }, * // Permissions: [ // PermissionList - * // "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION", + * // "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION" || "CREATE_LF_TAG_EXPRESSION", * // ], * // PermissionsWithGrantOption: [ - * // "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION", + * // "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION" || "CREATE_LF_TAG_EXPRESSION", * // ], * // AdditionalDetails: { // DetailsMap * // ResourceShare: [ // ResourceShareList diff --git a/clients/client-lakeformation/src/commands/PutDataLakeSettingsCommand.ts b/clients/client-lakeformation/src/commands/PutDataLakeSettingsCommand.ts index f00c9c99c35e..9e270833d8ea 100644 --- a/clients/client-lakeformation/src/commands/PutDataLakeSettingsCommand.ts +++ b/clients/client-lakeformation/src/commands/PutDataLakeSettingsCommand.ts @@ -55,7 +55,7 @@ export interface PutDataLakeSettingsCommandOutput extends PutDataLakeSettingsRes * DataLakePrincipalIdentifier: "STRING_VALUE", * }, * Permissions: [ // PermissionList - * "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION", + * "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION" || "CREATE_LF_TAG_EXPRESSION", * ], * }, * ], @@ -65,7 +65,7 @@ export interface PutDataLakeSettingsCommandOutput extends PutDataLakeSettingsRes * DataLakePrincipalIdentifier: "STRING_VALUE", * }, * Permissions: [ - * "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION", + * "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION" || "CREATE_LF_TAG_EXPRESSION", * ], * }, * ], diff --git a/clients/client-lakeformation/src/commands/RegisterResourceCommand.ts b/clients/client-lakeformation/src/commands/RegisterResourceCommand.ts index 1e5a35729a97..8ee7e4b5db3f 100644 --- a/clients/client-lakeformation/src/commands/RegisterResourceCommand.ts +++ b/clients/client-lakeformation/src/commands/RegisterResourceCommand.ts @@ -32,7 +32,7 @@ export interface RegisterResourceCommandOutput extends RegisterResourceResponse, *

To add or update data, Lake Formation needs read/write access to the chosen Amazon S3 path. Choose a role that you know has permission to do this, or choose the AWSServiceRoleForLakeFormationDataAccess service-linked role. When you register the first Amazon S3 path, the service-linked role and a new inline policy are created on your behalf. Lake Formation adds the first path to the inline policy and attaches it to the service-linked role. When you register subsequent paths, Lake Formation adds the path to the existing policy.

*

The following request registers a new location and gives Lake Formation permission to use the service-linked role to access that location.

*

- * ResourceArn = arn:aws:s3:::my-bucket + * ResourceArn = arn:aws:s3:::my-bucket/ * UseServiceLinkedRole = true *

*

If UseServiceLinkedRole is not set to true, you must provide or set the RoleArn:

diff --git a/clients/client-lakeformation/src/commands/RemoveLFTagsFromResourceCommand.ts b/clients/client-lakeformation/src/commands/RemoveLFTagsFromResourceCommand.ts index 57cd56336965..e8f664e81f22 100644 --- a/clients/client-lakeformation/src/commands/RemoveLFTagsFromResourceCommand.ts +++ b/clients/client-lakeformation/src/commands/RemoveLFTagsFromResourceCommand.ts @@ -82,7 +82,7 @@ export interface RemoveLFTagsFromResourceCommandOutput extends RemoveLFTagsFromR * LFTagPolicy: { // LFTagPolicyResource * CatalogId: "STRING_VALUE", * ResourceType: "DATABASE" || "TABLE", // required - * Expression: [ // Expression // required + * Expression: [ // Expression * { // LFTag * TagKey: "STRING_VALUE", // required * TagValues: [ // required @@ -90,6 +90,11 @@ export interface RemoveLFTagsFromResourceCommandOutput extends RemoveLFTagsFromR * ], * }, * ], + * ExpressionName: "STRING_VALUE", + * }, + * LFTagExpression: { // LFTagExpressionResource + * CatalogId: "STRING_VALUE", + * Name: "STRING_VALUE", // required * }, * }, * LFTags: [ // LFTagsList // required diff --git a/clients/client-lakeformation/src/commands/RevokePermissionsCommand.ts b/clients/client-lakeformation/src/commands/RevokePermissionsCommand.ts index 0fa65f19bca9..8bf300594fb8 100644 --- a/clients/client-lakeformation/src/commands/RevokePermissionsCommand.ts +++ b/clients/client-lakeformation/src/commands/RevokePermissionsCommand.ts @@ -85,7 +85,7 @@ export interface RevokePermissionsCommandOutput extends RevokePermissionsRespons * LFTagPolicy: { // LFTagPolicyResource * CatalogId: "STRING_VALUE", * ResourceType: "DATABASE" || "TABLE", // required - * Expression: [ // Expression // required + * Expression: [ // Expression * { // LFTag * TagKey: "STRING_VALUE", // required * TagValues: [ // required @@ -93,13 +93,18 @@ export interface RevokePermissionsCommandOutput extends RevokePermissionsRespons * ], * }, * ], + * ExpressionName: "STRING_VALUE", + * }, + * LFTagExpression: { // LFTagExpressionResource + * CatalogId: "STRING_VALUE", + * Name: "STRING_VALUE", // required * }, * }, * Permissions: [ // PermissionList // required - * "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION", + * "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION" || "CREATE_LF_TAG_EXPRESSION", * ], * PermissionsWithGrantOption: [ - * "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION", + * "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION" || "CREATE_LF_TAG_EXPRESSION", * ], * }; * const command = new RevokePermissionsCommand(input); diff --git a/clients/client-lakeformation/src/commands/UpdateLFTagExpressionCommand.ts b/clients/client-lakeformation/src/commands/UpdateLFTagExpressionCommand.ts new file mode 100644 index 000000000000..f1d88f96ba41 --- /dev/null +++ b/clients/client-lakeformation/src/commands/UpdateLFTagExpressionCommand.ts @@ -0,0 +1,119 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { LakeFormationClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../LakeFormationClient"; +import { UpdateLFTagExpressionRequest, UpdateLFTagExpressionResponse } from "../models/models_0"; +import { de_UpdateLFTagExpressionCommand, se_UpdateLFTagExpressionCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link UpdateLFTagExpressionCommand}. + */ +export interface UpdateLFTagExpressionCommandInput extends UpdateLFTagExpressionRequest {} +/** + * @public + * + * The output of {@link UpdateLFTagExpressionCommand}. + */ +export interface UpdateLFTagExpressionCommandOutput extends UpdateLFTagExpressionResponse, __MetadataBearer {} + +/** + *

Updates the name of the LF-Tag expression to the new description and expression body provided. + * Updating a LF-Tag expression immediately changes the permission boundaries of all existing LFTagPolicy permission grants that reference the given LF-Tag expression.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { LakeFormationClient, UpdateLFTagExpressionCommand } from "@aws-sdk/client-lakeformation"; // ES Modules import + * // const { LakeFormationClient, UpdateLFTagExpressionCommand } = require("@aws-sdk/client-lakeformation"); // CommonJS import + * const client = new LakeFormationClient(config); + * const input = { // UpdateLFTagExpressionRequest + * 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 UpdateLFTagExpressionCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param UpdateLFTagExpressionCommandInput - {@link UpdateLFTagExpressionCommandInput} + * @returns {@link UpdateLFTagExpressionCommandOutput} + * @see {@link UpdateLFTagExpressionCommandInput} for command's `input` shape. + * @see {@link UpdateLFTagExpressionCommandOutput} for command's `response` shape. + * @see {@link LakeFormationClientResolvedConfig | config} for LakeFormationClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

Access to a resource was denied.

+ * + * @throws {@link EntityNotFoundException} (client fault) + *

A specified entity does not exist.

+ * + * @throws {@link InternalServiceException} (server fault) + *

An internal service error occurred.

+ * + * @throws {@link InvalidInputException} (client fault) + *

The input provided was not valid.

+ * + * @throws {@link OperationTimeoutException} (client fault) + *

The operation timed out.

+ * + * @throws {@link ResourceNumberLimitExceededException} (client fault) + *

A resource numerical limit was exceeded.

+ * + * @throws {@link LakeFormationServiceException} + *

Base exception class for all service exceptions from LakeFormation service.

+ * + * @public + */ +export class UpdateLFTagExpressionCommand extends $Command + .classBuilder< + UpdateLFTagExpressionCommandInput, + UpdateLFTagExpressionCommandOutput, + LakeFormationClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: LakeFormationClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSLakeFormation", "UpdateLFTagExpression", {}) + .n("LakeFormationClient", "UpdateLFTagExpressionCommand") + .f(void 0, void 0) + .ser(se_UpdateLFTagExpressionCommand) + .de(de_UpdateLFTagExpressionCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: UpdateLFTagExpressionRequest; + output: {}; + }; + sdk: { + input: UpdateLFTagExpressionCommandInput; + output: UpdateLFTagExpressionCommandOutput; + }; + }; +} diff --git a/clients/client-lakeformation/src/commands/index.ts b/clients/client-lakeformation/src/commands/index.ts index cbbc8059415b..c74525353f71 100644 --- a/clients/client-lakeformation/src/commands/index.ts +++ b/clients/client-lakeformation/src/commands/index.ts @@ -7,10 +7,12 @@ export * from "./CancelTransactionCommand"; export * from "./CommitTransactionCommand"; export * from "./CreateDataCellsFilterCommand"; export * from "./CreateLFTagCommand"; +export * from "./CreateLFTagExpressionCommand"; export * from "./CreateLakeFormationIdentityCenterConfigurationCommand"; export * from "./CreateLakeFormationOptInCommand"; export * from "./DeleteDataCellsFilterCommand"; export * from "./DeleteLFTagCommand"; +export * from "./DeleteLFTagExpressionCommand"; export * from "./DeleteLakeFormationIdentityCenterConfigurationCommand"; export * from "./DeleteLakeFormationOptInCommand"; export * from "./DeleteObjectsOnCancelCommand"; @@ -24,6 +26,7 @@ export * from "./GetDataLakePrincipalCommand"; export * from "./GetDataLakeSettingsCommand"; export * from "./GetEffectivePermissionsForPathCommand"; export * from "./GetLFTagCommand"; +export * from "./GetLFTagExpressionCommand"; export * from "./GetQueryStateCommand"; export * from "./GetQueryStatisticsCommand"; export * from "./GetResourceLFTagsCommand"; @@ -34,6 +37,7 @@ export * from "./GetWorkUnitResultsCommand"; export * from "./GetWorkUnitsCommand"; export * from "./GrantPermissionsCommand"; export * from "./ListDataCellsFilterCommand"; +export * from "./ListLFTagExpressionsCommand"; export * from "./ListLFTagsCommand"; export * from "./ListLakeFormationOptInsCommand"; export * from "./ListPermissionsCommand"; @@ -50,6 +54,7 @@ export * from "./StartQueryPlanningCommand"; export * from "./StartTransactionCommand"; export * from "./UpdateDataCellsFilterCommand"; export * from "./UpdateLFTagCommand"; +export * from "./UpdateLFTagExpressionCommand"; export * from "./UpdateLakeFormationIdentityCenterConfigurationCommand"; export * from "./UpdateResourceCommand"; export * from "./UpdateTableObjectsCommand"; diff --git a/clients/client-lakeformation/src/models/models_0.ts b/clients/client-lakeformation/src/models/models_0.ts index afbc52bf206b..45cad1cfdf8d 100644 --- a/clients/client-lakeformation/src/models/models_0.ts +++ b/clients/client-lakeformation/src/models/models_0.ts @@ -151,6 +151,24 @@ export interface LFTagKeyResource { TagValues: string[] | undefined; } +/** + *

A structure containing a LF-Tag expression (keys and values).

+ * @public + */ +export interface LFTagExpressionResource { + /** + *

The identifier for the Data Catalog. By default, the account ID.

+ * @public + */ + CatalogId?: string; + + /** + *

The name of the LF-Tag expression to grant permissions on.

+ * @public + */ + Name: string | undefined; +} + /** *

A structure that allows an admin to grant user permissions on certain conditions. For example, granting a role access to all columns that do not have the LF-tag 'PII' in tables that have the LF-tag 'Prod'.

* @public @@ -186,7 +204,7 @@ export const ResourceType = { export type ResourceType = (typeof ResourceType)[keyof typeof ResourceType]; /** - *

A structure containing a list of LF-tag conditions that apply to a resource's LF-tag policy.

+ *

A structure containing a list of LF-tag conditions or saved LF-Tag expressions that apply to a resource's LF-tag policy.

* @public */ export interface LFTagPolicyResource { @@ -203,10 +221,18 @@ export interface LFTagPolicyResource { ResourceType: ResourceType | undefined; /** - *

A list of LF-tag conditions that apply to the resource's LF-tag policy.

+ *

A list of LF-tag conditions or a saved expression that apply to the resource's LF-tag policy.

* @public */ - Expression: LFTag[] | undefined; + Expression?: LFTag[]; + + /** + *

If provided, permissions are granted to the Data Catalog resources whose assigned LF-Tags + * match the expression body of the saved expression under the provided + * ExpressionName.

+ * @public + */ + ExpressionName?: string; } /** @@ -343,10 +369,16 @@ export interface Resource { LFTag?: LFTagKeyResource; /** - *

A list of LF-tag conditions that define a resource's LF-tag policy.

+ *

A list of LF-tag conditions or saved LF-Tag expressions that define a resource's LF-tag policy.

* @public */ LFTagPolicy?: LFTagPolicyResource; + + /** + *

LF-Tag expression resource. A logical expression composed of one or more LF-Tag key:value pairs.

+ * @public + */ + LFTagExpression?: LFTagExpressionResource; } /** @@ -706,6 +738,7 @@ export const Permission = { ASSOCIATE: "ASSOCIATE", CREATE_DATABASE: "CREATE_DATABASE", CREATE_LF_TAG: "CREATE_LF_TAG", + CREATE_LF_TAG_EXPRESSION: "CREATE_LF_TAG_EXPRESSION", CREATE_TABLE: "CREATE_TABLE", DATA_LOCATION_ACCESS: "DATA_LOCATION_ACCESS", DELETE: "DELETE", @@ -1226,6 +1259,40 @@ export interface CreateLFTagRequest { */ export interface CreateLFTagResponse {} +/** + * @public + */ +export interface CreateLFTagExpressionRequest { + /** + *

A name for the expression.

+ * @public + */ + Name: string | undefined; + + /** + *

A description with information about the LF-Tag expression.

+ * @public + */ + Description?: string; + + /** + *

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.

+ * @public + */ + CatalogId?: string; + + /** + *

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

+ * @public + */ + Expression: LFTag[] | undefined; +} + +/** + * @public + */ +export interface CreateLFTagExpressionResponse {} + /** * @public */ @@ -1323,6 +1390,28 @@ export interface DeleteLFTagRequest { */ export interface DeleteLFTagResponse {} +/** + * @public + */ +export interface DeleteLFTagExpressionRequest { + /** + *

The name for the LF-Tag expression.

+ * @public + */ + Name: string | undefined; + + /** + *

The identifier for the Data Catalog. By default, the account ID in which the LF-Tag expression is saved.

+ * @public + */ + CatalogId?: string; +} + +/** + * @public + */ +export interface DeleteLFTagExpressionResponse {} + /** *

An object that defines an Amazon S3 object to be deleted if a transaction cancels, provided that * VirtualPut was called before writing the object.

@@ -1926,6 +2015,52 @@ export interface GetLFTagResponse { TagValues?: string[]; } +/** + * @public + */ +export interface GetLFTagExpressionRequest { + /** + *

The name for the LF-Tag expression

+ * @public + */ + Name: string | undefined; + + /** + *

The identifier for the Data Catalog. By default, the account ID.

+ * @public + */ + CatalogId?: string; +} + +/** + * @public + */ +export interface GetLFTagExpressionResponse { + /** + *

The name for the LF-Tag expression.

+ * @public + */ + Name?: string; + + /** + *

The description with information about the LF-Tag expression.

+ * @public + */ + Description?: string; + + /** + *

The identifier for the Data Catalog. By default, the account ID in which the LF-Tag expression is saved.

+ * @public + */ + CatalogId?: string; + + /** + *

The body of the LF-Tag expression. It is composed of one or more LF-Tag key-value pairs.

+ * @public + */ + Expression?: LFTag[]; +} + /** * @public */ @@ -2901,6 +3036,76 @@ export interface ListLakeFormationOptInsResponse { NextToken?: string; } +/** + * @public + */ +export interface ListLFTagExpressionsRequest { + /** + *

The identifier for the Data Catalog. By default, the account ID.

+ * @public + */ + CatalogId?: string; + + /** + *

The maximum number of results to return.

+ * @public + */ + MaxResults?: number; + + /** + *

A continuation token, if this is not the first call to retrieve this list.

+ * @public + */ + NextToken?: string; +} + +/** + *

A structure consists LF-Tag expression name and catalog ID.

+ * @public + */ +export interface LFTagExpression { + /** + *

The name for saved the LF-Tag expression.

+ * @public + */ + Name?: string; + + /** + *

A structure that contains information about the LF-Tag expression.

+ * @public + */ + Description?: string; + + /** + *

The identifier for the Data Catalog. By default, the account ID.

+ * @public + */ + CatalogId?: string; + + /** + *

A logical expression composed of one or more LF-Tags.

+ * @public + */ + Expression?: LFTag[]; +} + +/** + * @public + */ +export interface ListLFTagExpressionsResponse { + /** + *

Logical expressions composed of one more LF-Tag key-value pairs.

+ * @public + */ + LFTagExpressions?: LFTagExpression[]; + + /** + *

A continuation token, if this is not the first call to retrieve this list.

+ * @public + */ + NextToken?: string; +} + /** * @public * @enum @@ -2969,6 +3174,7 @@ export const DataLakeResourceType = { CATALOG: "CATALOG", DATABASE: "DATABASE", DATA_LOCATION: "DATA_LOCATION", + LF_NAMED_TAG_EXPRESSION: "LF_NAMED_TAG_EXPRESSION", LF_TAG: "LF_TAG", LF_TAG_POLICY: "LF_TAG_POLICY", LF_TAG_POLICY_DATABASE: "LF_TAG_POLICY_DATABASE", @@ -3797,6 +4003,40 @@ export interface UpdateLFTagRequest { */ export interface UpdateLFTagResponse {} +/** + * @public + */ +export interface UpdateLFTagExpressionRequest { + /** + *

The name for the LF-Tag expression.

+ * @public + */ + Name: string | undefined; + + /** + *

The description with information about the saved LF-Tag expression.

+ * @public + */ + Description?: string; + + /** + *

The identifier for the Data Catalog. By default, the account ID.

+ * @public + */ + CatalogId?: string; + + /** + *

The LF-Tag expression body composed of one more LF-Tag key-value pairs.

+ * @public + */ + Expression: LFTag[] | undefined; +} + +/** + * @public + */ +export interface UpdateLFTagExpressionResponse {} + /** * @public */ @@ -3938,7 +4178,7 @@ export interface UpdateTableStorageOptimizerRequest { TableName: string | undefined; /** - *

Name of the table for which to enable the storage optimizer.

+ *

Name of the configuration for the storage optimizer.

* @public */ StorageOptimizerConfig: Partial>> | undefined; diff --git a/clients/client-lakeformation/src/pagination/ListLFTagExpressionsPaginator.ts b/clients/client-lakeformation/src/pagination/ListLFTagExpressionsPaginator.ts new file mode 100644 index 000000000000..74301a3e93f9 --- /dev/null +++ b/clients/client-lakeformation/src/pagination/ListLFTagExpressionsPaginator.ts @@ -0,0 +1,24 @@ +// smithy-typescript generated code +import { createPaginator } from "@smithy/core"; +import { Paginator } from "@smithy/types"; + +import { + ListLFTagExpressionsCommand, + ListLFTagExpressionsCommandInput, + ListLFTagExpressionsCommandOutput, +} from "../commands/ListLFTagExpressionsCommand"; +import { LakeFormationClient } from "../LakeFormationClient"; +import { LakeFormationPaginationConfiguration } from "./Interfaces"; + +/** + * @public + */ +export const paginateListLFTagExpressions: ( + config: LakeFormationPaginationConfiguration, + input: ListLFTagExpressionsCommandInput, + ...rest: any[] +) => Paginator = createPaginator< + LakeFormationPaginationConfiguration, + ListLFTagExpressionsCommandInput, + ListLFTagExpressionsCommandOutput +>(LakeFormationClient, ListLFTagExpressionsCommand, "NextToken", "NextToken", "MaxResults"); diff --git a/clients/client-lakeformation/src/pagination/index.ts b/clients/client-lakeformation/src/pagination/index.ts index fe8441ac388a..4622e0f27a23 100644 --- a/clients/client-lakeformation/src/pagination/index.ts +++ b/clients/client-lakeformation/src/pagination/index.ts @@ -6,6 +6,7 @@ export * from "./GetWorkUnitsPaginator"; // smithy-typescript generated code export * from "./Interfaces"; export * from "./ListDataCellsFilterPaginator"; +export * from "./ListLFTagExpressionsPaginator"; export * from "./ListLFTagsPaginator"; export * from "./ListLakeFormationOptInsPaginator"; export * from "./ListPermissionsPaginator"; diff --git a/clients/client-lakeformation/src/protocols/Aws_restJson1.ts b/clients/client-lakeformation/src/protocols/Aws_restJson1.ts index 571b3bd4548b..3a93c93eb51c 100644 --- a/clients/client-lakeformation/src/protocols/Aws_restJson1.ts +++ b/clients/client-lakeformation/src/protocols/Aws_restJson1.ts @@ -59,6 +59,10 @@ import { CreateLakeFormationOptInCommandOutput, } from "../commands/CreateLakeFormationOptInCommand"; import { CreateLFTagCommandInput, CreateLFTagCommandOutput } from "../commands/CreateLFTagCommand"; +import { + CreateLFTagExpressionCommandInput, + CreateLFTagExpressionCommandOutput, +} from "../commands/CreateLFTagExpressionCommand"; import { DeleteDataCellsFilterCommandInput, DeleteDataCellsFilterCommandOutput, @@ -72,6 +76,10 @@ import { DeleteLakeFormationOptInCommandOutput, } from "../commands/DeleteLakeFormationOptInCommand"; import { DeleteLFTagCommandInput, DeleteLFTagCommandOutput } from "../commands/DeleteLFTagCommand"; +import { + DeleteLFTagExpressionCommandInput, + DeleteLFTagExpressionCommandOutput, +} from "../commands/DeleteLFTagExpressionCommand"; import { DeleteObjectsOnCancelCommandInput, DeleteObjectsOnCancelCommandOutput, @@ -101,6 +109,7 @@ import { GetEffectivePermissionsForPathCommandOutput, } from "../commands/GetEffectivePermissionsForPathCommand"; import { GetLFTagCommandInput, GetLFTagCommandOutput } from "../commands/GetLFTagCommand"; +import { GetLFTagExpressionCommandInput, GetLFTagExpressionCommandOutput } from "../commands/GetLFTagExpressionCommand"; import { GetQueryStateCommandInput, GetQueryStateCommandOutput } from "../commands/GetQueryStateCommand"; import { GetQueryStatisticsCommandInput, GetQueryStatisticsCommandOutput } from "../commands/GetQueryStatisticsCommand"; import { GetResourceLFTagsCommandInput, GetResourceLFTagsCommandOutput } from "../commands/GetResourceLFTagsCommand"; @@ -124,6 +133,10 @@ import { ListLakeFormationOptInsCommandInput, ListLakeFormationOptInsCommandOutput, } from "../commands/ListLakeFormationOptInsCommand"; +import { + ListLFTagExpressionsCommandInput, + ListLFTagExpressionsCommandOutput, +} from "../commands/ListLFTagExpressionsCommand"; import { ListLFTagsCommandInput, ListLFTagsCommandOutput } from "../commands/ListLFTagsCommand"; import { ListPermissionsCommandInput, ListPermissionsCommandOutput } from "../commands/ListPermissionsCommand"; import { ListResourcesCommandInput, ListResourcesCommandOutput } from "../commands/ListResourcesCommand"; @@ -161,6 +174,10 @@ import { UpdateLakeFormationIdentityCenterConfigurationCommandOutput, } from "../commands/UpdateLakeFormationIdentityCenterConfigurationCommand"; import { UpdateLFTagCommandInput, UpdateLFTagCommandOutput } from "../commands/UpdateLFTagCommand"; +import { + UpdateLFTagExpressionCommandInput, + UpdateLFTagExpressionCommandOutput, +} from "../commands/UpdateLFTagExpressionCommand"; import { UpdateResourceCommandInput, UpdateResourceCommandOutput } from "../commands/UpdateResourceCommand"; import { UpdateTableObjectsCommandInput, UpdateTableObjectsCommandOutput } from "../commands/UpdateTableObjectsCommand"; import { @@ -194,6 +211,7 @@ import { InvalidInputException, LakeFormationOptInsInfo, LFTag, + LFTagExpressionResource, LFTagKeyResource, LFTagPair, LFTagPolicyResource, @@ -459,6 +477,31 @@ export const se_CreateLFTagCommand = async ( return b.build(); }; +/** + * serializeAws_restJson1CreateLFTagExpressionCommand + */ +export const se_CreateLFTagExpressionCommand = async ( + input: CreateLFTagExpressionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = { + "content-type": "application/json", + }; + b.bp("/CreateLFTagExpression"); + let body: any; + body = JSON.stringify( + take(input, { + CatalogId: [], + Description: [], + Expression: (_) => _json(_), + Name: [], + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); +}; + /** * serializeAws_restJson1DeleteDataCellsFilterCommand */ @@ -552,6 +595,29 @@ export const se_DeleteLFTagCommand = async ( return b.build(); }; +/** + * serializeAws_restJson1DeleteLFTagExpressionCommand + */ +export const se_DeleteLFTagExpressionCommand = async ( + input: DeleteLFTagExpressionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = { + "content-type": "application/json", + }; + b.bp("/DeleteLFTagExpression"); + let body: any; + body = JSON.stringify( + take(input, { + CatalogId: [], + Name: [], + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); +}; + /** * serializeAws_restJson1DeleteObjectsOnCancelCommand */ @@ -798,6 +864,29 @@ export const se_GetLFTagCommand = async ( return b.build(); }; +/** + * serializeAws_restJson1GetLFTagExpressionCommand + */ +export const se_GetLFTagExpressionCommand = async ( + input: GetLFTagExpressionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = { + "content-type": "application/json", + }; + b.bp("/GetLFTagExpression"); + let body: any; + body = JSON.stringify( + take(input, { + CatalogId: [], + Name: [], + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); +}; + /** * serializeAws_restJson1GetQueryStateCommand */ @@ -1105,6 +1194,30 @@ export const se_ListLakeFormationOptInsCommand = async ( return b.build(); }; +/** + * serializeAws_restJson1ListLFTagExpressionsCommand + */ +export const se_ListLFTagExpressionsCommand = async ( + input: ListLFTagExpressionsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = { + "content-type": "application/json", + }; + b.bp("/ListLFTagExpressions"); + let body: any; + body = JSON.stringify( + take(input, { + CatalogId: [], + MaxResults: [], + NextToken: [], + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); +}; + /** * serializeAws_restJson1ListLFTagsCommand */ @@ -1508,6 +1621,31 @@ export const se_UpdateLFTagCommand = async ( return b.build(); }; +/** + * serializeAws_restJson1UpdateLFTagExpressionCommand + */ +export const se_UpdateLFTagExpressionCommand = async ( + input: UpdateLFTagExpressionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = { + "content-type": "application/json", + }; + b.bp("/UpdateLFTagExpression"); + let body: any; + body = JSON.stringify( + take(input, { + CatalogId: [], + Description: [], + Expression: (_) => _json(_), + Name: [], + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); +}; + /** * serializeAws_restJson1UpdateResourceCommand */ @@ -1781,6 +1919,23 @@ export const de_CreateLFTagCommand = async ( return contents; }; +/** + * deserializeAws_restJson1CreateLFTagExpressionCommand + */ +export const de_CreateLFTagExpressionCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + /** * deserializeAws_restJson1DeleteDataCellsFilterCommand */ @@ -1849,6 +2004,23 @@ export const de_DeleteLFTagCommand = async ( return contents; }; +/** + * deserializeAws_restJson1DeleteLFTagExpressionCommand + */ +export const de_DeleteLFTagExpressionCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + /** * deserializeAws_restJson1DeleteObjectsOnCancelCommand */ @@ -2076,6 +2248,30 @@ export const de_GetLFTagCommand = async ( return contents; }; +/** + * deserializeAws_restJson1GetLFTagExpressionCommand + */ +export const de_GetLFTagExpressionCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + CatalogId: __expectString, + Description: __expectString, + Expression: _json, + Name: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + /** * deserializeAws_restJson1GetQueryStateCommand */ @@ -2318,6 +2514,28 @@ export const de_ListLakeFormationOptInsCommand = async ( return contents; }; +/** + * deserializeAws_restJson1ListLFTagExpressionsCommand + */ +export const de_ListLFTagExpressionsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + LFTagExpressions: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + /** * deserializeAws_restJson1ListLFTagsCommand */ @@ -2637,6 +2855,23 @@ export const de_UpdateLFTagCommand = async ( return contents; }; +/** + * deserializeAws_restJson1UpdateLFTagExpressionCommand + */ +export const de_UpdateLFTagExpressionCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + /** * deserializeAws_restJson1UpdateResourceCommand */ @@ -3167,6 +3402,8 @@ const de_WorkUnitsNotReadyYetExceptionRes = async ( // se_LFTag omitted. +// se_LFTagExpressionResource omitted. + // se_LFTagKeyResource omitted. // se_LFTagPair omitted. @@ -3327,6 +3564,12 @@ const de_LakeFormationOptInsInfoList = (output: any, context: __SerdeContext): L // de_LFTagErrors omitted. +// de_LFTagExpression omitted. + +// de_LFTagExpressionResource omitted. + +// de_LFTagExpressionsList omitted. + // de_LFTagKeyResource omitted. // de_LFTagPair omitted. diff --git a/codegen/sdk-codegen/aws-models/lakeformation.json b/codegen/sdk-codegen/aws-models/lakeformation.json index a8ab233a56a0..a80e79d49610 100644 --- a/codegen/sdk-codegen/aws-models/lakeformation.json +++ b/codegen/sdk-codegen/aws-models/lakeformation.json @@ -63,6 +63,9 @@ { "target": "com.amazonaws.lakeformation#CreateLFTag" }, + { + "target": "com.amazonaws.lakeformation#CreateLFTagExpression" + }, { "target": "com.amazonaws.lakeformation#DeleteDataCellsFilter" }, @@ -75,6 +78,9 @@ { "target": "com.amazonaws.lakeformation#DeleteLFTag" }, + { + "target": "com.amazonaws.lakeformation#DeleteLFTagExpression" + }, { "target": "com.amazonaws.lakeformation#DeleteObjectsOnCancel" }, @@ -108,6 +114,9 @@ { "target": "com.amazonaws.lakeformation#GetLFTag" }, + { + "target": "com.amazonaws.lakeformation#GetLFTagExpression" + }, { "target": "com.amazonaws.lakeformation#GetQueryState" }, @@ -141,6 +150,9 @@ { "target": "com.amazonaws.lakeformation#ListLakeFormationOptIns" }, + { + "target": "com.amazonaws.lakeformation#ListLFTagExpressions" + }, { "target": "com.amazonaws.lakeformation#ListLFTags" }, @@ -189,6 +201,9 @@ { "target": "com.amazonaws.lakeformation#UpdateLFTag" }, + { + "target": "com.amazonaws.lakeformation#UpdateLFTagExpression" + }, { "target": "com.amazonaws.lakeformation#UpdateResource" }, @@ -2085,6 +2100,84 @@ } } }, + "com.amazonaws.lakeformation#CreateLFTagExpression": { + "type": "operation", + "input": { + "target": "com.amazonaws.lakeformation#CreateLFTagExpressionRequest" + }, + "output": { + "target": "com.amazonaws.lakeformation#CreateLFTagExpressionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.lakeformation#AccessDeniedException" + }, + { + "target": "com.amazonaws.lakeformation#EntityNotFoundException" + }, + { + "target": "com.amazonaws.lakeformation#InternalServiceException" + }, + { + "target": "com.amazonaws.lakeformation#InvalidInputException" + }, + { + "target": "com.amazonaws.lakeformation#OperationTimeoutException" + }, + { + "target": "com.amazonaws.lakeformation#ResourceNumberLimitExceededException" + } + ], + "traits": { + "smithy.api#documentation": "

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

\n

\n CREATE_LF_TAG_EXPRESSION on the root catalog resource.

\n

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

", + "smithy.api#http": { + "method": "POST", + "uri": "/CreateLFTagExpression", + "code": 200 + } + } + }, + "com.amazonaws.lakeformation#CreateLFTagExpressionRequest": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.lakeformation#NameString", + "traits": { + "smithy.api#documentation": "

A name for the expression.

", + "smithy.api#required": {} + } + }, + "Description": { + "target": "com.amazonaws.lakeformation#DescriptionString", + "traits": { + "smithy.api#documentation": "

A description with information about the LF-Tag expression.

" + } + }, + "CatalogId": { + "target": "com.amazonaws.lakeformation#CatalogIdString", + "traits": { + "smithy.api#documentation": "

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.

" + } + }, + "Expression": { + "target": "com.amazonaws.lakeformation#Expression", + "traits": { + "smithy.api#documentation": "

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

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.lakeformation#CreateLFTagExpressionResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.lakeformation#CreateLFTagRequest": { "type": "structure", "members": { @@ -2459,6 +2552,12 @@ "traits": { "smithy.api#enumValue": "LF_TAG_POLICY_TABLE" } + }, + "LF_NAMED_TAG_EXPRESSION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LF_NAMED_TAG_EXPRESSION" + } } } }, @@ -2691,6 +2790,68 @@ } } }, + "com.amazonaws.lakeformation#DeleteLFTagExpression": { + "type": "operation", + "input": { + "target": "com.amazonaws.lakeformation#DeleteLFTagExpressionRequest" + }, + "output": { + "target": "com.amazonaws.lakeformation#DeleteLFTagExpressionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.lakeformation#AccessDeniedException" + }, + { + "target": "com.amazonaws.lakeformation#EntityNotFoundException" + }, + { + "target": "com.amazonaws.lakeformation#InternalServiceException" + }, + { + "target": "com.amazonaws.lakeformation#InvalidInputException" + }, + { + "target": "com.amazonaws.lakeformation#OperationTimeoutException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes the LF-Tag expression. The caller must be a data lake admin or have DROP permissions on the LF-Tag expression.\n Deleting a LF-Tag expression will also delete all LFTagPolicy permissions referencing the LF-Tag expression.

", + "smithy.api#http": { + "method": "POST", + "uri": "/DeleteLFTagExpression", + "code": 200 + } + } + }, + "com.amazonaws.lakeformation#DeleteLFTagExpressionRequest": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.lakeformation#NameString", + "traits": { + "smithy.api#documentation": "

The name for the LF-Tag expression.

", + "smithy.api#required": {} + } + }, + "CatalogId": { + "target": "com.amazonaws.lakeformation#CatalogIdString", + "traits": { + "smithy.api#documentation": "

The identifier for the Data Catalog. By default, the account ID in which the LF-Tag expression is saved.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.lakeformation#DeleteLFTagExpressionResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.lakeformation#DeleteLFTagRequest": { "type": "structure", "members": { @@ -3824,6 +3985,93 @@ } } }, + "com.amazonaws.lakeformation#GetLFTagExpression": { + "type": "operation", + "input": { + "target": "com.amazonaws.lakeformation#GetLFTagExpressionRequest" + }, + "output": { + "target": "com.amazonaws.lakeformation#GetLFTagExpressionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.lakeformation#AccessDeniedException" + }, + { + "target": "com.amazonaws.lakeformation#EntityNotFoundException" + }, + { + "target": "com.amazonaws.lakeformation#InternalServiceException" + }, + { + "target": "com.amazonaws.lakeformation#InvalidInputException" + }, + { + "target": "com.amazonaws.lakeformation#OperationTimeoutException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns the details about the LF-Tag expression. The caller must be a data lake admin or must have DESCRIBE permission on the LF-Tag expression resource.\n

", + "smithy.api#http": { + "method": "POST", + "uri": "/GetLFTagExpression", + "code": 200 + } + } + }, + "com.amazonaws.lakeformation#GetLFTagExpressionRequest": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.lakeformation#NameString", + "traits": { + "smithy.api#documentation": "

The name for the LF-Tag expression

", + "smithy.api#required": {} + } + }, + "CatalogId": { + "target": "com.amazonaws.lakeformation#CatalogIdString", + "traits": { + "smithy.api#documentation": "

The identifier for the Data Catalog. By default, the account ID.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.lakeformation#GetLFTagExpressionResponse": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.lakeformation#NameString", + "traits": { + "smithy.api#documentation": "

The name for the LF-Tag expression.

" + } + }, + "Description": { + "target": "com.amazonaws.lakeformation#DescriptionString", + "traits": { + "smithy.api#documentation": "

The description with information about the LF-Tag expression.

" + } + }, + "CatalogId": { + "target": "com.amazonaws.lakeformation#CatalogIdString", + "traits": { + "smithy.api#documentation": "

The identifier for the Data Catalog. By default, the account ID in which the LF-Tag expression is saved.

" + } + }, + "Expression": { + "target": "com.amazonaws.lakeformation#Expression", + "traits": { + "smithy.api#documentation": "

The body of the LF-Tag expression. It is composed of one or more LF-Tag key-value pairs.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.lakeformation#GetLFTagRequest": { "type": "structure", "members": { @@ -4395,7 +4643,7 @@ } ], "traits": { - "smithy.api#documentation": "

Allows a caller in a secure environment to assume a role with permission to access Amazon S3. In order to vend such credentials, Lake Formation assumes the role associated with a registered location, for example an Amazon S3 bucket, with a scope down policy which restricts the access to a single prefix.

", + "smithy.api#documentation": "

Allows a caller in a secure environment to assume a role with permission to access Amazon S3. In order to vend such credentials, Lake Formation assumes the role associated with a registered location, for example an Amazon S3 bucket, with a scope down policy which restricts the access to a single prefix.

\n

To call this API, the role that the service assumes must have lakeformation:GetDataAccess permission on the resource.

", "smithy.api#http": { "method": "POST", "uri": "/GetTemporaryGlueTableCredentials", @@ -4920,6 +5168,65 @@ "target": "com.amazonaws.lakeformation#LFTagError" } }, + "com.amazonaws.lakeformation#LFTagExpression": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.lakeformation#NameString", + "traits": { + "smithy.api#documentation": "

The name for saved the LF-Tag expression.

" + } + }, + "Description": { + "target": "com.amazonaws.lakeformation#DescriptionString", + "traits": { + "smithy.api#documentation": "

A structure that contains information about the LF-Tag expression.

" + } + }, + "CatalogId": { + "target": "com.amazonaws.lakeformation#CatalogIdString", + "traits": { + "smithy.api#documentation": "

The identifier for the Data Catalog. By default, the account ID.

" + } + }, + "Expression": { + "target": "com.amazonaws.lakeformation#Expression", + "traits": { + "smithy.api#documentation": "

A logical expression composed of one or more LF-Tags.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A structure consists LF-Tag expression name and catalog ID.

" + } + }, + "com.amazonaws.lakeformation#LFTagExpressionResource": { + "type": "structure", + "members": { + "CatalogId": { + "target": "com.amazonaws.lakeformation#CatalogIdString", + "traits": { + "smithy.api#documentation": "

The identifier for the Data Catalog. By default, the account ID.

" + } + }, + "Name": { + "target": "com.amazonaws.lakeformation#NameString", + "traits": { + "smithy.api#documentation": "

The name of the LF-Tag expression to grant permissions on.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

A structure containing a LF-Tag expression (keys and values).

" + } + }, + "com.amazonaws.lakeformation#LFTagExpressionsList": { + "type": "list", + "member": { + "target": "com.amazonaws.lakeformation#LFTagExpression" + } + }, "com.amazonaws.lakeformation#LFTagKey": { "type": "string", "traits": { @@ -5005,13 +5312,20 @@ "Expression": { "target": "com.amazonaws.lakeformation#Expression", "traits": { - "smithy.api#documentation": "

A list of LF-tag conditions that apply to the resource's LF-tag policy.

", - "smithy.api#required": {} + "smithy.api#addedDefault": {}, + "smithy.api#default": [], + "smithy.api#documentation": "

A list of LF-tag conditions or a saved expression that apply to the resource's LF-tag policy.

" + } + }, + "ExpressionName": { + "target": "com.amazonaws.lakeformation#NameString", + "traits": { + "smithy.api#documentation": "

If provided, permissions are granted to the Data Catalog resources whose assigned LF-Tags\n match the expression body of the saved expression under the provided\n ExpressionName.

" } } }, "traits": { - "smithy.api#documentation": "

A structure containing a list of LF-tag conditions that apply to a resource's LF-tag policy.

" + "smithy.api#documentation": "

A structure containing a list of LF-tag conditions or saved LF-Tag expressions that apply to a resource's LF-tag policy.

" } }, "com.amazonaws.lakeformation#LFTagValue": { @@ -5154,6 +5468,92 @@ "smithy.api#output": {} } }, + "com.amazonaws.lakeformation#ListLFTagExpressions": { + "type": "operation", + "input": { + "target": "com.amazonaws.lakeformation#ListLFTagExpressionsRequest" + }, + "output": { + "target": "com.amazonaws.lakeformation#ListLFTagExpressionsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.lakeformation#AccessDeniedException" + }, + { + "target": "com.amazonaws.lakeformation#EntityNotFoundException" + }, + { + "target": "com.amazonaws.lakeformation#InternalServiceException" + }, + { + "target": "com.amazonaws.lakeformation#InvalidInputException" + }, + { + "target": "com.amazonaws.lakeformation#OperationTimeoutException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns the LF-Tag expressions in caller’s account filtered based on caller's permissions. Data Lake and read only admins implicitly can see all tag expressions in their account, else caller needs DESCRIBE permissions on tag expression.

", + "smithy.api#http": { + "method": "POST", + "uri": "/ListLFTagExpressions", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "LFTagExpressions", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.lakeformation#ListLFTagExpressionsRequest": { + "type": "structure", + "members": { + "CatalogId": { + "target": "com.amazonaws.lakeformation#CatalogIdString", + "traits": { + "smithy.api#documentation": "

The identifier for the Data Catalog. By default, the account ID.

" + } + }, + "MaxResults": { + "target": "com.amazonaws.lakeformation#PageSize", + "traits": { + "smithy.api#documentation": "

The maximum number of results to return.

" + } + }, + "NextToken": { + "target": "com.amazonaws.lakeformation#Token", + "traits": { + "smithy.api#documentation": "

A continuation token, if this is not the first call to retrieve this list.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.lakeformation#ListLFTagExpressionsResponse": { + "type": "structure", + "members": { + "LFTagExpressions": { + "target": "com.amazonaws.lakeformation#LFTagExpressionsList", + "traits": { + "smithy.api#documentation": "

Logical expressions composed of one more LF-Tag key-value pairs.

" + } + }, + "NextToken": { + "target": "com.amazonaws.lakeformation#Token", + "traits": { + "smithy.api#documentation": "

A continuation token, if this is not the first call to retrieve this list.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.lakeformation#ListLFTags": { "type": "operation", "input": { @@ -5959,6 +6359,12 @@ "traits": { "smithy.api#enumValue": "GRANT_WITH_LF_TAG_EXPRESSION" } + }, + "CREATE_LF_TAG_EXPRESSION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATE_LF_TAG_EXPRESSION" + } } } }, @@ -6373,7 +6779,7 @@ } ], "traits": { - "smithy.api#documentation": "

Registers the resource as managed by the Data Catalog.

\n

To add or update data, Lake Formation needs read/write access to the chosen Amazon S3 path. Choose a role that you know has permission to do this, or choose the AWSServiceRoleForLakeFormationDataAccess service-linked role. When you register the first Amazon S3 path, the service-linked role and a new inline policy are created on your behalf. Lake Formation adds the first path to the inline policy and attaches it to the service-linked role. When you register subsequent paths, Lake Formation adds the path to the existing policy.

\n

The following request registers a new location and gives Lake Formation permission to use the service-linked role to access that location.

\n

\n ResourceArn = arn:aws:s3:::my-bucket\nUseServiceLinkedRole = true\n

\n

If UseServiceLinkedRole is not set to true, you must provide or set the RoleArn:

\n

\n arn:aws:iam::12345:role/my-data-access-role\n

", + "smithy.api#documentation": "

Registers the resource as managed by the Data Catalog.

\n

To add or update data, Lake Formation needs read/write access to the chosen Amazon S3 path. Choose a role that you know has permission to do this, or choose the AWSServiceRoleForLakeFormationDataAccess service-linked role. When you register the first Amazon S3 path, the service-linked role and a new inline policy are created on your behalf. Lake Formation adds the first path to the inline policy and attaches it to the service-linked role. When you register subsequent paths, Lake Formation adds the path to the existing policy.

\n

The following request registers a new location and gives Lake Formation permission to use the service-linked role to access that location.

\n

\n ResourceArn = arn:aws:s3:::my-bucket/\nUseServiceLinkedRole = true\n

\n

If UseServiceLinkedRole is not set to true, you must provide or set the RoleArn:

\n

\n arn:aws:iam::12345:role/my-data-access-role\n

", "smithy.api#http": { "method": "POST", "uri": "/RegisterResource", @@ -6557,7 +6963,13 @@ "LFTagPolicy": { "target": "com.amazonaws.lakeformation#LFTagPolicyResource", "traits": { - "smithy.api#documentation": "

A list of LF-tag conditions that define a resource's LF-tag policy.

" + "smithy.api#documentation": "

A list of LF-tag conditions or saved LF-Tag expressions that define a resource's LF-tag policy.

" + } + }, + "LFTagExpression": { + "target": "com.amazonaws.lakeformation#LFTagExpressionResource", + "traits": { + "smithy.api#documentation": "

LF-Tag expression resource. A logical expression composed of one or more LF-Tag key:value pairs.

" } } }, @@ -7765,6 +8177,84 @@ } } }, + "com.amazonaws.lakeformation#UpdateLFTagExpression": { + "type": "operation", + "input": { + "target": "com.amazonaws.lakeformation#UpdateLFTagExpressionRequest" + }, + "output": { + "target": "com.amazonaws.lakeformation#UpdateLFTagExpressionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.lakeformation#AccessDeniedException" + }, + { + "target": "com.amazonaws.lakeformation#EntityNotFoundException" + }, + { + "target": "com.amazonaws.lakeformation#InternalServiceException" + }, + { + "target": "com.amazonaws.lakeformation#InvalidInputException" + }, + { + "target": "com.amazonaws.lakeformation#OperationTimeoutException" + }, + { + "target": "com.amazonaws.lakeformation#ResourceNumberLimitExceededException" + } + ], + "traits": { + "smithy.api#documentation": "

Updates the name of the LF-Tag expression to the new description and expression body provided.\n Updating a LF-Tag expression immediately changes the permission boundaries of all existing LFTagPolicy permission grants that reference the given LF-Tag expression.

", + "smithy.api#http": { + "method": "POST", + "uri": "/UpdateLFTagExpression", + "code": 200 + } + } + }, + "com.amazonaws.lakeformation#UpdateLFTagExpressionRequest": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.lakeformation#NameString", + "traits": { + "smithy.api#documentation": "

The name for the LF-Tag expression.

", + "smithy.api#required": {} + } + }, + "Description": { + "target": "com.amazonaws.lakeformation#DescriptionString", + "traits": { + "smithy.api#documentation": "

The description with information about the saved LF-Tag expression.

" + } + }, + "CatalogId": { + "target": "com.amazonaws.lakeformation#CatalogIdString", + "traits": { + "smithy.api#documentation": "

The identifier for the Data Catalog. By default, the account ID.

" + } + }, + "Expression": { + "target": "com.amazonaws.lakeformation#Expression", + "traits": { + "smithy.api#documentation": "

The LF-Tag expression body composed of one more LF-Tag key-value pairs.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.lakeformation#UpdateLFTagExpressionResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.lakeformation#UpdateLFTagRequest": { "type": "structure", "members": { @@ -8104,7 +8594,7 @@ "StorageOptimizerConfig": { "target": "com.amazonaws.lakeformation#StorageOptimizerConfigMap", "traits": { - "smithy.api#documentation": "

Name of the table for which to enable the storage optimizer.

", + "smithy.api#documentation": "

Name of the configuration for the storage optimizer.

", "smithy.api#required": {} } }