@aws-sdk/client-athena 3.321.1 → 3.323.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -0
- package/dist-cjs/Athena.js +14 -0
- package/dist-cjs/commands/CancelCapacityReservationCommand.js +45 -0
- package/dist-cjs/commands/CreateCapacityReservationCommand.js +45 -0
- package/dist-cjs/commands/GetCapacityAssignmentConfigurationCommand.js +45 -0
- package/dist-cjs/commands/GetCapacityReservationCommand.js +45 -0
- package/dist-cjs/commands/ListCapacityReservationsCommand.js +45 -0
- package/dist-cjs/commands/PutCapacityAssignmentConfigurationCommand.js +45 -0
- package/dist-cjs/commands/UpdateCapacityReservationCommand.js +45 -0
- package/dist-cjs/commands/index.js +7 -0
- package/dist-cjs/models/models_0.js +14 -1
- package/dist-cjs/pagination/ListCapacityReservationsPaginator.js +29 -0
- package/dist-cjs/pagination/index.js +1 -0
- package/dist-cjs/protocols/Aws_json1_1.js +342 -3
- package/dist-es/Athena.js +14 -0
- package/dist-es/commands/CancelCapacityReservationCommand.js +41 -0
- package/dist-es/commands/CreateCapacityReservationCommand.js +41 -0
- package/dist-es/commands/GetCapacityAssignmentConfigurationCommand.js +41 -0
- package/dist-es/commands/GetCapacityReservationCommand.js +41 -0
- package/dist-es/commands/ListCapacityReservationsCommand.js +41 -0
- package/dist-es/commands/PutCapacityAssignmentConfigurationCommand.js +41 -0
- package/dist-es/commands/UpdateCapacityReservationCommand.js +41 -0
- package/dist-es/commands/index.js +7 -0
- package/dist-es/models/models_0.js +13 -0
- package/dist-es/pagination/ListCapacityReservationsPaginator.js +25 -0
- package/dist-es/pagination/index.js +1 -0
- package/dist-es/protocols/Aws_json1_1.js +326 -1
- package/dist-types/Athena.d.ts +49 -0
- package/dist-types/AthenaClient.d.ts +9 -2
- package/dist-types/commands/CancelCapacityReservationCommand.d.ts +71 -0
- package/dist-types/commands/CreateCapacityReservationCommand.d.ts +78 -0
- package/dist-types/commands/GetCapacityAssignmentConfigurationCommand.d.ts +71 -0
- package/dist-types/commands/GetCapacityReservationCommand.d.ts +71 -0
- package/dist-types/commands/ListCapacityReservationsCommand.d.ts +72 -0
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +1 -2
- package/dist-types/commands/PutCapacityAssignmentConfigurationCommand.d.ts +78 -0
- package/dist-types/commands/TagResourceCommand.d.ts +3 -5
- package/dist-types/commands/UntagResourceCommand.d.ts +1 -1
- package/dist-types/commands/UpdateCapacityReservationCommand.d.ts +72 -0
- package/dist-types/commands/index.d.ts +7 -0
- package/dist-types/models/models_0.d.ts +254 -8
- package/dist-types/pagination/ListCapacityReservationsPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +1 -0
- package/dist-types/protocols/Aws_json1_1.d.ts +63 -0
- package/dist-types/ts3.4/Athena.d.ts +131 -0
- package/dist-types/ts3.4/AthenaClient.d.ts +42 -0
- package/dist-types/ts3.4/commands/CancelCapacityReservationCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/CreateCapacityReservationCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/GetCapacityAssignmentConfigurationCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/GetCapacityReservationCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/ListCapacityReservationsCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/PutCapacityAssignmentConfigurationCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/UpdateCapacityReservationCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/index.d.ts +7 -0
- package/dist-types/ts3.4/models/models_0.d.ts +79 -0
- package/dist-types/ts3.4/pagination/ListCapacityReservationsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +1 -0
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +84 -0
- package/package.json +1 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { de_GetCapacityReservationCommand, se_GetCapacityReservationCommand } from "../protocols/Aws_json1_1";
|
|
5
|
+
export class GetCapacityReservationCommand extends $Command {
|
|
6
|
+
static getEndpointParameterInstructions() {
|
|
7
|
+
return {
|
|
8
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
9
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
10
|
+
Region: { type: "builtInParams", name: "region" },
|
|
11
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
constructor(input) {
|
|
15
|
+
super();
|
|
16
|
+
this.input = input;
|
|
17
|
+
}
|
|
18
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
19
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
20
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, GetCapacityReservationCommand.getEndpointParameterInstructions()));
|
|
21
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
22
|
+
const { logger } = configuration;
|
|
23
|
+
const clientName = "AthenaClient";
|
|
24
|
+
const commandName = "GetCapacityReservationCommand";
|
|
25
|
+
const handlerExecutionContext = {
|
|
26
|
+
logger,
|
|
27
|
+
clientName,
|
|
28
|
+
commandName,
|
|
29
|
+
inputFilterSensitiveLog: (_) => _,
|
|
30
|
+
outputFilterSensitiveLog: (_) => _,
|
|
31
|
+
};
|
|
32
|
+
const { requestHandler } = configuration;
|
|
33
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
34
|
+
}
|
|
35
|
+
serialize(input, context) {
|
|
36
|
+
return se_GetCapacityReservationCommand(input, context);
|
|
37
|
+
}
|
|
38
|
+
deserialize(output, context) {
|
|
39
|
+
return de_GetCapacityReservationCommand(output, context);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { de_ListCapacityReservationsCommand, se_ListCapacityReservationsCommand } from "../protocols/Aws_json1_1";
|
|
5
|
+
export class ListCapacityReservationsCommand extends $Command {
|
|
6
|
+
static getEndpointParameterInstructions() {
|
|
7
|
+
return {
|
|
8
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
9
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
10
|
+
Region: { type: "builtInParams", name: "region" },
|
|
11
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
constructor(input) {
|
|
15
|
+
super();
|
|
16
|
+
this.input = input;
|
|
17
|
+
}
|
|
18
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
19
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
20
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, ListCapacityReservationsCommand.getEndpointParameterInstructions()));
|
|
21
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
22
|
+
const { logger } = configuration;
|
|
23
|
+
const clientName = "AthenaClient";
|
|
24
|
+
const commandName = "ListCapacityReservationsCommand";
|
|
25
|
+
const handlerExecutionContext = {
|
|
26
|
+
logger,
|
|
27
|
+
clientName,
|
|
28
|
+
commandName,
|
|
29
|
+
inputFilterSensitiveLog: (_) => _,
|
|
30
|
+
outputFilterSensitiveLog: (_) => _,
|
|
31
|
+
};
|
|
32
|
+
const { requestHandler } = configuration;
|
|
33
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
34
|
+
}
|
|
35
|
+
serialize(input, context) {
|
|
36
|
+
return se_ListCapacityReservationsCommand(input, context);
|
|
37
|
+
}
|
|
38
|
+
deserialize(output, context) {
|
|
39
|
+
return de_ListCapacityReservationsCommand(output, context);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { de_PutCapacityAssignmentConfigurationCommand, se_PutCapacityAssignmentConfigurationCommand, } from "../protocols/Aws_json1_1";
|
|
5
|
+
export class PutCapacityAssignmentConfigurationCommand extends $Command {
|
|
6
|
+
static getEndpointParameterInstructions() {
|
|
7
|
+
return {
|
|
8
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
9
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
10
|
+
Region: { type: "builtInParams", name: "region" },
|
|
11
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
constructor(input) {
|
|
15
|
+
super();
|
|
16
|
+
this.input = input;
|
|
17
|
+
}
|
|
18
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
19
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
20
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, PutCapacityAssignmentConfigurationCommand.getEndpointParameterInstructions()));
|
|
21
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
22
|
+
const { logger } = configuration;
|
|
23
|
+
const clientName = "AthenaClient";
|
|
24
|
+
const commandName = "PutCapacityAssignmentConfigurationCommand";
|
|
25
|
+
const handlerExecutionContext = {
|
|
26
|
+
logger,
|
|
27
|
+
clientName,
|
|
28
|
+
commandName,
|
|
29
|
+
inputFilterSensitiveLog: (_) => _,
|
|
30
|
+
outputFilterSensitiveLog: (_) => _,
|
|
31
|
+
};
|
|
32
|
+
const { requestHandler } = configuration;
|
|
33
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
34
|
+
}
|
|
35
|
+
serialize(input, context) {
|
|
36
|
+
return se_PutCapacityAssignmentConfigurationCommand(input, context);
|
|
37
|
+
}
|
|
38
|
+
deserialize(output, context) {
|
|
39
|
+
return de_PutCapacityAssignmentConfigurationCommand(output, context);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { de_UpdateCapacityReservationCommand, se_UpdateCapacityReservationCommand } from "../protocols/Aws_json1_1";
|
|
5
|
+
export class UpdateCapacityReservationCommand extends $Command {
|
|
6
|
+
static getEndpointParameterInstructions() {
|
|
7
|
+
return {
|
|
8
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
9
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
10
|
+
Region: { type: "builtInParams", name: "region" },
|
|
11
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
constructor(input) {
|
|
15
|
+
super();
|
|
16
|
+
this.input = input;
|
|
17
|
+
}
|
|
18
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
19
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
20
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, UpdateCapacityReservationCommand.getEndpointParameterInstructions()));
|
|
21
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
22
|
+
const { logger } = configuration;
|
|
23
|
+
const clientName = "AthenaClient";
|
|
24
|
+
const commandName = "UpdateCapacityReservationCommand";
|
|
25
|
+
const handlerExecutionContext = {
|
|
26
|
+
logger,
|
|
27
|
+
clientName,
|
|
28
|
+
commandName,
|
|
29
|
+
inputFilterSensitiveLog: (_) => _,
|
|
30
|
+
outputFilterSensitiveLog: (_) => _,
|
|
31
|
+
};
|
|
32
|
+
const { requestHandler } = configuration;
|
|
33
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
34
|
+
}
|
|
35
|
+
serialize(input, context) {
|
|
36
|
+
return se_UpdateCapacityReservationCommand(input, context);
|
|
37
|
+
}
|
|
38
|
+
deserialize(output, context) {
|
|
39
|
+
return de_UpdateCapacityReservationCommand(output, context);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export * from "./BatchGetNamedQueryCommand";
|
|
2
2
|
export * from "./BatchGetPreparedStatementCommand";
|
|
3
3
|
export * from "./BatchGetQueryExecutionCommand";
|
|
4
|
+
export * from "./CancelCapacityReservationCommand";
|
|
5
|
+
export * from "./CreateCapacityReservationCommand";
|
|
4
6
|
export * from "./CreateDataCatalogCommand";
|
|
5
7
|
export * from "./CreateNamedQueryCommand";
|
|
6
8
|
export * from "./CreateNotebookCommand";
|
|
@@ -16,6 +18,8 @@ export * from "./ExportNotebookCommand";
|
|
|
16
18
|
export * from "./GetCalculationExecutionCodeCommand";
|
|
17
19
|
export * from "./GetCalculationExecutionCommand";
|
|
18
20
|
export * from "./GetCalculationExecutionStatusCommand";
|
|
21
|
+
export * from "./GetCapacityAssignmentConfigurationCommand";
|
|
22
|
+
export * from "./GetCapacityReservationCommand";
|
|
19
23
|
export * from "./GetDataCatalogCommand";
|
|
20
24
|
export * from "./GetDatabaseCommand";
|
|
21
25
|
export * from "./GetNamedQueryCommand";
|
|
@@ -31,6 +35,7 @@ export * from "./GetWorkGroupCommand";
|
|
|
31
35
|
export * from "./ImportNotebookCommand";
|
|
32
36
|
export * from "./ListApplicationDPUSizesCommand";
|
|
33
37
|
export * from "./ListCalculationExecutionsCommand";
|
|
38
|
+
export * from "./ListCapacityReservationsCommand";
|
|
34
39
|
export * from "./ListDataCatalogsCommand";
|
|
35
40
|
export * from "./ListDatabasesCommand";
|
|
36
41
|
export * from "./ListEngineVersionsCommand";
|
|
@@ -44,6 +49,7 @@ export * from "./ListSessionsCommand";
|
|
|
44
49
|
export * from "./ListTableMetadataCommand";
|
|
45
50
|
export * from "./ListTagsForResourceCommand";
|
|
46
51
|
export * from "./ListWorkGroupsCommand";
|
|
52
|
+
export * from "./PutCapacityAssignmentConfigurationCommand";
|
|
47
53
|
export * from "./StartCalculationExecutionCommand";
|
|
48
54
|
export * from "./StartQueryExecutionCommand";
|
|
49
55
|
export * from "./StartSessionCommand";
|
|
@@ -52,6 +58,7 @@ export * from "./StopQueryExecutionCommand";
|
|
|
52
58
|
export * from "./TagResourceCommand";
|
|
53
59
|
export * from "./TerminateSessionCommand";
|
|
54
60
|
export * from "./UntagResourceCommand";
|
|
61
|
+
export * from "./UpdateCapacityReservationCommand";
|
|
55
62
|
export * from "./UpdateDataCatalogCommand";
|
|
56
63
|
export * from "./UpdateNamedQueryCommand";
|
|
57
64
|
export * from "./UpdateNotebookCommand";
|
|
@@ -95,6 +95,19 @@ export const CalculationExecutionState = {
|
|
|
95
95
|
QUEUED: "QUEUED",
|
|
96
96
|
RUNNING: "RUNNING",
|
|
97
97
|
};
|
|
98
|
+
export const CapacityAllocationStatus = {
|
|
99
|
+
FAILED: "FAILED",
|
|
100
|
+
PENDING: "PENDING",
|
|
101
|
+
SUCCEEDED: "SUCCEEDED",
|
|
102
|
+
};
|
|
103
|
+
export const CapacityReservationStatus = {
|
|
104
|
+
ACTIVE: "ACTIVE",
|
|
105
|
+
CANCELLED: "CANCELLED",
|
|
106
|
+
CANCELLING: "CANCELLING",
|
|
107
|
+
FAILED: "FAILED",
|
|
108
|
+
PENDING: "PENDING",
|
|
109
|
+
UPDATE_PENDING: "UPDATE_PENDING",
|
|
110
|
+
};
|
|
98
111
|
export class MetadataException extends __BaseException {
|
|
99
112
|
constructor(opts) {
|
|
100
113
|
super({
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AthenaClient } from "../AthenaClient";
|
|
2
|
+
import { ListCapacityReservationsCommand, } from "../commands/ListCapacityReservationsCommand";
|
|
3
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
4
|
+
return await client.send(new ListCapacityReservationsCommand(input), ...args);
|
|
5
|
+
};
|
|
6
|
+
export async function* paginateListCapacityReservations(config, input, ...additionalArguments) {
|
|
7
|
+
let token = config.startingToken || undefined;
|
|
8
|
+
let hasNext = true;
|
|
9
|
+
let page;
|
|
10
|
+
while (hasNext) {
|
|
11
|
+
input.NextToken = token;
|
|
12
|
+
input["MaxResults"] = config.pageSize;
|
|
13
|
+
if (config.client instanceof AthenaClient) {
|
|
14
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
throw new Error("Invalid client, expected Athena | AthenaClient");
|
|
18
|
+
}
|
|
19
|
+
yield page;
|
|
20
|
+
const prevToken = token;
|
|
21
|
+
token = page.NextToken;
|
|
22
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
23
|
+
}
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
@@ -2,6 +2,7 @@ export * from "./GetQueryResultsPaginator";
|
|
|
2
2
|
export * from "./Interfaces";
|
|
3
3
|
export * from "./ListApplicationDPUSizesPaginator";
|
|
4
4
|
export * from "./ListCalculationExecutionsPaginator";
|
|
5
|
+
export * from "./ListCapacityReservationsPaginator";
|
|
5
6
|
export * from "./ListDataCatalogsPaginator";
|
|
6
7
|
export * from "./ListDatabasesPaginator";
|
|
7
8
|
export * from "./ListEngineVersionsPaginator";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
|
-
import { _json, decorateServiceException as __decorateServiceException, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@aws-sdk/smithy-client";
|
|
2
|
+
import { _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@aws-sdk/smithy-client";
|
|
3
3
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
4
4
|
import { AthenaServiceException as __BaseException } from "../models/AthenaServiceException";
|
|
5
5
|
import { InternalServerException, InvalidRequestException, MetadataException, ResourceNotFoundException, SessionAlreadyExistsException, TooManyRequestsException, } from "../models/models_0";
|
|
@@ -21,6 +21,18 @@ export const se_BatchGetQueryExecutionCommand = async (input, context) => {
|
|
|
21
21
|
body = JSON.stringify(_json(input));
|
|
22
22
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
23
23
|
};
|
|
24
|
+
export const se_CancelCapacityReservationCommand = async (input, context) => {
|
|
25
|
+
const headers = sharedHeaders("CancelCapacityReservation");
|
|
26
|
+
let body;
|
|
27
|
+
body = JSON.stringify(_json(input));
|
|
28
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
29
|
+
};
|
|
30
|
+
export const se_CreateCapacityReservationCommand = async (input, context) => {
|
|
31
|
+
const headers = sharedHeaders("CreateCapacityReservation");
|
|
32
|
+
let body;
|
|
33
|
+
body = JSON.stringify(_json(input));
|
|
34
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
35
|
+
};
|
|
24
36
|
export const se_CreateDataCatalogCommand = async (input, context) => {
|
|
25
37
|
const headers = sharedHeaders("CreateDataCatalog");
|
|
26
38
|
let body;
|
|
@@ -111,6 +123,18 @@ export const se_GetCalculationExecutionStatusCommand = async (input, context) =>
|
|
|
111
123
|
body = JSON.stringify(_json(input));
|
|
112
124
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
113
125
|
};
|
|
126
|
+
export const se_GetCapacityAssignmentConfigurationCommand = async (input, context) => {
|
|
127
|
+
const headers = sharedHeaders("GetCapacityAssignmentConfiguration");
|
|
128
|
+
let body;
|
|
129
|
+
body = JSON.stringify(_json(input));
|
|
130
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
131
|
+
};
|
|
132
|
+
export const se_GetCapacityReservationCommand = async (input, context) => {
|
|
133
|
+
const headers = sharedHeaders("GetCapacityReservation");
|
|
134
|
+
let body;
|
|
135
|
+
body = JSON.stringify(_json(input));
|
|
136
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
137
|
+
};
|
|
114
138
|
export const se_GetDatabaseCommand = async (input, context) => {
|
|
115
139
|
const headers = sharedHeaders("GetDatabase");
|
|
116
140
|
let body;
|
|
@@ -201,6 +225,12 @@ export const se_ListCalculationExecutionsCommand = async (input, context) => {
|
|
|
201
225
|
body = JSON.stringify(_json(input));
|
|
202
226
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
203
227
|
};
|
|
228
|
+
export const se_ListCapacityReservationsCommand = async (input, context) => {
|
|
229
|
+
const headers = sharedHeaders("ListCapacityReservations");
|
|
230
|
+
let body;
|
|
231
|
+
body = JSON.stringify(_json(input));
|
|
232
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
233
|
+
};
|
|
204
234
|
export const se_ListDatabasesCommand = async (input, context) => {
|
|
205
235
|
const headers = sharedHeaders("ListDatabases");
|
|
206
236
|
let body;
|
|
@@ -279,6 +309,12 @@ export const se_ListWorkGroupsCommand = async (input, context) => {
|
|
|
279
309
|
body = JSON.stringify(_json(input));
|
|
280
310
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
281
311
|
};
|
|
312
|
+
export const se_PutCapacityAssignmentConfigurationCommand = async (input, context) => {
|
|
313
|
+
const headers = sharedHeaders("PutCapacityAssignmentConfiguration");
|
|
314
|
+
let body;
|
|
315
|
+
body = JSON.stringify(_json(input));
|
|
316
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
317
|
+
};
|
|
282
318
|
export const se_StartCalculationExecutionCommand = async (input, context) => {
|
|
283
319
|
const headers = sharedHeaders("StartCalculationExecution");
|
|
284
320
|
let body;
|
|
@@ -327,6 +363,12 @@ export const se_UntagResourceCommand = async (input, context) => {
|
|
|
327
363
|
body = JSON.stringify(_json(input));
|
|
328
364
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
329
365
|
};
|
|
366
|
+
export const se_UpdateCapacityReservationCommand = async (input, context) => {
|
|
367
|
+
const headers = sharedHeaders("UpdateCapacityReservation");
|
|
368
|
+
let body;
|
|
369
|
+
body = JSON.stringify(_json(input));
|
|
370
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
371
|
+
};
|
|
330
372
|
export const se_UpdateDataCatalogCommand = async (input, context) => {
|
|
331
373
|
const headers = sharedHeaders("UpdateDataCatalog");
|
|
332
374
|
let body;
|
|
@@ -468,6 +510,76 @@ const de_BatchGetQueryExecutionCommandError = async (output, context) => {
|
|
|
468
510
|
});
|
|
469
511
|
}
|
|
470
512
|
};
|
|
513
|
+
export const de_CancelCapacityReservationCommand = async (output, context) => {
|
|
514
|
+
if (output.statusCode >= 300) {
|
|
515
|
+
return de_CancelCapacityReservationCommandError(output, context);
|
|
516
|
+
}
|
|
517
|
+
const data = await parseBody(output.body, context);
|
|
518
|
+
let contents = {};
|
|
519
|
+
contents = _json(data);
|
|
520
|
+
const response = {
|
|
521
|
+
$metadata: deserializeMetadata(output),
|
|
522
|
+
...contents,
|
|
523
|
+
};
|
|
524
|
+
return response;
|
|
525
|
+
};
|
|
526
|
+
const de_CancelCapacityReservationCommandError = async (output, context) => {
|
|
527
|
+
const parsedOutput = {
|
|
528
|
+
...output,
|
|
529
|
+
body: await parseErrorBody(output.body, context),
|
|
530
|
+
};
|
|
531
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
532
|
+
switch (errorCode) {
|
|
533
|
+
case "InternalServerException":
|
|
534
|
+
case "com.amazonaws.athena#InternalServerException":
|
|
535
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
536
|
+
case "InvalidRequestException":
|
|
537
|
+
case "com.amazonaws.athena#InvalidRequestException":
|
|
538
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
539
|
+
default:
|
|
540
|
+
const parsedBody = parsedOutput.body;
|
|
541
|
+
return throwDefaultError({
|
|
542
|
+
output,
|
|
543
|
+
parsedBody,
|
|
544
|
+
errorCode,
|
|
545
|
+
});
|
|
546
|
+
}
|
|
547
|
+
};
|
|
548
|
+
export const de_CreateCapacityReservationCommand = async (output, context) => {
|
|
549
|
+
if (output.statusCode >= 300) {
|
|
550
|
+
return de_CreateCapacityReservationCommandError(output, context);
|
|
551
|
+
}
|
|
552
|
+
const data = await parseBody(output.body, context);
|
|
553
|
+
let contents = {};
|
|
554
|
+
contents = _json(data);
|
|
555
|
+
const response = {
|
|
556
|
+
$metadata: deserializeMetadata(output),
|
|
557
|
+
...contents,
|
|
558
|
+
};
|
|
559
|
+
return response;
|
|
560
|
+
};
|
|
561
|
+
const de_CreateCapacityReservationCommandError = async (output, context) => {
|
|
562
|
+
const parsedOutput = {
|
|
563
|
+
...output,
|
|
564
|
+
body: await parseErrorBody(output.body, context),
|
|
565
|
+
};
|
|
566
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
567
|
+
switch (errorCode) {
|
|
568
|
+
case "InternalServerException":
|
|
569
|
+
case "com.amazonaws.athena#InternalServerException":
|
|
570
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
571
|
+
case "InvalidRequestException":
|
|
572
|
+
case "com.amazonaws.athena#InvalidRequestException":
|
|
573
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
574
|
+
default:
|
|
575
|
+
const parsedBody = parsedOutput.body;
|
|
576
|
+
return throwDefaultError({
|
|
577
|
+
output,
|
|
578
|
+
parsedBody,
|
|
579
|
+
errorCode,
|
|
580
|
+
});
|
|
581
|
+
}
|
|
582
|
+
};
|
|
471
583
|
export const de_CreateDataCatalogCommand = async (output, context) => {
|
|
472
584
|
if (output.statusCode >= 300) {
|
|
473
585
|
return de_CreateDataCatalogCommandError(output, context);
|
|
@@ -1017,6 +1129,76 @@ const de_GetCalculationExecutionStatusCommandError = async (output, context) =>
|
|
|
1017
1129
|
});
|
|
1018
1130
|
}
|
|
1019
1131
|
};
|
|
1132
|
+
export const de_GetCapacityAssignmentConfigurationCommand = async (output, context) => {
|
|
1133
|
+
if (output.statusCode >= 300) {
|
|
1134
|
+
return de_GetCapacityAssignmentConfigurationCommandError(output, context);
|
|
1135
|
+
}
|
|
1136
|
+
const data = await parseBody(output.body, context);
|
|
1137
|
+
let contents = {};
|
|
1138
|
+
contents = _json(data);
|
|
1139
|
+
const response = {
|
|
1140
|
+
$metadata: deserializeMetadata(output),
|
|
1141
|
+
...contents,
|
|
1142
|
+
};
|
|
1143
|
+
return response;
|
|
1144
|
+
};
|
|
1145
|
+
const de_GetCapacityAssignmentConfigurationCommandError = async (output, context) => {
|
|
1146
|
+
const parsedOutput = {
|
|
1147
|
+
...output,
|
|
1148
|
+
body: await parseErrorBody(output.body, context),
|
|
1149
|
+
};
|
|
1150
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1151
|
+
switch (errorCode) {
|
|
1152
|
+
case "InternalServerException":
|
|
1153
|
+
case "com.amazonaws.athena#InternalServerException":
|
|
1154
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1155
|
+
case "InvalidRequestException":
|
|
1156
|
+
case "com.amazonaws.athena#InvalidRequestException":
|
|
1157
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
1158
|
+
default:
|
|
1159
|
+
const parsedBody = parsedOutput.body;
|
|
1160
|
+
return throwDefaultError({
|
|
1161
|
+
output,
|
|
1162
|
+
parsedBody,
|
|
1163
|
+
errorCode,
|
|
1164
|
+
});
|
|
1165
|
+
}
|
|
1166
|
+
};
|
|
1167
|
+
export const de_GetCapacityReservationCommand = async (output, context) => {
|
|
1168
|
+
if (output.statusCode >= 300) {
|
|
1169
|
+
return de_GetCapacityReservationCommandError(output, context);
|
|
1170
|
+
}
|
|
1171
|
+
const data = await parseBody(output.body, context);
|
|
1172
|
+
let contents = {};
|
|
1173
|
+
contents = de_GetCapacityReservationOutput(data, context);
|
|
1174
|
+
const response = {
|
|
1175
|
+
$metadata: deserializeMetadata(output),
|
|
1176
|
+
...contents,
|
|
1177
|
+
};
|
|
1178
|
+
return response;
|
|
1179
|
+
};
|
|
1180
|
+
const de_GetCapacityReservationCommandError = async (output, context) => {
|
|
1181
|
+
const parsedOutput = {
|
|
1182
|
+
...output,
|
|
1183
|
+
body: await parseErrorBody(output.body, context),
|
|
1184
|
+
};
|
|
1185
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1186
|
+
switch (errorCode) {
|
|
1187
|
+
case "InternalServerException":
|
|
1188
|
+
case "com.amazonaws.athena#InternalServerException":
|
|
1189
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1190
|
+
case "InvalidRequestException":
|
|
1191
|
+
case "com.amazonaws.athena#InvalidRequestException":
|
|
1192
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
1193
|
+
default:
|
|
1194
|
+
const parsedBody = parsedOutput.body;
|
|
1195
|
+
return throwDefaultError({
|
|
1196
|
+
output,
|
|
1197
|
+
parsedBody,
|
|
1198
|
+
errorCode,
|
|
1199
|
+
});
|
|
1200
|
+
}
|
|
1201
|
+
};
|
|
1020
1202
|
export const de_GetDatabaseCommand = async (output, context) => {
|
|
1021
1203
|
if (output.statusCode >= 300) {
|
|
1022
1204
|
return de_GetDatabaseCommandError(output, context);
|
|
@@ -1572,6 +1754,41 @@ const de_ListCalculationExecutionsCommandError = async (output, context) => {
|
|
|
1572
1754
|
});
|
|
1573
1755
|
}
|
|
1574
1756
|
};
|
|
1757
|
+
export const de_ListCapacityReservationsCommand = async (output, context) => {
|
|
1758
|
+
if (output.statusCode >= 300) {
|
|
1759
|
+
return de_ListCapacityReservationsCommandError(output, context);
|
|
1760
|
+
}
|
|
1761
|
+
const data = await parseBody(output.body, context);
|
|
1762
|
+
let contents = {};
|
|
1763
|
+
contents = de_ListCapacityReservationsOutput(data, context);
|
|
1764
|
+
const response = {
|
|
1765
|
+
$metadata: deserializeMetadata(output),
|
|
1766
|
+
...contents,
|
|
1767
|
+
};
|
|
1768
|
+
return response;
|
|
1769
|
+
};
|
|
1770
|
+
const de_ListCapacityReservationsCommandError = async (output, context) => {
|
|
1771
|
+
const parsedOutput = {
|
|
1772
|
+
...output,
|
|
1773
|
+
body: await parseErrorBody(output.body, context),
|
|
1774
|
+
};
|
|
1775
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1776
|
+
switch (errorCode) {
|
|
1777
|
+
case "InternalServerException":
|
|
1778
|
+
case "com.amazonaws.athena#InternalServerException":
|
|
1779
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1780
|
+
case "InvalidRequestException":
|
|
1781
|
+
case "com.amazonaws.athena#InvalidRequestException":
|
|
1782
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
1783
|
+
default:
|
|
1784
|
+
const parsedBody = parsedOutput.body;
|
|
1785
|
+
return throwDefaultError({
|
|
1786
|
+
output,
|
|
1787
|
+
parsedBody,
|
|
1788
|
+
errorCode,
|
|
1789
|
+
});
|
|
1790
|
+
}
|
|
1791
|
+
};
|
|
1575
1792
|
export const de_ListDatabasesCommand = async (output, context) => {
|
|
1576
1793
|
if (output.statusCode >= 300) {
|
|
1577
1794
|
return de_ListDatabasesCommandError(output, context);
|
|
@@ -2048,6 +2265,41 @@ const de_ListWorkGroupsCommandError = async (output, context) => {
|
|
|
2048
2265
|
});
|
|
2049
2266
|
}
|
|
2050
2267
|
};
|
|
2268
|
+
export const de_PutCapacityAssignmentConfigurationCommand = async (output, context) => {
|
|
2269
|
+
if (output.statusCode >= 300) {
|
|
2270
|
+
return de_PutCapacityAssignmentConfigurationCommandError(output, context);
|
|
2271
|
+
}
|
|
2272
|
+
const data = await parseBody(output.body, context);
|
|
2273
|
+
let contents = {};
|
|
2274
|
+
contents = _json(data);
|
|
2275
|
+
const response = {
|
|
2276
|
+
$metadata: deserializeMetadata(output),
|
|
2277
|
+
...contents,
|
|
2278
|
+
};
|
|
2279
|
+
return response;
|
|
2280
|
+
};
|
|
2281
|
+
const de_PutCapacityAssignmentConfigurationCommandError = async (output, context) => {
|
|
2282
|
+
const parsedOutput = {
|
|
2283
|
+
...output,
|
|
2284
|
+
body: await parseErrorBody(output.body, context),
|
|
2285
|
+
};
|
|
2286
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2287
|
+
switch (errorCode) {
|
|
2288
|
+
case "InternalServerException":
|
|
2289
|
+
case "com.amazonaws.athena#InternalServerException":
|
|
2290
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
2291
|
+
case "InvalidRequestException":
|
|
2292
|
+
case "com.amazonaws.athena#InvalidRequestException":
|
|
2293
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
2294
|
+
default:
|
|
2295
|
+
const parsedBody = parsedOutput.body;
|
|
2296
|
+
return throwDefaultError({
|
|
2297
|
+
output,
|
|
2298
|
+
parsedBody,
|
|
2299
|
+
errorCode,
|
|
2300
|
+
});
|
|
2301
|
+
}
|
|
2302
|
+
};
|
|
2051
2303
|
export const de_StartCalculationExecutionCommand = async (output, context) => {
|
|
2052
2304
|
if (output.statusCode >= 300) {
|
|
2053
2305
|
return de_StartCalculationExecutionCommandError(output, context);
|
|
@@ -2355,6 +2607,41 @@ const de_UntagResourceCommandError = async (output, context) => {
|
|
|
2355
2607
|
});
|
|
2356
2608
|
}
|
|
2357
2609
|
};
|
|
2610
|
+
export const de_UpdateCapacityReservationCommand = async (output, context) => {
|
|
2611
|
+
if (output.statusCode >= 300) {
|
|
2612
|
+
return de_UpdateCapacityReservationCommandError(output, context);
|
|
2613
|
+
}
|
|
2614
|
+
const data = await parseBody(output.body, context);
|
|
2615
|
+
let contents = {};
|
|
2616
|
+
contents = _json(data);
|
|
2617
|
+
const response = {
|
|
2618
|
+
$metadata: deserializeMetadata(output),
|
|
2619
|
+
...contents,
|
|
2620
|
+
};
|
|
2621
|
+
return response;
|
|
2622
|
+
};
|
|
2623
|
+
const de_UpdateCapacityReservationCommandError = async (output, context) => {
|
|
2624
|
+
const parsedOutput = {
|
|
2625
|
+
...output,
|
|
2626
|
+
body: await parseErrorBody(output.body, context),
|
|
2627
|
+
};
|
|
2628
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2629
|
+
switch (errorCode) {
|
|
2630
|
+
case "InternalServerException":
|
|
2631
|
+
case "com.amazonaws.athena#InternalServerException":
|
|
2632
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
2633
|
+
case "InvalidRequestException":
|
|
2634
|
+
case "com.amazonaws.athena#InvalidRequestException":
|
|
2635
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
2636
|
+
default:
|
|
2637
|
+
const parsedBody = parsedOutput.body;
|
|
2638
|
+
return throwDefaultError({
|
|
2639
|
+
output,
|
|
2640
|
+
parsedBody,
|
|
2641
|
+
errorCode,
|
|
2642
|
+
});
|
|
2643
|
+
}
|
|
2644
|
+
};
|
|
2358
2645
|
export const de_UpdateDataCatalogCommand = async (output, context) => {
|
|
2359
2646
|
if (output.statusCode >= 300) {
|
|
2360
2647
|
return de_UpdateDataCatalogCommandError(output, context);
|
|
@@ -2694,6 +2981,33 @@ const de_CalculationSummary = (output, context) => {
|
|
|
2694
2981
|
Status: (_) => de_CalculationStatus(_, context),
|
|
2695
2982
|
});
|
|
2696
2983
|
};
|
|
2984
|
+
const de_CapacityAllocation = (output, context) => {
|
|
2985
|
+
return take(output, {
|
|
2986
|
+
RequestCompletionTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
2987
|
+
RequestTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
2988
|
+
Status: __expectString,
|
|
2989
|
+
StatusMessage: __expectString,
|
|
2990
|
+
});
|
|
2991
|
+
};
|
|
2992
|
+
const de_CapacityReservation = (output, context) => {
|
|
2993
|
+
return take(output, {
|
|
2994
|
+
AllocatedDpus: __expectInt32,
|
|
2995
|
+
CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
2996
|
+
LastAllocation: (_) => de_CapacityAllocation(_, context),
|
|
2997
|
+
LastSuccessfulAllocationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
2998
|
+
Name: __expectString,
|
|
2999
|
+
Status: __expectString,
|
|
3000
|
+
TargetDpus: __expectInt32,
|
|
3001
|
+
});
|
|
3002
|
+
};
|
|
3003
|
+
const de_CapacityReservationsList = (output, context) => {
|
|
3004
|
+
const retVal = (output || [])
|
|
3005
|
+
.filter((e) => e != null)
|
|
3006
|
+
.map((entry) => {
|
|
3007
|
+
return de_CapacityReservation(entry, context);
|
|
3008
|
+
});
|
|
3009
|
+
return retVal;
|
|
3010
|
+
};
|
|
2697
3011
|
const de_ExportNotebookOutput = (output, context) => {
|
|
2698
3012
|
return take(output, {
|
|
2699
3013
|
NotebookMetadata: (_) => de_NotebookMetadata(_, context),
|
|
@@ -2717,6 +3031,11 @@ const de_GetCalculationExecutionStatusResponse = (output, context) => {
|
|
|
2717
3031
|
Status: (_) => de_CalculationStatus(_, context),
|
|
2718
3032
|
});
|
|
2719
3033
|
};
|
|
3034
|
+
const de_GetCapacityReservationOutput = (output, context) => {
|
|
3035
|
+
return take(output, {
|
|
3036
|
+
CapacityReservation: (_) => de_CapacityReservation(_, context),
|
|
3037
|
+
});
|
|
3038
|
+
};
|
|
2720
3039
|
const de_GetNotebookMetadataOutput = (output, context) => {
|
|
2721
3040
|
return take(output, {
|
|
2722
3041
|
NotebookMetadata: (_) => de_NotebookMetadata(_, context),
|
|
@@ -2772,6 +3091,12 @@ const de_ListCalculationExecutionsResponse = (output, context) => {
|
|
|
2772
3091
|
NextToken: __expectString,
|
|
2773
3092
|
});
|
|
2774
3093
|
};
|
|
3094
|
+
const de_ListCapacityReservationsOutput = (output, context) => {
|
|
3095
|
+
return take(output, {
|
|
3096
|
+
CapacityReservations: (_) => de_CapacityReservationsList(_, context),
|
|
3097
|
+
NextToken: __expectString,
|
|
3098
|
+
});
|
|
3099
|
+
};
|
|
2775
3100
|
const de_ListNotebookMetadataOutput = (output, context) => {
|
|
2776
3101
|
return take(output, {
|
|
2777
3102
|
NextToken: __expectString,
|