diff --git a/clients/client-glue/src/Glue.ts b/clients/client-glue/src/Glue.ts index 541715aad519..1934243e195c 100644 --- a/clients/client-glue/src/Glue.ts +++ b/clients/client-glue/src/Glue.ts @@ -35,6 +35,11 @@ import { BatchGetCrawlersCommandInput, BatchGetCrawlersCommandOutput, } from "./commands/BatchGetCrawlersCommand"; +import { + BatchGetCustomEntityTypesCommand, + BatchGetCustomEntityTypesCommandInput, + BatchGetCustomEntityTypesCommandOutput, +} from "./commands/BatchGetCustomEntityTypesCommand"; import { BatchGetDevEndpointsCommand, BatchGetDevEndpointsCommandInput, @@ -105,6 +110,11 @@ import { CreateCrawlerCommandInput, CreateCrawlerCommandOutput, } from "./commands/CreateCrawlerCommand"; +import { + CreateCustomEntityTypeCommand, + CreateCustomEntityTypeCommandInput, + CreateCustomEntityTypeCommandOutput, +} from "./commands/CreateCustomEntityTypeCommand"; import { CreateDatabaseCommand, CreateDatabaseCommandInput, @@ -202,6 +212,11 @@ import { DeleteCrawlerCommandInput, DeleteCrawlerCommandOutput, } from "./commands/DeleteCrawlerCommand"; +import { + DeleteCustomEntityTypeCommand, + DeleteCustomEntityTypeCommandInput, + DeleteCustomEntityTypeCommandOutput, +} from "./commands/DeleteCustomEntityTypeCommand"; import { DeleteDatabaseCommand, DeleteDatabaseCommandInput, @@ -336,6 +351,11 @@ import { GetCrawlerMetricsCommandOutput, } from "./commands/GetCrawlerMetricsCommand"; import { GetCrawlersCommand, GetCrawlersCommandInput, GetCrawlersCommandOutput } from "./commands/GetCrawlersCommand"; +import { + GetCustomEntityTypeCommand, + GetCustomEntityTypeCommandInput, + GetCustomEntityTypeCommandOutput, +} from "./commands/GetCustomEntityTypeCommand"; import { GetDatabaseCommand, GetDatabaseCommandInput, GetDatabaseCommandOutput } from "./commands/GetDatabaseCommand"; import { GetDatabasesCommand, @@ -522,6 +542,11 @@ import { ListCrawlersCommandInput, ListCrawlersCommandOutput, } from "./commands/ListCrawlersCommand"; +import { + ListCustomEntityTypesCommand, + ListCustomEntityTypesCommandInput, + ListCustomEntityTypesCommandOutput, +} from "./commands/ListCustomEntityTypesCommand"; import { ListDevEndpointsCommand, ListDevEndpointsCommandInput, @@ -1007,6 +1032,35 @@ export class Glue extends GlueClient { } } + public batchGetCustomEntityTypes( + args: BatchGetCustomEntityTypesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public batchGetCustomEntityTypes( + args: BatchGetCustomEntityTypesCommandInput, + cb: (err: any, data?: BatchGetCustomEntityTypesCommandOutput) => void + ): void; + public batchGetCustomEntityTypes( + args: BatchGetCustomEntityTypesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: BatchGetCustomEntityTypesCommandOutput) => void + ): void; + public batchGetCustomEntityTypes( + args: BatchGetCustomEntityTypesCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: BatchGetCustomEntityTypesCommandOutput) => void), + cb?: (err: any, data?: BatchGetCustomEntityTypesCommandOutput) => void + ): Promise | void { + const command = new BatchGetCustomEntityTypesCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

Returns a list of resource metadata for a given list of development endpoint names. After * calling the ListDevEndpoints operation, you can call this operation to access the @@ -1462,6 +1516,35 @@ export class Glue extends GlueClient { } } + public createCustomEntityType( + args: CreateCustomEntityTypeCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createCustomEntityType( + args: CreateCustomEntityTypeCommandInput, + cb: (err: any, data?: CreateCustomEntityTypeCommandOutput) => void + ): void; + public createCustomEntityType( + args: CreateCustomEntityTypeCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateCustomEntityTypeCommandOutput) => void + ): void; + public createCustomEntityType( + args: CreateCustomEntityTypeCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateCustomEntityTypeCommandOutput) => void), + cb?: (err: any, data?: CreateCustomEntityTypeCommandOutput) => void + ): Promise | void { + const command = new CreateCustomEntityTypeCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

Creates a new database in a Data Catalog.

*/ @@ -2135,6 +2218,35 @@ export class Glue extends GlueClient { } } + public deleteCustomEntityType( + args: DeleteCustomEntityTypeCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteCustomEntityType( + args: DeleteCustomEntityTypeCommandInput, + cb: (err: any, data?: DeleteCustomEntityTypeCommandOutput) => void + ): void; + public deleteCustomEntityType( + args: DeleteCustomEntityTypeCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteCustomEntityTypeCommandOutput) => void + ): void; + public deleteCustomEntityType( + args: DeleteCustomEntityTypeCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteCustomEntityTypeCommandOutput) => void), + cb?: (err: any, data?: DeleteCustomEntityTypeCommandOutput) => void + ): Promise | void { + const command = new DeleteCustomEntityTypeCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

Removes a specified database from a Data Catalog.

* @@ -3102,6 +3214,35 @@ export class Glue extends GlueClient { } } + public getCustomEntityType( + args: GetCustomEntityTypeCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getCustomEntityType( + args: GetCustomEntityTypeCommandInput, + cb: (err: any, data?: GetCustomEntityTypeCommandOutput) => void + ): void; + public getCustomEntityType( + args: GetCustomEntityTypeCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetCustomEntityTypeCommandOutput) => void + ): void; + public getCustomEntityType( + args: GetCustomEntityTypeCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetCustomEntityTypeCommandOutput) => void), + cb?: (err: any, data?: GetCustomEntityTypeCommandOutput) => void + ): Promise | void { + const command = new GetCustomEntityTypeCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

Retrieves the definition of a specified database.

*/ @@ -4625,6 +4766,35 @@ export class Glue extends GlueClient { } } + public listCustomEntityTypes( + args: ListCustomEntityTypesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listCustomEntityTypes( + args: ListCustomEntityTypesCommandInput, + cb: (err: any, data?: ListCustomEntityTypesCommandOutput) => void + ): void; + public listCustomEntityTypes( + args: ListCustomEntityTypesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListCustomEntityTypesCommandOutput) => void + ): void; + public listCustomEntityTypes( + args: ListCustomEntityTypesCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListCustomEntityTypesCommandOutput) => void), + cb?: (err: any, data?: ListCustomEntityTypesCommandOutput) => void + ): Promise | void { + const command = new ListCustomEntityTypesCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

Retrieves the names of all DevEndpoint resources in this Amazon Web Services account, or the * resources with the specified tag. This operation allows you to see which resources are diff --git a/clients/client-glue/src/GlueClient.ts b/clients/client-glue/src/GlueClient.ts index b4ef9b34be3d..fbd919564c85 100644 --- a/clients/client-glue/src/GlueClient.ts +++ b/clients/client-glue/src/GlueClient.ts @@ -70,6 +70,10 @@ import { } from "./commands/BatchDeleteTableVersionCommand"; import { BatchGetBlueprintsCommandInput, BatchGetBlueprintsCommandOutput } from "./commands/BatchGetBlueprintsCommand"; import { BatchGetCrawlersCommandInput, BatchGetCrawlersCommandOutput } from "./commands/BatchGetCrawlersCommand"; +import { + BatchGetCustomEntityTypesCommandInput, + BatchGetCustomEntityTypesCommandOutput, +} from "./commands/BatchGetCustomEntityTypesCommand"; import { BatchGetDevEndpointsCommandInput, BatchGetDevEndpointsCommandOutput, @@ -93,6 +97,10 @@ import { CreateBlueprintCommandInput, CreateBlueprintCommandOutput } from "./com import { CreateClassifierCommandInput, CreateClassifierCommandOutput } from "./commands/CreateClassifierCommand"; import { CreateConnectionCommandInput, CreateConnectionCommandOutput } from "./commands/CreateConnectionCommand"; import { CreateCrawlerCommandInput, CreateCrawlerCommandOutput } from "./commands/CreateCrawlerCommand"; +import { + CreateCustomEntityTypeCommandInput, + CreateCustomEntityTypeCommandOutput, +} from "./commands/CreateCustomEntityTypeCommand"; import { CreateDatabaseCommandInput, CreateDatabaseCommandOutput } from "./commands/CreateDatabaseCommand"; import { CreateDevEndpointCommandInput, CreateDevEndpointCommandOutput } from "./commands/CreateDevEndpointCommand"; import { CreateJobCommandInput, CreateJobCommandOutput } from "./commands/CreateJobCommand"; @@ -129,6 +137,10 @@ import { } from "./commands/DeleteColumnStatisticsForTableCommand"; import { DeleteConnectionCommandInput, DeleteConnectionCommandOutput } from "./commands/DeleteConnectionCommand"; import { DeleteCrawlerCommandInput, DeleteCrawlerCommandOutput } from "./commands/DeleteCrawlerCommand"; +import { + DeleteCustomEntityTypeCommandInput, + DeleteCustomEntityTypeCommandOutput, +} from "./commands/DeleteCustomEntityTypeCommand"; import { DeleteDatabaseCommandInput, DeleteDatabaseCommandOutput } from "./commands/DeleteDatabaseCommand"; import { DeleteDevEndpointCommandInput, DeleteDevEndpointCommandOutput } from "./commands/DeleteDevEndpointCommand"; import { DeleteJobCommandInput, DeleteJobCommandOutput } from "./commands/DeleteJobCommand"; @@ -183,6 +195,10 @@ import { GetConnectionsCommandInput, GetConnectionsCommandOutput } from "./comma import { GetCrawlerCommandInput, GetCrawlerCommandOutput } from "./commands/GetCrawlerCommand"; import { GetCrawlerMetricsCommandInput, GetCrawlerMetricsCommandOutput } from "./commands/GetCrawlerMetricsCommand"; import { GetCrawlersCommandInput, GetCrawlersCommandOutput } from "./commands/GetCrawlersCommand"; +import { + GetCustomEntityTypeCommandInput, + GetCustomEntityTypeCommandOutput, +} from "./commands/GetCustomEntityTypeCommand"; import { GetDatabaseCommandInput, GetDatabaseCommandOutput } from "./commands/GetDatabaseCommand"; import { GetDatabasesCommandInput, GetDatabasesCommandOutput } from "./commands/GetDatabasesCommand"; import { @@ -275,6 +291,10 @@ import { } from "./commands/ImportCatalogToGlueCommand"; import { ListBlueprintsCommandInput, ListBlueprintsCommandOutput } from "./commands/ListBlueprintsCommand"; import { ListCrawlersCommandInput, ListCrawlersCommandOutput } from "./commands/ListCrawlersCommand"; +import { + ListCustomEntityTypesCommandInput, + ListCustomEntityTypesCommandOutput, +} from "./commands/ListCustomEntityTypesCommand"; import { ListDevEndpointsCommandInput, ListDevEndpointsCommandOutput } from "./commands/ListDevEndpointsCommand"; import { ListJobsCommandInput, ListJobsCommandOutput } from "./commands/ListJobsCommand"; import { ListMLTransformsCommandInput, ListMLTransformsCommandOutput } from "./commands/ListMLTransformsCommand"; @@ -389,6 +409,7 @@ export type ServiceInputTypes = | BatchDeleteTableVersionCommandInput | BatchGetBlueprintsCommandInput | BatchGetCrawlersCommandInput + | BatchGetCustomEntityTypesCommandInput | BatchGetDevEndpointsCommandInput | BatchGetJobsCommandInput | BatchGetPartitionCommandInput @@ -403,6 +424,7 @@ export type ServiceInputTypes = | CreateClassifierCommandInput | CreateConnectionCommandInput | CreateCrawlerCommandInput + | CreateCustomEntityTypeCommandInput | CreateDatabaseCommandInput | CreateDevEndpointCommandInput | CreateJobCommandInput @@ -424,6 +446,7 @@ export type ServiceInputTypes = | DeleteColumnStatisticsForTableCommandInput | DeleteConnectionCommandInput | DeleteCrawlerCommandInput + | DeleteCustomEntityTypeCommandInput | DeleteDatabaseCommandInput | DeleteDevEndpointCommandInput | DeleteJobCommandInput @@ -454,6 +477,7 @@ export type ServiceInputTypes = | GetCrawlerCommandInput | GetCrawlerMetricsCommandInput | GetCrawlersCommandInput + | GetCustomEntityTypeCommandInput | GetDataCatalogEncryptionSettingsCommandInput | GetDatabaseCommandInput | GetDatabasesCommandInput @@ -504,6 +528,7 @@ export type ServiceInputTypes = | ImportCatalogToGlueCommandInput | ListBlueprintsCommandInput | ListCrawlersCommandInput + | ListCustomEntityTypesCommandInput | ListDevEndpointsCommandInput | ListJobsCommandInput | ListMLTransformsCommandInput @@ -569,6 +594,7 @@ export type ServiceOutputTypes = | BatchDeleteTableVersionCommandOutput | BatchGetBlueprintsCommandOutput | BatchGetCrawlersCommandOutput + | BatchGetCustomEntityTypesCommandOutput | BatchGetDevEndpointsCommandOutput | BatchGetJobsCommandOutput | BatchGetPartitionCommandOutput @@ -583,6 +609,7 @@ export type ServiceOutputTypes = | CreateClassifierCommandOutput | CreateConnectionCommandOutput | CreateCrawlerCommandOutput + | CreateCustomEntityTypeCommandOutput | CreateDatabaseCommandOutput | CreateDevEndpointCommandOutput | CreateJobCommandOutput @@ -604,6 +631,7 @@ export type ServiceOutputTypes = | DeleteColumnStatisticsForTableCommandOutput | DeleteConnectionCommandOutput | DeleteCrawlerCommandOutput + | DeleteCustomEntityTypeCommandOutput | DeleteDatabaseCommandOutput | DeleteDevEndpointCommandOutput | DeleteJobCommandOutput @@ -634,6 +662,7 @@ export type ServiceOutputTypes = | GetCrawlerCommandOutput | GetCrawlerMetricsCommandOutput | GetCrawlersCommandOutput + | GetCustomEntityTypeCommandOutput | GetDataCatalogEncryptionSettingsCommandOutput | GetDatabaseCommandOutput | GetDatabasesCommandOutput @@ -684,6 +713,7 @@ export type ServiceOutputTypes = | ImportCatalogToGlueCommandOutput | ListBlueprintsCommandOutput | ListCrawlersCommandOutput + | ListCustomEntityTypesCommandOutput | ListDevEndpointsCommandOutput | ListJobsCommandOutput | ListMLTransformsCommandOutput diff --git a/clients/client-glue/src/commands/BatchGetCustomEntityTypesCommand.ts b/clients/client-glue/src/commands/BatchGetCustomEntityTypesCommand.ts new file mode 100644 index 000000000000..9e72d0470b66 --- /dev/null +++ b/clients/client-glue/src/commands/BatchGetCustomEntityTypesCommand.ts @@ -0,0 +1,81 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient"; +import { BatchGetCustomEntityTypesRequest, BatchGetCustomEntityTypesResponse } from "../models/models_0"; +import { + deserializeAws_json1_1BatchGetCustomEntityTypesCommand, + serializeAws_json1_1BatchGetCustomEntityTypesCommand, +} from "../protocols/Aws_json1_1"; + +export interface BatchGetCustomEntityTypesCommandInput extends BatchGetCustomEntityTypesRequest {} +export interface BatchGetCustomEntityTypesCommandOutput extends BatchGetCustomEntityTypesResponse, __MetadataBearer {} + +export class BatchGetCustomEntityTypesCommand extends $Command< + BatchGetCustomEntityTypesCommandInput, + BatchGetCustomEntityTypesCommandOutput, + GlueClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: BatchGetCustomEntityTypesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: GlueClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "GlueClient"; + const commandName = "BatchGetCustomEntityTypesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: BatchGetCustomEntityTypesRequest.filterSensitiveLog, + outputFilterSensitiveLog: BatchGetCustomEntityTypesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: BatchGetCustomEntityTypesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_1BatchGetCustomEntityTypesCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_json1_1BatchGetCustomEntityTypesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-glue/src/commands/CreateCustomEntityTypeCommand.ts b/clients/client-glue/src/commands/CreateCustomEntityTypeCommand.ts new file mode 100644 index 000000000000..9ab6ef69ed58 --- /dev/null +++ b/clients/client-glue/src/commands/CreateCustomEntityTypeCommand.ts @@ -0,0 +1,78 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient"; +import { CreateCustomEntityTypeRequest, CreateCustomEntityTypeResponse } from "../models/models_0"; +import { + deserializeAws_json1_1CreateCustomEntityTypeCommand, + serializeAws_json1_1CreateCustomEntityTypeCommand, +} from "../protocols/Aws_json1_1"; + +export interface CreateCustomEntityTypeCommandInput extends CreateCustomEntityTypeRequest {} +export interface CreateCustomEntityTypeCommandOutput extends CreateCustomEntityTypeResponse, __MetadataBearer {} + +export class CreateCustomEntityTypeCommand extends $Command< + CreateCustomEntityTypeCommandInput, + CreateCustomEntityTypeCommandOutput, + GlueClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateCustomEntityTypeCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: GlueClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "GlueClient"; + const commandName = "CreateCustomEntityTypeCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: CreateCustomEntityTypeRequest.filterSensitiveLog, + outputFilterSensitiveLog: CreateCustomEntityTypeResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: CreateCustomEntityTypeCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_1CreateCustomEntityTypeCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_1CreateCustomEntityTypeCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-glue/src/commands/DeleteCustomEntityTypeCommand.ts b/clients/client-glue/src/commands/DeleteCustomEntityTypeCommand.ts new file mode 100644 index 000000000000..51aebec0cf8e --- /dev/null +++ b/clients/client-glue/src/commands/DeleteCustomEntityTypeCommand.ts @@ -0,0 +1,78 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient"; +import { DeleteCustomEntityTypeRequest, DeleteCustomEntityTypeResponse } from "../models/models_0"; +import { + deserializeAws_json1_1DeleteCustomEntityTypeCommand, + serializeAws_json1_1DeleteCustomEntityTypeCommand, +} from "../protocols/Aws_json1_1"; + +export interface DeleteCustomEntityTypeCommandInput extends DeleteCustomEntityTypeRequest {} +export interface DeleteCustomEntityTypeCommandOutput extends DeleteCustomEntityTypeResponse, __MetadataBearer {} + +export class DeleteCustomEntityTypeCommand extends $Command< + DeleteCustomEntityTypeCommandInput, + DeleteCustomEntityTypeCommandOutput, + GlueClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteCustomEntityTypeCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: GlueClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "GlueClient"; + const commandName = "DeleteCustomEntityTypeCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DeleteCustomEntityTypeRequest.filterSensitiveLog, + outputFilterSensitiveLog: DeleteCustomEntityTypeResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DeleteCustomEntityTypeCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_1DeleteCustomEntityTypeCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_1DeleteCustomEntityTypeCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-glue/src/commands/GetColumnStatisticsForPartitionCommand.ts b/clients/client-glue/src/commands/GetColumnStatisticsForPartitionCommand.ts index 1ecc491c534f..c8688d8711b5 100644 --- a/clients/client-glue/src/commands/GetColumnStatisticsForPartitionCommand.ts +++ b/clients/client-glue/src/commands/GetColumnStatisticsForPartitionCommand.ts @@ -12,7 +12,8 @@ import { } from "@aws-sdk/types"; import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient"; -import { GetColumnStatisticsForPartitionRequest, GetColumnStatisticsForPartitionResponse } from "../models/models_0"; +import { GetColumnStatisticsForPartitionRequest } from "../models/models_0"; +import { GetColumnStatisticsForPartitionResponse } from "../models/models_1"; import { deserializeAws_json1_1GetColumnStatisticsForPartitionCommand, serializeAws_json1_1GetColumnStatisticsForPartitionCommand, diff --git a/clients/client-glue/src/commands/GetColumnStatisticsForTableCommand.ts b/clients/client-glue/src/commands/GetColumnStatisticsForTableCommand.ts index c42cebf9ea20..84b8081cbcad 100644 --- a/clients/client-glue/src/commands/GetColumnStatisticsForTableCommand.ts +++ b/clients/client-glue/src/commands/GetColumnStatisticsForTableCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient"; -import { GetColumnStatisticsForTableRequest, GetColumnStatisticsForTableResponse } from "../models/models_0"; +import { GetColumnStatisticsForTableRequest, GetColumnStatisticsForTableResponse } from "../models/models_1"; import { deserializeAws_json1_1GetColumnStatisticsForTableCommand, serializeAws_json1_1GetColumnStatisticsForTableCommand, diff --git a/clients/client-glue/src/commands/GetCustomEntityTypeCommand.ts b/clients/client-glue/src/commands/GetCustomEntityTypeCommand.ts new file mode 100644 index 000000000000..70ce60618a57 --- /dev/null +++ b/clients/client-glue/src/commands/GetCustomEntityTypeCommand.ts @@ -0,0 +1,78 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient"; +import { GetCustomEntityTypeRequest, GetCustomEntityTypeResponse } from "../models/models_1"; +import { + deserializeAws_json1_1GetCustomEntityTypeCommand, + serializeAws_json1_1GetCustomEntityTypeCommand, +} from "../protocols/Aws_json1_1"; + +export interface GetCustomEntityTypeCommandInput extends GetCustomEntityTypeRequest {} +export interface GetCustomEntityTypeCommandOutput extends GetCustomEntityTypeResponse, __MetadataBearer {} + +export class GetCustomEntityTypeCommand extends $Command< + GetCustomEntityTypeCommandInput, + GetCustomEntityTypeCommandOutput, + GlueClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetCustomEntityTypeCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: GlueClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "GlueClient"; + const commandName = "GetCustomEntityTypeCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetCustomEntityTypeRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetCustomEntityTypeResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetCustomEntityTypeCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_1GetCustomEntityTypeCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_1GetCustomEntityTypeCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-glue/src/commands/ListCustomEntityTypesCommand.ts b/clients/client-glue/src/commands/ListCustomEntityTypesCommand.ts new file mode 100644 index 000000000000..6068cea56df1 --- /dev/null +++ b/clients/client-glue/src/commands/ListCustomEntityTypesCommand.ts @@ -0,0 +1,78 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient"; +import { ListCustomEntityTypesRequest, ListCustomEntityTypesResponse } from "../models/models_1"; +import { + deserializeAws_json1_1ListCustomEntityTypesCommand, + serializeAws_json1_1ListCustomEntityTypesCommand, +} from "../protocols/Aws_json1_1"; + +export interface ListCustomEntityTypesCommandInput extends ListCustomEntityTypesRequest {} +export interface ListCustomEntityTypesCommandOutput extends ListCustomEntityTypesResponse, __MetadataBearer {} + +export class ListCustomEntityTypesCommand extends $Command< + ListCustomEntityTypesCommandInput, + ListCustomEntityTypesCommandOutput, + GlueClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListCustomEntityTypesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: GlueClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "GlueClient"; + const commandName = "ListCustomEntityTypesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListCustomEntityTypesRequest.filterSensitiveLog, + outputFilterSensitiveLog: ListCustomEntityTypesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: ListCustomEntityTypesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_1ListCustomEntityTypesCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_1ListCustomEntityTypesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-glue/src/commands/UpdateJobCommand.ts b/clients/client-glue/src/commands/UpdateJobCommand.ts index 09a38c7258e5..33416820b01c 100644 --- a/clients/client-glue/src/commands/UpdateJobCommand.ts +++ b/clients/client-glue/src/commands/UpdateJobCommand.ts @@ -12,7 +12,8 @@ import { } from "@aws-sdk/types"; import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient"; -import { UpdateJobRequest, UpdateJobResponse } from "../models/models_1"; +import { UpdateJobRequest } from "../models/models_1"; +import { UpdateJobResponse } from "../models/models_2"; import { deserializeAws_json1_1UpdateJobCommand, serializeAws_json1_1UpdateJobCommand } from "../protocols/Aws_json1_1"; export interface UpdateJobCommandInput extends UpdateJobRequest {} diff --git a/clients/client-glue/src/commands/UpdateMLTransformCommand.ts b/clients/client-glue/src/commands/UpdateMLTransformCommand.ts index e51b626e0367..ad498bb8f4d5 100644 --- a/clients/client-glue/src/commands/UpdateMLTransformCommand.ts +++ b/clients/client-glue/src/commands/UpdateMLTransformCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient"; -import { UpdateMLTransformRequest, UpdateMLTransformResponse } from "../models/models_1"; +import { UpdateMLTransformRequest, UpdateMLTransformResponse } from "../models/models_2"; import { deserializeAws_json1_1UpdateMLTransformCommand, serializeAws_json1_1UpdateMLTransformCommand, diff --git a/clients/client-glue/src/commands/UpdatePartitionCommand.ts b/clients/client-glue/src/commands/UpdatePartitionCommand.ts index f9fdec781d98..0ba740efef15 100644 --- a/clients/client-glue/src/commands/UpdatePartitionCommand.ts +++ b/clients/client-glue/src/commands/UpdatePartitionCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient"; -import { UpdatePartitionRequest, UpdatePartitionResponse } from "../models/models_1"; +import { UpdatePartitionRequest, UpdatePartitionResponse } from "../models/models_2"; import { deserializeAws_json1_1UpdatePartitionCommand, serializeAws_json1_1UpdatePartitionCommand, diff --git a/clients/client-glue/src/commands/UpdateRegistryCommand.ts b/clients/client-glue/src/commands/UpdateRegistryCommand.ts index 2b27a0666323..a7e9cc756f0b 100644 --- a/clients/client-glue/src/commands/UpdateRegistryCommand.ts +++ b/clients/client-glue/src/commands/UpdateRegistryCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient"; -import { UpdateRegistryInput, UpdateRegistryResponse } from "../models/models_1"; +import { UpdateRegistryInput, UpdateRegistryResponse } from "../models/models_2"; import { deserializeAws_json1_1UpdateRegistryCommand, serializeAws_json1_1UpdateRegistryCommand, diff --git a/clients/client-glue/src/commands/UpdateSchemaCommand.ts b/clients/client-glue/src/commands/UpdateSchemaCommand.ts index 59c9813ce948..954e4b78f175 100644 --- a/clients/client-glue/src/commands/UpdateSchemaCommand.ts +++ b/clients/client-glue/src/commands/UpdateSchemaCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient"; -import { UpdateSchemaInput, UpdateSchemaResponse } from "../models/models_1"; +import { UpdateSchemaInput, UpdateSchemaResponse } from "../models/models_2"; import { deserializeAws_json1_1UpdateSchemaCommand, serializeAws_json1_1UpdateSchemaCommand, diff --git a/clients/client-glue/src/commands/UpdateTableCommand.ts b/clients/client-glue/src/commands/UpdateTableCommand.ts index 61d540871213..f4b21f243599 100644 --- a/clients/client-glue/src/commands/UpdateTableCommand.ts +++ b/clients/client-glue/src/commands/UpdateTableCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient"; -import { UpdateTableRequest, UpdateTableResponse } from "../models/models_1"; +import { UpdateTableRequest, UpdateTableResponse } from "../models/models_2"; import { deserializeAws_json1_1UpdateTableCommand, serializeAws_json1_1UpdateTableCommand, diff --git a/clients/client-glue/src/commands/index.ts b/clients/client-glue/src/commands/index.ts index 84412c126699..1995fd24e4ca 100644 --- a/clients/client-glue/src/commands/index.ts +++ b/clients/client-glue/src/commands/index.ts @@ -5,6 +5,7 @@ export * from "./BatchDeleteTableCommand"; export * from "./BatchDeleteTableVersionCommand"; export * from "./BatchGetBlueprintsCommand"; export * from "./BatchGetCrawlersCommand"; +export * from "./BatchGetCustomEntityTypesCommand"; export * from "./BatchGetDevEndpointsCommand"; export * from "./BatchGetJobsCommand"; export * from "./BatchGetPartitionCommand"; @@ -19,6 +20,7 @@ export * from "./CreateBlueprintCommand"; export * from "./CreateClassifierCommand"; export * from "./CreateConnectionCommand"; export * from "./CreateCrawlerCommand"; +export * from "./CreateCustomEntityTypeCommand"; export * from "./CreateDatabaseCommand"; export * from "./CreateDevEndpointCommand"; export * from "./CreateJobCommand"; @@ -40,6 +42,7 @@ export * from "./DeleteColumnStatisticsForPartitionCommand"; export * from "./DeleteColumnStatisticsForTableCommand"; export * from "./DeleteConnectionCommand"; export * from "./DeleteCrawlerCommand"; +export * from "./DeleteCustomEntityTypeCommand"; export * from "./DeleteDatabaseCommand"; export * from "./DeleteDevEndpointCommand"; export * from "./DeleteJobCommand"; @@ -70,6 +73,7 @@ export * from "./GetConnectionsCommand"; export * from "./GetCrawlerCommand"; export * from "./GetCrawlerMetricsCommand"; export * from "./GetCrawlersCommand"; +export * from "./GetCustomEntityTypeCommand"; export * from "./GetDataCatalogEncryptionSettingsCommand"; export * from "./GetDatabaseCommand"; export * from "./GetDatabasesCommand"; @@ -120,6 +124,7 @@ export * from "./GetWorkflowRunsCommand"; export * from "./ImportCatalogToGlueCommand"; export * from "./ListBlueprintsCommand"; export * from "./ListCrawlersCommand"; +export * from "./ListCustomEntityTypesCommand"; export * from "./ListDevEndpointsCommand"; export * from "./ListJobsCommand"; export * from "./ListMLTransformsCommand"; diff --git a/clients/client-glue/src/models/models_0.ts b/clients/client-glue/src/models/models_0.ts index 19b3f057cfc6..b443e72315fb 100644 --- a/clients/client-glue/src/models/models_0.ts +++ b/clients/client-glue/src/models/models_0.ts @@ -1768,6 +1768,48 @@ export namespace BatchGetCrawlersResponse { }); } +export interface BatchGetCustomEntityTypesRequest { + Names: string[] | undefined; +} + +export namespace BatchGetCustomEntityTypesRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: BatchGetCustomEntityTypesRequest): any => ({ + ...obj, + }); +} + +export interface CustomEntityType { + Name: string | undefined; + RegexString: string | undefined; + ContextWords?: string[]; +} + +export namespace CustomEntityType { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CustomEntityType): any => ({ + ...obj, + }); +} + +export interface BatchGetCustomEntityTypesResponse { + CustomEntityTypes?: CustomEntityType[]; + CustomEntityTypesNotFound?: string[]; +} + +export namespace BatchGetCustomEntityTypesResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: BatchGetCustomEntityTypesResponse): any => ({ + ...obj, + }); +} + export interface BatchGetDevEndpointsRequest { /** *

The list of DevEndpoint names, which might be the names returned from the @@ -4248,6 +4290,58 @@ export namespace CreateCrawlerResponse { }); } +export interface CreateCustomEntityTypeRequest { + Name: string | undefined; + RegexString: string | undefined; + ContextWords?: string[]; +} + +export namespace CreateCustomEntityTypeRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateCustomEntityTypeRequest): any => ({ + ...obj, + }); +} + +export interface CreateCustomEntityTypeResponse { + Name?: string; +} + +export namespace CreateCustomEntityTypeResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateCustomEntityTypeResponse): any => ({ + ...obj, + }); +} + +/** + *

The same unique identifier was associated with two different records.

+ */ +export class IdempotentParameterMismatchException extends __BaseException { + readonly name: "IdempotentParameterMismatchException" = "IdempotentParameterMismatchException"; + readonly $fault: "client" = "client"; + /** + *

A message describing the problem.

+ */ + Message?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "IdempotentParameterMismatchException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, IdempotentParameterMismatchException.prototype); + this.Message = opts.Message; + } +} + /** *

Two processes are trying to modify a resource simultaneously.

*/ @@ -4683,30 +4777,6 @@ export namespace CreateDevEndpointResponse { }); } -/** - *

The same unique identifier was associated with two different records.

- */ -export class IdempotentParameterMismatchException extends __BaseException { - readonly name: "IdempotentParameterMismatchException" = "IdempotentParameterMismatchException"; - readonly $fault: "client" = "client"; - /** - *

A message describing the problem.

- */ - Message?: string; - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "IdempotentParameterMismatchException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, IdempotentParameterMismatchException.prototype); - this.Message = opts.Message; - } -} - /** *

A value could not be validated.

*/ @@ -6823,6 +6893,32 @@ export class SchedulerTransitioningException extends __BaseException { } } +export interface DeleteCustomEntityTypeRequest { + Name: string | undefined; +} + +export namespace DeleteCustomEntityTypeRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteCustomEntityTypeRequest): any => ({ + ...obj, + }); +} + +export interface DeleteCustomEntityTypeResponse { + Name?: string; +} + +export namespace DeleteCustomEntityTypeResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteCustomEntityTypeResponse): any => ({ + ...obj, + }); +} + export interface DeleteDatabaseRequest { /** *

The ID of the Data Catalog in which the database resides. If none is provided, the Amazon Web Services @@ -8437,199 +8533,3 @@ export namespace StringColumnStatisticsData { ...obj, }); } - -export enum ColumnStatisticsType { - BINARY = "BINARY", - BOOLEAN = "BOOLEAN", - DATE = "DATE", - DECIMAL = "DECIMAL", - DOUBLE = "DOUBLE", - LONG = "LONG", - STRING = "STRING", -} - -/** - *

Contains the individual types of column statistics data. Only one data object should be set and indicated by the Type attribute.

- */ -export interface ColumnStatisticsData { - /** - *

The type of column statistics data.

- */ - Type: ColumnStatisticsType | string | undefined; - - /** - *

Boolean column statistics data.

- */ - BooleanColumnStatisticsData?: BooleanColumnStatisticsData; - - /** - *

Date column statistics data.

- */ - DateColumnStatisticsData?: DateColumnStatisticsData; - - /** - *

Decimal column statistics data.

- */ - DecimalColumnStatisticsData?: DecimalColumnStatisticsData; - - /** - *

Double column statistics data.

- */ - DoubleColumnStatisticsData?: DoubleColumnStatisticsData; - - /** - *

Long column statistics data.

- */ - LongColumnStatisticsData?: LongColumnStatisticsData; - - /** - *

String column statistics data.

- */ - StringColumnStatisticsData?: StringColumnStatisticsData; - - /** - *

Binary column statistics data.

- */ - BinaryColumnStatisticsData?: BinaryColumnStatisticsData; -} - -export namespace ColumnStatisticsData { - /** - * @internal - */ - export const filterSensitiveLog = (obj: ColumnStatisticsData): any => ({ - ...obj, - }); -} - -/** - *

Represents the generated column-level statistics for a table or partition.

- */ -export interface ColumnStatistics { - /** - *

Name of column which statistics belong to.

- */ - ColumnName: string | undefined; - - /** - *

The data type of the column.

- */ - ColumnType: string | undefined; - - /** - *

The timestamp of when column statistics were generated.

- */ - AnalyzedTime: Date | undefined; - - /** - *

A ColumnStatisticData object that contains the statistics data values.

- */ - StatisticsData: ColumnStatisticsData | undefined; -} - -export namespace ColumnStatistics { - /** - * @internal - */ - export const filterSensitiveLog = (obj: ColumnStatistics): any => ({ - ...obj, - }); -} - -/** - *

Encapsulates a column name that failed and the reason for failure.

- */ -export interface ColumnError { - /** - *

The name of the column that failed.

- */ - ColumnName?: string; - - /** - *

An error message with the reason for the failure of an operation.

- */ - Error?: ErrorDetail; -} - -export namespace ColumnError { - /** - * @internal - */ - export const filterSensitiveLog = (obj: ColumnError): any => ({ - ...obj, - }); -} - -export interface GetColumnStatisticsForPartitionResponse { - /** - *

List of ColumnStatistics that failed to be retrieved.

- */ - ColumnStatisticsList?: ColumnStatistics[]; - - /** - *

Error occurred during retrieving column statistics data.

- */ - Errors?: ColumnError[]; -} - -export namespace GetColumnStatisticsForPartitionResponse { - /** - * @internal - */ - export const filterSensitiveLog = (obj: GetColumnStatisticsForPartitionResponse): any => ({ - ...obj, - }); -} - -export interface GetColumnStatisticsForTableRequest { - /** - *

The ID of the Data Catalog where the partitions in question reside. - * If none is supplied, the Amazon Web Services account ID is used by default.

- */ - CatalogId?: string; - - /** - *

The name of the catalog database where the partitions reside.

- */ - DatabaseName: string | undefined; - - /** - *

The name of the partitions' table.

- */ - TableName: string | undefined; - - /** - *

A list of the column names.

- */ - ColumnNames: string[] | undefined; -} - -export namespace GetColumnStatisticsForTableRequest { - /** - * @internal - */ - export const filterSensitiveLog = (obj: GetColumnStatisticsForTableRequest): any => ({ - ...obj, - }); -} - -export interface GetColumnStatisticsForTableResponse { - /** - *

List of ColumnStatistics that failed to be retrieved.

- */ - ColumnStatisticsList?: ColumnStatistics[]; - - /** - *

List of ColumnStatistics that failed to be retrieved.

- */ - Errors?: ColumnError[]; -} - -export namespace GetColumnStatisticsForTableResponse { - /** - * @internal - */ - export const filterSensitiveLog = (obj: GetColumnStatisticsForTableResponse): any => ({ - ...obj, - }); -} diff --git a/clients/client-glue/src/models/models_1.ts b/clients/client-glue/src/models/models_1.ts index 3b4d990f484a..fb75b1821ac4 100644 --- a/clients/client-glue/src/models/models_1.ts +++ b/clients/client-glue/src/models/models_1.ts @@ -4,11 +4,12 @@ import { MetadataBearer as $MetadataBearer } from "@aws-sdk/types"; import { GlueServiceException as __BaseException } from "./GlueServiceException"; import { AuditContext, + BinaryColumnStatisticsData, + BooleanColumnStatisticsData, CodeGenEdge, CodeGenNode, CodeGenNodeArg, Column, - ColumnStatistics, Compatibility, ConnectionInput, ConnectionsList, @@ -16,10 +17,14 @@ import { Crawler, CrawlerTargets, CsvHeaderOption, + CustomEntityType, DatabaseIdentifier, DatabaseInput, DataFormat, + DateColumnStatisticsData, + DecimalColumnStatisticsData, DevEndpoint, + DoubleColumnStatisticsData, EncryptionConfiguration, ErrorDetail, ExecutionProperty, @@ -30,9 +35,9 @@ import { LakeFormationConfiguration, Language, LineageConfiguration, + LongColumnStatisticsData, NotificationProperty, Partition, - PartitionInput, PartitionValueList, PhysicalConnectionRequirements, PrincipalPermissions, @@ -47,8 +52,8 @@ import { SchemaVersionStatus, Session, StorageDescriptor, + StringColumnStatisticsData, TableIdentifier, - TableInput, TaskStatusType, TransformEncryption, TransformParameters, @@ -59,6 +64,202 @@ import { WorkflowRun, } from "./models_0"; +export enum ColumnStatisticsType { + BINARY = "BINARY", + BOOLEAN = "BOOLEAN", + DATE = "DATE", + DECIMAL = "DECIMAL", + DOUBLE = "DOUBLE", + LONG = "LONG", + STRING = "STRING", +} + +/** + *

Contains the individual types of column statistics data. Only one data object should be set and indicated by the Type attribute.

+ */ +export interface ColumnStatisticsData { + /** + *

The type of column statistics data.

+ */ + Type: ColumnStatisticsType | string | undefined; + + /** + *

Boolean column statistics data.

+ */ + BooleanColumnStatisticsData?: BooleanColumnStatisticsData; + + /** + *

Date column statistics data.

+ */ + DateColumnStatisticsData?: DateColumnStatisticsData; + + /** + *

Decimal column statistics data.

+ */ + DecimalColumnStatisticsData?: DecimalColumnStatisticsData; + + /** + *

Double column statistics data.

+ */ + DoubleColumnStatisticsData?: DoubleColumnStatisticsData; + + /** + *

Long column statistics data.

+ */ + LongColumnStatisticsData?: LongColumnStatisticsData; + + /** + *

String column statistics data.

+ */ + StringColumnStatisticsData?: StringColumnStatisticsData; + + /** + *

Binary column statistics data.

+ */ + BinaryColumnStatisticsData?: BinaryColumnStatisticsData; +} + +export namespace ColumnStatisticsData { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ColumnStatisticsData): any => ({ + ...obj, + }); +} + +/** + *

Represents the generated column-level statistics for a table or partition.

+ */ +export interface ColumnStatistics { + /** + *

Name of column which statistics belong to.

+ */ + ColumnName: string | undefined; + + /** + *

The data type of the column.

+ */ + ColumnType: string | undefined; + + /** + *

The timestamp of when column statistics were generated.

+ */ + AnalyzedTime: Date | undefined; + + /** + *

A ColumnStatisticData object that contains the statistics data values.

+ */ + StatisticsData: ColumnStatisticsData | undefined; +} + +export namespace ColumnStatistics { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ColumnStatistics): any => ({ + ...obj, + }); +} + +/** + *

Encapsulates a column name that failed and the reason for failure.

+ */ +export interface ColumnError { + /** + *

The name of the column that failed.

+ */ + ColumnName?: string; + + /** + *

An error message with the reason for the failure of an operation.

+ */ + Error?: ErrorDetail; +} + +export namespace ColumnError { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ColumnError): any => ({ + ...obj, + }); +} + +export interface GetColumnStatisticsForPartitionResponse { + /** + *

List of ColumnStatistics that failed to be retrieved.

+ */ + ColumnStatisticsList?: ColumnStatistics[]; + + /** + *

Error occurred during retrieving column statistics data.

+ */ + Errors?: ColumnError[]; +} + +export namespace GetColumnStatisticsForPartitionResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetColumnStatisticsForPartitionResponse): any => ({ + ...obj, + }); +} + +export interface GetColumnStatisticsForTableRequest { + /** + *

The ID of the Data Catalog where the partitions in question reside. + * If none is supplied, the Amazon Web Services account ID is used by default.

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

The name of the catalog database where the partitions reside.

+ */ + DatabaseName: string | undefined; + + /** + *

The name of the partitions' table.

+ */ + TableName: string | undefined; + + /** + *

A list of the column names.

+ */ + ColumnNames: string[] | undefined; +} + +export namespace GetColumnStatisticsForTableRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetColumnStatisticsForTableRequest): any => ({ + ...obj, + }); +} + +export interface GetColumnStatisticsForTableResponse { + /** + *

List of ColumnStatistics that failed to be retrieved.

+ */ + ColumnStatisticsList?: ColumnStatistics[]; + + /** + *

List of ColumnStatistics that failed to be retrieved.

+ */ + Errors?: ColumnError[]; +} + +export namespace GetColumnStatisticsForTableResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetColumnStatisticsForTableResponse): any => ({ + ...obj, + }); +} + export interface GetConnectionRequest { /** *

The ID of the Data Catalog in which the connection resides. If none is provided, the Amazon Web Services @@ -563,6 +764,34 @@ export namespace GetCrawlersResponse { }); } +export interface GetCustomEntityTypeRequest { + Name: string | undefined; +} + +export namespace GetCustomEntityTypeRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetCustomEntityTypeRequest): any => ({ + ...obj, + }); +} + +export interface GetCustomEntityTypeResponse { + Name?: string; + RegexString?: string; + ContextWords?: string[]; +} + +export namespace GetCustomEntityTypeResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetCustomEntityTypeResponse): any => ({ + ...obj, + }); +} + export interface GetDatabaseRequest { /** *

The ID of the Data Catalog in which the database resides. If none is provided, the Amazon Web Services @@ -4887,6 +5116,34 @@ export namespace ListCrawlersResponse { }); } +export interface ListCustomEntityTypesRequest { + NextToken?: string; + MaxResults?: number; +} + +export namespace ListCustomEntityTypesRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListCustomEntityTypesRequest): any => ({ + ...obj, + }); +} + +export interface ListCustomEntityTypesResponse { + CustomEntityTypes?: CustomEntityType[]; + NextToken?: string; +} + +export namespace ListCustomEntityTypesResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListCustomEntityTypesResponse): any => ({ + ...obj, + }); +} + export interface ListDevEndpointsRequest { /** *

A continuation token, if this is a continuation request.

@@ -8038,331 +8295,3 @@ export namespace UpdateJobRequest { ...obj, }); } - -export interface UpdateJobResponse { - /** - *

Returns the name of the updated job definition.

- */ - JobName?: string; -} - -export namespace UpdateJobResponse { - /** - * @internal - */ - export const filterSensitiveLog = (obj: UpdateJobResponse): any => ({ - ...obj, - }); -} - -export interface UpdateMLTransformRequest { - /** - *

A unique identifier that was generated when the transform was created.

- */ - TransformId: string | undefined; - - /** - *

The unique name that you gave the transform when you created it.

- */ - Name?: string; - - /** - *

A description of the transform. The default is an empty string.

- */ - Description?: string; - - /** - *

The configuration parameters that are specific to the transform type (algorithm) used. - * Conditionally dependent on the transform type.

- */ - Parameters?: TransformParameters; - - /** - *

The name or Amazon Resource Name (ARN) of the IAM role with the required - * permissions.

- */ - Role?: string; - - /** - *

This value determines which version of Glue this machine learning transform is compatible with. Glue 1.0 is recommended for most customers. If the value is not set, the Glue compatibility defaults to Glue 0.9. For more information, see Glue Versions in the developer guide.

- */ - GlueVersion?: string; - - /** - *

The number of Glue data processing units (DPUs) that are allocated to task runs for this transform. You can allocate from 2 to 100 DPUs; the default is 10. A DPU is a relative measure of - * processing power that consists of 4 vCPUs of compute capacity and 16 GB of memory. For more - * information, see the Glue pricing - * page.

- * - *

When the WorkerType field is set to a value other than Standard, the MaxCapacity field is set automatically and becomes read-only.

- */ - MaxCapacity?: number; - - /** - *

The type of predefined worker that is allocated when this task runs. Accepts a value of Standard, G.1X, or G.2X.

- *
    - *
  • - *

    For the Standard worker type, each worker provides 4 vCPU, 16 GB of memory and a 50GB disk, and 2 executors per worker.

    - *
  • - *
  • - *

    For the G.1X worker type, each worker provides 4 vCPU, 16 GB of memory and a 64GB disk, and 1 executor per worker.

    - *
  • - *
  • - *

    For the G.2X worker type, each worker provides 8 vCPU, 32 GB of memory and a 128GB disk, and 1 executor per worker.

    - *
  • - *
- */ - WorkerType?: WorkerType | string; - - /** - *

The number of workers of a defined workerType that are allocated when this task runs.

- */ - NumberOfWorkers?: number; - - /** - *

The timeout for a task run for this transform in minutes. This is the maximum time that a task run for this transform can consume resources before it is terminated and enters TIMEOUT status. The default is 2,880 minutes (48 hours).

- */ - Timeout?: number; - - /** - *

The maximum number of times to retry a task for this transform after a task run fails.

- */ - MaxRetries?: number; -} - -export namespace UpdateMLTransformRequest { - /** - * @internal - */ - export const filterSensitiveLog = (obj: UpdateMLTransformRequest): any => ({ - ...obj, - }); -} - -export interface UpdateMLTransformResponse { - /** - *

The unique identifier for the transform that was updated.

- */ - TransformId?: string; -} - -export namespace UpdateMLTransformResponse { - /** - * @internal - */ - export const filterSensitiveLog = (obj: UpdateMLTransformResponse): any => ({ - ...obj, - }); -} - -export interface UpdatePartitionRequest { - /** - *

The ID of the Data Catalog where the partition to be updated resides. If none is provided, - * the Amazon Web Services account ID is used by default.

- */ - CatalogId?: string; - - /** - *

The name of the catalog database in which the table in question - * resides.

- */ - DatabaseName: string | undefined; - - /** - *

The name of the table in which the partition to be updated is located.

- */ - TableName: string | undefined; - - /** - *

List of partition key values that define the partition to update.

- */ - PartitionValueList: string[] | undefined; - - /** - *

The new partition object to update the partition to.

- * - *

The Values property can't be changed. If you want to change the partition key values for a partition, delete and recreate the partition.

- */ - PartitionInput: PartitionInput | undefined; -} - -export namespace UpdatePartitionRequest { - /** - * @internal - */ - export const filterSensitiveLog = (obj: UpdatePartitionRequest): any => ({ - ...obj, - }); -} - -export interface UpdatePartitionResponse {} - -export namespace UpdatePartitionResponse { - /** - * @internal - */ - export const filterSensitiveLog = (obj: UpdatePartitionResponse): any => ({ - ...obj, - }); -} - -export interface UpdateRegistryInput { - /** - *

This is a wrapper structure that may contain the registry name and Amazon Resource Name (ARN).

- */ - RegistryId: RegistryId | undefined; - - /** - *

A description of the registry. If description is not provided, this field will not be updated.

- */ - Description: string | undefined; -} - -export namespace UpdateRegistryInput { - /** - * @internal - */ - export const filterSensitiveLog = (obj: UpdateRegistryInput): any => ({ - ...obj, - }); -} - -export interface UpdateRegistryResponse { - /** - *

The name of the updated registry.

- */ - RegistryName?: string; - - /** - *

The Amazon Resource name (ARN) of the updated registry.

- */ - RegistryArn?: string; -} - -export namespace UpdateRegistryResponse { - /** - * @internal - */ - export const filterSensitiveLog = (obj: UpdateRegistryResponse): any => ({ - ...obj, - }); -} - -export interface UpdateSchemaInput { - /** - *

This is a wrapper structure to contain schema identity fields. The structure contains:

- *
    - *
  • - *

    SchemaId$SchemaArn: The Amazon Resource Name (ARN) of the schema. One of SchemaArn or SchemaName has to be provided.

    - *
  • - *
  • - *

    SchemaId$SchemaName: The name of the schema. One of SchemaArn or SchemaName has to be provided.

    - *
  • - *
- */ - SchemaId: SchemaId | undefined; - - /** - *

Version number required for check pointing. One of VersionNumber or Compatibility has to be provided.

- */ - SchemaVersionNumber?: SchemaVersionNumber; - - /** - *

The new compatibility setting for the schema.

- */ - Compatibility?: Compatibility | string; - - /** - *

The new description for the schema.

- */ - Description?: string; -} - -export namespace UpdateSchemaInput { - /** - * @internal - */ - export const filterSensitiveLog = (obj: UpdateSchemaInput): any => ({ - ...obj, - }); -} - -export interface UpdateSchemaResponse { - /** - *

The Amazon Resource Name (ARN) of the schema.

- */ - SchemaArn?: string; - - /** - *

The name of the schema.

- */ - SchemaName?: string; - - /** - *

The name of the registry that contains the schema.

- */ - RegistryName?: string; -} - -export namespace UpdateSchemaResponse { - /** - * @internal - */ - export const filterSensitiveLog = (obj: UpdateSchemaResponse): any => ({ - ...obj, - }); -} - -export interface UpdateTableRequest { - /** - *

The ID of the Data Catalog where the table resides. If none is provided, the Amazon Web Services account - * ID is used by default.

- */ - CatalogId?: string; - - /** - *

The name of the catalog database in which the table resides. For Hive - * compatibility, this name is entirely lowercase.

- */ - DatabaseName: string | undefined; - - /** - *

An updated TableInput object to define the metadata table - * in the catalog.

- */ - TableInput: TableInput | undefined; - - /** - *

By default, UpdateTable always creates an archived version of the table - * before updating it. However, if skipArchive is set to true, - * UpdateTable does not create the archived version.

- */ - SkipArchive?: boolean; - - /** - *

The transaction ID at which to update the table contents.

- */ - TransactionId?: string; - - VersionId?: string; -} - -export namespace UpdateTableRequest { - /** - * @internal - */ - export const filterSensitiveLog = (obj: UpdateTableRequest): any => ({ - ...obj, - }); -} - -export interface UpdateTableResponse {} - -export namespace UpdateTableResponse { - /** - * @internal - */ - export const filterSensitiveLog = (obj: UpdateTableResponse): any => ({ - ...obj, - }); -} diff --git a/clients/client-glue/src/models/models_2.ts b/clients/client-glue/src/models/models_2.ts index 1ad20bd2945a..121319efc62b 100644 --- a/clients/client-glue/src/models/models_2.ts +++ b/clients/client-glue/src/models/models_2.ts @@ -1,4 +1,346 @@ -import { Action, EventBatchingCondition, Predicate, Trigger, UserDefinedFunctionInput } from "./models_0"; +import { + Action, + Compatibility, + EventBatchingCondition, + PartitionInput, + Predicate, + RegistryId, + SchemaId, + TableInput, + TransformParameters, + Trigger, + UserDefinedFunctionInput, + WorkerType, +} from "./models_0"; +import { SchemaVersionNumber } from "./models_1"; + +export interface UpdateJobResponse { + /** + *

Returns the name of the updated job definition.

+ */ + JobName?: string; +} + +export namespace UpdateJobResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateJobResponse): any => ({ + ...obj, + }); +} + +export interface UpdateMLTransformRequest { + /** + *

A unique identifier that was generated when the transform was created.

+ */ + TransformId: string | undefined; + + /** + *

The unique name that you gave the transform when you created it.

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

A description of the transform. The default is an empty string.

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

The configuration parameters that are specific to the transform type (algorithm) used. + * Conditionally dependent on the transform type.

+ */ + Parameters?: TransformParameters; + + /** + *

The name or Amazon Resource Name (ARN) of the IAM role with the required + * permissions.

+ */ + Role?: string; + + /** + *

This value determines which version of Glue this machine learning transform is compatible with. Glue 1.0 is recommended for most customers. If the value is not set, the Glue compatibility defaults to Glue 0.9. For more information, see Glue Versions in the developer guide.

+ */ + GlueVersion?: string; + + /** + *

The number of Glue data processing units (DPUs) that are allocated to task runs for this transform. You can allocate from 2 to 100 DPUs; the default is 10. A DPU is a relative measure of + * processing power that consists of 4 vCPUs of compute capacity and 16 GB of memory. For more + * information, see the Glue pricing + * page.

+ * + *

When the WorkerType field is set to a value other than Standard, the MaxCapacity field is set automatically and becomes read-only.

+ */ + MaxCapacity?: number; + + /** + *

The type of predefined worker that is allocated when this task runs. Accepts a value of Standard, G.1X, or G.2X.

+ *
    + *
  • + *

    For the Standard worker type, each worker provides 4 vCPU, 16 GB of memory and a 50GB disk, and 2 executors per worker.

    + *
  • + *
  • + *

    For the G.1X worker type, each worker provides 4 vCPU, 16 GB of memory and a 64GB disk, and 1 executor per worker.

    + *
  • + *
  • + *

    For the G.2X worker type, each worker provides 8 vCPU, 32 GB of memory and a 128GB disk, and 1 executor per worker.

    + *
  • + *
+ */ + WorkerType?: WorkerType | string; + + /** + *

The number of workers of a defined workerType that are allocated when this task runs.

+ */ + NumberOfWorkers?: number; + + /** + *

The timeout for a task run for this transform in minutes. This is the maximum time that a task run for this transform can consume resources before it is terminated and enters TIMEOUT status. The default is 2,880 minutes (48 hours).

+ */ + Timeout?: number; + + /** + *

The maximum number of times to retry a task for this transform after a task run fails.

+ */ + MaxRetries?: number; +} + +export namespace UpdateMLTransformRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateMLTransformRequest): any => ({ + ...obj, + }); +} + +export interface UpdateMLTransformResponse { + /** + *

The unique identifier for the transform that was updated.

+ */ + TransformId?: string; +} + +export namespace UpdateMLTransformResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateMLTransformResponse): any => ({ + ...obj, + }); +} + +export interface UpdatePartitionRequest { + /** + *

The ID of the Data Catalog where the partition to be updated resides. If none is provided, + * the Amazon Web Services account ID is used by default.

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

The name of the catalog database in which the table in question + * resides.

+ */ + DatabaseName: string | undefined; + + /** + *

The name of the table in which the partition to be updated is located.

+ */ + TableName: string | undefined; + + /** + *

List of partition key values that define the partition to update.

+ */ + PartitionValueList: string[] | undefined; + + /** + *

The new partition object to update the partition to.

+ * + *

The Values property can't be changed. If you want to change the partition key values for a partition, delete and recreate the partition.

+ */ + PartitionInput: PartitionInput | undefined; +} + +export namespace UpdatePartitionRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdatePartitionRequest): any => ({ + ...obj, + }); +} + +export interface UpdatePartitionResponse {} + +export namespace UpdatePartitionResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdatePartitionResponse): any => ({ + ...obj, + }); +} + +export interface UpdateRegistryInput { + /** + *

This is a wrapper structure that may contain the registry name and Amazon Resource Name (ARN).

+ */ + RegistryId: RegistryId | undefined; + + /** + *

A description of the registry. If description is not provided, this field will not be updated.

+ */ + Description: string | undefined; +} + +export namespace UpdateRegistryInput { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateRegistryInput): any => ({ + ...obj, + }); +} + +export interface UpdateRegistryResponse { + /** + *

The name of the updated registry.

+ */ + RegistryName?: string; + + /** + *

The Amazon Resource name (ARN) of the updated registry.

+ */ + RegistryArn?: string; +} + +export namespace UpdateRegistryResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateRegistryResponse): any => ({ + ...obj, + }); +} + +export interface UpdateSchemaInput { + /** + *

This is a wrapper structure to contain schema identity fields. The structure contains:

+ *
    + *
  • + *

    SchemaId$SchemaArn: The Amazon Resource Name (ARN) of the schema. One of SchemaArn or SchemaName has to be provided.

    + *
  • + *
  • + *

    SchemaId$SchemaName: The name of the schema. One of SchemaArn or SchemaName has to be provided.

    + *
  • + *
+ */ + SchemaId: SchemaId | undefined; + + /** + *

Version number required for check pointing. One of VersionNumber or Compatibility has to be provided.

+ */ + SchemaVersionNumber?: SchemaVersionNumber; + + /** + *

The new compatibility setting for the schema.

+ */ + Compatibility?: Compatibility | string; + + /** + *

The new description for the schema.

+ */ + Description?: string; +} + +export namespace UpdateSchemaInput { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateSchemaInput): any => ({ + ...obj, + }); +} + +export interface UpdateSchemaResponse { + /** + *

The Amazon Resource Name (ARN) of the schema.

+ */ + SchemaArn?: string; + + /** + *

The name of the schema.

+ */ + SchemaName?: string; + + /** + *

The name of the registry that contains the schema.

+ */ + RegistryName?: string; +} + +export namespace UpdateSchemaResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateSchemaResponse): any => ({ + ...obj, + }); +} + +export interface UpdateTableRequest { + /** + *

The ID of the Data Catalog where the table resides. If none is provided, the Amazon Web Services account + * ID is used by default.

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

The name of the catalog database in which the table resides. For Hive + * compatibility, this name is entirely lowercase.

+ */ + DatabaseName: string | undefined; + + /** + *

An updated TableInput object to define the metadata table + * in the catalog.

+ */ + TableInput: TableInput | undefined; + + /** + *

By default, UpdateTable always creates an archived version of the table + * before updating it. However, if skipArchive is set to true, + * UpdateTable does not create the archived version.

+ */ + SkipArchive?: boolean; + + /** + *

The transaction ID at which to update the table contents.

+ */ + TransactionId?: string; + + VersionId?: string; +} + +export namespace UpdateTableRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateTableRequest): any => ({ + ...obj, + }); +} + +export interface UpdateTableResponse {} + +export namespace UpdateTableResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateTableResponse): any => ({ + ...obj, + }); +} /** *

A structure used to provide information used to update a trigger. This object updates the diff --git a/clients/client-glue/src/pagination/ListCustomEntityTypesPaginator.ts b/clients/client-glue/src/pagination/ListCustomEntityTypesPaginator.ts new file mode 100644 index 000000000000..65fd3d0fc259 --- /dev/null +++ b/clients/client-glue/src/pagination/ListCustomEntityTypesPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + ListCustomEntityTypesCommand, + ListCustomEntityTypesCommandInput, + ListCustomEntityTypesCommandOutput, +} from "../commands/ListCustomEntityTypesCommand"; +import { Glue } from "../Glue"; +import { GlueClient } from "../GlueClient"; +import { GluePaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: GlueClient, + input: ListCustomEntityTypesCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListCustomEntityTypesCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: Glue, + input: ListCustomEntityTypesCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.listCustomEntityTypes(input, ...args); +}; +export async function* paginateListCustomEntityTypes( + config: GluePaginationConfiguration, + input: ListCustomEntityTypesCommandInput, + ...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: ListCustomEntityTypesCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof Glue) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof GlueClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected Glue | GlueClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-glue/src/pagination/index.ts b/clients/client-glue/src/pagination/index.ts index 14f06c6d7d31..2ef1dc32bc15 100644 --- a/clients/client-glue/src/pagination/index.ts +++ b/clients/client-glue/src/pagination/index.ts @@ -22,6 +22,7 @@ export * from "./GetUserDefinedFunctionsPaginator"; export * from "./GetWorkflowRunsPaginator"; export * from "./ListBlueprintsPaginator"; export * from "./ListCrawlersPaginator"; +export * from "./ListCustomEntityTypesPaginator"; export * from "./ListDevEndpointsPaginator"; export * from "./ListJobsPaginator"; export * from "./ListMLTransformsPaginator"; diff --git a/clients/client-glue/src/protocols/Aws_json1_1.ts b/clients/client-glue/src/protocols/Aws_json1_1.ts index 7f1031fdfb17..0d9d18420084 100644 --- a/clients/client-glue/src/protocols/Aws_json1_1.ts +++ b/clients/client-glue/src/protocols/Aws_json1_1.ts @@ -37,6 +37,10 @@ import { } from "../commands/BatchDeleteTableVersionCommand"; import { BatchGetBlueprintsCommandInput, BatchGetBlueprintsCommandOutput } from "../commands/BatchGetBlueprintsCommand"; import { BatchGetCrawlersCommandInput, BatchGetCrawlersCommandOutput } from "../commands/BatchGetCrawlersCommand"; +import { + BatchGetCustomEntityTypesCommandInput, + BatchGetCustomEntityTypesCommandOutput, +} from "../commands/BatchGetCustomEntityTypesCommand"; import { BatchGetDevEndpointsCommandInput, BatchGetDevEndpointsCommandOutput, @@ -60,6 +64,10 @@ import { CreateBlueprintCommandInput, CreateBlueprintCommandOutput } from "../co import { CreateClassifierCommandInput, CreateClassifierCommandOutput } from "../commands/CreateClassifierCommand"; import { CreateConnectionCommandInput, CreateConnectionCommandOutput } from "../commands/CreateConnectionCommand"; import { CreateCrawlerCommandInput, CreateCrawlerCommandOutput } from "../commands/CreateCrawlerCommand"; +import { + CreateCustomEntityTypeCommandInput, + CreateCustomEntityTypeCommandOutput, +} from "../commands/CreateCustomEntityTypeCommand"; import { CreateDatabaseCommandInput, CreateDatabaseCommandOutput } from "../commands/CreateDatabaseCommand"; import { CreateDevEndpointCommandInput, CreateDevEndpointCommandOutput } from "../commands/CreateDevEndpointCommand"; import { CreateJobCommandInput, CreateJobCommandOutput } from "../commands/CreateJobCommand"; @@ -96,6 +104,10 @@ import { } from "../commands/DeleteColumnStatisticsForTableCommand"; import { DeleteConnectionCommandInput, DeleteConnectionCommandOutput } from "../commands/DeleteConnectionCommand"; import { DeleteCrawlerCommandInput, DeleteCrawlerCommandOutput } from "../commands/DeleteCrawlerCommand"; +import { + DeleteCustomEntityTypeCommandInput, + DeleteCustomEntityTypeCommandOutput, +} from "../commands/DeleteCustomEntityTypeCommand"; import { DeleteDatabaseCommandInput, DeleteDatabaseCommandOutput } from "../commands/DeleteDatabaseCommand"; import { DeleteDevEndpointCommandInput, DeleteDevEndpointCommandOutput } from "../commands/DeleteDevEndpointCommand"; import { DeleteJobCommandInput, DeleteJobCommandOutput } from "../commands/DeleteJobCommand"; @@ -150,6 +162,10 @@ import { GetConnectionsCommandInput, GetConnectionsCommandOutput } from "../comm import { GetCrawlerCommandInput, GetCrawlerCommandOutput } from "../commands/GetCrawlerCommand"; import { GetCrawlerMetricsCommandInput, GetCrawlerMetricsCommandOutput } from "../commands/GetCrawlerMetricsCommand"; import { GetCrawlersCommandInput, GetCrawlersCommandOutput } from "../commands/GetCrawlersCommand"; +import { + GetCustomEntityTypeCommandInput, + GetCustomEntityTypeCommandOutput, +} from "../commands/GetCustomEntityTypeCommand"; import { GetDatabaseCommandInput, GetDatabaseCommandOutput } from "../commands/GetDatabaseCommand"; import { GetDatabasesCommandInput, GetDatabasesCommandOutput } from "../commands/GetDatabasesCommand"; import { @@ -242,6 +258,10 @@ import { } from "../commands/ImportCatalogToGlueCommand"; import { ListBlueprintsCommandInput, ListBlueprintsCommandOutput } from "../commands/ListBlueprintsCommand"; import { ListCrawlersCommandInput, ListCrawlersCommandOutput } from "../commands/ListCrawlersCommand"; +import { + ListCustomEntityTypesCommandInput, + ListCustomEntityTypesCommandOutput, +} from "../commands/ListCustomEntityTypesCommand"; import { ListDevEndpointsCommandInput, ListDevEndpointsCommandOutput } from "../commands/ListDevEndpointsCommand"; import { ListJobsCommandInput, ListJobsCommandOutput } from "../commands/ListJobsCommand"; import { ListMLTransformsCommandInput, ListMLTransformsCommandOutput } from "../commands/ListMLTransformsCommand"; @@ -366,6 +386,8 @@ import { BatchGetBlueprintsResponse, BatchGetCrawlersRequest, BatchGetCrawlersResponse, + BatchGetCustomEntityTypesRequest, + BatchGetCustomEntityTypesResponse, BatchGetDevEndpointsRequest, BatchGetDevEndpointsResponse, BatchGetJobsRequest, @@ -403,9 +425,6 @@ import { CodeGenNode, CodeGenNodeArg, Column, - ColumnError, - ColumnStatistics, - ColumnStatisticsData, ConcurrentModificationException, Condition, ConditionCheckFailureException, @@ -427,6 +446,8 @@ import { CreateCrawlerRequest, CreateCrawlerResponse, CreateCsvClassifierRequest, + CreateCustomEntityTypeRequest, + CreateCustomEntityTypeResponse, CreateDatabaseRequest, CreateDatabaseResponse, CreateDevEndpointRequest, @@ -461,6 +482,7 @@ import { CreateWorkflowResponse, CreateXMLClassifierRequest, CsvClassifier, + CustomEntityType, DatabaseIdentifier, DatabaseInput, DataLakePrincipal, @@ -479,6 +501,8 @@ import { DeleteConnectionResponse, DeleteCrawlerRequest, DeleteCrawlerResponse, + DeleteCustomEntityTypeRequest, + DeleteCustomEntityTypeResponse, DeleteDatabaseRequest, DeleteDatabaseResponse, DeleteDevEndpointRequest, @@ -538,9 +562,6 @@ import { GetClassifiersRequest, GetClassifiersResponse, GetColumnStatisticsForPartitionRequest, - GetColumnStatisticsForPartitionResponse, - GetColumnStatisticsForTableRequest, - GetColumnStatisticsForTableResponse, GlueEncryptionException, GlueTable, GrokClassifier, @@ -616,8 +637,11 @@ import { import { BackfillError, CatalogEntry, + ColumnError, ColumnImportance, ColumnRowFilter, + ColumnStatistics, + ColumnStatisticsData, ColumnStatisticsError, ConcurrentRunsExceededException, ConfusionMatrix, @@ -634,6 +658,9 @@ import { ExportLabelsTaskRunProperties, FindMatchesMetrics, FindMatchesTaskRunProperties, + GetColumnStatisticsForPartitionResponse, + GetColumnStatisticsForTableRequest, + GetColumnStatisticsForTableResponse, GetConnectionRequest, GetConnectionResponse, GetConnectionsFilter, @@ -645,6 +672,8 @@ import { GetCrawlerResponse, GetCrawlersRequest, GetCrawlersResponse, + GetCustomEntityTypeRequest, + GetCustomEntityTypeResponse, GetDatabaseRequest, GetDatabaseResponse, GetDatabasesRequest, @@ -753,6 +782,8 @@ import { ListBlueprintsResponse, ListCrawlersRequest, ListCrawlersResponse, + ListCustomEntityTypesRequest, + ListCustomEntityTypesResponse, ListDevEndpointsRequest, ListDevEndpointsResponse, ListJobsRequest, @@ -884,8 +915,14 @@ import { UpdateDevEndpointResponse, UpdateGrokClassifierRequest, UpdateJobRequest, - UpdateJobResponse, UpdateJsonClassifierRequest, + UpdateXMLClassifierRequest, + UserDefinedFunction, + VersionMismatchException, +} from "../models/models_1"; +import { + TriggerUpdate, + UpdateJobResponse, UpdateMLTransformRequest, UpdateMLTransformResponse, UpdatePartitionRequest, @@ -896,12 +933,6 @@ import { UpdateSchemaResponse, UpdateTableRequest, UpdateTableResponse, - UpdateXMLClassifierRequest, - UserDefinedFunction, - VersionMismatchException, -} from "../models/models_1"; -import { - TriggerUpdate, UpdateTriggerRequest, UpdateTriggerResponse, UpdateUserDefinedFunctionRequest, @@ -1001,6 +1032,19 @@ export const serializeAws_json1_1BatchGetCrawlersCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +export const serializeAws_json1_1BatchGetCustomEntityTypesCommand = async ( + input: BatchGetCustomEntityTypesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSGlue.BatchGetCustomEntityTypes", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_1BatchGetCustomEntityTypesRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + export const serializeAws_json1_1BatchGetDevEndpointsCommand = async ( input: BatchGetDevEndpointsCommandInput, context: __SerdeContext @@ -1183,6 +1227,19 @@ export const serializeAws_json1_1CreateCrawlerCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +export const serializeAws_json1_1CreateCustomEntityTypeCommand = async ( + input: CreateCustomEntityTypeCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSGlue.CreateCustomEntityType", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_1CreateCustomEntityTypeRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + export const serializeAws_json1_1CreateDatabaseCommand = async ( input: CreateDatabaseCommandInput, context: __SerdeContext @@ -1456,6 +1513,19 @@ export const serializeAws_json1_1DeleteCrawlerCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +export const serializeAws_json1_1DeleteCustomEntityTypeCommand = async ( + input: DeleteCustomEntityTypeCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSGlue.DeleteCustomEntityType", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_1DeleteCustomEntityTypeRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + export const serializeAws_json1_1DeleteDatabaseCommand = async ( input: DeleteDatabaseCommandInput, context: __SerdeContext @@ -1846,6 +1916,19 @@ export const serializeAws_json1_1GetCrawlersCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +export const serializeAws_json1_1GetCustomEntityTypeCommand = async ( + input: GetCustomEntityTypeCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSGlue.GetCustomEntityType", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_1GetCustomEntityTypeRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + export const serializeAws_json1_1GetDatabaseCommand = async ( input: GetDatabaseCommandInput, context: __SerdeContext @@ -2496,6 +2579,19 @@ export const serializeAws_json1_1ListCrawlersCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +export const serializeAws_json1_1ListCustomEntityTypesCommand = async ( + input: ListCustomEntityTypesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSGlue.ListCustomEntityTypes", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_1ListCustomEntityTypesRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + export const serializeAws_json1_1ListDevEndpointsCommand = async ( input: ListDevEndpointsCommandInput, context: __SerdeContext @@ -3588,6 +3684,55 @@ const deserializeAws_json1_1BatchGetCrawlersCommandError = async ( } }; +export const deserializeAws_json1_1BatchGetCustomEntityTypesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1BatchGetCustomEntityTypesCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1BatchGetCustomEntityTypesResponse(data, context); + const response: BatchGetCustomEntityTypesCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_1BatchGetCustomEntityTypesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __BaseException; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServiceException": + case "com.amazonaws.glue#InternalServiceException": + throw await deserializeAws_json1_1InternalServiceExceptionResponse(parsedOutput, context); + case "InvalidInputException": + case "com.amazonaws.glue#InvalidInputException": + throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context); + case "OperationTimeoutException": + case "com.amazonaws.glue#OperationTimeoutException": + throw await deserializeAws_json1_1OperationTimeoutExceptionResponse(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + response = new __BaseException({ + name: parsedBody.code || parsedBody.Code || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }); + throw __decorateServiceException(response, parsedBody); + } +}; + export const deserializeAws_json1_1BatchGetDevEndpointsCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -4319,6 +4464,67 @@ const deserializeAws_json1_1CreateCrawlerCommandError = async ( } }; +export const deserializeAws_json1_1CreateCustomEntityTypeCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1CreateCustomEntityTypeCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1CreateCustomEntityTypeResponse(data, context); + const response: CreateCustomEntityTypeCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_1CreateCustomEntityTypeCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __BaseException; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.glue#AccessDeniedException": + throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context); + case "AlreadyExistsException": + case "com.amazonaws.glue#AlreadyExistsException": + throw await deserializeAws_json1_1AlreadyExistsExceptionResponse(parsedOutput, context); + case "IdempotentParameterMismatchException": + case "com.amazonaws.glue#IdempotentParameterMismatchException": + throw await deserializeAws_json1_1IdempotentParameterMismatchExceptionResponse(parsedOutput, context); + case "InternalServiceException": + case "com.amazonaws.glue#InternalServiceException": + throw await deserializeAws_json1_1InternalServiceExceptionResponse(parsedOutput, context); + case "InvalidInputException": + case "com.amazonaws.glue#InvalidInputException": + throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context); + case "OperationTimeoutException": + case "com.amazonaws.glue#OperationTimeoutException": + throw await deserializeAws_json1_1OperationTimeoutExceptionResponse(parsedOutput, context); + case "ResourceNumberLimitExceededException": + case "com.amazonaws.glue#ResourceNumberLimitExceededException": + throw await deserializeAws_json1_1ResourceNumberLimitExceededExceptionResponse(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + response = new __BaseException({ + name: parsedBody.code || parsedBody.Code || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }); + throw __decorateServiceException(response, parsedBody); + } +}; + export const deserializeAws_json1_1CreateDatabaseCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -5528,6 +5734,61 @@ const deserializeAws_json1_1DeleteCrawlerCommandError = async ( } }; +export const deserializeAws_json1_1DeleteCustomEntityTypeCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DeleteCustomEntityTypeCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DeleteCustomEntityTypeResponse(data, context); + const response: DeleteCustomEntityTypeCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_1DeleteCustomEntityTypeCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __BaseException; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.glue#AccessDeniedException": + throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context); + case "EntityNotFoundException": + case "com.amazonaws.glue#EntityNotFoundException": + throw await deserializeAws_json1_1EntityNotFoundExceptionResponse(parsedOutput, context); + case "InternalServiceException": + case "com.amazonaws.glue#InternalServiceException": + throw await deserializeAws_json1_1InternalServiceExceptionResponse(parsedOutput, context); + case "InvalidInputException": + case "com.amazonaws.glue#InvalidInputException": + throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context); + case "OperationTimeoutException": + case "com.amazonaws.glue#OperationTimeoutException": + throw await deserializeAws_json1_1OperationTimeoutExceptionResponse(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + response = new __BaseException({ + name: parsedBody.code || parsedBody.Code || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }); + throw __decorateServiceException(response, parsedBody); + } +}; + export const deserializeAws_json1_1DeleteDatabaseCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -7067,6 +7328,61 @@ const deserializeAws_json1_1GetCrawlersCommandError = async ( } }; +export const deserializeAws_json1_1GetCustomEntityTypeCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1GetCustomEntityTypeCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1GetCustomEntityTypeResponse(data, context); + const response: GetCustomEntityTypeCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_1GetCustomEntityTypeCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __BaseException; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.glue#AccessDeniedException": + throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context); + case "EntityNotFoundException": + case "com.amazonaws.glue#EntityNotFoundException": + throw await deserializeAws_json1_1EntityNotFoundExceptionResponse(parsedOutput, context); + case "InternalServiceException": + case "com.amazonaws.glue#InternalServiceException": + throw await deserializeAws_json1_1InternalServiceExceptionResponse(parsedOutput, context); + case "InvalidInputException": + case "com.amazonaws.glue#InvalidInputException": + throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context); + case "OperationTimeoutException": + case "com.amazonaws.glue#OperationTimeoutException": + throw await deserializeAws_json1_1OperationTimeoutExceptionResponse(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + response = new __BaseException({ + name: parsedBody.code || parsedBody.Code || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }); + throw __decorateServiceException(response, parsedBody); + } +}; + export const deserializeAws_json1_1GetDatabaseCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -9709,6 +10025,55 @@ const deserializeAws_json1_1ListCrawlersCommandError = async ( } }; +export const deserializeAws_json1_1ListCustomEntityTypesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1ListCustomEntityTypesCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1ListCustomEntityTypesResponse(data, context); + const response: ListCustomEntityTypesCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_1ListCustomEntityTypesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __BaseException; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServiceException": + case "com.amazonaws.glue#InternalServiceException": + throw await deserializeAws_json1_1InternalServiceExceptionResponse(parsedOutput, context); + case "InvalidInputException": + case "com.amazonaws.glue#InvalidInputException": + throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context); + case "OperationTimeoutException": + case "com.amazonaws.glue#OperationTimeoutException": + throw await deserializeAws_json1_1OperationTimeoutExceptionResponse(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + response = new __BaseException({ + name: parsedBody.code || parsedBody.Code || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }); + throw __decorateServiceException(response, parsedBody); + } +}; + export const deserializeAws_json1_1ListDevEndpointsCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -13342,6 +13707,16 @@ const serializeAws_json1_1BatchGetCrawlersRequest = (input: BatchGetCrawlersRequ }; }; +const serializeAws_json1_1BatchGetCustomEntityTypesRequest = ( + input: BatchGetCustomEntityTypesRequest, + context: __SerdeContext +): any => { + return { + ...(input.Names !== undefined && + input.Names !== null && { Names: serializeAws_json1_1CustomEntityTypeNames(input.Names, context) }), + }; +}; + const serializeAws_json1_1BatchGetDevEndpointsRequest = ( input: BatchGetDevEndpointsRequest, context: __SerdeContext @@ -13818,6 +14193,17 @@ const serializeAws_json1_1ConnectionsList = (input: ConnectionsList, context: __ }; }; +const serializeAws_json1_1ContextWords = (input: string[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + const serializeAws_json1_1CrawlerNameList = (input: string[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) @@ -13957,6 +14343,18 @@ const serializeAws_json1_1CreateCsvClassifierRequest = ( }; }; +const serializeAws_json1_1CreateCustomEntityTypeRequest = ( + input: CreateCustomEntityTypeRequest, + context: __SerdeContext +): any => { + return { + ...(input.ContextWords !== undefined && + input.ContextWords !== null && { ContextWords: serializeAws_json1_1ContextWords(input.ContextWords, context) }), + ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }), + ...(input.RegexString !== undefined && input.RegexString !== null && { RegexString: input.RegexString }), + }; +}; + const serializeAws_json1_1CreateDatabaseRequest = (input: CreateDatabaseRequest, context: __SerdeContext): any => { return { ...(input.CatalogId !== undefined && input.CatalogId !== null && { CatalogId: input.CatalogId }), @@ -14281,6 +14679,17 @@ const serializeAws_json1_1CsvHeader = (input: string[], context: __SerdeContext) }); }; +const serializeAws_json1_1CustomEntityTypeNames = (input: string[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + const serializeAws_json1_1DagEdges = (input: CodeGenEdge[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) @@ -14460,6 +14869,15 @@ const serializeAws_json1_1DeleteCrawlerRequest = (input: DeleteCrawlerRequest, c }; }; +const serializeAws_json1_1DeleteCustomEntityTypeRequest = ( + input: DeleteCustomEntityTypeRequest, + context: __SerdeContext +): any => { + return { + ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }), + }; +}; + const serializeAws_json1_1DeleteDatabaseRequest = (input: DeleteDatabaseRequest, context: __SerdeContext): any => { return { ...(input.CatalogId !== undefined && input.CatalogId !== null && { CatalogId: input.CatalogId }), @@ -14905,6 +15323,15 @@ const serializeAws_json1_1GetCrawlersRequest = (input: GetCrawlersRequest, conte }; }; +const serializeAws_json1_1GetCustomEntityTypeRequest = ( + input: GetCustomEntityTypeRequest, + context: __SerdeContext +): any => { + return { + ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }), + }; +}; + const serializeAws_json1_1GetDatabaseRequest = (input: GetDatabaseRequest, context: __SerdeContext): any => { return { ...(input.CatalogId !== undefined && input.CatalogId !== null && { CatalogId: input.CatalogId }), @@ -15552,6 +15979,16 @@ const serializeAws_json1_1ListCrawlersRequest = (input: ListCrawlersRequest, con }; }; +const serializeAws_json1_1ListCustomEntityTypesRequest = ( + input: ListCustomEntityTypesRequest, + context: __SerdeContext +): any => { + return { + ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }), + ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }), + }; +}; + const serializeAws_json1_1ListDevEndpointsRequest = (input: ListDevEndpointsRequest, context: __SerdeContext): any => { return { ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }), @@ -17324,6 +17761,22 @@ const deserializeAws_json1_1BatchGetCrawlersResponse = ( } as any; }; +const deserializeAws_json1_1BatchGetCustomEntityTypesResponse = ( + output: any, + context: __SerdeContext +): BatchGetCustomEntityTypesResponse => { + return { + CustomEntityTypes: + output.CustomEntityTypes !== undefined && output.CustomEntityTypes !== null + ? deserializeAws_json1_1CustomEntityTypes(output.CustomEntityTypes, context) + : undefined, + CustomEntityTypesNotFound: + output.CustomEntityTypesNotFound !== undefined && output.CustomEntityTypesNotFound !== null + ? deserializeAws_json1_1CustomEntityTypeNames(output.CustomEntityTypesNotFound, context) + : undefined, + } as any; +}; + const deserializeAws_json1_1BatchGetDevEndpointsResponse = ( output: any, context: __SerdeContext @@ -18141,6 +18594,18 @@ const deserializeAws_json1_1ConnectionsList = (output: any, context: __SerdeCont } as any; }; +const deserializeAws_json1_1ContextWords = (output: any, context: __SerdeContext): string[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return __expectString(entry) as any; + }); + return retVal; +}; + const deserializeAws_json1_1Crawl = (output: any, context: __SerdeContext): Crawl => { return { CompletedOn: @@ -18366,6 +18831,15 @@ const deserializeAws_json1_1CreateCrawlerResponse = (output: any, context: __Ser return {} as any; }; +const deserializeAws_json1_1CreateCustomEntityTypeResponse = ( + output: any, + context: __SerdeContext +): CreateCustomEntityTypeResponse => { + return { + Name: __expectString(output.Name), + } as any; +}; + const deserializeAws_json1_1CreateDatabaseResponse = (output: any, context: __SerdeContext): CreateDatabaseResponse => { return {} as any; }; @@ -18557,6 +19031,41 @@ const deserializeAws_json1_1CsvHeader = (output: any, context: __SerdeContext): return retVal; }; +const deserializeAws_json1_1CustomEntityType = (output: any, context: __SerdeContext): CustomEntityType => { + return { + ContextWords: + output.ContextWords !== undefined && output.ContextWords !== null + ? deserializeAws_json1_1ContextWords(output.ContextWords, context) + : undefined, + Name: __expectString(output.Name), + RegexString: __expectString(output.RegexString), + } as any; +}; + +const deserializeAws_json1_1CustomEntityTypeNames = (output: any, context: __SerdeContext): string[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return __expectString(entry) as any; + }); + return retVal; +}; + +const deserializeAws_json1_1CustomEntityTypes = (output: any, context: __SerdeContext): CustomEntityType[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_json1_1CustomEntityType(entry, context); + }); + return retVal; +}; + const deserializeAws_json1_1DagEdges = (output: any, context: __SerdeContext): CodeGenEdge[] => { const retVal = (output || []) .filter((e: any) => e != null) @@ -18734,6 +19243,15 @@ const deserializeAws_json1_1DeleteCrawlerResponse = (output: any, context: __Ser return {} as any; }; +const deserializeAws_json1_1DeleteCustomEntityTypeResponse = ( + output: any, + context: __SerdeContext +): DeleteCustomEntityTypeResponse => { + return { + Name: __expectString(output.Name), + } as any; +}; + const deserializeAws_json1_1DeleteDatabaseResponse = (output: any, context: __SerdeContext): DeleteDatabaseResponse => { return {} as any; }; @@ -19298,6 +19816,20 @@ const deserializeAws_json1_1GetCrawlersResponse = (output: any, context: __Serde } as any; }; +const deserializeAws_json1_1GetCustomEntityTypeResponse = ( + output: any, + context: __SerdeContext +): GetCustomEntityTypeResponse => { + return { + ContextWords: + output.ContextWords !== undefined && output.ContextWords !== null + ? deserializeAws_json1_1ContextWords(output.ContextWords, context) + : undefined, + Name: __expectString(output.Name), + RegexString: __expectString(output.RegexString), + } as any; +}; + const deserializeAws_json1_1GetDatabaseResponse = (output: any, context: __SerdeContext): GetDatabaseResponse => { return { Database: @@ -20343,6 +20875,19 @@ const deserializeAws_json1_1ListCrawlersResponse = (output: any, context: __Serd } as any; }; +const deserializeAws_json1_1ListCustomEntityTypesResponse = ( + output: any, + context: __SerdeContext +): ListCustomEntityTypesResponse => { + return { + CustomEntityTypes: + output.CustomEntityTypes !== undefined && output.CustomEntityTypes !== null + ? deserializeAws_json1_1CustomEntityTypes(output.CustomEntityTypes, context) + : undefined, + NextToken: __expectString(output.NextToken), + } as any; +}; + const deserializeAws_json1_1ListDevEndpointsResponse = ( output: any, context: __SerdeContext diff --git a/codegen/sdk-codegen/aws-models/glue.json b/codegen/sdk-codegen/aws-models/glue.json index 0bd6179523d2..19c61cd990f2 100644 --- a/codegen/sdk-codegen/aws-models/glue.json +++ b/codegen/sdk-codegen/aws-models/glue.json @@ -69,6 +69,9 @@ { "target": "com.amazonaws.glue#BatchGetCrawlers" }, + { + "target": "com.amazonaws.glue#BatchGetCustomEntityTypes" + }, { "target": "com.amazonaws.glue#BatchGetDevEndpoints" }, @@ -111,6 +114,9 @@ { "target": "com.amazonaws.glue#CreateCrawler" }, + { + "target": "com.amazonaws.glue#CreateCustomEntityType" + }, { "target": "com.amazonaws.glue#CreateDatabase" }, @@ -174,6 +180,9 @@ { "target": "com.amazonaws.glue#DeleteCrawler" }, + { + "target": "com.amazonaws.glue#DeleteCustomEntityType" + }, { "target": "com.amazonaws.glue#DeleteDatabase" }, @@ -264,6 +273,9 @@ { "target": "com.amazonaws.glue#GetCrawlers" }, + { + "target": "com.amazonaws.glue#GetCustomEntityType" + }, { "target": "com.amazonaws.glue#GetDatabase" }, @@ -414,6 +426,9 @@ { "target": "com.amazonaws.glue#ListCrawlers" }, + { + "target": "com.amazonaws.glue#ListCustomEntityTypes" + }, { "target": "com.amazonaws.glue#ListDevEndpoints" }, @@ -1291,6 +1306,48 @@ } } }, + "com.amazonaws.glue#BatchGetCustomEntityTypes": { + "type": "operation", + "input": { + "target": "com.amazonaws.glue#BatchGetCustomEntityTypesRequest" + }, + "output": { + "target": "com.amazonaws.glue#BatchGetCustomEntityTypesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.glue#InternalServiceException" + }, + { + "target": "com.amazonaws.glue#InvalidInputException" + }, + { + "target": "com.amazonaws.glue#OperationTimeoutException" + } + ] + }, + "com.amazonaws.glue#BatchGetCustomEntityTypesRequest": { + "type": "structure", + "members": { + "Names": { + "target": "com.amazonaws.glue#CustomEntityTypeNames", + "traits": { + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.glue#BatchGetCustomEntityTypesResponse": { + "type": "structure", + "members": { + "CustomEntityTypes": { + "target": "com.amazonaws.glue#CustomEntityTypes" + }, + "CustomEntityTypesNotFound": { + "target": "com.amazonaws.glue#CustomEntityTypeNames" + } + } + }, "com.amazonaws.glue#BatchGetDevEndpoints": { "type": "operation", "input": { @@ -3575,6 +3632,18 @@ "smithy.api#documentation": "

Specifies the connections used by a job.

" } }, + "com.amazonaws.glue#ContextWords": { + "type": "list", + "member": { + "target": "com.amazonaws.glue#NameString" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 20 + } + } + }, "com.amazonaws.glue#Crawl": { "type": "structure", "members": { @@ -4366,6 +4435,66 @@ "smithy.api#documentation": "

Specifies a custom CSV classifier for CreateClassifier to create.

" } }, + "com.amazonaws.glue#CreateCustomEntityType": { + "type": "operation", + "input": { + "target": "com.amazonaws.glue#CreateCustomEntityTypeRequest" + }, + "output": { + "target": "com.amazonaws.glue#CreateCustomEntityTypeResponse" + }, + "errors": [ + { + "target": "com.amazonaws.glue#AccessDeniedException" + }, + { + "target": "com.amazonaws.glue#AlreadyExistsException" + }, + { + "target": "com.amazonaws.glue#IdempotentParameterMismatchException" + }, + { + "target": "com.amazonaws.glue#InternalServiceException" + }, + { + "target": "com.amazonaws.glue#InvalidInputException" + }, + { + "target": "com.amazonaws.glue#OperationTimeoutException" + }, + { + "target": "com.amazonaws.glue#ResourceNumberLimitExceededException" + } + ] + }, + "com.amazonaws.glue#CreateCustomEntityTypeRequest": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NameString", + "traits": { + "smithy.api#required": {} + } + }, + "RegexString": { + "target": "com.amazonaws.glue#NameString", + "traits": { + "smithy.api#required": {} + } + }, + "ContextWords": { + "target": "com.amazonaws.glue#ContextWords" + } + } + }, + "com.amazonaws.glue#CreateCustomEntityTypeResponse": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NameString" + } + } + }, "com.amazonaws.glue#CreateDatabase": { "type": "operation", "input": { @@ -6206,6 +6335,44 @@ "smithy.api#pattern": "^[^\\r\\n]$" } }, + "com.amazonaws.glue#CustomEntityType": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NameString", + "traits": { + "smithy.api#required": {} + } + }, + "RegexString": { + "target": "com.amazonaws.glue#NameString", + "traits": { + "smithy.api#required": {} + } + }, + "ContextWords": { + "target": "com.amazonaws.glue#ContextWords" + } + } + }, + "com.amazonaws.glue#CustomEntityTypeNames": { + "type": "list", + "member": { + "target": "com.amazonaws.glue#NameString" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 50 + } + } + }, + "com.amazonaws.glue#CustomEntityTypes": { + "type": "list", + "member": { + "target": "com.amazonaws.glue#CustomEntityType" + } + }, "com.amazonaws.glue#CustomPatterns": { "type": "string", "traits": { @@ -6845,6 +7012,51 @@ "type": "structure", "members": {} }, + "com.amazonaws.glue#DeleteCustomEntityType": { + "type": "operation", + "input": { + "target": "com.amazonaws.glue#DeleteCustomEntityTypeRequest" + }, + "output": { + "target": "com.amazonaws.glue#DeleteCustomEntityTypeResponse" + }, + "errors": [ + { + "target": "com.amazonaws.glue#AccessDeniedException" + }, + { + "target": "com.amazonaws.glue#EntityNotFoundException" + }, + { + "target": "com.amazonaws.glue#InternalServiceException" + }, + { + "target": "com.amazonaws.glue#InvalidInputException" + }, + { + "target": "com.amazonaws.glue#OperationTimeoutException" + } + ] + }, + "com.amazonaws.glue#DeleteCustomEntityTypeRequest": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NameString", + "traits": { + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.glue#DeleteCustomEntityTypeResponse": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NameString" + } + } + }, "com.amazonaws.glue#DeleteDatabase": { "type": "operation", "input": { @@ -9341,6 +9553,57 @@ } } }, + "com.amazonaws.glue#GetCustomEntityType": { + "type": "operation", + "input": { + "target": "com.amazonaws.glue#GetCustomEntityTypeRequest" + }, + "output": { + "target": "com.amazonaws.glue#GetCustomEntityTypeResponse" + }, + "errors": [ + { + "target": "com.amazonaws.glue#AccessDeniedException" + }, + { + "target": "com.amazonaws.glue#EntityNotFoundException" + }, + { + "target": "com.amazonaws.glue#InternalServiceException" + }, + { + "target": "com.amazonaws.glue#InvalidInputException" + }, + { + "target": "com.amazonaws.glue#OperationTimeoutException" + } + ] + }, + "com.amazonaws.glue#GetCustomEntityTypeRequest": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NameString", + "traits": { + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.glue#GetCustomEntityTypeResponse": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NameString" + }, + "RegexString": { + "target": "com.amazonaws.glue#NameString" + }, + "ContextWords": { + "target": "com.amazonaws.glue#ContextWords" + } + } + }, "com.amazonaws.glue#GetDataCatalogEncryptionSettings": { "type": "operation", "input": { @@ -14209,6 +14472,55 @@ } } }, + "com.amazonaws.glue#ListCustomEntityTypes": { + "type": "operation", + "input": { + "target": "com.amazonaws.glue#ListCustomEntityTypesRequest" + }, + "output": { + "target": "com.amazonaws.glue#ListCustomEntityTypesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.glue#InternalServiceException" + }, + { + "target": "com.amazonaws.glue#InvalidInputException" + }, + { + "target": "com.amazonaws.glue#OperationTimeoutException" + } + ], + "traits": { + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.glue#ListCustomEntityTypesRequest": { + "type": "structure", + "members": { + "NextToken": { + "target": "com.amazonaws.glue#PaginationToken" + }, + "MaxResults": { + "target": "com.amazonaws.glue#PageSize" + } + } + }, + "com.amazonaws.glue#ListCustomEntityTypesResponse": { + "type": "structure", + "members": { + "CustomEntityTypes": { + "target": "com.amazonaws.glue#CustomEntityTypes" + }, + "NextToken": { + "target": "com.amazonaws.glue#PaginationToken" + } + } + }, "com.amazonaws.glue#ListDevEndpoints": { "type": "operation", "input": {