Skip to content

Commit 35f7d85

Browse files
author
awstools
committed
feat(client-athena): Introduces Spark workgroup features including log persistence, S3/CloudWatch delivery, UI and History Server APIs, and SparkConnect 3.5.6 support. Adds DPU usage limits at workgroup and query levels as well as DPU usage tracking for Capacity Reservation queries to optimize performance and costs.
1 parent 678f856 commit 35f7d85

18 files changed

+1298
-81
lines changed

clients/client-athena/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,14 @@ GetQueryRuntimeStatistics
460460

461461
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/athena/command/GetQueryRuntimeStatisticsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-athena/Interface/GetQueryRuntimeStatisticsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-athena/Interface/GetQueryRuntimeStatisticsCommandOutput/)
462462

463+
</details>
464+
<details>
465+
<summary>
466+
GetResourceDashboard
467+
</summary>
468+
469+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/athena/command/GetResourceDashboardCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-athena/Interface/GetResourceDashboardCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-athena/Interface/GetResourceDashboardCommandOutput/)
470+
463471
</details>
464472
<details>
465473
<summary>
@@ -468,6 +476,14 @@ GetSession
468476

469477
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/athena/command/GetSessionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-athena/Interface/GetSessionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-athena/Interface/GetSessionCommandOutput/)
470478

479+
</details>
480+
<details>
481+
<summary>
482+
GetSessionEndpoint
483+
</summary>
484+
485+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/athena/command/GetSessionEndpointCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-athena/Interface/GetSessionEndpointCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-athena/Interface/GetSessionEndpointCommandOutput/)
486+
471487
</details>
472488
<details>
473489
<summary>

