diff --git a/clients/client-glue/README.md b/clients/client-glue/README.md index ba2bbb3af827e..b7194ca27e3ef 100644 --- a/clients/client-glue/README.md +++ b/clients/client-glue/README.md @@ -828,6 +828,22 @@ GetColumnStatisticsForTable [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-glue/classes/getcolumnstatisticsfortablecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-glue/interfaces/getcolumnstatisticsfortablecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-glue/interfaces/getcolumnstatisticsfortablecommandoutput.html) + +
+ +GetColumnStatisticsTaskRun + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-glue/classes/getcolumnstatisticstaskruncommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-glue/interfaces/getcolumnstatisticstaskruncommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-glue/interfaces/getcolumnstatisticstaskruncommandoutput.html) + +
+
+ +GetColumnStatisticsTaskRuns + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-glue/classes/getcolumnstatisticstaskrunscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-glue/interfaces/getcolumnstatisticstaskrunscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-glue/interfaces/getcolumnstatisticstaskrunscommandoutput.html) +
@@ -1308,6 +1324,14 @@ ListBlueprints [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-glue/classes/listblueprintscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-glue/interfaces/listblueprintscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-glue/interfaces/listblueprintscommandoutput.html) +
+
+ +ListColumnStatisticsTaskRuns + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-glue/classes/listcolumnstatisticstaskrunscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-glue/interfaces/listcolumnstatisticstaskrunscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-glue/interfaces/listcolumnstatisticstaskrunscommandoutput.html) +
@@ -1548,6 +1572,14 @@ StartBlueprintRun [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-glue/classes/startblueprintruncommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-glue/interfaces/startblueprintruncommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-glue/interfaces/startblueprintruncommandoutput.html) +
+
+ +StartColumnStatisticsTaskRun + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-glue/classes/startcolumnstatisticstaskruncommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-glue/interfaces/startcolumnstatisticstaskruncommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-glue/interfaces/startcolumnstatisticstaskruncommandoutput.html) +
@@ -1636,6 +1668,14 @@ StartWorkflowRun [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-glue/classes/startworkflowruncommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-glue/interfaces/startworkflowruncommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-glue/interfaces/startworkflowruncommandoutput.html) +
+
+ +StopColumnStatisticsTaskRun + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-glue/classes/stopcolumnstatisticstaskruncommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-glue/interfaces/stopcolumnstatisticstaskruncommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-glue/interfaces/stopcolumnstatisticstaskruncommandoutput.html) +
diff --git a/clients/client-glue/src/Glue.ts b/clients/client-glue/src/Glue.ts index d6100cce40b54..40226cf034ef6 100644 --- a/clients/client-glue/src/Glue.ts +++ b/clients/client-glue/src/Glue.ts @@ -376,6 +376,16 @@ import { GetColumnStatisticsForTableCommandInput, GetColumnStatisticsForTableCommandOutput, } from "./commands/GetColumnStatisticsForTableCommand"; +import { + GetColumnStatisticsTaskRunCommand, + GetColumnStatisticsTaskRunCommandInput, + GetColumnStatisticsTaskRunCommandOutput, +} from "./commands/GetColumnStatisticsTaskRunCommand"; +import { + GetColumnStatisticsTaskRunsCommand, + GetColumnStatisticsTaskRunsCommandInput, + GetColumnStatisticsTaskRunsCommandOutput, +} from "./commands/GetColumnStatisticsTaskRunsCommand"; import { GetConnectionCommand, GetConnectionCommandInput, @@ -604,6 +614,11 @@ import { ListBlueprintsCommandInput, ListBlueprintsCommandOutput, } from "./commands/ListBlueprintsCommand"; +import { + ListColumnStatisticsTaskRunsCommand, + ListColumnStatisticsTaskRunsCommandInput, + ListColumnStatisticsTaskRunsCommandOutput, +} from "./commands/ListColumnStatisticsTaskRunsCommand"; import { ListCrawlersCommand, ListCrawlersCommandInput, @@ -742,6 +757,11 @@ import { StartBlueprintRunCommandInput, StartBlueprintRunCommandOutput, } from "./commands/StartBlueprintRunCommand"; +import { + StartColumnStatisticsTaskRunCommand, + StartColumnStatisticsTaskRunCommandInput, + StartColumnStatisticsTaskRunCommandOutput, +} from "./commands/StartColumnStatisticsTaskRunCommand"; import { StartCrawlerCommand, StartCrawlerCommandInput, @@ -793,6 +813,11 @@ import { StartWorkflowRunCommandInput, StartWorkflowRunCommandOutput, } from "./commands/StartWorkflowRunCommand"; +import { + StopColumnStatisticsTaskRunCommand, + StopColumnStatisticsTaskRunCommandInput, + StopColumnStatisticsTaskRunCommandOutput, +} from "./commands/StopColumnStatisticsTaskRunCommand"; import { StopCrawlerCommand, StopCrawlerCommandInput, StopCrawlerCommandOutput } from "./commands/StopCrawlerCommand"; import { StopCrawlerScheduleCommand, @@ -995,6 +1020,8 @@ const commands = { GetClassifiersCommand, GetColumnStatisticsForPartitionCommand, GetColumnStatisticsForTableCommand, + GetColumnStatisticsTaskRunCommand, + GetColumnStatisticsTaskRunsCommand, GetConnectionCommand, GetConnectionsCommand, GetCrawlerCommand, @@ -1055,6 +1082,7 @@ const commands = { GetWorkflowRunsCommand, ImportCatalogToGlueCommand, ListBlueprintsCommand, + ListColumnStatisticsTaskRunsCommand, ListCrawlersCommand, ListCrawlsCommand, ListCustomEntityTypesCommand, @@ -1085,6 +1113,7 @@ const commands = { RunStatementCommand, SearchTablesCommand, StartBlueprintRunCommand, + StartColumnStatisticsTaskRunCommand, StartCrawlerCommand, StartCrawlerScheduleCommand, StartDataQualityRuleRecommendationRunCommand, @@ -1096,6 +1125,7 @@ const commands = { StartMLLabelingSetGenerationTaskRunCommand, StartTriggerCommand, StartWorkflowRunCommand, + StopColumnStatisticsTaskRunCommand, StopCrawlerCommand, StopCrawlerScheduleCommand, StopSessionCommand, @@ -2313,6 +2343,40 @@ export interface Glue { cb: (err: any, data?: GetColumnStatisticsForTableCommandOutput) => void ): void; + /** + * @see {@link GetColumnStatisticsTaskRunCommand} + */ + getColumnStatisticsTaskRun( + args: GetColumnStatisticsTaskRunCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getColumnStatisticsTaskRun( + args: GetColumnStatisticsTaskRunCommandInput, + cb: (err: any, data?: GetColumnStatisticsTaskRunCommandOutput) => void + ): void; + getColumnStatisticsTaskRun( + args: GetColumnStatisticsTaskRunCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetColumnStatisticsTaskRunCommandOutput) => void + ): void; + + /** + * @see {@link GetColumnStatisticsTaskRunsCommand} + */ + getColumnStatisticsTaskRuns( + args: GetColumnStatisticsTaskRunsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getColumnStatisticsTaskRuns( + args: GetColumnStatisticsTaskRunsCommandInput, + cb: (err: any, data?: GetColumnStatisticsTaskRunsCommandOutput) => void + ): void; + getColumnStatisticsTaskRuns( + args: GetColumnStatisticsTaskRunsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetColumnStatisticsTaskRunsCommandOutput) => void + ): void; + /** * @see {@link GetConnectionCommand} */ @@ -3153,6 +3217,23 @@ export interface Glue { cb: (err: any, data?: ListBlueprintsCommandOutput) => void ): void; + /** + * @see {@link ListColumnStatisticsTaskRunsCommand} + */ + listColumnStatisticsTaskRuns( + args: ListColumnStatisticsTaskRunsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listColumnStatisticsTaskRuns( + args: ListColumnStatisticsTaskRunsCommandInput, + cb: (err: any, data?: ListColumnStatisticsTaskRunsCommandOutput) => void + ): void; + listColumnStatisticsTaskRuns( + args: ListColumnStatisticsTaskRunsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListColumnStatisticsTaskRunsCommandOutput) => void + ): void; + /** * @see {@link ListCrawlersCommand} */ @@ -3603,6 +3684,23 @@ export interface Glue { cb: (err: any, data?: StartBlueprintRunCommandOutput) => void ): void; + /** + * @see {@link StartColumnStatisticsTaskRunCommand} + */ + startColumnStatisticsTaskRun( + args: StartColumnStatisticsTaskRunCommandInput, + options?: __HttpHandlerOptions + ): Promise; + startColumnStatisticsTaskRun( + args: StartColumnStatisticsTaskRunCommandInput, + cb: (err: any, data?: StartColumnStatisticsTaskRunCommandOutput) => void + ): void; + startColumnStatisticsTaskRun( + args: StartColumnStatisticsTaskRunCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StartColumnStatisticsTaskRunCommandOutput) => void + ): void; + /** * @see {@link StartCrawlerCommand} */ @@ -3772,6 +3870,23 @@ export interface Glue { cb: (err: any, data?: StartWorkflowRunCommandOutput) => void ): void; + /** + * @see {@link StopColumnStatisticsTaskRunCommand} + */ + stopColumnStatisticsTaskRun( + args: StopColumnStatisticsTaskRunCommandInput, + options?: __HttpHandlerOptions + ): Promise; + stopColumnStatisticsTaskRun( + args: StopColumnStatisticsTaskRunCommandInput, + cb: (err: any, data?: StopColumnStatisticsTaskRunCommandOutput) => void + ): void; + stopColumnStatisticsTaskRun( + args: StopColumnStatisticsTaskRunCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StopColumnStatisticsTaskRunCommandOutput) => void + ): void; + /** * @see {@link StopCrawlerCommand} */ diff --git a/clients/client-glue/src/GlueClient.ts b/clients/client-glue/src/GlueClient.ts index 40741457c88e2..6a9d89a9b24d8 100644 --- a/clients/client-glue/src/GlueClient.ts +++ b/clients/client-glue/src/GlueClient.ts @@ -221,6 +221,14 @@ import { GetColumnStatisticsForTableCommandInput, GetColumnStatisticsForTableCommandOutput, } from "./commands/GetColumnStatisticsForTableCommand"; +import { + GetColumnStatisticsTaskRunCommandInput, + GetColumnStatisticsTaskRunCommandOutput, +} from "./commands/GetColumnStatisticsTaskRunCommand"; +import { + GetColumnStatisticsTaskRunsCommandInput, + GetColumnStatisticsTaskRunsCommandOutput, +} from "./commands/GetColumnStatisticsTaskRunsCommand"; import { GetConnectionCommandInput, GetConnectionCommandOutput } from "./commands/GetConnectionCommand"; import { GetConnectionsCommandInput, GetConnectionsCommandOutput } from "./commands/GetConnectionsCommand"; import { GetCrawlerCommandInput, GetCrawlerCommandOutput } from "./commands/GetCrawlerCommand"; @@ -338,6 +346,10 @@ import { ImportCatalogToGlueCommandOutput, } from "./commands/ImportCatalogToGlueCommand"; import { ListBlueprintsCommandInput, ListBlueprintsCommandOutput } from "./commands/ListBlueprintsCommand"; +import { + ListColumnStatisticsTaskRunsCommandInput, + ListColumnStatisticsTaskRunsCommandOutput, +} from "./commands/ListColumnStatisticsTaskRunsCommand"; import { ListCrawlersCommandInput, ListCrawlersCommandOutput } from "./commands/ListCrawlersCommand"; import { ListCrawlsCommandInput, ListCrawlsCommandOutput } from "./commands/ListCrawlsCommand"; import { @@ -404,6 +416,10 @@ import { ResumeWorkflowRunCommandInput, ResumeWorkflowRunCommandOutput } from ". import { RunStatementCommandInput, RunStatementCommandOutput } from "./commands/RunStatementCommand"; import { SearchTablesCommandInput, SearchTablesCommandOutput } from "./commands/SearchTablesCommand"; import { StartBlueprintRunCommandInput, StartBlueprintRunCommandOutput } from "./commands/StartBlueprintRunCommand"; +import { + StartColumnStatisticsTaskRunCommandInput, + StartColumnStatisticsTaskRunCommandOutput, +} from "./commands/StartColumnStatisticsTaskRunCommand"; import { StartCrawlerCommandInput, StartCrawlerCommandOutput } from "./commands/StartCrawlerCommand"; import { StartCrawlerScheduleCommandInput, @@ -436,6 +452,10 @@ import { } from "./commands/StartMLLabelingSetGenerationTaskRunCommand"; import { StartTriggerCommandInput, StartTriggerCommandOutput } from "./commands/StartTriggerCommand"; import { StartWorkflowRunCommandInput, StartWorkflowRunCommandOutput } from "./commands/StartWorkflowRunCommand"; +import { + StopColumnStatisticsTaskRunCommandInput, + StopColumnStatisticsTaskRunCommandOutput, +} from "./commands/StopColumnStatisticsTaskRunCommand"; import { StopCrawlerCommandInput, StopCrawlerCommandOutput } from "./commands/StopCrawlerCommand"; import { StopCrawlerScheduleCommandInput, @@ -585,6 +605,8 @@ export type ServiceInputTypes = | GetClassifiersCommandInput | GetColumnStatisticsForPartitionCommandInput | GetColumnStatisticsForTableCommandInput + | GetColumnStatisticsTaskRunCommandInput + | GetColumnStatisticsTaskRunsCommandInput | GetConnectionCommandInput | GetConnectionsCommandInput | GetCrawlerCommandInput @@ -645,6 +667,7 @@ export type ServiceInputTypes = | GetWorkflowRunsCommandInput | ImportCatalogToGlueCommandInput | ListBlueprintsCommandInput + | ListColumnStatisticsTaskRunsCommandInput | ListCrawlersCommandInput | ListCrawlsCommandInput | ListCustomEntityTypesCommandInput @@ -675,6 +698,7 @@ export type ServiceInputTypes = | RunStatementCommandInput | SearchTablesCommandInput | StartBlueprintRunCommandInput + | StartColumnStatisticsTaskRunCommandInput | StartCrawlerCommandInput | StartCrawlerScheduleCommandInput | StartDataQualityRuleRecommendationRunCommandInput @@ -686,6 +710,7 @@ export type ServiceInputTypes = | StartMLLabelingSetGenerationTaskRunCommandInput | StartTriggerCommandInput | StartWorkflowRunCommandInput + | StopColumnStatisticsTaskRunCommandInput | StopCrawlerCommandInput | StopCrawlerScheduleCommandInput | StopSessionCommandInput @@ -798,6 +823,8 @@ export type ServiceOutputTypes = | GetClassifiersCommandOutput | GetColumnStatisticsForPartitionCommandOutput | GetColumnStatisticsForTableCommandOutput + | GetColumnStatisticsTaskRunCommandOutput + | GetColumnStatisticsTaskRunsCommandOutput | GetConnectionCommandOutput | GetConnectionsCommandOutput | GetCrawlerCommandOutput @@ -858,6 +885,7 @@ export type ServiceOutputTypes = | GetWorkflowRunsCommandOutput | ImportCatalogToGlueCommandOutput | ListBlueprintsCommandOutput + | ListColumnStatisticsTaskRunsCommandOutput | ListCrawlersCommandOutput | ListCrawlsCommandOutput | ListCustomEntityTypesCommandOutput @@ -888,6 +916,7 @@ export type ServiceOutputTypes = | RunStatementCommandOutput | SearchTablesCommandOutput | StartBlueprintRunCommandOutput + | StartColumnStatisticsTaskRunCommandOutput | StartCrawlerCommandOutput | StartCrawlerScheduleCommandOutput | StartDataQualityRuleRecommendationRunCommandOutput @@ -899,6 +928,7 @@ export type ServiceOutputTypes = | StartMLLabelingSetGenerationTaskRunCommandOutput | StartTriggerCommandOutput | StartWorkflowRunCommandOutput + | StopColumnStatisticsTaskRunCommandOutput | StopCrawlerCommandOutput | StopCrawlerScheduleCommandOutput | StopSessionCommandOutput diff --git a/clients/client-glue/src/commands/GetColumnStatisticsTaskRunCommand.ts b/clients/client-glue/src/commands/GetColumnStatisticsTaskRunCommand.ts new file mode 100644 index 0000000000000..2eef45a404ba7 --- /dev/null +++ b/clients/client-glue/src/commands/GetColumnStatisticsTaskRunCommand.ts @@ -0,0 +1,172 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient"; +import { GetColumnStatisticsTaskRunRequest, GetColumnStatisticsTaskRunResponse } from "../models/models_1"; +import { de_GetColumnStatisticsTaskRunCommand, se_GetColumnStatisticsTaskRunCommand } from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetColumnStatisticsTaskRunCommand}. + */ +export interface GetColumnStatisticsTaskRunCommandInput extends GetColumnStatisticsTaskRunRequest {} +/** + * @public + * + * The output of {@link GetColumnStatisticsTaskRunCommand}. + */ +export interface GetColumnStatisticsTaskRunCommandOutput extends GetColumnStatisticsTaskRunResponse, __MetadataBearer {} + +/** + * @public + *

Get the associated metadata/information for a task run, given a task run ID.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { GlueClient, GetColumnStatisticsTaskRunCommand } from "@aws-sdk/client-glue"; // ES Modules import + * // const { GlueClient, GetColumnStatisticsTaskRunCommand } = require("@aws-sdk/client-glue"); // CommonJS import + * const client = new GlueClient(config); + * const input = { // GetColumnStatisticsTaskRunRequest + * ColumnStatisticsTaskRunId: "STRING_VALUE", // required + * }; + * const command = new GetColumnStatisticsTaskRunCommand(input); + * const response = await client.send(command); + * // { // GetColumnStatisticsTaskRunResponse + * // ColumnStatisticsTaskRun: { // ColumnStatisticsTaskRun + * // CustomerId: "STRING_VALUE", + * // ColumnStatisticsTaskRunId: "STRING_VALUE", + * // DatabaseName: "STRING_VALUE", + * // TableName: "STRING_VALUE", + * // ColumnNameList: [ // ColumnNameList + * // "STRING_VALUE", + * // ], + * // CatalogID: "STRING_VALUE", + * // Role: "STRING_VALUE", + * // SampleSize: Number("double"), + * // SecurityConfiguration: "STRING_VALUE", + * // NumberOfWorkers: Number("int"), + * // WorkerType: "STRING_VALUE", + * // Status: "STARTING" || "RUNNING" || "SUCCEEDED" || "FAILED" || "STOPPED", + * // CreationTime: new Date("TIMESTAMP"), + * // LastUpdated: new Date("TIMESTAMP"), + * // StartTime: new Date("TIMESTAMP"), + * // EndTime: new Date("TIMESTAMP"), + * // ErrorMessage: "STRING_VALUE", + * // DPUSeconds: Number("double"), + * // }, + * // }; + * + * ``` + * + * @param GetColumnStatisticsTaskRunCommandInput - {@link GetColumnStatisticsTaskRunCommandInput} + * @returns {@link GetColumnStatisticsTaskRunCommandOutput} + * @see {@link GetColumnStatisticsTaskRunCommandInput} for command's `input` shape. + * @see {@link GetColumnStatisticsTaskRunCommandOutput} for command's `response` shape. + * @see {@link GlueClientResolvedConfig | config} for GlueClient's `config` shape. + * + * @throws {@link EntityNotFoundException} (client fault) + *

A specified entity does not exist

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

The input provided was not valid.

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

The operation timed out.

+ * + * @throws {@link GlueServiceException} + *

Base exception class for all service exceptions from Glue service.

+ * + */ +export class GetColumnStatisticsTaskRunCommand extends $Command< + GetColumnStatisticsTaskRunCommandInput, + GetColumnStatisticsTaskRunCommandOutput, + GlueClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: GetColumnStatisticsTaskRunCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: GlueClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, GetColumnStatisticsTaskRunCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "GlueClient"; + const commandName = "GetColumnStatisticsTaskRunCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "AWSGlue", + operation: "GetColumnStatisticsTaskRun", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: GetColumnStatisticsTaskRunCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_GetColumnStatisticsTaskRunCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_GetColumnStatisticsTaskRunCommand(output, context); + } +} diff --git a/clients/client-glue/src/commands/GetColumnStatisticsTaskRunsCommand.ts b/clients/client-glue/src/commands/GetColumnStatisticsTaskRunsCommand.ts new file mode 100644 index 0000000000000..f8385348d4ae2 --- /dev/null +++ b/clients/client-glue/src/commands/GetColumnStatisticsTaskRunsCommand.ts @@ -0,0 +1,174 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient"; +import { GetColumnStatisticsTaskRunsRequest, GetColumnStatisticsTaskRunsResponse } from "../models/models_1"; +import { de_GetColumnStatisticsTaskRunsCommand, se_GetColumnStatisticsTaskRunsCommand } from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetColumnStatisticsTaskRunsCommand}. + */ +export interface GetColumnStatisticsTaskRunsCommandInput extends GetColumnStatisticsTaskRunsRequest {} +/** + * @public + * + * The output of {@link GetColumnStatisticsTaskRunsCommand}. + */ +export interface GetColumnStatisticsTaskRunsCommandOutput + extends GetColumnStatisticsTaskRunsResponse, + __MetadataBearer {} + +/** + * @public + *

Retrieves information about all runs associated with the specified table.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { GlueClient, GetColumnStatisticsTaskRunsCommand } from "@aws-sdk/client-glue"; // ES Modules import + * // const { GlueClient, GetColumnStatisticsTaskRunsCommand } = require("@aws-sdk/client-glue"); // CommonJS import + * const client = new GlueClient(config); + * const input = { // GetColumnStatisticsTaskRunsRequest + * DatabaseName: "STRING_VALUE", // required + * TableName: "STRING_VALUE", // required + * MaxResults: Number("int"), + * NextToken: "STRING_VALUE", + * }; + * const command = new GetColumnStatisticsTaskRunsCommand(input); + * const response = await client.send(command); + * // { // GetColumnStatisticsTaskRunsResponse + * // ColumnStatisticsTaskRuns: [ // ColumnStatisticsTaskRunsList + * // { // ColumnStatisticsTaskRun + * // CustomerId: "STRING_VALUE", + * // ColumnStatisticsTaskRunId: "STRING_VALUE", + * // DatabaseName: "STRING_VALUE", + * // TableName: "STRING_VALUE", + * // ColumnNameList: [ // ColumnNameList + * // "STRING_VALUE", + * // ], + * // CatalogID: "STRING_VALUE", + * // Role: "STRING_VALUE", + * // SampleSize: Number("double"), + * // SecurityConfiguration: "STRING_VALUE", + * // NumberOfWorkers: Number("int"), + * // WorkerType: "STRING_VALUE", + * // Status: "STARTING" || "RUNNING" || "SUCCEEDED" || "FAILED" || "STOPPED", + * // CreationTime: new Date("TIMESTAMP"), + * // LastUpdated: new Date("TIMESTAMP"), + * // StartTime: new Date("TIMESTAMP"), + * // EndTime: new Date("TIMESTAMP"), + * // ErrorMessage: "STRING_VALUE", + * // DPUSeconds: Number("double"), + * // }, + * // ], + * // NextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param GetColumnStatisticsTaskRunsCommandInput - {@link GetColumnStatisticsTaskRunsCommandInput} + * @returns {@link GetColumnStatisticsTaskRunsCommandOutput} + * @see {@link GetColumnStatisticsTaskRunsCommandInput} for command's `input` shape. + * @see {@link GetColumnStatisticsTaskRunsCommandOutput} for command's `response` shape. + * @see {@link GlueClientResolvedConfig | config} for GlueClient's `config` shape. + * + * @throws {@link OperationTimeoutException} (client fault) + *

The operation timed out.

+ * + * @throws {@link GlueServiceException} + *

Base exception class for all service exceptions from Glue service.

+ * + */ +export class GetColumnStatisticsTaskRunsCommand extends $Command< + GetColumnStatisticsTaskRunsCommandInput, + GetColumnStatisticsTaskRunsCommandOutput, + GlueClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: GetColumnStatisticsTaskRunsCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: GlueClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, GetColumnStatisticsTaskRunsCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "GlueClient"; + const commandName = "GetColumnStatisticsTaskRunsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "AWSGlue", + operation: "GetColumnStatisticsTaskRuns", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: GetColumnStatisticsTaskRunsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_GetColumnStatisticsTaskRunsCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_GetColumnStatisticsTaskRunsCommand(output, context); + } +} diff --git a/clients/client-glue/src/commands/GetStatementCommand.ts b/clients/client-glue/src/commands/GetStatementCommand.ts index 7d0f85223bcff..369b715f2450d 100644 --- a/clients/client-glue/src/commands/GetStatementCommand.ts +++ b/clients/client-glue/src/commands/GetStatementCommand.ts @@ -15,7 +15,8 @@ import { } from "@smithy/types"; import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient"; -import { GetStatementRequest, GetStatementResponse } from "../models/models_1"; +import { GetStatementRequest } from "../models/models_1"; +import { GetStatementResponse } from "../models/models_2"; import { de_GetStatementCommand, se_GetStatementCommand } from "../protocols/Aws_json1_1"; /** diff --git a/clients/client-glue/src/commands/GetTableCommand.ts b/clients/client-glue/src/commands/GetTableCommand.ts index 95748c8f9f2e6..7b7dca7c3f033 100644 --- a/clients/client-glue/src/commands/GetTableCommand.ts +++ b/clients/client-glue/src/commands/GetTableCommand.ts @@ -15,8 +15,7 @@ import { } from "@smithy/types"; import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient"; -import { GetTableRequest } from "../models/models_1"; -import { GetTableResponse } from "../models/models_2"; +import { GetTableRequest, GetTableResponse } from "../models/models_2"; import { de_GetTableCommand, se_GetTableCommand } from "../protocols/Aws_json1_1"; /** diff --git a/clients/client-glue/src/commands/ListColumnStatisticsTaskRunsCommand.ts b/clients/client-glue/src/commands/ListColumnStatisticsTaskRunsCommand.ts new file mode 100644 index 0000000000000..8881bf2525057 --- /dev/null +++ b/clients/client-glue/src/commands/ListColumnStatisticsTaskRunsCommand.ts @@ -0,0 +1,154 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient"; +import { ListColumnStatisticsTaskRunsRequest, ListColumnStatisticsTaskRunsResponse } from "../models/models_2"; +import { + de_ListColumnStatisticsTaskRunsCommand, + se_ListColumnStatisticsTaskRunsCommand, +} from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListColumnStatisticsTaskRunsCommand}. + */ +export interface ListColumnStatisticsTaskRunsCommandInput extends ListColumnStatisticsTaskRunsRequest {} +/** + * @public + * + * The output of {@link ListColumnStatisticsTaskRunsCommand}. + */ +export interface ListColumnStatisticsTaskRunsCommandOutput + extends ListColumnStatisticsTaskRunsResponse, + __MetadataBearer {} + +/** + * @public + *

List all task runs for a particular account.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { GlueClient, ListColumnStatisticsTaskRunsCommand } from "@aws-sdk/client-glue"; // ES Modules import + * // const { GlueClient, ListColumnStatisticsTaskRunsCommand } = require("@aws-sdk/client-glue"); // CommonJS import + * const client = new GlueClient(config); + * const input = { // ListColumnStatisticsTaskRunsRequest + * MaxResults: Number("int"), + * NextToken: "STRING_VALUE", + * }; + * const command = new ListColumnStatisticsTaskRunsCommand(input); + * const response = await client.send(command); + * // { // ListColumnStatisticsTaskRunsResponse + * // ColumnStatisticsTaskRunIds: [ // ColumnStatisticsTaskRunIdList + * // "STRING_VALUE", + * // ], + * // NextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListColumnStatisticsTaskRunsCommandInput - {@link ListColumnStatisticsTaskRunsCommandInput} + * @returns {@link ListColumnStatisticsTaskRunsCommandOutput} + * @see {@link ListColumnStatisticsTaskRunsCommandInput} for command's `input` shape. + * @see {@link ListColumnStatisticsTaskRunsCommandOutput} for command's `response` shape. + * @see {@link GlueClientResolvedConfig | config} for GlueClient's `config` shape. + * + * @throws {@link OperationTimeoutException} (client fault) + *

The operation timed out.

+ * + * @throws {@link GlueServiceException} + *

Base exception class for all service exceptions from Glue service.

+ * + */ +export class ListColumnStatisticsTaskRunsCommand extends $Command< + ListColumnStatisticsTaskRunsCommandInput, + ListColumnStatisticsTaskRunsCommandOutput, + GlueClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListColumnStatisticsTaskRunsCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: GlueClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, ListColumnStatisticsTaskRunsCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "GlueClient"; + const commandName = "ListColumnStatisticsTaskRunsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "AWSGlue", + operation: "ListColumnStatisticsTaskRuns", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListColumnStatisticsTaskRunsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListColumnStatisticsTaskRunsCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_ListColumnStatisticsTaskRunsCommand(output, context); + } +} diff --git a/clients/client-glue/src/commands/StartColumnStatisticsTaskRunCommand.ts b/clients/client-glue/src/commands/StartColumnStatisticsTaskRunCommand.ts new file mode 100644 index 0000000000000..7fd186d55d0ab --- /dev/null +++ b/clients/client-glue/src/commands/StartColumnStatisticsTaskRunCommand.ts @@ -0,0 +1,173 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient"; +import { StartColumnStatisticsTaskRunRequest, StartColumnStatisticsTaskRunResponse } from "../models/models_2"; +import { + de_StartColumnStatisticsTaskRunCommand, + se_StartColumnStatisticsTaskRunCommand, +} from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link StartColumnStatisticsTaskRunCommand}. + */ +export interface StartColumnStatisticsTaskRunCommandInput extends StartColumnStatisticsTaskRunRequest {} +/** + * @public + * + * The output of {@link StartColumnStatisticsTaskRunCommand}. + */ +export interface StartColumnStatisticsTaskRunCommandOutput + extends StartColumnStatisticsTaskRunResponse, + __MetadataBearer {} + +/** + * @public + *

Starts a column statistics task run, for a specified table and columns.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { GlueClient, StartColumnStatisticsTaskRunCommand } from "@aws-sdk/client-glue"; // ES Modules import + * // const { GlueClient, StartColumnStatisticsTaskRunCommand } = require("@aws-sdk/client-glue"); // CommonJS import + * const client = new GlueClient(config); + * const input = { // StartColumnStatisticsTaskRunRequest + * DatabaseName: "STRING_VALUE", // required + * TableName: "STRING_VALUE", // required + * ColumnNameList: [ // ColumnNameList + * "STRING_VALUE", + * ], + * Role: "STRING_VALUE", // required + * SampleSize: Number("double"), + * CatalogID: "STRING_VALUE", + * SecurityConfiguration: "STRING_VALUE", + * }; + * const command = new StartColumnStatisticsTaskRunCommand(input); + * const response = await client.send(command); + * // { // StartColumnStatisticsTaskRunResponse + * // ColumnStatisticsTaskRunId: "STRING_VALUE", + * // }; + * + * ``` + * + * @param StartColumnStatisticsTaskRunCommandInput - {@link StartColumnStatisticsTaskRunCommandInput} + * @returns {@link StartColumnStatisticsTaskRunCommandOutput} + * @see {@link StartColumnStatisticsTaskRunCommandInput} for command's `input` shape. + * @see {@link StartColumnStatisticsTaskRunCommandOutput} for command's `response` shape. + * @see {@link GlueClientResolvedConfig | config} for GlueClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

Access to a resource was denied.

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

An exception thrown when you try to start another job while running a column stats generation job.

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

A specified entity does not exist

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

The input provided was not valid.

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

The operation timed out.

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

A resource numerical limit was exceeded.

+ * + * @throws {@link GlueServiceException} + *

Base exception class for all service exceptions from Glue service.

+ * + */ +export class StartColumnStatisticsTaskRunCommand extends $Command< + StartColumnStatisticsTaskRunCommandInput, + StartColumnStatisticsTaskRunCommandOutput, + GlueClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: StartColumnStatisticsTaskRunCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: GlueClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, StartColumnStatisticsTaskRunCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "GlueClient"; + const commandName = "StartColumnStatisticsTaskRunCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "AWSGlue", + operation: "StartColumnStatisticsTaskRun", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: StartColumnStatisticsTaskRunCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_StartColumnStatisticsTaskRunCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_StartColumnStatisticsTaskRunCommand(output, context); + } +} diff --git a/clients/client-glue/src/commands/StopColumnStatisticsTaskRunCommand.ts b/clients/client-glue/src/commands/StopColumnStatisticsTaskRunCommand.ts new file mode 100644 index 0000000000000..be8ec2c4cde6d --- /dev/null +++ b/clients/client-glue/src/commands/StopColumnStatisticsTaskRunCommand.ts @@ -0,0 +1,155 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient"; +import { StopColumnStatisticsTaskRunRequest, StopColumnStatisticsTaskRunResponse } from "../models/models_2"; +import { de_StopColumnStatisticsTaskRunCommand, se_StopColumnStatisticsTaskRunCommand } from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link StopColumnStatisticsTaskRunCommand}. + */ +export interface StopColumnStatisticsTaskRunCommandInput extends StopColumnStatisticsTaskRunRequest {} +/** + * @public + * + * The output of {@link StopColumnStatisticsTaskRunCommand}. + */ +export interface StopColumnStatisticsTaskRunCommandOutput + extends StopColumnStatisticsTaskRunResponse, + __MetadataBearer {} + +/** + * @public + *

Stops a task run for the specified table.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { GlueClient, StopColumnStatisticsTaskRunCommand } from "@aws-sdk/client-glue"; // ES Modules import + * // const { GlueClient, StopColumnStatisticsTaskRunCommand } = require("@aws-sdk/client-glue"); // CommonJS import + * const client = new GlueClient(config); + * const input = { // StopColumnStatisticsTaskRunRequest + * DatabaseName: "STRING_VALUE", // required + * TableName: "STRING_VALUE", // required + * }; + * const command = new StopColumnStatisticsTaskRunCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param StopColumnStatisticsTaskRunCommandInput - {@link StopColumnStatisticsTaskRunCommandInput} + * @returns {@link StopColumnStatisticsTaskRunCommandOutput} + * @see {@link StopColumnStatisticsTaskRunCommandInput} for command's `input` shape. + * @see {@link StopColumnStatisticsTaskRunCommandOutput} for command's `response` shape. + * @see {@link GlueClientResolvedConfig | config} for GlueClient's `config` shape. + * + * @throws {@link ColumnStatisticsTaskNotRunningException} (client fault) + *

An exception thrown when you try to stop a task run when there is no task running.

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

An exception thrown when you try to stop a task run.

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

A specified entity does not exist

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

The operation timed out.

+ * + * @throws {@link GlueServiceException} + *

Base exception class for all service exceptions from Glue service.

+ * + */ +export class StopColumnStatisticsTaskRunCommand extends $Command< + StopColumnStatisticsTaskRunCommandInput, + StopColumnStatisticsTaskRunCommandOutput, + GlueClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: StopColumnStatisticsTaskRunCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: GlueClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, StopColumnStatisticsTaskRunCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "GlueClient"; + const commandName = "StopColumnStatisticsTaskRunCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "AWSGlue", + operation: "StopColumnStatisticsTaskRun", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: StopColumnStatisticsTaskRunCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_StopColumnStatisticsTaskRunCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_StopColumnStatisticsTaskRunCommand(output, context); + } +} diff --git a/clients/client-glue/src/commands/index.ts b/clients/client-glue/src/commands/index.ts index d3106ba018e53..94bfd9e7e1fae 100644 --- a/clients/client-glue/src/commands/index.ts +++ b/clients/client-glue/src/commands/index.ts @@ -77,6 +77,8 @@ export * from "./GetClassifierCommand"; export * from "./GetClassifiersCommand"; export * from "./GetColumnStatisticsForPartitionCommand"; export * from "./GetColumnStatisticsForTableCommand"; +export * from "./GetColumnStatisticsTaskRunCommand"; +export * from "./GetColumnStatisticsTaskRunsCommand"; export * from "./GetConnectionCommand"; export * from "./GetConnectionsCommand"; export * from "./GetCrawlerCommand"; @@ -137,6 +139,7 @@ export * from "./GetWorkflowRunPropertiesCommand"; export * from "./GetWorkflowRunsCommand"; export * from "./ImportCatalogToGlueCommand"; export * from "./ListBlueprintsCommand"; +export * from "./ListColumnStatisticsTaskRunsCommand"; export * from "./ListCrawlersCommand"; export * from "./ListCrawlsCommand"; export * from "./ListCustomEntityTypesCommand"; @@ -167,6 +170,7 @@ export * from "./ResumeWorkflowRunCommand"; export * from "./RunStatementCommand"; export * from "./SearchTablesCommand"; export * from "./StartBlueprintRunCommand"; +export * from "./StartColumnStatisticsTaskRunCommand"; export * from "./StartCrawlerCommand"; export * from "./StartCrawlerScheduleCommand"; export * from "./StartDataQualityRuleRecommendationRunCommand"; @@ -178,6 +182,7 @@ export * from "./StartMLEvaluationTaskRunCommand"; export * from "./StartMLLabelingSetGenerationTaskRunCommand"; export * from "./StartTriggerCommand"; export * from "./StartWorkflowRunCommand"; +export * from "./StopColumnStatisticsTaskRunCommand"; export * from "./StopCrawlerCommand"; export * from "./StopCrawlerScheduleCommand"; export * from "./StopSessionCommand"; diff --git a/clients/client-glue/src/models/models_1.ts b/clients/client-glue/src/models/models_1.ts index bdfed0bf9e067..35f9ee610f58d 100644 --- a/clients/client-glue/src/models/models_1.ts +++ b/clients/client-glue/src/models/models_1.ts @@ -4216,6 +4216,205 @@ export interface GetColumnStatisticsForTableResponse { Errors?: ColumnError[]; } +/** + * @public + */ +export interface GetColumnStatisticsTaskRunRequest { + /** + * @public + *

The identifier for the particular column statistics task run.

+ */ + ColumnStatisticsTaskRunId: string | undefined; +} + +/** + * @public + * @enum + */ +export const ColumnStatisticsState = { + FAILED: "FAILED", + RUNNING: "RUNNING", + STARTING: "STARTING", + STOPPED: "STOPPED", + SUCCEEDED: "SUCCEEDED", +} as const; + +/** + * @public + */ +export type ColumnStatisticsState = (typeof ColumnStatisticsState)[keyof typeof ColumnStatisticsState]; + +/** + * @public + *

The object that shows the details of the column stats run.

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

The Amazon Web Services account ID.

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

The identifier for the particular column statistics task run.

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

The database where the table resides.

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

The name of the table for which column statistics is generated.

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

A list of the column names. If none is supplied, all column names for the table will be used by default.

+ */ + ColumnNameList?: string[]; + + /** + * @public + *

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

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

The IAM role that the service assumes to generate statistics.

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

The percentage of rows used to generate statistics. If none is supplied, the entire table will be used to generate stats.

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

Name of the security configuration that is used to encrypt CloudWatch logs for the column stats task run.

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

The number of workers used to generate column statistics. The job is preconfigured to autoscale up to 25 instances.

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

The type of workers being used for generating stats. The default is g.1x.

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

The status of the task run.

+ */ + Status?: ColumnStatisticsState; + + /** + * @public + *

The time that this task was created.

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

The last point in time when this task was modified.

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

The start time of the task.

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

The end time of the task.

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

The error message for the job.

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

The calculated DPU usage in seconds for all autoscaled workers.

+ */ + DPUSeconds?: number; +} + +/** + * @public + */ +export interface GetColumnStatisticsTaskRunResponse { + /** + * @public + *

A ColumnStatisticsTaskRun object representing the details of the column stats run.

+ */ + ColumnStatisticsTaskRun?: ColumnStatisticsTaskRun; +} + +/** + * @public + */ +export interface GetColumnStatisticsTaskRunsRequest { + /** + * @public + *

The name of the database where the table resides.

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

The name of the table.

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

The maximum size of the response.

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

A continuation token, if this is a continuation call.

+ */ + NextToken?: string; +} + +/** + * @public + */ +export interface GetColumnStatisticsTaskRunsResponse { + /** + * @public + *

A list of column statistics task runs.

+ */ + ColumnStatisticsTaskRuns?: ColumnStatisticsTaskRun[]; + + /** + * @public + *

A continuation token, if not all task runs have yet been returned.

+ */ + NextToken?: string; +} + /** * @public */ @@ -7909,172 +8108,3 @@ export interface GetStatementRequest { */ RequestOrigin?: string; } - -/** - * @public - *

The code execution output in JSON format.

- */ -export interface StatementOutputData { - /** - * @public - *

The code execution output in text format.

- */ - TextPlain?: string; -} - -/** - * @public - * @enum - */ -export const StatementState = { - AVAILABLE: "AVAILABLE", - CANCELLED: "CANCELLED", - CANCELLING: "CANCELLING", - ERROR: "ERROR", - RUNNING: "RUNNING", - WAITING: "WAITING", -} as const; - -/** - * @public - */ -export type StatementState = (typeof StatementState)[keyof typeof StatementState]; - -/** - * @public - *

The code execution output in JSON format.

- */ -export interface StatementOutput { - /** - * @public - *

The code execution output.

- */ - Data?: StatementOutputData; - - /** - * @public - *

The execution count of the output.

- */ - ExecutionCount?: number; - - /** - * @public - *

The status of the code execution output.

- */ - Status?: StatementState; - - /** - * @public - *

The name of the error in the output.

- */ - ErrorName?: string; - - /** - * @public - *

The error value of the output.

- */ - ErrorValue?: string; - - /** - * @public - *

The traceback of the output.

- */ - Traceback?: string[]; -} - -/** - * @public - *

The statement or request for a particular action to occur in a session.

- */ -export interface Statement { - /** - * @public - *

The ID of the statement.

- */ - Id?: number; - - /** - * @public - *

The execution code of the statement.

- */ - Code?: string; - - /** - * @public - *

The state while request is actioned.

- */ - State?: StatementState; - - /** - * @public - *

The output in JSON.

- */ - Output?: StatementOutput; - - /** - * @public - *

The code execution progress.

- */ - Progress?: number; - - /** - * @public - *

The unix time and date that the job definition was started.

- */ - StartedOn?: number; - - /** - * @public - *

The unix time and date that the job definition was completed.

- */ - CompletedOn?: number; -} - -/** - * @public - */ -export interface GetStatementResponse { - /** - * @public - *

Returns the statement.

- */ - Statement?: Statement; -} - -/** - * @public - */ -export interface GetTableRequest { - /** - * @public - *

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; - - /** - * @public - *

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

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

The name of the table for which to retrieve the definition. For Hive - * compatibility, this name is entirely lowercase.

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

The transaction ID at which to read the table contents.

- */ - TransactionId?: string; - - /** - * @public - *

The time as of when to read the table contents. If not set, the most recent transaction commit time will be used. Cannot be specified along with TransactionId.

- */ - QueryAsOfTime?: Date; -} diff --git a/clients/client-glue/src/models/models_2.ts b/clients/client-glue/src/models/models_2.ts index 996a48bc22392..f8ab296eb793d 100644 --- a/clients/client-glue/src/models/models_2.ts +++ b/clients/client-glue/src/models/models_2.ts @@ -129,7 +129,6 @@ import { SchemaVersionStatus, Segment, Session, - Statement, TableIdentifier, TableInput, TransformFilterCriteria, @@ -138,6 +137,175 @@ import { UserDefinedFunctionInput, } from "./models_1"; +/** + * @public + *

The code execution output in JSON format.

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

The code execution output in text format.

+ */ + TextPlain?: string; +} + +/** + * @public + * @enum + */ +export const StatementState = { + AVAILABLE: "AVAILABLE", + CANCELLED: "CANCELLED", + CANCELLING: "CANCELLING", + ERROR: "ERROR", + RUNNING: "RUNNING", + WAITING: "WAITING", +} as const; + +/** + * @public + */ +export type StatementState = (typeof StatementState)[keyof typeof StatementState]; + +/** + * @public + *

The code execution output in JSON format.

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

The code execution output.

+ */ + Data?: StatementOutputData; + + /** + * @public + *

The execution count of the output.

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

The status of the code execution output.

+ */ + Status?: StatementState; + + /** + * @public + *

The name of the error in the output.

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

The error value of the output.

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

The traceback of the output.

+ */ + Traceback?: string[]; +} + +/** + * @public + *

The statement or request for a particular action to occur in a session.

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

The ID of the statement.

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

The execution code of the statement.

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

The state while request is actioned.

+ */ + State?: StatementState; + + /** + * @public + *

The output in JSON.

+ */ + Output?: StatementOutput; + + /** + * @public + *

The code execution progress.

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

The unix time and date that the job definition was started.

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

The unix time and date that the job definition was completed.

+ */ + CompletedOn?: number; +} + +/** + * @public + */ +export interface GetStatementResponse { + /** + * @public + *

Returns the statement.

+ */ + Statement?: Statement; +} + +/** + * @public + */ +export interface GetTableRequest { + /** + * @public + *

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; + + /** + * @public + *

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

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

The name of the table for which to retrieve the definition. For Hive + * compatibility, this name is entirely lowercase.

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

The transaction ID at which to read the table contents.

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

The time as of when to read the table contents. If not set, the most recent transaction commit time will be used. Cannot be specified along with TransactionId.

+ */ + QueryAsOfTime?: Date; +} + /** * @public *

A table that points to an entity outside the Glue Data Catalog.

@@ -1393,6 +1561,40 @@ export interface ListBlueprintsResponse { NextToken?: string; } +/** + * @public + */ +export interface ListColumnStatisticsTaskRunsRequest { + /** + * @public + *

The maximum size of the response.

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

A continuation token, if this is a continuation call.

+ */ + NextToken?: string; +} + +/** + * @public + */ +export interface ListColumnStatisticsTaskRunsResponse { + /** + * @public + *

A list of column statistics task run IDs.

+ */ + ColumnStatisticsTaskRunIds?: string[]; + + /** + * @public + *

A continuation token, if not all task run IDs have yet been returned.

+ */ + NextToken?: string; +} + /** * @public */ @@ -3625,6 +3827,90 @@ export interface StartBlueprintRunResponse { RunId?: string; } +/** + * @public + *

An exception thrown when you try to start another job while running a column stats generation job.

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

A message describing the problem.

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

The name of the database where the table resides.

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

The name of the table to generate statistics.

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

A list of the column names to generate statistics. If none is supplied, all column names for the table will be used by default.

+ */ + ColumnNameList?: string[]; + + /** + * @public + *

The IAM role that the service assumes to generate statistics.

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

The percentage of rows used to generate statistics. If none is supplied, the entire table will be used to generate stats.

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

The ID of the Data Catalog where the table reside. If none is supplied, the Amazon Web Services account ID is used by default.

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

Name of the security configuration that is used to encrypt CloudWatch logs for the column stats task run.

+ */ + SecurityConfiguration?: string; +} + +/** + * @public + */ +export interface StartColumnStatisticsTaskRunResponse { + /** + * @public + *

The identifier for the column statistics task run.

+ */ + ColumnStatisticsTaskRunId?: string; +} + /** * @public */ @@ -4163,6 +4449,80 @@ export interface StartWorkflowRunResponse { RunId?: string; } +/** + * @public + *

An exception thrown when you try to stop a task run when there is no task running.

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

A message describing the problem.

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

An exception thrown when you try to stop a task run.

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

A message describing the problem.

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

The name of the database where the table resides.

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

The name of the table.

+ */ + TableName: string | undefined; +} + +/** + * @public + */ +export interface StopColumnStatisticsTaskRunResponse {} + /** * @public *

The specified crawler is not running.

diff --git a/clients/client-glue/src/pagination/GetColumnStatisticsTaskRunsPaginator.ts b/clients/client-glue/src/pagination/GetColumnStatisticsTaskRunsPaginator.ts new file mode 100644 index 0000000000000..aaae367037c72 --- /dev/null +++ b/clients/client-glue/src/pagination/GetColumnStatisticsTaskRunsPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { + GetColumnStatisticsTaskRunsCommand, + GetColumnStatisticsTaskRunsCommandInput, + GetColumnStatisticsTaskRunsCommandOutput, +} from "../commands/GetColumnStatisticsTaskRunsCommand"; +import { GlueClient } from "../GlueClient"; +import { GluePaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: GlueClient, + input: GetColumnStatisticsTaskRunsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new GetColumnStatisticsTaskRunsCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateGetColumnStatisticsTaskRuns( + config: GluePaginationConfiguration, + input: GetColumnStatisticsTaskRunsCommandInput, + ...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: GetColumnStatisticsTaskRunsCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof GlueClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected Glue | GlueClient"); + } + yield page; + const prevToken = token; + token = page.NextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-glue/src/pagination/ListColumnStatisticsTaskRunsPaginator.ts b/clients/client-glue/src/pagination/ListColumnStatisticsTaskRunsPaginator.ts new file mode 100644 index 0000000000000..f0ba9c3b16c57 --- /dev/null +++ b/clients/client-glue/src/pagination/ListColumnStatisticsTaskRunsPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { + ListColumnStatisticsTaskRunsCommand, + ListColumnStatisticsTaskRunsCommandInput, + ListColumnStatisticsTaskRunsCommandOutput, +} from "../commands/ListColumnStatisticsTaskRunsCommand"; +import { GlueClient } from "../GlueClient"; +import { GluePaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: GlueClient, + input: ListColumnStatisticsTaskRunsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListColumnStatisticsTaskRunsCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateListColumnStatisticsTaskRuns( + config: GluePaginationConfiguration, + input: ListColumnStatisticsTaskRunsCommandInput, + ...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: ListColumnStatisticsTaskRunsCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof GlueClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected Glue | GlueClient"); + } + yield page; + const prevToken = token; + token = page.NextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-glue/src/pagination/index.ts b/clients/client-glue/src/pagination/index.ts index a00d2cceb430c..9a2db94053a12 100644 --- a/clients/client-glue/src/pagination/index.ts +++ b/clients/client-glue/src/pagination/index.ts @@ -2,6 +2,8 @@ export * from "./GetBlueprintRunsPaginator"; export * from "./GetClassifiersPaginator"; +export * from "./GetColumnStatisticsTaskRunsPaginator"; + export * from "./GetConnectionsPaginator"; export * from "./GetCrawlerMetricsPaginator"; @@ -15,10 +17,9 @@ export * from "./GetDevEndpointsPaginator"; export * from "./GetJobRunsPaginator"; export * from "./GetJobsPaginator"; - -export * from "./GetMLTaskRunsPaginator"; // smithy-typescript generated code export * from "./Interfaces"; +export * from "./GetMLTaskRunsPaginator"; export * from "./GetMLTransformsPaginator"; export * from "./GetPartitionIndexesPaginator"; export * from "./GetPartitionsPaginator"; @@ -31,6 +32,7 @@ export * from "./GetUnfilteredPartitionsMetadataPaginator"; export * from "./GetUserDefinedFunctionsPaginator"; export * from "./GetWorkflowRunsPaginator"; export * from "./ListBlueprintsPaginator"; +export * from "./ListColumnStatisticsTaskRunsPaginator"; export * from "./ListCrawlersPaginator"; export * from "./ListCustomEntityTypesPaginator"; export * from "./ListDataQualityResultsPaginator"; diff --git a/clients/client-glue/src/protocols/Aws_json1_1.ts b/clients/client-glue/src/protocols/Aws_json1_1.ts index 6e257c75f97f5..91bc650439182 100644 --- a/clients/client-glue/src/protocols/Aws_json1_1.ts +++ b/clients/client-glue/src/protocols/Aws_json1_1.ts @@ -195,6 +195,14 @@ import { GetColumnStatisticsForTableCommandInput, GetColumnStatisticsForTableCommandOutput, } from "../commands/GetColumnStatisticsForTableCommand"; +import { + GetColumnStatisticsTaskRunCommandInput, + GetColumnStatisticsTaskRunCommandOutput, +} from "../commands/GetColumnStatisticsTaskRunCommand"; +import { + GetColumnStatisticsTaskRunsCommandInput, + GetColumnStatisticsTaskRunsCommandOutput, +} from "../commands/GetColumnStatisticsTaskRunsCommand"; import { GetConnectionCommandInput, GetConnectionCommandOutput } from "../commands/GetConnectionCommand"; import { GetConnectionsCommandInput, GetConnectionsCommandOutput } from "../commands/GetConnectionsCommand"; import { GetCrawlerCommandInput, GetCrawlerCommandOutput } from "../commands/GetCrawlerCommand"; @@ -312,6 +320,10 @@ import { ImportCatalogToGlueCommandOutput, } from "../commands/ImportCatalogToGlueCommand"; import { ListBlueprintsCommandInput, ListBlueprintsCommandOutput } from "../commands/ListBlueprintsCommand"; +import { + ListColumnStatisticsTaskRunsCommandInput, + ListColumnStatisticsTaskRunsCommandOutput, +} from "../commands/ListColumnStatisticsTaskRunsCommand"; import { ListCrawlersCommandInput, ListCrawlersCommandOutput } from "../commands/ListCrawlersCommand"; import { ListCrawlsCommandInput, ListCrawlsCommandOutput } from "../commands/ListCrawlsCommand"; import { @@ -378,6 +390,10 @@ import { ResumeWorkflowRunCommandInput, ResumeWorkflowRunCommandOutput } from ". import { RunStatementCommandInput, RunStatementCommandOutput } from "../commands/RunStatementCommand"; import { SearchTablesCommandInput, SearchTablesCommandOutput } from "../commands/SearchTablesCommand"; import { StartBlueprintRunCommandInput, StartBlueprintRunCommandOutput } from "../commands/StartBlueprintRunCommand"; +import { + StartColumnStatisticsTaskRunCommandInput, + StartColumnStatisticsTaskRunCommandOutput, +} from "../commands/StartColumnStatisticsTaskRunCommand"; import { StartCrawlerCommandInput, StartCrawlerCommandOutput } from "../commands/StartCrawlerCommand"; import { StartCrawlerScheduleCommandInput, @@ -410,6 +426,10 @@ import { } from "../commands/StartMLLabelingSetGenerationTaskRunCommand"; import { StartTriggerCommandInput, StartTriggerCommandOutput } from "../commands/StartTriggerCommand"; import { StartWorkflowRunCommandInput, StartWorkflowRunCommandOutput } from "../commands/StartWorkflowRunCommand"; +import { + StopColumnStatisticsTaskRunCommandInput, + StopColumnStatisticsTaskRunCommandOutput, +} from "../commands/StopColumnStatisticsTaskRunCommand"; import { StopCrawlerCommandInput, StopCrawlerCommandOutput } from "../commands/StopCrawlerCommand"; import { StopCrawlerScheduleCommandInput, @@ -697,6 +717,7 @@ import { ColumnImportance, ColumnStatistics, ColumnStatisticsData, + ColumnStatisticsTaskRun, ConditionCheckFailureException, ConflictException, Connection, @@ -783,6 +804,10 @@ import { GetColumnStatisticsForPartitionResponse, GetColumnStatisticsForTableRequest, GetColumnStatisticsForTableResponse, + GetColumnStatisticsTaskRunRequest, + GetColumnStatisticsTaskRunResponse, + GetColumnStatisticsTaskRunsRequest, + GetColumnStatisticsTaskRunsResponse, GetConnectionRequest, GetConnectionResponse, GetConnectionsFilter, @@ -851,8 +876,6 @@ import { GetSessionRequest, GetSessionResponse, GetStatementRequest, - GetStatementResponse, - GetTableRequest, GluePolicy, GrokClassifier, IcebergInput, @@ -876,7 +899,6 @@ import { Segment, Session, SessionCommand, - Statement, StringColumnStatisticsData, TableIdentifier, TableInput, @@ -896,6 +918,9 @@ import { BatchGetJobsResponse, CodeGenConfigurationNode, ColumnStatisticsError, + ColumnStatisticsTaskNotRunningException, + ColumnStatisticsTaskRunningException, + ColumnStatisticsTaskStoppingException, ConcurrentRunsExceededException, CrawlerHistory, CrawlerNotRunningException, @@ -913,8 +938,10 @@ import { DevEndpointCustomLibraries, GetJobResponse, GetJobsResponse, + GetStatementResponse, GetTableOptimizerRequest, GetTableOptimizerResponse, + GetTableRequest, GetTableResponse, GetTablesRequest, GetTablesResponse, @@ -948,6 +975,7 @@ import { Job, JobUpdate, ListBlueprintsRequest, + ListColumnStatisticsTaskRunsRequest, ListCrawlersRequest, ListCrawlsRequest, ListCrawlsResponse, @@ -997,6 +1025,7 @@ import { SearchTablesResponse, SortCriterion, StartBlueprintRunRequest, + StartColumnStatisticsTaskRunRequest, StartCrawlerRequest, StartCrawlerScheduleRequest, StartDataQualityRuleRecommendationRunRequest, @@ -1008,6 +1037,8 @@ import { StartMLLabelingSetGenerationTaskRunRequest, StartTriggerRequest, StartWorkflowRunRequest, + Statement, + StopColumnStatisticsTaskRunRequest, StopCrawlerRequest, StopCrawlerScheduleRequest, StopSessionRequest, @@ -2065,6 +2096,32 @@ export const se_GetColumnStatisticsForTableCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_1GetColumnStatisticsTaskRunCommand + */ +export const se_GetColumnStatisticsTaskRunCommand = async ( + input: GetColumnStatisticsTaskRunCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("GetColumnStatisticsTaskRun"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1GetColumnStatisticsTaskRunsCommand + */ +export const se_GetColumnStatisticsTaskRunsCommand = async ( + input: GetColumnStatisticsTaskRunsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("GetColumnStatisticsTaskRuns"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_1GetConnectionCommand */ @@ -2842,6 +2899,19 @@ export const se_ListBlueprintsCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_1ListColumnStatisticsTaskRunsCommand + */ +export const se_ListColumnStatisticsTaskRunsCommand = async ( + input: ListColumnStatisticsTaskRunsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("ListColumnStatisticsTaskRuns"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_1ListCrawlersCommand */ @@ -3232,6 +3302,19 @@ export const se_StartBlueprintRunCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_1StartColumnStatisticsTaskRunCommand + */ +export const se_StartColumnStatisticsTaskRunCommand = async ( + input: StartColumnStatisticsTaskRunCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("StartColumnStatisticsTaskRun"); + let body: any; + body = JSON.stringify(se_StartColumnStatisticsTaskRunRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_1StartCrawlerCommand */ @@ -3375,6 +3458,19 @@ export const se_StartWorkflowRunCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_1StopColumnStatisticsTaskRunCommand + */ +export const se_StopColumnStatisticsTaskRunCommand = async ( + input: StopColumnStatisticsTaskRunCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("StopColumnStatisticsTaskRun"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_1StopCrawlerCommand */ @@ -8177,6 +8273,104 @@ const de_GetColumnStatisticsForTableCommandError = async ( } }; +/** + * deserializeAws_json1_1GetColumnStatisticsTaskRunCommand + */ +export const de_GetColumnStatisticsTaskRunCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_GetColumnStatisticsTaskRunCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_GetColumnStatisticsTaskRunResponse(data, context); + const response: GetColumnStatisticsTaskRunCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1GetColumnStatisticsTaskRunCommandError + */ +const de_GetColumnStatisticsTaskRunCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "EntityNotFoundException": + case "com.amazonaws.glue#EntityNotFoundException": + throw await de_EntityNotFoundExceptionRes(parsedOutput, context); + case "InvalidInputException": + case "com.amazonaws.glue#InvalidInputException": + throw await de_InvalidInputExceptionRes(parsedOutput, context); + case "OperationTimeoutException": + case "com.amazonaws.glue#OperationTimeoutException": + throw await de_OperationTimeoutExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_1GetColumnStatisticsTaskRunsCommand + */ +export const de_GetColumnStatisticsTaskRunsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_GetColumnStatisticsTaskRunsCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_GetColumnStatisticsTaskRunsResponse(data, context); + const response: GetColumnStatisticsTaskRunsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1GetColumnStatisticsTaskRunsCommandError + */ +const de_GetColumnStatisticsTaskRunsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "OperationTimeoutException": + case "com.amazonaws.glue#OperationTimeoutException": + throw await de_OperationTimeoutExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_json1_1GetConnectionCommand */ @@ -11549,6 +11743,52 @@ const de_ListBlueprintsCommandError = async ( } }; +/** + * deserializeAws_json1_1ListColumnStatisticsTaskRunsCommand + */ +export const de_ListColumnStatisticsTaskRunsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_ListColumnStatisticsTaskRunsCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: ListColumnStatisticsTaskRunsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1ListColumnStatisticsTaskRunsCommandError + */ +const de_ListColumnStatisticsTaskRunsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "OperationTimeoutException": + case "com.amazonaws.glue#OperationTimeoutException": + throw await de_OperationTimeoutExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_json1_1ListCrawlersCommand */ @@ -13208,6 +13448,67 @@ const de_StartBlueprintRunCommandError = async ( } }; +/** + * deserializeAws_json1_1StartColumnStatisticsTaskRunCommand + */ +export const de_StartColumnStatisticsTaskRunCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_StartColumnStatisticsTaskRunCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: StartColumnStatisticsTaskRunCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1StartColumnStatisticsTaskRunCommandError + */ +const de_StartColumnStatisticsTaskRunCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.glue#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ColumnStatisticsTaskRunningException": + case "com.amazonaws.glue#ColumnStatisticsTaskRunningException": + throw await de_ColumnStatisticsTaskRunningExceptionRes(parsedOutput, context); + case "EntityNotFoundException": + case "com.amazonaws.glue#EntityNotFoundException": + throw await de_EntityNotFoundExceptionRes(parsedOutput, context); + case "InvalidInputException": + case "com.amazonaws.glue#InvalidInputException": + throw await de_InvalidInputExceptionRes(parsedOutput, context); + case "OperationTimeoutException": + case "com.amazonaws.glue#OperationTimeoutException": + throw await de_OperationTimeoutExceptionRes(parsedOutput, context); + case "ResourceNumberLimitExceededException": + case "com.amazonaws.glue#ResourceNumberLimitExceededException": + throw await de_ResourceNumberLimitExceededExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_json1_1StartCrawlerCommand */ @@ -13846,6 +14147,61 @@ const de_StartWorkflowRunCommandError = async ( } }; +/** + * deserializeAws_json1_1StopColumnStatisticsTaskRunCommand + */ +export const de_StopColumnStatisticsTaskRunCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_StopColumnStatisticsTaskRunCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: StopColumnStatisticsTaskRunCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1StopColumnStatisticsTaskRunCommandError + */ +const de_StopColumnStatisticsTaskRunCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ColumnStatisticsTaskNotRunningException": + case "com.amazonaws.glue#ColumnStatisticsTaskNotRunningException": + throw await de_ColumnStatisticsTaskNotRunningExceptionRes(parsedOutput, context); + case "ColumnStatisticsTaskStoppingException": + case "com.amazonaws.glue#ColumnStatisticsTaskStoppingException": + throw await de_ColumnStatisticsTaskStoppingExceptionRes(parsedOutput, context); + case "EntityNotFoundException": + case "com.amazonaws.glue#EntityNotFoundException": + throw await de_EntityNotFoundExceptionRes(parsedOutput, context); + case "OperationTimeoutException": + case "com.amazonaws.glue#OperationTimeoutException": + throw await de_OperationTimeoutExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_json1_1StopCrawlerCommand */ @@ -15575,6 +15931,54 @@ const de_AlreadyExistsExceptionRes = async ( return __decorateServiceException(exception, body); }; +/** + * deserializeAws_json1_1ColumnStatisticsTaskNotRunningExceptionRes + */ +const de_ColumnStatisticsTaskNotRunningExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new ColumnStatisticsTaskNotRunningException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_1ColumnStatisticsTaskRunningExceptionRes + */ +const de_ColumnStatisticsTaskRunningExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new ColumnStatisticsTaskRunningException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_1ColumnStatisticsTaskStoppingExceptionRes + */ +const de_ColumnStatisticsTaskStoppingExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new ColumnStatisticsTaskStoppingException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + /** * deserializeAws_json1_1ConcurrentModificationExceptionRes */ @@ -16367,6 +16771,8 @@ const se_CodeGenConfigurationNodes = ( // se_ColumnList omitted. +// se_ColumnNameList omitted. + /** * serializeAws_json1_1ColumnStatistics */ @@ -16932,6 +17338,10 @@ const se_FindMatchesParameters = (input: FindMatchesParameters, context: __Serde // se_GetColumnStatisticsForTableRequest omitted. +// se_GetColumnStatisticsTaskRunRequest omitted. + +// se_GetColumnStatisticsTaskRunsRequest omitted. + // se_GetConnectionRequest omitted. // se_GetConnectionsFilter omitted. @@ -17263,6 +17673,8 @@ const se_KinesisStreamingSourceOptions = (input: KinesisStreamingSourceOptions, // se_ListBlueprintsRequest omitted. +// se_ListColumnStatisticsTaskRunsRequest omitted. + // se_ListCrawlersRequest omitted. // se_ListCrawlsRequest omitted. @@ -17669,6 +18081,24 @@ const se_Spigot = (input: Spigot, context: __SerdeContext): any => { // se_StartBlueprintRunRequest omitted. +/** + * serializeAws_json1_1StartColumnStatisticsTaskRunRequest + */ +const se_StartColumnStatisticsTaskRunRequest = ( + input: StartColumnStatisticsTaskRunRequest, + context: __SerdeContext +): any => { + return take(input, { + CatalogID: [], + ColumnNameList: _json, + DatabaseName: [], + Role: [], + SampleSize: __serializeFloat, + SecurityConfiguration: [], + TableName: [], + }); +}; + // se_StartCrawlerRequest omitted. // se_StartCrawlerScheduleRequest omitted. @@ -17708,6 +18138,8 @@ const se_StartJobRunRequest = (input: StartJobRunRequest, context: __SerdeContex // se_StartWorkflowRunRequest omitted. +// se_StopColumnStatisticsTaskRunRequest omitted. + // se_StopCrawlerRequest omitted. // se_StopCrawlerScheduleRequest omitted. @@ -18491,6 +18923,8 @@ const de_ColumnImportanceList = (output: any, context: __SerdeContext): ColumnIm // de_ColumnList omitted. +// de_ColumnNameList omitted. + // de_ColumnRowFilter omitted. // de_ColumnRowFilterList omitted. @@ -18557,6 +18991,52 @@ const de_ColumnStatisticsList = (output: any, context: __SerdeContext): ColumnSt return retVal; }; +// de_ColumnStatisticsTaskNotRunningException omitted. + +/** + * deserializeAws_json1_1ColumnStatisticsTaskRun + */ +const de_ColumnStatisticsTaskRun = (output: any, context: __SerdeContext): ColumnStatisticsTaskRun => { + return take(output, { + CatalogID: __expectString, + ColumnNameList: _json, + ColumnStatisticsTaskRunId: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CustomerId: __expectString, + DPUSeconds: __limitedParseDouble, + DatabaseName: __expectString, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ErrorMessage: __expectString, + LastUpdated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NumberOfWorkers: __expectInt32, + Role: __expectString, + SampleSize: __limitedParseDouble, + SecurityConfiguration: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + TableName: __expectString, + WorkerType: __expectString, + }) as any; +}; + +// de_ColumnStatisticsTaskRunIdList omitted. + +// de_ColumnStatisticsTaskRunningException omitted. + +/** + * deserializeAws_json1_1ColumnStatisticsTaskRunsList + */ +const de_ColumnStatisticsTaskRunsList = (output: any, context: __SerdeContext): ColumnStatisticsTaskRun[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_ColumnStatisticsTaskRun(entry, context); + }); + return retVal; +}; + +// de_ColumnStatisticsTaskStoppingException omitted. + // de_ColumnValueStringList omitted. // de_ConcurrentModificationException omitted. @@ -19525,6 +20005,31 @@ const de_GetColumnStatisticsForTableResponse = ( }) as any; }; +/** + * deserializeAws_json1_1GetColumnStatisticsTaskRunResponse + */ +const de_GetColumnStatisticsTaskRunResponse = ( + output: any, + context: __SerdeContext +): GetColumnStatisticsTaskRunResponse => { + return take(output, { + ColumnStatisticsTaskRun: (_: any) => de_ColumnStatisticsTaskRun(_, context), + }) as any; +}; + +/** + * deserializeAws_json1_1GetColumnStatisticsTaskRunsResponse + */ +const de_GetColumnStatisticsTaskRunsResponse = ( + output: any, + context: __SerdeContext +): GetColumnStatisticsTaskRunsResponse => { + return take(output, { + ColumnStatisticsTaskRuns: (_: any) => de_ColumnStatisticsTaskRunsList(_, context), + NextToken: __expectString, + }) as any; +}; + /** * deserializeAws_json1_1GetConnectionResponse */ @@ -20386,6 +20891,8 @@ const de_LastCrawlInfo = (output: any, context: __SerdeContext): LastCrawlInfo = // de_ListBlueprintsResponse omitted. +// de_ListColumnStatisticsTaskRunsResponse omitted. + // de_ListCrawlersResponse omitted. /** @@ -20973,6 +21480,8 @@ const de_Spigot = (output: any, context: __SerdeContext): Spigot => { // de_StartBlueprintRunResponse omitted. +// de_StartColumnStatisticsTaskRunResponse omitted. + // de_StartCrawlerResponse omitted. // de_StartCrawlerScheduleResponse omitted. @@ -21028,6 +21537,8 @@ const de_StatementList = (output: any, context: __SerdeContext): Statement[] => // de_StatementOutputData omitted. +// de_StopColumnStatisticsTaskRunResponse omitted. + // de_StopCrawlerResponse omitted. // de_StopCrawlerScheduleResponse omitted. diff --git a/codegen/sdk-codegen/aws-models/glue.json b/codegen/sdk-codegen/aws-models/glue.json index f6f987d258e5a..88e2e7c279382 100644 --- a/codegen/sdk-codegen/aws-models/glue.json +++ b/codegen/sdk-codegen/aws-models/glue.json @@ -267,6 +267,12 @@ { "target": "com.amazonaws.glue#GetColumnStatisticsForTable" }, + { + "target": "com.amazonaws.glue#GetColumnStatisticsTaskRun" + }, + { + "target": "com.amazonaws.glue#GetColumnStatisticsTaskRuns" + }, { "target": "com.amazonaws.glue#GetConnection" }, @@ -447,6 +453,9 @@ { "target": "com.amazonaws.glue#ListBlueprints" }, + { + "target": "com.amazonaws.glue#ListColumnStatisticsTaskRuns" + }, { "target": "com.amazonaws.glue#ListCrawlers" }, @@ -537,6 +546,9 @@ { "target": "com.amazonaws.glue#StartBlueprintRun" }, + { + "target": "com.amazonaws.glue#StartColumnStatisticsTaskRun" + }, { "target": "com.amazonaws.glue#StartCrawler" }, @@ -570,6 +582,9 @@ { "target": "com.amazonaws.glue#StartWorkflowRun" }, + { + "target": "com.amazonaws.glue#StopColumnStatisticsTaskRun" + }, { "target": "com.amazonaws.glue#StopCrawler" }, @@ -1634,17 +1649,6 @@ "expect": { "error": "Invalid Configuration: Missing Region" } - }, - { - "documentation": "Partition doesn't support DualStack", - "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" - }, - "params": { - "Region": "us-isob-east-1", - "UseFIPS": false, - "UseDualStack": true - } } ], "version": "1.0" @@ -5718,6 +5722,12 @@ "target": "com.amazonaws.glue#Column" } }, + "com.amazonaws.glue#ColumnNameList": { + "type": "list", + "member": { + "target": "com.amazonaws.glue#NameString" + } + }, "com.amazonaws.glue#ColumnNameString": { "type": "string", "traits": { @@ -5879,6 +5889,223 @@ "target": "com.amazonaws.glue#ColumnStatistics" } }, + "com.amazonaws.glue#ColumnStatisticsState": { + "type": "enum", + "members": { + "STARTING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STARTING" + } + }, + "RUNNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RUNNING" + } + }, + "SUCCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUCCEEDED" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "STOPPED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STOPPED" + } + } + } + }, + "com.amazonaws.glue#ColumnStatisticsTaskNotRunningException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.glue#MessageString", + "traits": { + "smithy.api#documentation": "

A message describing the problem.

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

An exception thrown when you try to stop a task run when there is no task running.

", + "smithy.api#error": "client" + } + }, + "com.amazonaws.glue#ColumnStatisticsTaskRun": { + "type": "structure", + "members": { + "CustomerId": { + "target": "com.amazonaws.glue#AccountId", + "traits": { + "smithy.api#documentation": "

The Amazon Web Services account ID.

" + } + }, + "ColumnStatisticsTaskRunId": { + "target": "com.amazonaws.glue#HashString", + "traits": { + "smithy.api#documentation": "

The identifier for the particular column statistics task run.

" + } + }, + "DatabaseName": { + "target": "com.amazonaws.glue#DatabaseName", + "traits": { + "smithy.api#documentation": "

The database where the table resides.

" + } + }, + "TableName": { + "target": "com.amazonaws.glue#TableName", + "traits": { + "smithy.api#documentation": "

The name of the table for which column statistics is generated.

" + } + }, + "ColumnNameList": { + "target": "com.amazonaws.glue#ColumnNameList", + "traits": { + "smithy.api#documentation": "

A list of the column names. If none is supplied, all column names for the table will be used by default.

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

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

" + } + }, + "Role": { + "target": "com.amazonaws.glue#Role", + "traits": { + "smithy.api#documentation": "

The IAM role that the service assumes to generate statistics.

" + } + }, + "SampleSize": { + "target": "com.amazonaws.glue#SampleSizePercentage", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The percentage of rows used to generate statistics. If none is supplied, the entire table will be used to generate stats.

" + } + }, + "SecurityConfiguration": { + "target": "com.amazonaws.glue#CrawlerSecurityConfiguration", + "traits": { + "smithy.api#documentation": "

Name of the security configuration that is used to encrypt CloudWatch logs for the column stats task run.

" + } + }, + "NumberOfWorkers": { + "target": "com.amazonaws.glue#PositiveInteger", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The number of workers used to generate column statistics. The job is preconfigured to autoscale up to 25 instances.

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

The type of workers being used for generating stats. The default is g.1x.

" + } + }, + "Status": { + "target": "com.amazonaws.glue#ColumnStatisticsState", + "traits": { + "smithy.api#documentation": "

The status of the task run.

" + } + }, + "CreationTime": { + "target": "com.amazonaws.glue#Timestamp", + "traits": { + "smithy.api#documentation": "

The time that this task was created.

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

The last point in time when this task was modified.

" + } + }, + "StartTime": { + "target": "com.amazonaws.glue#Timestamp", + "traits": { + "smithy.api#documentation": "

The start time of the task.

" + } + }, + "EndTime": { + "target": "com.amazonaws.glue#Timestamp", + "traits": { + "smithy.api#documentation": "

The end time of the task.

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

The error message for the job.

" + } + }, + "DPUSeconds": { + "target": "com.amazonaws.glue#NonNegativeDouble", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The calculated DPU usage in seconds for all autoscaled workers.

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

The object that shows the details of the column stats run.

" + } + }, + "com.amazonaws.glue#ColumnStatisticsTaskRunIdList": { + "type": "list", + "member": { + "target": "com.amazonaws.glue#HashString" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 100 + } + } + }, + "com.amazonaws.glue#ColumnStatisticsTaskRunningException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.glue#MessageString", + "traits": { + "smithy.api#documentation": "

A message describing the problem.

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

An exception thrown when you try to start another job while running a column stats generation job.

", + "smithy.api#error": "client" + } + }, + "com.amazonaws.glue#ColumnStatisticsTaskRunsList": { + "type": "list", + "member": { + "target": "com.amazonaws.glue#ColumnStatisticsTaskRun" + } + }, + "com.amazonaws.glue#ColumnStatisticsTaskStoppingException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.glue#MessageString", + "traits": { + "smithy.api#documentation": "

A message describing the problem.

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

An exception thrown when you try to stop a task run.

", + "smithy.api#error": "client" + } + }, "com.amazonaws.glue#ColumnStatisticsType": { "type": "enum", "members": { @@ -15036,6 +15263,134 @@ "smithy.api#output": {} } }, + "com.amazonaws.glue#GetColumnStatisticsTaskRun": { + "type": "operation", + "input": { + "target": "com.amazonaws.glue#GetColumnStatisticsTaskRunRequest" + }, + "output": { + "target": "com.amazonaws.glue#GetColumnStatisticsTaskRunResponse" + }, + "errors": [ + { + "target": "com.amazonaws.glue#EntityNotFoundException" + }, + { + "target": "com.amazonaws.glue#InvalidInputException" + }, + { + "target": "com.amazonaws.glue#OperationTimeoutException" + } + ], + "traits": { + "smithy.api#documentation": "

Get the associated metadata/information for a task run, given a task run ID.

" + } + }, + "com.amazonaws.glue#GetColumnStatisticsTaskRunRequest": { + "type": "structure", + "members": { + "ColumnStatisticsTaskRunId": { + "target": "com.amazonaws.glue#HashString", + "traits": { + "smithy.api#documentation": "

The identifier for the particular column statistics task run.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.glue#GetColumnStatisticsTaskRunResponse": { + "type": "structure", + "members": { + "ColumnStatisticsTaskRun": { + "target": "com.amazonaws.glue#ColumnStatisticsTaskRun", + "traits": { + "smithy.api#documentation": "

A ColumnStatisticsTaskRun object representing the details of the column stats run.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.glue#GetColumnStatisticsTaskRuns": { + "type": "operation", + "input": { + "target": "com.amazonaws.glue#GetColumnStatisticsTaskRunsRequest" + }, + "output": { + "target": "com.amazonaws.glue#GetColumnStatisticsTaskRunsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.glue#OperationTimeoutException" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieves information about all runs associated with the specified table.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.glue#GetColumnStatisticsTaskRunsRequest": { + "type": "structure", + "members": { + "DatabaseName": { + "target": "com.amazonaws.glue#DatabaseName", + "traits": { + "smithy.api#documentation": "

The name of the database where the table resides.

", + "smithy.api#required": {} + } + }, + "TableName": { + "target": "com.amazonaws.glue#NameString", + "traits": { + "smithy.api#documentation": "

The name of the table.

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

The maximum size of the response.

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

A continuation token, if this is a continuation call.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.glue#GetColumnStatisticsTaskRunsResponse": { + "type": "structure", + "members": { + "ColumnStatisticsTaskRuns": { + "target": "com.amazonaws.glue#ColumnStatisticsTaskRunsList", + "traits": { + "smithy.api#documentation": "

A list of column statistics task runs.

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

A continuation token, if not all task runs have yet been returned.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.glue#GetConnection": { "type": "operation", "input": { @@ -22614,6 +22969,68 @@ "smithy.api#output": {} } }, + "com.amazonaws.glue#ListColumnStatisticsTaskRuns": { + "type": "operation", + "input": { + "target": "com.amazonaws.glue#ListColumnStatisticsTaskRunsRequest" + }, + "output": { + "target": "com.amazonaws.glue#ListColumnStatisticsTaskRunsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.glue#OperationTimeoutException" + } + ], + "traits": { + "smithy.api#documentation": "

List all task runs for a particular account.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.glue#ListColumnStatisticsTaskRunsRequest": { + "type": "structure", + "members": { + "MaxResults": { + "target": "com.amazonaws.glue#PageSize", + "traits": { + "smithy.api#documentation": "

The maximum size of the response.

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

A continuation token, if this is a continuation call.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.glue#ListColumnStatisticsTaskRunsResponse": { + "type": "structure", + "members": { + "ColumnStatisticsTaskRunIds": { + "target": "com.amazonaws.glue#ColumnStatisticsTaskRunIdList", + "traits": { + "smithy.api#documentation": "

A list of column statistics task run IDs.

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

A continuation token, if not all task run IDs have yet been returned.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.glue#ListCrawlers": { "type": "operation", "input": { @@ -26024,6 +26441,15 @@ } } }, + "com.amazonaws.glue#PositiveInteger": { + "type": "integer", + "traits": { + "smithy.api#default": 0, + "smithy.api#range": { + "min": 1 + } + } + }, "com.amazonaws.glue#PositiveLong": { "type": "long", "traits": { @@ -28687,6 +29113,16 @@ "target": "com.amazonaws.glue#S3Target" } }, + "com.amazonaws.glue#SampleSizePercentage": { + "type": "double", + "traits": { + "smithy.api#default": 0, + "smithy.api#range": { + "min": 0, + "max": 100 + } + } + }, "com.amazonaws.glue#ScalaCode": { "type": "string" }, @@ -30349,6 +30785,106 @@ "smithy.api#output": {} } }, + "com.amazonaws.glue#StartColumnStatisticsTaskRun": { + "type": "operation", + "input": { + "target": "com.amazonaws.glue#StartColumnStatisticsTaskRunRequest" + }, + "output": { + "target": "com.amazonaws.glue#StartColumnStatisticsTaskRunResponse" + }, + "errors": [ + { + "target": "com.amazonaws.glue#AccessDeniedException" + }, + { + "target": "com.amazonaws.glue#ColumnStatisticsTaskRunningException" + }, + { + "target": "com.amazonaws.glue#EntityNotFoundException" + }, + { + "target": "com.amazonaws.glue#InvalidInputException" + }, + { + "target": "com.amazonaws.glue#OperationTimeoutException" + }, + { + "target": "com.amazonaws.glue#ResourceNumberLimitExceededException" + } + ], + "traits": { + "smithy.api#documentation": "

Starts a column statistics task run, for a specified table and columns.

" + } + }, + "com.amazonaws.glue#StartColumnStatisticsTaskRunRequest": { + "type": "structure", + "members": { + "DatabaseName": { + "target": "com.amazonaws.glue#NameString", + "traits": { + "smithy.api#documentation": "

The name of the database where the table resides.

", + "smithy.api#required": {} + } + }, + "TableName": { + "target": "com.amazonaws.glue#NameString", + "traits": { + "smithy.api#documentation": "

The name of the table to generate statistics.

", + "smithy.api#required": {} + } + }, + "ColumnNameList": { + "target": "com.amazonaws.glue#ColumnNameList", + "traits": { + "smithy.api#documentation": "

A list of the column names to generate statistics. If none is supplied, all column names for the table will be used by default.

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

The IAM role that the service assumes to generate statistics.

", + "smithy.api#required": {} + } + }, + "SampleSize": { + "target": "com.amazonaws.glue#SampleSizePercentage", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The percentage of rows used to generate statistics. If none is supplied, the entire table will be used to generate stats.

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

The ID of the Data Catalog where the table reside. If none is supplied, the Amazon Web Services account ID is used by default.

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

Name of the security configuration that is used to encrypt CloudWatch logs for the column stats task run.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.glue#StartColumnStatisticsTaskRunResponse": { + "type": "structure", + "members": { + "ColumnStatisticsTaskRunId": { + "target": "com.amazonaws.glue#HashString", + "traits": { + "smithy.api#documentation": "

The identifier for the column statistics task run.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.glue#StartCrawler": { "type": "operation", "input": { @@ -31357,6 +31893,61 @@ } } }, + "com.amazonaws.glue#StopColumnStatisticsTaskRun": { + "type": "operation", + "input": { + "target": "com.amazonaws.glue#StopColumnStatisticsTaskRunRequest" + }, + "output": { + "target": "com.amazonaws.glue#StopColumnStatisticsTaskRunResponse" + }, + "errors": [ + { + "target": "com.amazonaws.glue#ColumnStatisticsTaskNotRunningException" + }, + { + "target": "com.amazonaws.glue#ColumnStatisticsTaskStoppingException" + }, + { + "target": "com.amazonaws.glue#EntityNotFoundException" + }, + { + "target": "com.amazonaws.glue#OperationTimeoutException" + } + ], + "traits": { + "smithy.api#documentation": "

Stops a task run for the specified table.

" + } + }, + "com.amazonaws.glue#StopColumnStatisticsTaskRunRequest": { + "type": "structure", + "members": { + "DatabaseName": { + "target": "com.amazonaws.glue#DatabaseName", + "traits": { + "smithy.api#documentation": "

The name of the database where the table resides.

", + "smithy.api#required": {} + } + }, + "TableName": { + "target": "com.amazonaws.glue#NameString", + "traits": { + "smithy.api#documentation": "

The name of the table.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.glue#StopColumnStatisticsTaskRunResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.glue#StopCrawler": { "type": "operation", "input": {