diff --git a/clients/client-lakeformation/README.md b/clients/client-lakeformation/README.md index 725a18efc46d3..ff2929fc4fce2 100644 --- a/clients/client-lakeformation/README.md +++ b/clients/client-lakeformation/README.md @@ -260,6 +260,14 @@ CreateDataCellsFilter [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lakeformation/classes/createdatacellsfiltercommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lakeformation/interfaces/createdatacellsfiltercommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lakeformation/interfaces/createdatacellsfiltercommandoutput.html) + +
+ +CreateLakeFormationOptIn + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lakeformation/classes/createlakeformationoptincommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lakeformation/interfaces/createlakeformationoptincommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lakeformation/interfaces/createlakeformationoptincommandoutput.html) +
@@ -276,6 +284,14 @@ DeleteDataCellsFilter [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lakeformation/classes/deletedatacellsfiltercommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lakeformation/interfaces/deletedatacellsfiltercommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lakeformation/interfaces/deletedatacellsfiltercommandoutput.html) +
+
+ +DeleteLakeFormationOptIn + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lakeformation/classes/deletelakeformationoptincommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lakeformation/interfaces/deletelakeformationoptincommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lakeformation/interfaces/deletelakeformationoptincommandoutput.html) +
@@ -436,6 +452,14 @@ ListDataCellsFilter [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lakeformation/classes/listdatacellsfiltercommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lakeformation/interfaces/listdatacellsfiltercommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lakeformation/interfaces/listdatacellsfiltercommandoutput.html) +
+
+ +ListLakeFormationOptIns + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lakeformation/classes/listlakeformationoptinscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lakeformation/interfaces/listlakeformationoptinscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lakeformation/interfaces/listlakeformationoptinscommandoutput.html) +
diff --git a/clients/client-lakeformation/src/LakeFormation.ts b/clients/client-lakeformation/src/LakeFormation.ts index a0f99ff120e32..54439da1c2a32 100644 --- a/clients/client-lakeformation/src/LakeFormation.ts +++ b/clients/client-lakeformation/src/LakeFormation.ts @@ -37,12 +37,22 @@ import { CreateDataCellsFilterCommandInput, CreateDataCellsFilterCommandOutput, } from "./commands/CreateDataCellsFilterCommand"; +import { + CreateLakeFormationOptInCommand, + CreateLakeFormationOptInCommandInput, + CreateLakeFormationOptInCommandOutput, +} from "./commands/CreateLakeFormationOptInCommand"; import { CreateLFTagCommand, CreateLFTagCommandInput, CreateLFTagCommandOutput } from "./commands/CreateLFTagCommand"; import { DeleteDataCellsFilterCommand, DeleteDataCellsFilterCommandInput, DeleteDataCellsFilterCommandOutput, } from "./commands/DeleteDataCellsFilterCommand"; +import { + DeleteLakeFormationOptInCommand, + DeleteLakeFormationOptInCommandInput, + DeleteLakeFormationOptInCommandOutput, +} from "./commands/DeleteLakeFormationOptInCommand"; import { DeleteLFTagCommand, DeleteLFTagCommandInput, DeleteLFTagCommandOutput } from "./commands/DeleteLFTagCommand"; import { DeleteObjectsOnCancelCommand, @@ -135,6 +145,11 @@ import { ListDataCellsFilterCommandInput, ListDataCellsFilterCommandOutput, } from "./commands/ListDataCellsFilterCommand"; +import { + ListLakeFormationOptInsCommand, + ListLakeFormationOptInsCommandInput, + ListLakeFormationOptInsCommandOutput, +} from "./commands/ListLakeFormationOptInsCommand"; import { ListLFTagsCommand, ListLFTagsCommandInput, ListLFTagsCommandOutput } from "./commands/ListLFTagsCommand"; import { ListPermissionsCommand, @@ -227,8 +242,10 @@ const commands = { CancelTransactionCommand, CommitTransactionCommand, CreateDataCellsFilterCommand, + CreateLakeFormationOptInCommand, CreateLFTagCommand, DeleteDataCellsFilterCommand, + DeleteLakeFormationOptInCommand, DeleteLFTagCommand, DeleteObjectsOnCancelCommand, DeregisterResourceCommand, @@ -249,6 +266,7 @@ const commands = { GetWorkUnitsCommand, GrantPermissionsCommand, ListDataCellsFilterCommand, + ListLakeFormationOptInsCommand, ListLFTagsCommand, ListPermissionsCommand, ListResourcesCommand, @@ -389,6 +407,23 @@ export interface LakeFormation { cb: (err: any, data?: CreateDataCellsFilterCommandOutput) => void ): void; + /** + * @see {@link CreateLakeFormationOptInCommand} + */ + createLakeFormationOptIn( + args: CreateLakeFormationOptInCommandInput, + options?: __HttpHandlerOptions + ): Promise; + createLakeFormationOptIn( + args: CreateLakeFormationOptInCommandInput, + cb: (err: any, data?: CreateLakeFormationOptInCommandOutput) => void + ): void; + createLakeFormationOptIn( + args: CreateLakeFormationOptInCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateLakeFormationOptInCommandOutput) => void + ): void; + /** * @see {@link CreateLFTagCommand} */ @@ -417,6 +452,23 @@ export interface LakeFormation { cb: (err: any, data?: DeleteDataCellsFilterCommandOutput) => void ): void; + /** + * @see {@link DeleteLakeFormationOptInCommand} + */ + deleteLakeFormationOptIn( + args: DeleteLakeFormationOptInCommandInput, + options?: __HttpHandlerOptions + ): Promise; + deleteLakeFormationOptIn( + args: DeleteLakeFormationOptInCommandInput, + cb: (err: any, data?: DeleteLakeFormationOptInCommandOutput) => void + ): void; + deleteLakeFormationOptIn( + args: DeleteLakeFormationOptInCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteLakeFormationOptInCommandOutput) => void + ): void; + /** * @see {@link DeleteLFTagCommand} */ @@ -730,6 +782,23 @@ export interface LakeFormation { cb: (err: any, data?: ListDataCellsFilterCommandOutput) => void ): void; + /** + * @see {@link ListLakeFormationOptInsCommand} + */ + listLakeFormationOptIns( + args: ListLakeFormationOptInsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listLakeFormationOptIns( + args: ListLakeFormationOptInsCommandInput, + cb: (err: any, data?: ListLakeFormationOptInsCommandOutput) => void + ): void; + listLakeFormationOptIns( + args: ListLakeFormationOptInsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListLakeFormationOptInsCommandOutput) => void + ): void; + /** * @see {@link ListLFTagsCommand} */ diff --git a/clients/client-lakeformation/src/LakeFormationClient.ts b/clients/client-lakeformation/src/LakeFormationClient.ts index 8b263ff41c483..38e9e612de968 100644 --- a/clients/client-lakeformation/src/LakeFormationClient.ts +++ b/clients/client-lakeformation/src/LakeFormationClient.ts @@ -73,11 +73,19 @@ import { CreateDataCellsFilterCommandInput, CreateDataCellsFilterCommandOutput, } from "./commands/CreateDataCellsFilterCommand"; +import { + CreateLakeFormationOptInCommandInput, + CreateLakeFormationOptInCommandOutput, +} from "./commands/CreateLakeFormationOptInCommand"; import { CreateLFTagCommandInput, CreateLFTagCommandOutput } from "./commands/CreateLFTagCommand"; import { DeleteDataCellsFilterCommandInput, DeleteDataCellsFilterCommandOutput, } from "./commands/DeleteDataCellsFilterCommand"; +import { + DeleteLakeFormationOptInCommandInput, + DeleteLakeFormationOptInCommandOutput, +} from "./commands/DeleteLakeFormationOptInCommand"; import { DeleteLFTagCommandInput, DeleteLFTagCommandOutput } from "./commands/DeleteLFTagCommand"; import { DeleteObjectsOnCancelCommandInput, @@ -119,6 +127,10 @@ import { ListDataCellsFilterCommandInput, ListDataCellsFilterCommandOutput, } from "./commands/ListDataCellsFilterCommand"; +import { + ListLakeFormationOptInsCommandInput, + ListLakeFormationOptInsCommandOutput, +} from "./commands/ListLakeFormationOptInsCommand"; import { ListLFTagsCommandInput, ListLFTagsCommandOutput } from "./commands/ListLFTagsCommand"; import { ListPermissionsCommandInput, ListPermissionsCommandOutput } from "./commands/ListPermissionsCommand"; import { ListResourcesCommandInput, ListResourcesCommandOutput } from "./commands/ListResourcesCommand"; @@ -181,8 +193,10 @@ export type ServiceInputTypes = | CommitTransactionCommandInput | CreateDataCellsFilterCommandInput | CreateLFTagCommandInput + | CreateLakeFormationOptInCommandInput | DeleteDataCellsFilterCommandInput | DeleteLFTagCommandInput + | DeleteLakeFormationOptInCommandInput | DeleteObjectsOnCancelCommandInput | DeregisterResourceCommandInput | DescribeResourceCommandInput @@ -203,6 +217,7 @@ export type ServiceInputTypes = | GrantPermissionsCommandInput | ListDataCellsFilterCommandInput | ListLFTagsCommandInput + | ListLakeFormationOptInsCommandInput | ListPermissionsCommandInput | ListResourcesCommandInput | ListTableStorageOptimizersCommandInput @@ -233,8 +248,10 @@ export type ServiceOutputTypes = | CommitTransactionCommandOutput | CreateDataCellsFilterCommandOutput | CreateLFTagCommandOutput + | CreateLakeFormationOptInCommandOutput | DeleteDataCellsFilterCommandOutput | DeleteLFTagCommandOutput + | DeleteLakeFormationOptInCommandOutput | DeleteObjectsOnCancelCommandOutput | DeregisterResourceCommandOutput | DescribeResourceCommandOutput @@ -255,6 +272,7 @@ export type ServiceOutputTypes = | GrantPermissionsCommandOutput | ListDataCellsFilterCommandOutput | ListLFTagsCommandOutput + | ListLakeFormationOptInsCommandOutput | ListPermissionsCommandOutput | ListResourcesCommandOutput | ListTableStorageOptimizersCommandOutput diff --git a/clients/client-lakeformation/src/commands/CreateLakeFormationOptInCommand.ts b/clients/client-lakeformation/src/commands/CreateLakeFormationOptInCommand.ts new file mode 100644 index 0000000000000..af497294dee9e --- /dev/null +++ b/clients/client-lakeformation/src/commands/CreateLakeFormationOptInCommand.ts @@ -0,0 +1,220 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { LakeFormationClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../LakeFormationClient"; +import { CreateLakeFormationOptInRequest, CreateLakeFormationOptInResponse } from "../models/models_0"; +import { de_CreateLakeFormationOptInCommand, se_CreateLakeFormationOptInCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link CreateLakeFormationOptInCommand}. + */ +export interface CreateLakeFormationOptInCommandInput extends CreateLakeFormationOptInRequest {} +/** + * @public + * + * The output of {@link CreateLakeFormationOptInCommand}. + */ +export interface CreateLakeFormationOptInCommandOutput extends CreateLakeFormationOptInResponse, __MetadataBearer {} + +/** + * @public + *

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

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { LakeFormationClient, CreateLakeFormationOptInCommand } from "@aws-sdk/client-lakeformation"; // ES Modules import + * // const { LakeFormationClient, CreateLakeFormationOptInCommand } = require("@aws-sdk/client-lakeformation"); // CommonJS import + * const client = new LakeFormationClient(config); + * const input = { // CreateLakeFormationOptInRequest + * Principal: { // DataLakePrincipal + * DataLakePrincipalIdentifier: "STRING_VALUE", + * }, + * Resource: { // Resource + * Catalog: {}, + * Database: { // DatabaseResource + * CatalogId: "STRING_VALUE", + * Name: "STRING_VALUE", // required + * }, + * Table: { // TableResource + * CatalogId: "STRING_VALUE", + * DatabaseName: "STRING_VALUE", // required + * Name: "STRING_VALUE", + * TableWildcard: {}, + * }, + * TableWithColumns: { // TableWithColumnsResource + * CatalogId: "STRING_VALUE", + * DatabaseName: "STRING_VALUE", // required + * Name: "STRING_VALUE", // required + * ColumnNames: [ // ColumnNames + * "STRING_VALUE", + * ], + * ColumnWildcard: { // ColumnWildcard + * ExcludedColumnNames: [ + * "STRING_VALUE", + * ], + * }, + * }, + * DataLocation: { // DataLocationResource + * CatalogId: "STRING_VALUE", + * ResourceArn: "STRING_VALUE", // required + * }, + * DataCellsFilter: { // DataCellsFilterResource + * TableCatalogId: "STRING_VALUE", + * DatabaseName: "STRING_VALUE", + * TableName: "STRING_VALUE", + * Name: "STRING_VALUE", + * }, + * LFTag: { // LFTagKeyResource + * CatalogId: "STRING_VALUE", + * TagKey: "STRING_VALUE", // required + * TagValues: [ // TagValueList // required + * "STRING_VALUE", + * ], + * }, + * LFTagPolicy: { // LFTagPolicyResource + * CatalogId: "STRING_VALUE", + * ResourceType: "DATABASE" || "TABLE", // required + * Expression: [ // Expression // required + * { // LFTag + * TagKey: "STRING_VALUE", // required + * TagValues: [ // required + * "STRING_VALUE", + * ], + * }, + * ], + * }, + * }, + * }; + * const command = new CreateLakeFormationOptInCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param CreateLakeFormationOptInCommandInput - {@link CreateLakeFormationOptInCommandInput} + * @returns {@link CreateLakeFormationOptInCommandOutput} + * @see {@link CreateLakeFormationOptInCommandInput} for command's `input` shape. + * @see {@link CreateLakeFormationOptInCommandOutput} 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 ConcurrentModificationException} (client fault) + *

Two processes are trying to modify a resource simultaneously.

+ * + * @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.

+ * + */ +export class CreateLakeFormationOptInCommand extends $Command< + CreateLakeFormationOptInCommandInput, + CreateLakeFormationOptInCommandOutput, + LakeFormationClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: CreateLakeFormationOptInCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: LakeFormationClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, CreateLakeFormationOptInCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "LakeFormationClient"; + const commandName = "CreateLakeFormationOptInCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "AWSLakeFormation", + operation: "CreateLakeFormationOptIn", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: CreateLakeFormationOptInCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_CreateLakeFormationOptInCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_CreateLakeFormationOptInCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-lakeformation/src/commands/DeleteLakeFormationOptInCommand.ts b/clients/client-lakeformation/src/commands/DeleteLakeFormationOptInCommand.ts new file mode 100644 index 0000000000000..7bcbd2ba68b61 --- /dev/null +++ b/clients/client-lakeformation/src/commands/DeleteLakeFormationOptInCommand.ts @@ -0,0 +1,220 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { LakeFormationClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../LakeFormationClient"; +import { DeleteLakeFormationOptInRequest, DeleteLakeFormationOptInResponse } from "../models/models_0"; +import { de_DeleteLakeFormationOptInCommand, se_DeleteLakeFormationOptInCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DeleteLakeFormationOptInCommand}. + */ +export interface DeleteLakeFormationOptInCommandInput extends DeleteLakeFormationOptInRequest {} +/** + * @public + * + * The output of {@link DeleteLakeFormationOptInCommand}. + */ +export interface DeleteLakeFormationOptInCommandOutput extends DeleteLakeFormationOptInResponse, __MetadataBearer {} + +/** + * @public + *

Remove the Lake Formation permissions enforcement of the given databases, tables, and principals.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { LakeFormationClient, DeleteLakeFormationOptInCommand } from "@aws-sdk/client-lakeformation"; // ES Modules import + * // const { LakeFormationClient, DeleteLakeFormationOptInCommand } = require("@aws-sdk/client-lakeformation"); // CommonJS import + * const client = new LakeFormationClient(config); + * const input = { // DeleteLakeFormationOptInRequest + * Principal: { // DataLakePrincipal + * DataLakePrincipalIdentifier: "STRING_VALUE", + * }, + * Resource: { // Resource + * Catalog: {}, + * Database: { // DatabaseResource + * CatalogId: "STRING_VALUE", + * Name: "STRING_VALUE", // required + * }, + * Table: { // TableResource + * CatalogId: "STRING_VALUE", + * DatabaseName: "STRING_VALUE", // required + * Name: "STRING_VALUE", + * TableWildcard: {}, + * }, + * TableWithColumns: { // TableWithColumnsResource + * CatalogId: "STRING_VALUE", + * DatabaseName: "STRING_VALUE", // required + * Name: "STRING_VALUE", // required + * ColumnNames: [ // ColumnNames + * "STRING_VALUE", + * ], + * ColumnWildcard: { // ColumnWildcard + * ExcludedColumnNames: [ + * "STRING_VALUE", + * ], + * }, + * }, + * DataLocation: { // DataLocationResource + * CatalogId: "STRING_VALUE", + * ResourceArn: "STRING_VALUE", // required + * }, + * DataCellsFilter: { // DataCellsFilterResource + * TableCatalogId: "STRING_VALUE", + * DatabaseName: "STRING_VALUE", + * TableName: "STRING_VALUE", + * Name: "STRING_VALUE", + * }, + * LFTag: { // LFTagKeyResource + * CatalogId: "STRING_VALUE", + * TagKey: "STRING_VALUE", // required + * TagValues: [ // TagValueList // required + * "STRING_VALUE", + * ], + * }, + * LFTagPolicy: { // LFTagPolicyResource + * CatalogId: "STRING_VALUE", + * ResourceType: "DATABASE" || "TABLE", // required + * Expression: [ // Expression // required + * { // LFTag + * TagKey: "STRING_VALUE", // required + * TagValues: [ // required + * "STRING_VALUE", + * ], + * }, + * ], + * }, + * }, + * }; + * const command = new DeleteLakeFormationOptInCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteLakeFormationOptInCommandInput - {@link DeleteLakeFormationOptInCommandInput} + * @returns {@link DeleteLakeFormationOptInCommandOutput} + * @see {@link DeleteLakeFormationOptInCommandInput} for command's `input` shape. + * @see {@link DeleteLakeFormationOptInCommandOutput} 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 ConcurrentModificationException} (client fault) + *

Two processes are trying to modify a resource simultaneously.

+ * + * @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.

+ * + */ +export class DeleteLakeFormationOptInCommand extends $Command< + DeleteLakeFormationOptInCommandInput, + DeleteLakeFormationOptInCommandOutput, + LakeFormationClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: DeleteLakeFormationOptInCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: LakeFormationClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, DeleteLakeFormationOptInCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "LakeFormationClient"; + const commandName = "DeleteLakeFormationOptInCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "AWSLakeFormation", + operation: "DeleteLakeFormationOptIn", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: DeleteLakeFormationOptInCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_DeleteLakeFormationOptInCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_DeleteLakeFormationOptInCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-lakeformation/src/commands/DescribeResourceCommand.ts b/clients/client-lakeformation/src/commands/DescribeResourceCommand.ts index 92c8730091090..4b678f4bc798b 100644 --- a/clients/client-lakeformation/src/commands/DescribeResourceCommand.ts +++ b/clients/client-lakeformation/src/commands/DescribeResourceCommand.ts @@ -55,6 +55,7 @@ export interface DescribeResourceCommandOutput extends DescribeResourceResponse, * // RoleArn: "STRING_VALUE", * // LastModified: new Date("TIMESTAMP"), * // WithFederation: true || false, + * // HybridAccessEnabled: true || false, * // }, * // }; * diff --git a/clients/client-lakeformation/src/commands/GetEffectivePermissionsForPathCommand.ts b/clients/client-lakeformation/src/commands/GetEffectivePermissionsForPathCommand.ts index b59840d7977dc..e54a2d411c00c 100644 --- a/clients/client-lakeformation/src/commands/GetEffectivePermissionsForPathCommand.ts +++ b/clients/client-lakeformation/src/commands/GetEffectivePermissionsForPathCommand.ts @@ -130,6 +130,8 @@ export interface GetEffectivePermissionsForPathCommandOutput * // "STRING_VALUE", * // ], * // }, + * // LastUpdated: new Date("TIMESTAMP"), + * // LastUpdatedBy: "STRING_VALUE", * // }, * // ], * // NextToken: "STRING_VALUE", diff --git a/clients/client-lakeformation/src/commands/ListLakeFormationOptInsCommand.ts b/clients/client-lakeformation/src/commands/ListLakeFormationOptInsCommand.ts new file mode 100644 index 0000000000000..41c73ab9635a8 --- /dev/null +++ b/clients/client-lakeformation/src/commands/ListLakeFormationOptInsCommand.ts @@ -0,0 +1,282 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { LakeFormationClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../LakeFormationClient"; +import { ListLakeFormationOptInsRequest, ListLakeFormationOptInsResponse } from "../models/models_0"; +import { de_ListLakeFormationOptInsCommand, se_ListLakeFormationOptInsCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListLakeFormationOptInsCommand}. + */ +export interface ListLakeFormationOptInsCommandInput extends ListLakeFormationOptInsRequest {} +/** + * @public + * + * The output of {@link ListLakeFormationOptInsCommand}. + */ +export interface ListLakeFormationOptInsCommandOutput extends ListLakeFormationOptInsResponse, __MetadataBearer {} + +/** + * @public + *

Retrieve the current list of resources and principals that are opt in to enforce Lake Formation permissions.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { LakeFormationClient, ListLakeFormationOptInsCommand } from "@aws-sdk/client-lakeformation"; // ES Modules import + * // const { LakeFormationClient, ListLakeFormationOptInsCommand } = require("@aws-sdk/client-lakeformation"); // CommonJS import + * const client = new LakeFormationClient(config); + * const input = { // ListLakeFormationOptInsRequest + * Principal: { // DataLakePrincipal + * DataLakePrincipalIdentifier: "STRING_VALUE", + * }, + * Resource: { // Resource + * Catalog: {}, + * Database: { // DatabaseResource + * CatalogId: "STRING_VALUE", + * Name: "STRING_VALUE", // required + * }, + * Table: { // TableResource + * CatalogId: "STRING_VALUE", + * DatabaseName: "STRING_VALUE", // required + * Name: "STRING_VALUE", + * TableWildcard: {}, + * }, + * TableWithColumns: { // TableWithColumnsResource + * CatalogId: "STRING_VALUE", + * DatabaseName: "STRING_VALUE", // required + * Name: "STRING_VALUE", // required + * ColumnNames: [ // ColumnNames + * "STRING_VALUE", + * ], + * ColumnWildcard: { // ColumnWildcard + * ExcludedColumnNames: [ + * "STRING_VALUE", + * ], + * }, + * }, + * DataLocation: { // DataLocationResource + * CatalogId: "STRING_VALUE", + * ResourceArn: "STRING_VALUE", // required + * }, + * DataCellsFilter: { // DataCellsFilterResource + * TableCatalogId: "STRING_VALUE", + * DatabaseName: "STRING_VALUE", + * TableName: "STRING_VALUE", + * Name: "STRING_VALUE", + * }, + * LFTag: { // LFTagKeyResource + * CatalogId: "STRING_VALUE", + * TagKey: "STRING_VALUE", // required + * TagValues: [ // TagValueList // required + * "STRING_VALUE", + * ], + * }, + * LFTagPolicy: { // LFTagPolicyResource + * CatalogId: "STRING_VALUE", + * ResourceType: "DATABASE" || "TABLE", // required + * Expression: [ // Expression // required + * { // LFTag + * TagKey: "STRING_VALUE", // required + * TagValues: [ // required + * "STRING_VALUE", + * ], + * }, + * ], + * }, + * }, + * MaxResults: Number("int"), + * NextToken: "STRING_VALUE", + * }; + * const command = new ListLakeFormationOptInsCommand(input); + * const response = await client.send(command); + * // { // ListLakeFormationOptInsResponse + * // LakeFormationOptInsInfoList: [ // LakeFormationOptInsInfoList + * // { // LakeFormationOptInsInfo + * // Resource: { // Resource + * // Catalog: {}, + * // Database: { // DatabaseResource + * // CatalogId: "STRING_VALUE", + * // Name: "STRING_VALUE", // required + * // }, + * // Table: { // TableResource + * // CatalogId: "STRING_VALUE", + * // DatabaseName: "STRING_VALUE", // required + * // Name: "STRING_VALUE", + * // TableWildcard: {}, + * // }, + * // TableWithColumns: { // TableWithColumnsResource + * // CatalogId: "STRING_VALUE", + * // DatabaseName: "STRING_VALUE", // required + * // Name: "STRING_VALUE", // required + * // ColumnNames: [ // ColumnNames + * // "STRING_VALUE", + * // ], + * // ColumnWildcard: { // ColumnWildcard + * // ExcludedColumnNames: [ + * // "STRING_VALUE", + * // ], + * // }, + * // }, + * // DataLocation: { // DataLocationResource + * // CatalogId: "STRING_VALUE", + * // ResourceArn: "STRING_VALUE", // required + * // }, + * // DataCellsFilter: { // DataCellsFilterResource + * // TableCatalogId: "STRING_VALUE", + * // DatabaseName: "STRING_VALUE", + * // TableName: "STRING_VALUE", + * // Name: "STRING_VALUE", + * // }, + * // LFTag: { // LFTagKeyResource + * // CatalogId: "STRING_VALUE", + * // TagKey: "STRING_VALUE", // required + * // TagValues: [ // TagValueList // required + * // "STRING_VALUE", + * // ], + * // }, + * // LFTagPolicy: { // LFTagPolicyResource + * // CatalogId: "STRING_VALUE", + * // ResourceType: "DATABASE" || "TABLE", // required + * // Expression: [ // Expression // required + * // { // LFTag + * // TagKey: "STRING_VALUE", // required + * // TagValues: [ // required + * // "STRING_VALUE", + * // ], + * // }, + * // ], + * // }, + * // }, + * // Principal: { // DataLakePrincipal + * // DataLakePrincipalIdentifier: "STRING_VALUE", + * // }, + * // LastModified: new Date("TIMESTAMP"), + * // LastUpdatedBy: "STRING_VALUE", + * // }, + * // ], + * // NextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListLakeFormationOptInsCommandInput - {@link ListLakeFormationOptInsCommandInput} + * @returns {@link ListLakeFormationOptInsCommandOutput} + * @see {@link ListLakeFormationOptInsCommandInput} for command's `input` shape. + * @see {@link ListLakeFormationOptInsCommandOutput} 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 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.

+ * + */ +export class ListLakeFormationOptInsCommand extends $Command< + ListLakeFormationOptInsCommandInput, + ListLakeFormationOptInsCommandOutput, + LakeFormationClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListLakeFormationOptInsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: LakeFormationClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, ListLakeFormationOptInsCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "LakeFormationClient"; + const commandName = "ListLakeFormationOptInsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "AWSLakeFormation", + operation: "ListLakeFormationOptIns", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListLakeFormationOptInsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListLakeFormationOptInsCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_ListLakeFormationOptInsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-lakeformation/src/commands/ListPermissionsCommand.ts b/clients/client-lakeformation/src/commands/ListPermissionsCommand.ts index 9508201dabcd6..6168858529084 100644 --- a/clients/client-lakeformation/src/commands/ListPermissionsCommand.ts +++ b/clients/client-lakeformation/src/commands/ListPermissionsCommand.ts @@ -185,6 +185,8 @@ export interface ListPermissionsCommandOutput extends ListPermissionsResponse, _ * // "STRING_VALUE", * // ], * // }, + * // LastUpdated: new Date("TIMESTAMP"), + * // LastUpdatedBy: "STRING_VALUE", * // }, * // ], * // NextToken: "STRING_VALUE", diff --git a/clients/client-lakeformation/src/commands/ListResourcesCommand.ts b/clients/client-lakeformation/src/commands/ListResourcesCommand.ts index b9f25346861df..bff96b5be11f3 100644 --- a/clients/client-lakeformation/src/commands/ListResourcesCommand.ts +++ b/clients/client-lakeformation/src/commands/ListResourcesCommand.ts @@ -66,6 +66,7 @@ export interface ListResourcesCommandOutput extends ListResourcesResponse, __Met * // RoleArn: "STRING_VALUE", * // LastModified: new Date("TIMESTAMP"), * // WithFederation: true || false, + * // HybridAccessEnabled: true || false, * // }, * // ], * // NextToken: "STRING_VALUE", diff --git a/clients/client-lakeformation/src/commands/RegisterResourceCommand.ts b/clients/client-lakeformation/src/commands/RegisterResourceCommand.ts index ce5ea30f8a039..5eda56d1f5dcc 100644 --- a/clients/client-lakeformation/src/commands/RegisterResourceCommand.ts +++ b/clients/client-lakeformation/src/commands/RegisterResourceCommand.ts @@ -59,6 +59,7 @@ export interface RegisterResourceCommandOutput extends RegisterResourceResponse, * UseServiceLinkedRole: true || false, * RoleArn: "STRING_VALUE", * WithFederation: true || false, + * HybridAccessEnabled: true || false, * }; * const command = new RegisterResourceCommand(input); * const response = await client.send(command); diff --git a/clients/client-lakeformation/src/commands/UpdateResourceCommand.ts b/clients/client-lakeformation/src/commands/UpdateResourceCommand.ts index 0b670e7db348c..08c65e4a646d9 100644 --- a/clients/client-lakeformation/src/commands/UpdateResourceCommand.ts +++ b/clients/client-lakeformation/src/commands/UpdateResourceCommand.ts @@ -48,6 +48,7 @@ export interface UpdateResourceCommandOutput extends UpdateResourceResponse, __M * RoleArn: "STRING_VALUE", // required * ResourceArn: "STRING_VALUE", // required * WithFederation: true || false, + * HybridAccessEnabled: true || false, * }; * const command = new UpdateResourceCommand(input); * const response = await client.send(command); diff --git a/clients/client-lakeformation/src/commands/index.ts b/clients/client-lakeformation/src/commands/index.ts index 9899a40ad9425..c66acfe48430e 100644 --- a/clients/client-lakeformation/src/commands/index.ts +++ b/clients/client-lakeformation/src/commands/index.ts @@ -7,8 +7,10 @@ export * from "./CancelTransactionCommand"; export * from "./CommitTransactionCommand"; export * from "./CreateDataCellsFilterCommand"; export * from "./CreateLFTagCommand"; +export * from "./CreateLakeFormationOptInCommand"; export * from "./DeleteDataCellsFilterCommand"; export * from "./DeleteLFTagCommand"; +export * from "./DeleteLakeFormationOptInCommand"; export * from "./DeleteObjectsOnCancelCommand"; export * from "./DeregisterResourceCommand"; export * from "./DescribeResourceCommand"; @@ -29,6 +31,7 @@ export * from "./GetWorkUnitsCommand"; export * from "./GrantPermissionsCommand"; export * from "./ListDataCellsFilterCommand"; export * from "./ListLFTagsCommand"; +export * from "./ListLakeFormationOptInsCommand"; export * from "./ListPermissionsCommand"; export * from "./ListResourcesCommand"; export * from "./ListTableStorageOptimizersCommand"; diff --git a/clients/client-lakeformation/src/models/models_0.ts b/clients/client-lakeformation/src/models/models_0.ts index 6a8702862859c..be422d2d1c3c2 100644 --- a/clients/client-lakeformation/src/models/models_0.ts +++ b/clients/client-lakeformation/src/models/models_0.ts @@ -164,6 +164,8 @@ export interface LFTag { /** * @public *

A list of possible values an attribute can take.

+ *

The maximum number of values that can be defined for a LF-Tag is 1000. A single API call + * supports 50 values. You can use multiple API calls to add more values.

*/ TagValues: string[] | undefined; } @@ -1075,6 +1077,29 @@ export class ResourceNumberLimitExceededException extends __BaseException { } } +/** + * @public + */ +export interface CreateLakeFormationOptInRequest { + /** + * @public + *

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

+ */ + Principal: DataLakePrincipal | undefined; + + /** + * @public + *

A structure for the resource.

+ */ + Resource: Resource | undefined; +} + +/** + * @public + */ +export interface CreateLakeFormationOptInResponse {} + /** * @public */ @@ -1137,6 +1162,29 @@ export interface DeleteDataCellsFilterRequest { */ export interface DeleteDataCellsFilterResponse {} +/** + * @public + */ +export interface DeleteLakeFormationOptInRequest { + /** + * @public + *

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

+ */ + Principal: DataLakePrincipal | undefined; + + /** + * @public + *

A structure for the resource.

+ */ + Resource: Resource | undefined; +} + +/** + * @public + */ +export interface DeleteLakeFormationOptInResponse {} + /** * @public */ @@ -1299,6 +1347,14 @@ export interface ResourceInfo { *

Whether or not the resource is a federated resource.

*/ WithFederation?: boolean; + + /** + * @public + *

+ * Indicates whether the data access of tables pointing to the location can be managed by both Lake Formation permissions as well as Amazon S3 bucket policies. + *

+ */ + HybridAccessEnabled?: boolean; } /** @@ -1612,6 +1668,18 @@ export interface PrincipalResourcePermissions { *

This attribute can be used to return any additional details of PrincipalResourcePermissions. Currently returns only as a RAM resource share ARN.

*/ AdditionalDetails?: DetailsMap; + + /** + * @public + *

The date and time when the resource was last updated.

+ */ + LastUpdated?: Date; + + /** + * @public + *

The user who updated the record.

+ */ + LastUpdatedBy?: string; } /** @@ -2514,6 +2582,84 @@ export interface ListDataCellsFilterResponse { NextToken?: string; } +/** + * @public + */ +export interface ListLakeFormationOptInsRequest { + /** + * @public + *

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

+ */ + Principal?: DataLakePrincipal; + + /** + * @public + *

A structure for the resource.

+ */ + Resource?: Resource; + + /** + * @public + *

The maximum number of results to return.

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

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

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

A single principal-resource pair that has Lake Formation permissins enforced.

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

A structure for the resource.

+ */ + Resource?: Resource; + + /** + * @public + *

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

+ */ + Principal?: DataLakePrincipal; + + /** + * @public + *

The last modified date and time of the record.

+ */ + LastModified?: Date; + + /** + * @public + *

The user who updated the record.

+ */ + LastUpdatedBy?: string; +} + +/** + * @public + */ +export interface ListLakeFormationOptInsResponse { + /** + * @public + *

A list of principal-resource pairs that have Lake Formation permissins enforced.

+ */ + LakeFormationOptInsInfoList?: LakeFormationOptInsInfo[]; + + /** + * @public + *

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

+ */ + NextToken?: string; +} + /** * @public * @enum @@ -2985,6 +3131,14 @@ export interface RegisterResourceRequest { *

Whether or not the resource is a federated resource.

*/ WithFederation?: boolean; + + /** + * @public + *

+ * Specifies whether the data access of tables pointing to the location can be managed by both Lake Formation permissions as well as Amazon S3 bucket policies. + *

+ */ + HybridAccessEnabled?: boolean; } /** @@ -3379,6 +3533,14 @@ export interface UpdateResourceRequest { *

Whether or not the resource is a federated resource.

*/ WithFederation?: boolean; + + /** + * @public + *

+ * Specifies whether the data access of tables pointing to the location can be managed by both Lake Formation permissions as well as Amazon S3 bucket policies. + *

+ */ + HybridAccessEnabled?: boolean; } /** diff --git a/clients/client-lakeformation/src/pagination/ListLakeFormationOptInsPaginator.ts b/clients/client-lakeformation/src/pagination/ListLakeFormationOptInsPaginator.ts new file mode 100644 index 0000000000000..d4e29679f43ca --- /dev/null +++ b/clients/client-lakeformation/src/pagination/ListLakeFormationOptInsPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { + ListLakeFormationOptInsCommand, + ListLakeFormationOptInsCommandInput, + ListLakeFormationOptInsCommandOutput, +} from "../commands/ListLakeFormationOptInsCommand"; +import { LakeFormationClient } from "../LakeFormationClient"; +import { LakeFormationPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: LakeFormationClient, + input: ListLakeFormationOptInsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListLakeFormationOptInsCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateListLakeFormationOptIns( + config: LakeFormationPaginationConfiguration, + input: ListLakeFormationOptInsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListLakeFormationOptInsCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof LakeFormationClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected LakeFormation | LakeFormationClient"); + } + yield page; + const prevToken = token; + token = page.NextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-lakeformation/src/pagination/index.ts b/clients/client-lakeformation/src/pagination/index.ts index 0f401cf5c2c0e..fe8441ac388a5 100644 --- a/clients/client-lakeformation/src/pagination/index.ts +++ b/clients/client-lakeformation/src/pagination/index.ts @@ -7,6 +7,7 @@ export * from "./GetWorkUnitsPaginator"; export * from "./Interfaces"; export * from "./ListDataCellsFilterPaginator"; export * from "./ListLFTagsPaginator"; +export * from "./ListLakeFormationOptInsPaginator"; export * from "./ListPermissionsPaginator"; export * from "./ListResourcesPaginator"; export * from "./ListTableStorageOptimizersPaginator"; diff --git a/clients/client-lakeformation/src/protocols/Aws_restJson1.ts b/clients/client-lakeformation/src/protocols/Aws_restJson1.ts index af9a6c6dd4b34..1a784c2c917ec 100644 --- a/clients/client-lakeformation/src/protocols/Aws_restJson1.ts +++ b/clients/client-lakeformation/src/protocols/Aws_restJson1.ts @@ -48,11 +48,19 @@ import { CreateDataCellsFilterCommandInput, CreateDataCellsFilterCommandOutput, } from "../commands/CreateDataCellsFilterCommand"; +import { + CreateLakeFormationOptInCommandInput, + CreateLakeFormationOptInCommandOutput, +} from "../commands/CreateLakeFormationOptInCommand"; import { CreateLFTagCommandInput, CreateLFTagCommandOutput } from "../commands/CreateLFTagCommand"; import { DeleteDataCellsFilterCommandInput, DeleteDataCellsFilterCommandOutput, } from "../commands/DeleteDataCellsFilterCommand"; +import { + DeleteLakeFormationOptInCommandInput, + DeleteLakeFormationOptInCommandOutput, +} from "../commands/DeleteLakeFormationOptInCommand"; import { DeleteLFTagCommandInput, DeleteLFTagCommandOutput } from "../commands/DeleteLFTagCommand"; import { DeleteObjectsOnCancelCommandInput, @@ -94,6 +102,10 @@ import { ListDataCellsFilterCommandInput, ListDataCellsFilterCommandOutput, } from "../commands/ListDataCellsFilterCommand"; +import { + ListLakeFormationOptInsCommandInput, + ListLakeFormationOptInsCommandOutput, +} from "../commands/ListLakeFormationOptInsCommand"; import { ListLFTagsCommandInput, ListLFTagsCommandOutput } from "../commands/ListLFTagsCommand"; import { ListPermissionsCommandInput, ListPermissionsCommandOutput } from "../commands/ListPermissionsCommand"; import { ListResourcesCommandInput, ListResourcesCommandOutput } from "../commands/ListResourcesCommand"; @@ -157,6 +169,7 @@ import { GlueEncryptionException, InternalServiceException, InvalidInputException, + LakeFormationOptInsInfo, LFTag, LFTagKeyResource, LFTagPair, @@ -167,6 +180,7 @@ import { PermissionType, PermissionTypeMismatchException, PrincipalPermissions, + PrincipalResourcePermissions, QueryPlanningContext, Resource, ResourceInfo, @@ -399,6 +413,37 @@ export const se_CreateDataCellsFilterCommand = async ( }); }; +/** + * serializeAws_restJson1CreateLakeFormationOptInCommand + */ +export const se_CreateLakeFormationOptInCommand = async ( + input: CreateLakeFormationOptInCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateLakeFormationOptIn"; + let body: any; + body = JSON.stringify( + take(input, { + Principal: (_) => _json(_), + Resource: (_) => _json(_), + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + /** * serializeAws_restJson1CreateLFTagCommand */ @@ -462,6 +507,37 @@ export const se_DeleteDataCellsFilterCommand = async ( }); }; +/** + * serializeAws_restJson1DeleteLakeFormationOptInCommand + */ +export const se_DeleteLakeFormationOptInCommand = async ( + input: DeleteLakeFormationOptInCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteLakeFormationOptIn"; + let body: any; + body = JSON.stringify( + take(input, { + Principal: (_) => _json(_), + Resource: (_) => _json(_), + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + /** * serializeAws_restJson1DeleteLFTagCommand */ @@ -1113,6 +1189,39 @@ export const se_ListDataCellsFilterCommand = async ( }); }; +/** + * serializeAws_restJson1ListLakeFormationOptInsCommand + */ +export const se_ListLakeFormationOptInsCommand = async ( + input: ListLakeFormationOptInsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListLakeFormationOptIns"; + let body: any; + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + Principal: (_) => _json(_), + Resource: (_) => _json(_), + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + /** * serializeAws_restJson1ListLFTagsCommand */ @@ -1323,6 +1432,7 @@ export const se_RegisterResourceCommand = async ( let body: any; body = JSON.stringify( take(input, { + HybridAccessEnabled: [], ResourceArn: [], RoleArn: [], UseServiceLinkedRole: [], @@ -1612,6 +1722,7 @@ export const se_UpdateResourceCommand = async ( let body: any; body = JSON.stringify( take(input, { + HybridAccessEnabled: [], ResourceArn: [], RoleArn: [], WithFederation: [], @@ -2102,6 +2213,64 @@ const de_CreateDataCellsFilterCommandError = async ( } }; +/** + * deserializeAws_restJson1CreateLakeFormationOptInCommand + */ +export const de_CreateLakeFormationOptInCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CreateLakeFormationOptInCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1CreateLakeFormationOptInCommandError + */ +const de_CreateLakeFormationOptInCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.lakeformation#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConcurrentModificationException": + case "com.amazonaws.lakeformation#ConcurrentModificationException": + throw await de_ConcurrentModificationExceptionRes(parsedOutput, context); + case "EntityNotFoundException": + case "com.amazonaws.lakeformation#EntityNotFoundException": + throw await de_EntityNotFoundExceptionRes(parsedOutput, context); + case "InternalServiceException": + case "com.amazonaws.lakeformation#InternalServiceException": + throw await de_InternalServiceExceptionRes(parsedOutput, context); + case "InvalidInputException": + case "com.amazonaws.lakeformation#InvalidInputException": + throw await de_InvalidInputExceptionRes(parsedOutput, context); + case "OperationTimeoutException": + case "com.amazonaws.lakeformation#OperationTimeoutException": + throw await de_OperationTimeoutExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_restJson1CreateLFTagCommand */ @@ -2215,6 +2384,64 @@ const de_DeleteDataCellsFilterCommandError = async ( } }; +/** + * deserializeAws_restJson1DeleteLakeFormationOptInCommand + */ +export const de_DeleteLakeFormationOptInCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_DeleteLakeFormationOptInCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1DeleteLakeFormationOptInCommandError + */ +const de_DeleteLakeFormationOptInCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.lakeformation#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConcurrentModificationException": + case "com.amazonaws.lakeformation#ConcurrentModificationException": + throw await de_ConcurrentModificationExceptionRes(parsedOutput, context); + case "EntityNotFoundException": + case "com.amazonaws.lakeformation#EntityNotFoundException": + throw await de_EntityNotFoundExceptionRes(parsedOutput, context); + case "InternalServiceException": + case "com.amazonaws.lakeformation#InternalServiceException": + throw await de_InternalServiceExceptionRes(parsedOutput, context); + case "InvalidInputException": + case "com.amazonaws.lakeformation#InvalidInputException": + throw await de_InvalidInputExceptionRes(parsedOutput, context); + case "OperationTimeoutException": + case "com.amazonaws.lakeformation#OperationTimeoutException": + throw await de_OperationTimeoutExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_restJson1DeleteLFTagCommand */ @@ -2687,7 +2914,7 @@ export const de_GetEffectivePermissionsForPathCommand = async ( const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { NextToken: __expectString, - Permissions: _json, + Permissions: (_) => de_PrincipalResourcePermissionsList(_, context), }); Object.assign(contents, doc); return contents; @@ -3391,6 +3618,63 @@ const de_ListDataCellsFilterCommandError = async ( } }; +/** + * deserializeAws_restJson1ListLakeFormationOptInsCommand + */ +export const de_ListLakeFormationOptInsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_ListLakeFormationOptInsCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + LakeFormationOptInsInfoList: (_) => de_LakeFormationOptInsInfoList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1ListLakeFormationOptInsCommandError + */ +const de_ListLakeFormationOptInsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.lakeformation#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServiceException": + case "com.amazonaws.lakeformation#InternalServiceException": + throw await de_InternalServiceExceptionRes(parsedOutput, context); + case "InvalidInputException": + case "com.amazonaws.lakeformation#InvalidInputException": + throw await de_InvalidInputExceptionRes(parsedOutput, context); + case "OperationTimeoutException": + case "com.amazonaws.lakeformation#OperationTimeoutException": + throw await de_OperationTimeoutExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_restJson1ListLFTagsCommand */ @@ -3467,7 +3751,7 @@ export const de_ListPermissionsCommand = async ( const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { NextToken: __expectString, - PrincipalResourcePermissions: _json, + PrincipalResourcePermissions: (_) => de_PrincipalResourcePermissionsList(_, context), }); Object.assign(contents, doc); return contents; @@ -4924,6 +5208,30 @@ const se_QueryPlanningContext = (input: QueryPlanningContext, context: __SerdeCo // de_Expression omitted. +/** + * deserializeAws_restJson1LakeFormationOptInsInfo + */ +const de_LakeFormationOptInsInfo = (output: any, context: __SerdeContext): LakeFormationOptInsInfo => { + return take(output, { + LastModified: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdatedBy: __expectString, + Principal: _json, + Resource: _json, + }) as any; +}; + +/** + * deserializeAws_restJson1LakeFormationOptInsInfoList + */ +const de_LakeFormationOptInsInfoList = (output: any, context: __SerdeContext): LakeFormationOptInsInfo[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_LakeFormationOptInsInfo(entry, context); + }); + return retVal; +}; + // de_LFTag omitted. // de_LFTagError omitted. @@ -4954,9 +5262,32 @@ const se_QueryPlanningContext = (input: QueryPlanningContext, context: __SerdeCo // de_PrincipalPermissionsList omitted. -// de_PrincipalResourcePermissions omitted. +/** + * deserializeAws_restJson1PrincipalResourcePermissions + */ +const de_PrincipalResourcePermissions = (output: any, context: __SerdeContext): PrincipalResourcePermissions => { + return take(output, { + AdditionalDetails: _json, + LastUpdated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdatedBy: __expectString, + Permissions: _json, + PermissionsWithGrantOption: _json, + Principal: _json, + Resource: _json, + }) as any; +}; -// de_PrincipalResourcePermissionsList omitted. +/** + * deserializeAws_restJson1PrincipalResourcePermissionsList + */ +const de_PrincipalResourcePermissionsList = (output: any, context: __SerdeContext): PrincipalResourcePermissions[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_PrincipalResourcePermissions(entry, context); + }); + return retVal; +}; // de_Resource omitted. @@ -4965,6 +5296,7 @@ const se_QueryPlanningContext = (input: QueryPlanningContext, context: __SerdeCo */ const de_ResourceInfo = (output: any, context: __SerdeContext): ResourceInfo => { return take(output, { + HybridAccessEnabled: __expectBoolean, LastModified: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), ResourceArn: __expectString, RoleArn: __expectString, diff --git a/codegen/sdk-codegen/aws-models/lakeformation.json b/codegen/sdk-codegen/aws-models/lakeformation.json index 3b1ccf22a517e..93a9d7c7c359f 100644 --- a/codegen/sdk-codegen/aws-models/lakeformation.json +++ b/codegen/sdk-codegen/aws-models/lakeformation.json @@ -54,12 +54,18 @@ { "target": "com.amazonaws.lakeformation#CreateDataCellsFilter" }, + { + "target": "com.amazonaws.lakeformation#CreateLakeFormationOptIn" + }, { "target": "com.amazonaws.lakeformation#CreateLFTag" }, { "target": "com.amazonaws.lakeformation#DeleteDataCellsFilter" }, + { + "target": "com.amazonaws.lakeformation#DeleteLakeFormationOptIn" + }, { "target": "com.amazonaws.lakeformation#DeleteLFTag" }, @@ -120,6 +126,9 @@ { "target": "com.amazonaws.lakeformation#ListDataCellsFilter" }, + { + "target": "com.amazonaws.lakeformation#ListLakeFormationOptIns" + }, { "target": "com.amazonaws.lakeformation#ListLFTags" }, @@ -2049,6 +2058,70 @@ "smithy.api#output": {} } }, + "com.amazonaws.lakeformation#CreateLakeFormationOptIn": { + "type": "operation", + "input": { + "target": "com.amazonaws.lakeformation#CreateLakeFormationOptInRequest" + }, + "output": { + "target": "com.amazonaws.lakeformation#CreateLakeFormationOptInResponse" + }, + "errors": [ + { + "target": "com.amazonaws.lakeformation#AccessDeniedException" + }, + { + "target": "com.amazonaws.lakeformation#ConcurrentModificationException" + }, + { + "target": "com.amazonaws.lakeformation#EntityNotFoundException" + }, + { + "target": "com.amazonaws.lakeformation#InternalServiceException" + }, + { + "target": "com.amazonaws.lakeformation#InvalidInputException" + }, + { + "target": "com.amazonaws.lakeformation#OperationTimeoutException" + } + ], + "traits": { + "smithy.api#documentation": "

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

", + "smithy.api#http": { + "method": "POST", + "uri": "/CreateLakeFormationOptIn", + "code": 200 + } + } + }, + "com.amazonaws.lakeformation#CreateLakeFormationOptInRequest": { + "type": "structure", + "members": { + "Principal": { + "target": "com.amazonaws.lakeformation#DataLakePrincipal", + "traits": { + "smithy.api#required": {} + } + }, + "Resource": { + "target": "com.amazonaws.lakeformation#Resource", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.lakeformation#CreateLakeFormationOptInResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.lakeformation#CredentialTimeoutDurationSecondInteger": { "type": "integer", "traits": { @@ -2501,6 +2574,70 @@ "smithy.api#output": {} } }, + "com.amazonaws.lakeformation#DeleteLakeFormationOptIn": { + "type": "operation", + "input": { + "target": "com.amazonaws.lakeformation#DeleteLakeFormationOptInRequest" + }, + "output": { + "target": "com.amazonaws.lakeformation#DeleteLakeFormationOptInResponse" + }, + "errors": [ + { + "target": "com.amazonaws.lakeformation#AccessDeniedException" + }, + { + "target": "com.amazonaws.lakeformation#ConcurrentModificationException" + }, + { + "target": "com.amazonaws.lakeformation#EntityNotFoundException" + }, + { + "target": "com.amazonaws.lakeformation#InternalServiceException" + }, + { + "target": "com.amazonaws.lakeformation#InvalidInputException" + }, + { + "target": "com.amazonaws.lakeformation#OperationTimeoutException" + } + ], + "traits": { + "smithy.api#documentation": "

Remove the Lake Formation permissions enforcement of the given databases, tables, and principals.

", + "smithy.api#http": { + "method": "POST", + "uri": "/DeleteLakeFormationOptIn", + "code": 200 + } + } + }, + "com.amazonaws.lakeformation#DeleteLakeFormationOptInRequest": { + "type": "structure", + "members": { + "Principal": { + "target": "com.amazonaws.lakeformation#DataLakePrincipal", + "traits": { + "smithy.api#required": {} + } + }, + "Resource": { + "target": "com.amazonaws.lakeformation#Resource", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.lakeformation#DeleteLakeFormationOptInResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.lakeformation#DeleteObjectInput": { "type": "structure", "members": { @@ -4331,7 +4468,7 @@ "TagValues": { "target": "com.amazonaws.lakeformation#TagValueList", "traits": { - "smithy.api#documentation": "

A list of possible values an attribute can take.

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

A list of possible values an attribute can take.

\n

The maximum number of values that can be defined for a LF-Tag is 1000. A single API call\n supports 50 values. You can use multiple API calls to add more values.

", "smithy.api#required": {} } } @@ -4482,6 +4619,38 @@ } } }, + "com.amazonaws.lakeformation#LakeFormationOptInsInfo": { + "type": "structure", + "members": { + "Resource": { + "target": "com.amazonaws.lakeformation#Resource" + }, + "Principal": { + "target": "com.amazonaws.lakeformation#DataLakePrincipal" + }, + "LastModified": { + "target": "com.amazonaws.lakeformation#LastModifiedTimestamp", + "traits": { + "smithy.api#documentation": "

The last modified date and time of the record.

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

The user who updated the record.

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

A single principal-resource pair that has Lake Formation permissins enforced.

" + } + }, + "com.amazonaws.lakeformation#LakeFormationOptInsInfoList": { + "type": "list", + "member": { + "target": "com.amazonaws.lakeformation#LakeFormationOptInsInfo" + } + }, "com.amazonaws.lakeformation#LastModifiedTimestamp": { "type": "timestamp" }, @@ -4660,6 +4829,91 @@ "smithy.api#output": {} } }, + "com.amazonaws.lakeformation#ListLakeFormationOptIns": { + "type": "operation", + "input": { + "target": "com.amazonaws.lakeformation#ListLakeFormationOptInsRequest" + }, + "output": { + "target": "com.amazonaws.lakeformation#ListLakeFormationOptInsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.lakeformation#AccessDeniedException" + }, + { + "target": "com.amazonaws.lakeformation#InternalServiceException" + }, + { + "target": "com.amazonaws.lakeformation#InvalidInputException" + }, + { + "target": "com.amazonaws.lakeformation#OperationTimeoutException" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieve the current list of resources and principals that are opt in to enforce Lake Formation permissions.

", + "smithy.api#http": { + "method": "POST", + "uri": "/ListLakeFormationOptIns", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.lakeformation#ListLakeFormationOptInsRequest": { + "type": "structure", + "members": { + "Principal": { + "target": "com.amazonaws.lakeformation#DataLakePrincipal" + }, + "Resource": { + "target": "com.amazonaws.lakeformation#Resource", + "traits": { + "smithy.api#documentation": "

A structure for the resource.

" + } + }, + "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#ListLakeFormationOptInsResponse": { + "type": "structure", + "members": { + "LakeFormationOptInsInfoList": { + "target": "com.amazonaws.lakeformation#LakeFormationOptInsInfoList", + "traits": { + "smithy.api#documentation": "

A list of principal-resource pairs that have Lake Formation permissins enforced.

" + } + }, + "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#ListPermissions": { "type": "operation", "input": { @@ -5445,6 +5699,18 @@ "traits": { "smithy.api#documentation": "

This attribute can be used to return any additional details of PrincipalResourcePermissions. Currently returns only as a RAM resource share ARN.

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

The date and time when the resource was last updated.

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

The user who updated the record.

" + } } }, "traits": { @@ -5675,6 +5941,12 @@ "traits": { "smithy.api#documentation": "

Whether or not the resource is a federated resource.

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

\n Specifies whether the data access of tables pointing to the location can be managed by both Lake Formation permissions as well as Amazon S3 bucket policies.\n

" + } } }, "traits": { @@ -5855,6 +6127,12 @@ "traits": { "smithy.api#documentation": "

Whether or not the resource is a federated resource.

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

\n Indicates whether the data access of tables pointing to the location can be managed by both Lake Formation permissions as well as Amazon S3 bucket policies.\n

" + } } }, "traits": { @@ -7104,6 +7382,12 @@ "traits": { "smithy.api#documentation": "

Whether or not the resource is a federated resource.

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

\n Specifies whether the data access of tables pointing to the location can be managed by both Lake Formation permissions as well as Amazon S3 bucket policies.\n

" + } } }, "traits": { @@ -7443,4 +7727,4 @@ } } } -} \ No newline at end of file +}