clients/client-athena/src/Athena.ts

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,17 @@ import {
154154
GetQueryRuntimeStatisticsCommandInput,
155155
GetQueryRuntimeStatisticsCommandOutput,
156156
} from "./commands/GetQueryRuntimeStatisticsCommand";
157+
import {
158+
GetResourceDashboardCommand,
159+
GetResourceDashboardCommandInput,
160+
GetResourceDashboardCommandOutput,
161+
} from "./commands/GetResourceDashboardCommand";
157162
import { GetSessionCommand, GetSessionCommandInput, GetSessionCommandOutput } from "./commands/GetSessionCommand";
163+
import {
164+
GetSessionEndpointCommand,
165+
GetSessionEndpointCommandInput,
166+
GetSessionEndpointCommandOutput,
167+
} from "./commands/GetSessionEndpointCommand";
158168
import {
159169
GetSessionStatusCommand,
160170
GetSessionStatusCommandInput,
@@ -364,7 +374,9 @@ const commands = {
364374
GetQueryExecutionCommand,
365375
GetQueryResultsCommand,
366376
GetQueryRuntimeStatisticsCommand,
377+
GetResourceDashboardCommand,
367378
GetSessionCommand,
379+
GetSessionEndpointCommand,
368380
GetSessionStatusCommand,
369381
GetTableMetadataCommand,
370382
GetWorkGroupCommand,
@@ -898,6 +910,23 @@ export interface Athena {
898910
cb: (err: any, data?: GetQueryRuntimeStatisticsCommandOutput) => void
899911
): void;
900912

913+
/**
914+
* @see {@link GetResourceDashboardCommand}
915+
*/
916+
getResourceDashboard(
917+
args: GetResourceDashboardCommandInput,
918+
options?: __HttpHandlerOptions
919+
): Promise<GetResourceDashboardCommandOutput>;
920+
getResourceDashboard(
921+
args: GetResourceDashboardCommandInput,
922+
cb: (err: any, data?: GetResourceDashboardCommandOutput) => void
923+
): void;
924+
getResourceDashboard(
925+
args: GetResourceDashboardCommandInput,
926+
options: __HttpHandlerOptions,
927+
cb: (err: any, data?: GetResourceDashboardCommandOutput) => void
928+
): void;
929+
901930
/**
902931
* @see {@link GetSessionCommand}
903932
*/
@@ -909,6 +938,23 @@ export interface Athena {
909938
cb: (err: any, data?: GetSessionCommandOutput) => void
910939
): void;
911940

941+
/**
942+
* @see {@link GetSessionEndpointCommand}
943+
*/
944+
getSessionEndpoint(
945+
args: GetSessionEndpointCommandInput,
946+
options?: __HttpHandlerOptions
947+
): Promise<GetSessionEndpointCommandOutput>;
948+
getSessionEndpoint(
949+
args: GetSessionEndpointCommandInput,
950+
cb: (err: any, data?: GetSessionEndpointCommandOutput) => void
951+
): void;
952+
getSessionEndpoint(
953+
args: GetSessionEndpointCommandInput,
954+
options: __HttpHandlerOptions,
955+
cb: (err: any, data?: GetSessionEndpointCommandOutput) => void
956+
): void;
957+
912958
/**
913959
* @see {@link GetSessionStatusCommand}
914960
*/

clients/client-athena/src/AthenaClient.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,12 @@ import {
136136
GetQueryRuntimeStatisticsCommandInput,
137137
GetQueryRuntimeStatisticsCommandOutput,
138138
} from "./commands/GetQueryRuntimeStatisticsCommand";
139+
import {
140+
GetResourceDashboardCommandInput,
141+
GetResourceDashboardCommandOutput,
142+
} from "./commands/GetResourceDashboardCommand";
139143
import { GetSessionCommandInput, GetSessionCommandOutput } from "./commands/GetSessionCommand";
144+
import { GetSessionEndpointCommandInput, GetSessionEndpointCommandOutput } from "./commands/GetSessionEndpointCommand";
140145
import { GetSessionStatusCommandInput, GetSessionStatusCommandOutput } from "./commands/GetSessionStatusCommand";
141146
import { GetTableMetadataCommandInput, GetTableMetadataCommandOutput } from "./commands/GetTableMetadataCommand";
142147
import { GetWorkGroupCommandInput, GetWorkGroupCommandOutput } from "./commands/GetWorkGroupCommand";
@@ -264,7 +269,9 @@ export type ServiceInputTypes =
264269
| GetQueryExecutionCommandInput
265270
| GetQueryResultsCommandInput
266271
| GetQueryRuntimeStatisticsCommandInput
272+
| GetResourceDashboardCommandInput
267273
| GetSessionCommandInput
274+
| GetSessionEndpointCommandInput
268275
| GetSessionStatusCommandInput
269276
| GetTableMetadataCommandInput
270277
| GetWorkGroupCommandInput
@@ -337,7 +344,9 @@ export type ServiceOutputTypes =
337344
| GetQueryExecutionCommandOutput
338345
| GetQueryResultsCommandOutput
339346
| GetQueryRuntimeStatisticsCommandOutput
347+
| GetResourceDashboardCommandOutput
340348
| GetSessionCommandOutput
349+
| GetSessionEndpointCommandOutput
341350
| GetSessionStatusCommandOutput
342351
| GetTableMetadataCommandOutput
343352
| GetWorkGroupCommandOutput

clients/client-athena/src/commands/BatchGetQueryExecutionCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ export interface BatchGetQueryExecutionCommandOutput extends BatchGetQueryExecut
105105
* // ResultReuseInformation: { // ResultReuseInformation
106106
* // ReusedPreviousResult: true || false, // required
107107
* // },
108+
* // DpuCount: Number("double"),
108109
* // },
109110
* // WorkGroup: "STRING_VALUE",
110111
* // EngineVersion: { // EngineVersion

clients/client-athena/src/commands/CreateWorkGroupCommand.ts

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,46 @@ export interface CreateWorkGroupCommandOutput extends CreateWorkGroupOutput, __M
6767
* },
6868
* AdditionalConfiguration: "STRING_VALUE",
6969
* ExecutionRole: "STRING_VALUE",
70+
* MonitoringConfiguration: { // MonitoringConfiguration
71+
* CloudWatchLoggingConfiguration: { // CloudWatchLoggingConfiguration
72+
* Enabled: true || false, // required
73+
* LogGroup: "STRING_VALUE",
74+
* LogStreamNamePrefix: "STRING_VALUE",
75+
* LogTypes: { // LogTypesMap
76+
* "<keys>": [ // LogTypeValuesList
77+
* "STRING_VALUE",
78+
* ],
79+
* },
80+
* },
81+
* ManagedLoggingConfiguration: { // ManagedLoggingConfiguration
82+
* Enabled: true || false, // required
83+
* KmsKey: "STRING_VALUE",
84+
* },
85+
* S3LoggingConfiguration: { // S3LoggingConfiguration
86+
* Enabled: true || false, // required
87+
* KmsKey: "STRING_VALUE",
88+
* LogLocation: "STRING_VALUE",
89+
* },
90+
* },
91+
* EngineConfiguration: { // EngineConfiguration
92+
* CoordinatorDpuSize: Number("int"),
93+
* MaxConcurrentDpus: Number("int"),
94+
* DefaultExecutorDpuSize: Number("int"),
95+
* AdditionalConfigs: { // ParametersMap
96+
* "<keys>": "STRING_VALUE",
97+
* },
98+
* SparkProperties: {
99+
* "<keys>": "STRING_VALUE",
100+
* },
101+
* Classifications: [ // ClassificationList
102+
* { // Classification
103+
* Name: "STRING_VALUE",
104+
* Properties: {
105+
* "<keys>": "STRING_VALUE",
106+
* },
107+
* },
108+
* ],
109+
* },
70110
* CustomerContentEncryptionConfiguration: { // CustomerContentEncryptionConfiguration
71111
* KmsKey: "STRING_VALUE", // required
72112
* },

clients/client-athena/src/commands/GetQueryExecutionCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ export interface GetQueryExecutionCommandOutput extends GetQueryExecutionOutput,
9999
* // ResultReuseInformation: { // ResultReuseInformation
100100
* // ReusedPreviousResult: true || false, // required
101101
* // },
102+
* // DpuCount: Number("double"),
102103
* // },
103104
* // WorkGroup: "STRING_VALUE",
104105
* // EngineVersion: { // EngineVersion

clients/client-athena/src/commands/GetQueryRuntimeStatisticsCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ export interface GetQueryRuntimeStatisticsCommandOutput extends GetQueryRuntimeS
3232
* <code>Timeline</code> section of the response object are available as soon as <a>QueryExecutionStatus$State</a> is in a SUCCEEDED or FAILED state. The
3333
* remaining non-timeline statistics in the response (like stage-level input and output row
3434
* count and data size) are updated asynchronously and may not be available immediately
35-
* after a query completes. The non-timeline statistics are also not included when a query
36-
* has row-level filters defined in Lake Formation.</p>
35+
* after a query completes or, in some cases, may not be returned. The non-timeline
36+
* statistics are also not included when a query has row-level filters defined in Lake Formation.</p>
3737
* @example
3838
* Use a bare-bones client and the command you need to make an API call.
3939
* ```javascript
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { Command as $Command } from "@smithy/smithy-client";
4+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
5+
6+
import { AthenaClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AthenaClient";
7+
import { commonParams } from "../endpoint/EndpointParameters";
8+
import { GetResourceDashboardRequest, GetResourceDashboardResponse } from "../models/models_0";
9+
import { GetResourceDashboard } from "../schemas/schemas_0";
10+
11+
/**
12+
* @public
13+
*/
14+
export type { __MetadataBearer };
15+
export { $Command };
16+
/**
17+
* @public
18+
*
19+
* The input for {@link GetResourceDashboardCommand}.
20+
*/
21+
export interface GetResourceDashboardCommandInput extends GetResourceDashboardRequest {}
22+
/**
23+
* @public
24+
*
25+
* The output of {@link GetResourceDashboardCommand}.
26+
*/
27+
export interface GetResourceDashboardCommandOutput extends GetResourceDashboardResponse, __MetadataBearer {}
28+
29+
/**
30+
* <p>Gets the Live UI/Persistence UI for a session.</p>
31+
* @example
32+
* Use a bare-bones client and the command you need to make an API call.
33+
* ```javascript
34+
* import { AthenaClient, GetResourceDashboardCommand } from "@aws-sdk/client-athena"; // ES Modules import
35+
* // const { AthenaClient, GetResourceDashboardCommand } = require("@aws-sdk/client-athena"); // CommonJS import
36+
* // import type { AthenaClientConfig } from "@aws-sdk/client-athena";
37+
* const config = {}; // type is AthenaClientConfig
38+
* const client = new AthenaClient(config);
39+
* const input = { // GetResourceDashboardRequest
40+
* ResourceARN: "STRING_VALUE", // required
41+
* };
42+
* const command = new GetResourceDashboardCommand(input);
43+
* const response = await client.send(command);
44+
* // { // GetResourceDashboardResponse
45+
* // Url: "STRING_VALUE", // required
46+
* // };
47+
*
48+
* ```
49+
*
50+
* @param GetResourceDashboardCommandInput - {@link GetResourceDashboardCommandInput}
51+
* @returns {@link GetResourceDashboardCommandOutput}
52+
* @see {@link GetResourceDashboardCommandInput} for command's `input` shape.
53+
* @see {@link GetResourceDashboardCommandOutput} for command's `response` shape.
54+
* @see {@link AthenaClientResolvedConfig | config} for AthenaClient's `config` shape.
55+
*
56+
* @throws {@link InternalServerException} (server fault)
57+
* <p>Indicates a platform issue, which may be due to a transient condition or
58+
* outage.</p>
59+
*
60+
* @throws {@link InvalidRequestException} (client fault)
61+
* <p>Indicates that something is wrong with the input to the request. For example, a
62+
* required parameter may be missing or out of range.</p>
63+
*
64+
* @throws {@link ResourceNotFoundException} (client fault)
65+
* <p>A resource, such as a workgroup, was not found.</p>
66+
*
67+
* @throws {@link AthenaServiceException}
68+
* <p>Base exception class for all service exceptions from Athena service.</p>
69+
*
70+
*
71+
* @public
72+
*/
73+
export class GetResourceDashboardCommand extends $Command
74+
.classBuilder<
75+
GetResourceDashboardCommandInput,
76+
GetResourceDashboardCommandOutput,
77+
AthenaClientResolvedConfig,
78+
ServiceInputTypes,
79+
ServiceOutputTypes
80+
>()
81+
.ep(commonParams)
82+
.m(function (this: any, Command: any, cs: any, config: AthenaClientResolvedConfig, o: any) {
83+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
84+
})
85+
.s("AmazonAthena", "GetResourceDashboard", {})
86+
.n("AthenaClient", "GetResourceDashboardCommand")
87+
.sc(GetResourceDashboard)
88+
.build() {
89+
/** @internal type navigation helper, not in runtime. */
90+
protected declare static __types: {
91+
api: {
92+
input: GetResourceDashboardRequest;
93+
output: GetResourceDashboardResponse;
94+
};
95+
sdk: {
96+
input: GetResourceDashboardCommandInput;
97+
output: GetResourceDashboardCommandOutput;
98+
};
99+
};
100+
}

clients/client-athena/src/commands/GetSessionCommand.ts

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,50 @@ export interface GetSessionCommandOutput extends GetSessionResponse, __MetadataB
4949
* // EngineVersion: "STRING_VALUE",
5050
* // EngineConfiguration: { // EngineConfiguration
5151
* // CoordinatorDpuSize: Number("int"),
52-
* // MaxConcurrentDpus: Number("int"), // required
52+
* // MaxConcurrentDpus: Number("int"),
5353
* // DefaultExecutorDpuSize: Number("int"),
5454
* // AdditionalConfigs: { // ParametersMap
5555
* // "<keys>": "STRING_VALUE",
5656
* // },
5757
* // SparkProperties: {
5858
* // "<keys>": "STRING_VALUE",
5959
* // },
60+
* // Classifications: [ // ClassificationList
61+
* // { // Classification
62+
* // Name: "STRING_VALUE",
63+
* // Properties: {
64+
* // "<keys>": "STRING_VALUE",
65+
* // },
66+
* // },
67+
* // ],
6068
* // },
6169
* // NotebookVersion: "STRING_VALUE",
70+
* // MonitoringConfiguration: { // MonitoringConfiguration
71+
* // CloudWatchLoggingConfiguration: { // CloudWatchLoggingConfiguration
72+
* // Enabled: true || false, // required
73+
* // LogGroup: "STRING_VALUE",
74+
* // LogStreamNamePrefix: "STRING_VALUE",
75+
* // LogTypes: { // LogTypesMap
76+
* // "<keys>": [ // LogTypeValuesList
77+
* // "STRING_VALUE",
78+
* // ],
79+
* // },
80+
* // },
81+
* // ManagedLoggingConfiguration: { // ManagedLoggingConfiguration
82+
* // Enabled: true || false, // required
83+
* // KmsKey: "STRING_VALUE",
84+
* // },
85+
* // S3LoggingConfiguration: { // S3LoggingConfiguration
86+
* // Enabled: true || false, // required
87+
* // KmsKey: "STRING_VALUE",
88+
* // LogLocation: "STRING_VALUE",
89+
* // },
90+
* // },
6291
* // SessionConfiguration: { // SessionConfiguration
6392
* // ExecutionRole: "STRING_VALUE",
6493
* // WorkingDirectory: "STRING_VALUE",
6594
* // IdleTimeoutSeconds: Number("long"),
95+
* // SessionIdleTimeoutInMinutes: Number("int"),
6696
* // EncryptionConfiguration: { // EncryptionConfiguration
6797
* // EncryptionOption: "SSE_S3" || "SSE_KMS" || "CSE_KMS", // required
6898
* // KmsKey: "STRING_VALUE",

0 commit comments

Comments
 (0)