@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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.de_UpdateWorkGroupCommand = exports.de_UpdatePreparedStatementCommand = exports.de_UpdateNotebookMetadataCommand = exports.de_UpdateNotebookCommand = exports.de_UpdateNamedQueryCommand = exports.de_UpdateDataCatalogCommand = exports.de_UntagResourceCommand = exports.de_TerminateSessionCommand = exports.de_TagResourceCommand = exports.de_StopQueryExecutionCommand = exports.de_StopCalculationExecutionCommand = exports.de_StartSessionCommand = exports.de_StartQueryExecutionCommand = exports.de_StartCalculationExecutionCommand = exports.de_ListWorkGroupsCommand = exports.de_ListTagsForResourceCommand = exports.de_ListTableMetadataCommand = exports.de_ListSessionsCommand = exports.de_ListQueryExecutionsCommand = exports.de_ListPreparedStatementsCommand = void 0;
|
|
3
|
+
exports.se_ListTagsForResourceCommand = exports.se_ListTableMetadataCommand = exports.se_ListSessionsCommand = exports.se_ListQueryExecutionsCommand = exports.se_ListPreparedStatementsCommand = exports.se_ListNotebookSessionsCommand = exports.se_ListNotebookMetadataCommand = exports.se_ListNamedQueriesCommand = exports.se_ListExecutorsCommand = exports.se_ListEngineVersionsCommand = exports.se_ListDataCatalogsCommand = exports.se_ListDatabasesCommand = exports.se_ListCapacityReservationsCommand = exports.se_ListCalculationExecutionsCommand = exports.se_ListApplicationDPUSizesCommand = exports.se_ImportNotebookCommand = exports.se_GetWorkGroupCommand = exports.se_GetTableMetadataCommand = exports.se_GetSessionStatusCommand = exports.se_GetSessionCommand = exports.se_GetQueryRuntimeStatisticsCommand = exports.se_GetQueryResultsCommand = exports.se_GetQueryExecutionCommand = exports.se_GetPreparedStatementCommand = exports.se_GetNotebookMetadataCommand = exports.se_GetNamedQueryCommand = exports.se_GetDataCatalogCommand = exports.se_GetDatabaseCommand = exports.se_GetCapacityReservationCommand = exports.se_GetCapacityAssignmentConfigurationCommand = exports.se_GetCalculationExecutionStatusCommand = exports.se_GetCalculationExecutionCodeCommand = exports.se_GetCalculationExecutionCommand = exports.se_ExportNotebookCommand = exports.se_DeleteWorkGroupCommand = exports.se_DeletePreparedStatementCommand = exports.se_DeleteNotebookCommand = exports.se_DeleteNamedQueryCommand = exports.se_DeleteDataCatalogCommand = exports.se_CreateWorkGroupCommand = exports.se_CreatePresignedNotebookUrlCommand = exports.se_CreatePreparedStatementCommand = exports.se_CreateNotebookCommand = exports.se_CreateNamedQueryCommand = exports.se_CreateDataCatalogCommand = exports.se_CreateCapacityReservationCommand = exports.se_CancelCapacityReservationCommand = exports.se_BatchGetQueryExecutionCommand = exports.se_BatchGetPreparedStatementCommand = exports.se_BatchGetNamedQueryCommand = void 0;
|
|
4
|
+
exports.de_GetTableMetadataCommand = exports.de_GetSessionStatusCommand = exports.de_GetSessionCommand = exports.de_GetQueryRuntimeStatisticsCommand = exports.de_GetQueryResultsCommand = exports.de_GetQueryExecutionCommand = exports.de_GetPreparedStatementCommand = exports.de_GetNotebookMetadataCommand = exports.de_GetNamedQueryCommand = exports.de_GetDataCatalogCommand = exports.de_GetDatabaseCommand = exports.de_GetCapacityReservationCommand = exports.de_GetCapacityAssignmentConfigurationCommand = exports.de_GetCalculationExecutionStatusCommand = exports.de_GetCalculationExecutionCodeCommand = exports.de_GetCalculationExecutionCommand = exports.de_ExportNotebookCommand = exports.de_DeleteWorkGroupCommand = exports.de_DeletePreparedStatementCommand = exports.de_DeleteNotebookCommand = exports.de_DeleteNamedQueryCommand = exports.de_DeleteDataCatalogCommand = exports.de_CreateWorkGroupCommand = exports.de_CreatePresignedNotebookUrlCommand = exports.de_CreatePreparedStatementCommand = exports.de_CreateNotebookCommand = exports.de_CreateNamedQueryCommand = exports.de_CreateDataCatalogCommand = exports.de_CreateCapacityReservationCommand = exports.de_CancelCapacityReservationCommand = exports.de_BatchGetQueryExecutionCommand = exports.de_BatchGetPreparedStatementCommand = exports.de_BatchGetNamedQueryCommand = exports.se_UpdateWorkGroupCommand = exports.se_UpdatePreparedStatementCommand = exports.se_UpdateNotebookMetadataCommand = exports.se_UpdateNotebookCommand = exports.se_UpdateNamedQueryCommand = exports.se_UpdateDataCatalogCommand = exports.se_UpdateCapacityReservationCommand = exports.se_UntagResourceCommand = exports.se_TerminateSessionCommand = exports.se_TagResourceCommand = exports.se_StopQueryExecutionCommand = exports.se_StopCalculationExecutionCommand = exports.se_StartSessionCommand = exports.se_StartQueryExecutionCommand = exports.se_StartCalculationExecutionCommand = exports.se_PutCapacityAssignmentConfigurationCommand = exports.se_ListWorkGroupsCommand = void 0;
|
|
5
|
+
exports.de_UpdateWorkGroupCommand = exports.de_UpdatePreparedStatementCommand = exports.de_UpdateNotebookMetadataCommand = exports.de_UpdateNotebookCommand = exports.de_UpdateNamedQueryCommand = exports.de_UpdateDataCatalogCommand = exports.de_UpdateCapacityReservationCommand = exports.de_UntagResourceCommand = exports.de_TerminateSessionCommand = exports.de_TagResourceCommand = exports.de_StopQueryExecutionCommand = exports.de_StopCalculationExecutionCommand = exports.de_StartSessionCommand = exports.de_StartQueryExecutionCommand = exports.de_StartCalculationExecutionCommand = exports.de_PutCapacityAssignmentConfigurationCommand = exports.de_ListWorkGroupsCommand = exports.de_ListTagsForResourceCommand = exports.de_ListTableMetadataCommand = exports.de_ListSessionsCommand = exports.de_ListQueryExecutionsCommand = exports.de_ListPreparedStatementsCommand = exports.de_ListNotebookSessionsCommand = exports.de_ListNotebookMetadataCommand = exports.de_ListNamedQueriesCommand = exports.de_ListExecutorsCommand = exports.de_ListEngineVersionsCommand = exports.de_ListDataCatalogsCommand = exports.de_ListDatabasesCommand = exports.de_ListCapacityReservationsCommand = exports.de_ListCalculationExecutionsCommand = exports.de_ListApplicationDPUSizesCommand = exports.de_ImportNotebookCommand = exports.de_GetWorkGroupCommand = void 0;
|
|
6
6
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
7
7
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
8
8
|
const uuid_1 = require("uuid");
|
|
@@ -29,6 +29,20 @@ const se_BatchGetQueryExecutionCommand = async (input, context) => {
|
|
|
29
29
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
30
30
|
};
|
|
31
31
|
exports.se_BatchGetQueryExecutionCommand = se_BatchGetQueryExecutionCommand;
|
|
32
|
+
const se_CancelCapacityReservationCommand = async (input, context) => {
|
|
33
|
+
const headers = sharedHeaders("CancelCapacityReservation");
|
|
34
|
+
let body;
|
|
35
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
36
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
37
|
+
};
|
|
38
|
+
exports.se_CancelCapacityReservationCommand = se_CancelCapacityReservationCommand;
|
|
39
|
+
const se_CreateCapacityReservationCommand = async (input, context) => {
|
|
40
|
+
const headers = sharedHeaders("CreateCapacityReservation");
|
|
41
|
+
let body;
|
|
42
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
43
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
44
|
+
};
|
|
45
|
+
exports.se_CreateCapacityReservationCommand = se_CreateCapacityReservationCommand;
|
|
32
46
|
const se_CreateDataCatalogCommand = async (input, context) => {
|
|
33
47
|
const headers = sharedHeaders("CreateDataCatalog");
|
|
34
48
|
let body;
|
|
@@ -134,6 +148,20 @@ const se_GetCalculationExecutionStatusCommand = async (input, context) => {
|
|
|
134
148
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
135
149
|
};
|
|
136
150
|
exports.se_GetCalculationExecutionStatusCommand = se_GetCalculationExecutionStatusCommand;
|
|
151
|
+
const se_GetCapacityAssignmentConfigurationCommand = async (input, context) => {
|
|
152
|
+
const headers = sharedHeaders("GetCapacityAssignmentConfiguration");
|
|
153
|
+
let body;
|
|
154
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
155
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
156
|
+
};
|
|
157
|
+
exports.se_GetCapacityAssignmentConfigurationCommand = se_GetCapacityAssignmentConfigurationCommand;
|
|
158
|
+
const se_GetCapacityReservationCommand = async (input, context) => {
|
|
159
|
+
const headers = sharedHeaders("GetCapacityReservation");
|
|
160
|
+
let body;
|
|
161
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
162
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
163
|
+
};
|
|
164
|
+
exports.se_GetCapacityReservationCommand = se_GetCapacityReservationCommand;
|
|
137
165
|
const se_GetDatabaseCommand = async (input, context) => {
|
|
138
166
|
const headers = sharedHeaders("GetDatabase");
|
|
139
167
|
let body;
|
|
@@ -239,6 +267,13 @@ const se_ListCalculationExecutionsCommand = async (input, context) => {
|
|
|
239
267
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
240
268
|
};
|
|
241
269
|
exports.se_ListCalculationExecutionsCommand = se_ListCalculationExecutionsCommand;
|
|
270
|
+
const se_ListCapacityReservationsCommand = async (input, context) => {
|
|
271
|
+
const headers = sharedHeaders("ListCapacityReservations");
|
|
272
|
+
let body;
|
|
273
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
274
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
275
|
+
};
|
|
276
|
+
exports.se_ListCapacityReservationsCommand = se_ListCapacityReservationsCommand;
|
|
242
277
|
const se_ListDatabasesCommand = async (input, context) => {
|
|
243
278
|
const headers = sharedHeaders("ListDatabases");
|
|
244
279
|
let body;
|
|
@@ -330,6 +365,13 @@ const se_ListWorkGroupsCommand = async (input, context) => {
|
|
|
330
365
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
331
366
|
};
|
|
332
367
|
exports.se_ListWorkGroupsCommand = se_ListWorkGroupsCommand;
|
|
368
|
+
const se_PutCapacityAssignmentConfigurationCommand = async (input, context) => {
|
|
369
|
+
const headers = sharedHeaders("PutCapacityAssignmentConfiguration");
|
|
370
|
+
let body;
|
|
371
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
372
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
373
|
+
};
|
|
374
|
+
exports.se_PutCapacityAssignmentConfigurationCommand = se_PutCapacityAssignmentConfigurationCommand;
|
|
333
375
|
const se_StartCalculationExecutionCommand = async (input, context) => {
|
|
334
376
|
const headers = sharedHeaders("StartCalculationExecution");
|
|
335
377
|
let body;
|
|
@@ -386,6 +428,13 @@ const se_UntagResourceCommand = async (input, context) => {
|
|
|
386
428
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
387
429
|
};
|
|
388
430
|
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
431
|
+
const se_UpdateCapacityReservationCommand = async (input, context) => {
|
|
432
|
+
const headers = sharedHeaders("UpdateCapacityReservation");
|
|
433
|
+
let body;
|
|
434
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
435
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
436
|
+
};
|
|
437
|
+
exports.se_UpdateCapacityReservationCommand = se_UpdateCapacityReservationCommand;
|
|
389
438
|
const se_UpdateDataCatalogCommand = async (input, context) => {
|
|
390
439
|
const headers = sharedHeaders("UpdateDataCatalog");
|
|
391
440
|
let body;
|
|
@@ -536,6 +585,78 @@ const de_BatchGetQueryExecutionCommandError = async (output, context) => {
|
|
|
536
585
|
});
|
|
537
586
|
}
|
|
538
587
|
};
|
|
588
|
+
const de_CancelCapacityReservationCommand = async (output, context) => {
|
|
589
|
+
if (output.statusCode >= 300) {
|
|
590
|
+
return de_CancelCapacityReservationCommandError(output, context);
|
|
591
|
+
}
|
|
592
|
+
const data = await parseBody(output.body, context);
|
|
593
|
+
let contents = {};
|
|
594
|
+
contents = (0, smithy_client_1._json)(data);
|
|
595
|
+
const response = {
|
|
596
|
+
$metadata: deserializeMetadata(output),
|
|
597
|
+
...contents,
|
|
598
|
+
};
|
|
599
|
+
return response;
|
|
600
|
+
};
|
|
601
|
+
exports.de_CancelCapacityReservationCommand = de_CancelCapacityReservationCommand;
|
|
602
|
+
const de_CancelCapacityReservationCommandError = async (output, context) => {
|
|
603
|
+
const parsedOutput = {
|
|
604
|
+
...output,
|
|
605
|
+
body: await parseErrorBody(output.body, context),
|
|
606
|
+
};
|
|
607
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
608
|
+
switch (errorCode) {
|
|
609
|
+
case "InternalServerException":
|
|
610
|
+
case "com.amazonaws.athena#InternalServerException":
|
|
611
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
612
|
+
case "InvalidRequestException":
|
|
613
|
+
case "com.amazonaws.athena#InvalidRequestException":
|
|
614
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
615
|
+
default:
|
|
616
|
+
const parsedBody = parsedOutput.body;
|
|
617
|
+
return throwDefaultError({
|
|
618
|
+
output,
|
|
619
|
+
parsedBody,
|
|
620
|
+
errorCode,
|
|
621
|
+
});
|
|
622
|
+
}
|
|
623
|
+
};
|
|
624
|
+
const de_CreateCapacityReservationCommand = async (output, context) => {
|
|
625
|
+
if (output.statusCode >= 300) {
|
|
626
|
+
return de_CreateCapacityReservationCommandError(output, context);
|
|
627
|
+
}
|
|
628
|
+
const data = await parseBody(output.body, context);
|
|
629
|
+
let contents = {};
|
|
630
|
+
contents = (0, smithy_client_1._json)(data);
|
|
631
|
+
const response = {
|
|
632
|
+
$metadata: deserializeMetadata(output),
|
|
633
|
+
...contents,
|
|
634
|
+
};
|
|
635
|
+
return response;
|
|
636
|
+
};
|
|
637
|
+
exports.de_CreateCapacityReservationCommand = de_CreateCapacityReservationCommand;
|
|
638
|
+
const de_CreateCapacityReservationCommandError = async (output, context) => {
|
|
639
|
+
const parsedOutput = {
|
|
640
|
+
...output,
|
|
641
|
+
body: await parseErrorBody(output.body, context),
|
|
642
|
+
};
|
|
643
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
644
|
+
switch (errorCode) {
|
|
645
|
+
case "InternalServerException":
|
|
646
|
+
case "com.amazonaws.athena#InternalServerException":
|
|
647
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
648
|
+
case "InvalidRequestException":
|
|
649
|
+
case "com.amazonaws.athena#InvalidRequestException":
|
|
650
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
651
|
+
default:
|
|
652
|
+
const parsedBody = parsedOutput.body;
|
|
653
|
+
return throwDefaultError({
|
|
654
|
+
output,
|
|
655
|
+
parsedBody,
|
|
656
|
+
errorCode,
|
|
657
|
+
});
|
|
658
|
+
}
|
|
659
|
+
};
|
|
539
660
|
const de_CreateDataCatalogCommand = async (output, context) => {
|
|
540
661
|
if (output.statusCode >= 300) {
|
|
541
662
|
return de_CreateDataCatalogCommandError(output, context);
|
|
@@ -1100,6 +1221,78 @@ const de_GetCalculationExecutionStatusCommandError = async (output, context) =>
|
|
|
1100
1221
|
});
|
|
1101
1222
|
}
|
|
1102
1223
|
};
|
|
1224
|
+
const de_GetCapacityAssignmentConfigurationCommand = async (output, context) => {
|
|
1225
|
+
if (output.statusCode >= 300) {
|
|
1226
|
+
return de_GetCapacityAssignmentConfigurationCommandError(output, context);
|
|
1227
|
+
}
|
|
1228
|
+
const data = await parseBody(output.body, context);
|
|
1229
|
+
let contents = {};
|
|
1230
|
+
contents = (0, smithy_client_1._json)(data);
|
|
1231
|
+
const response = {
|
|
1232
|
+
$metadata: deserializeMetadata(output),
|
|
1233
|
+
...contents,
|
|
1234
|
+
};
|
|
1235
|
+
return response;
|
|
1236
|
+
};
|
|
1237
|
+
exports.de_GetCapacityAssignmentConfigurationCommand = de_GetCapacityAssignmentConfigurationCommand;
|
|
1238
|
+
const de_GetCapacityAssignmentConfigurationCommandError = async (output, context) => {
|
|
1239
|
+
const parsedOutput = {
|
|
1240
|
+
...output,
|
|
1241
|
+
body: await parseErrorBody(output.body, context),
|
|
1242
|
+
};
|
|
1243
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1244
|
+
switch (errorCode) {
|
|
1245
|
+
case "InternalServerException":
|
|
1246
|
+
case "com.amazonaws.athena#InternalServerException":
|
|
1247
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1248
|
+
case "InvalidRequestException":
|
|
1249
|
+
case "com.amazonaws.athena#InvalidRequestException":
|
|
1250
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
1251
|
+
default:
|
|
1252
|
+
const parsedBody = parsedOutput.body;
|
|
1253
|
+
return throwDefaultError({
|
|
1254
|
+
output,
|
|
1255
|
+
parsedBody,
|
|
1256
|
+
errorCode,
|
|
1257
|
+
});
|
|
1258
|
+
}
|
|
1259
|
+
};
|
|
1260
|
+
const de_GetCapacityReservationCommand = async (output, context) => {
|
|
1261
|
+
if (output.statusCode >= 300) {
|
|
1262
|
+
return de_GetCapacityReservationCommandError(output, context);
|
|
1263
|
+
}
|
|
1264
|
+
const data = await parseBody(output.body, context);
|
|
1265
|
+
let contents = {};
|
|
1266
|
+
contents = de_GetCapacityReservationOutput(data, context);
|
|
1267
|
+
const response = {
|
|
1268
|
+
$metadata: deserializeMetadata(output),
|
|
1269
|
+
...contents,
|
|
1270
|
+
};
|
|
1271
|
+
return response;
|
|
1272
|
+
};
|
|
1273
|
+
exports.de_GetCapacityReservationCommand = de_GetCapacityReservationCommand;
|
|
1274
|
+
const de_GetCapacityReservationCommandError = async (output, context) => {
|
|
1275
|
+
const parsedOutput = {
|
|
1276
|
+
...output,
|
|
1277
|
+
body: await parseErrorBody(output.body, context),
|
|
1278
|
+
};
|
|
1279
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1280
|
+
switch (errorCode) {
|
|
1281
|
+
case "InternalServerException":
|
|
1282
|
+
case "com.amazonaws.athena#InternalServerException":
|
|
1283
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1284
|
+
case "InvalidRequestException":
|
|
1285
|
+
case "com.amazonaws.athena#InvalidRequestException":
|
|
1286
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
1287
|
+
default:
|
|
1288
|
+
const parsedBody = parsedOutput.body;
|
|
1289
|
+
return throwDefaultError({
|
|
1290
|
+
output,
|
|
1291
|
+
parsedBody,
|
|
1292
|
+
errorCode,
|
|
1293
|
+
});
|
|
1294
|
+
}
|
|
1295
|
+
};
|
|
1103
1296
|
const de_GetDatabaseCommand = async (output, context) => {
|
|
1104
1297
|
if (output.statusCode >= 300) {
|
|
1105
1298
|
return de_GetDatabaseCommandError(output, context);
|
|
@@ -1670,6 +1863,42 @@ const de_ListCalculationExecutionsCommandError = async (output, context) => {
|
|
|
1670
1863
|
});
|
|
1671
1864
|
}
|
|
1672
1865
|
};
|
|
1866
|
+
const de_ListCapacityReservationsCommand = async (output, context) => {
|
|
1867
|
+
if (output.statusCode >= 300) {
|
|
1868
|
+
return de_ListCapacityReservationsCommandError(output, context);
|
|
1869
|
+
}
|
|
1870
|
+
const data = await parseBody(output.body, context);
|
|
1871
|
+
let contents = {};
|
|
1872
|
+
contents = de_ListCapacityReservationsOutput(data, context);
|
|
1873
|
+
const response = {
|
|
1874
|
+
$metadata: deserializeMetadata(output),
|
|
1875
|
+
...contents,
|
|
1876
|
+
};
|
|
1877
|
+
return response;
|
|
1878
|
+
};
|
|
1879
|
+
exports.de_ListCapacityReservationsCommand = de_ListCapacityReservationsCommand;
|
|
1880
|
+
const de_ListCapacityReservationsCommandError = async (output, context) => {
|
|
1881
|
+
const parsedOutput = {
|
|
1882
|
+
...output,
|
|
1883
|
+
body: await parseErrorBody(output.body, context),
|
|
1884
|
+
};
|
|
1885
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1886
|
+
switch (errorCode) {
|
|
1887
|
+
case "InternalServerException":
|
|
1888
|
+
case "com.amazonaws.athena#InternalServerException":
|
|
1889
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1890
|
+
case "InvalidRequestException":
|
|
1891
|
+
case "com.amazonaws.athena#InvalidRequestException":
|
|
1892
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
1893
|
+
default:
|
|
1894
|
+
const parsedBody = parsedOutput.body;
|
|
1895
|
+
return throwDefaultError({
|
|
1896
|
+
output,
|
|
1897
|
+
parsedBody,
|
|
1898
|
+
errorCode,
|
|
1899
|
+
});
|
|
1900
|
+
}
|
|
1901
|
+
};
|
|
1673
1902
|
const de_ListDatabasesCommand = async (output, context) => {
|
|
1674
1903
|
if (output.statusCode >= 300) {
|
|
1675
1904
|
return de_ListDatabasesCommandError(output, context);
|
|
@@ -2159,6 +2388,42 @@ const de_ListWorkGroupsCommandError = async (output, context) => {
|
|
|
2159
2388
|
});
|
|
2160
2389
|
}
|
|
2161
2390
|
};
|
|
2391
|
+
const de_PutCapacityAssignmentConfigurationCommand = async (output, context) => {
|
|
2392
|
+
if (output.statusCode >= 300) {
|
|
2393
|
+
return de_PutCapacityAssignmentConfigurationCommandError(output, context);
|
|
2394
|
+
}
|
|
2395
|
+
const data = await parseBody(output.body, context);
|
|
2396
|
+
let contents = {};
|
|
2397
|
+
contents = (0, smithy_client_1._json)(data);
|
|
2398
|
+
const response = {
|
|
2399
|
+
$metadata: deserializeMetadata(output),
|
|
2400
|
+
...contents,
|
|
2401
|
+
};
|
|
2402
|
+
return response;
|
|
2403
|
+
};
|
|
2404
|
+
exports.de_PutCapacityAssignmentConfigurationCommand = de_PutCapacityAssignmentConfigurationCommand;
|
|
2405
|
+
const de_PutCapacityAssignmentConfigurationCommandError = async (output, context) => {
|
|
2406
|
+
const parsedOutput = {
|
|
2407
|
+
...output,
|
|
2408
|
+
body: await parseErrorBody(output.body, context),
|
|
2409
|
+
};
|
|
2410
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2411
|
+
switch (errorCode) {
|
|
2412
|
+
case "InternalServerException":
|
|
2413
|
+
case "com.amazonaws.athena#InternalServerException":
|
|
2414
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
2415
|
+
case "InvalidRequestException":
|
|
2416
|
+
case "com.amazonaws.athena#InvalidRequestException":
|
|
2417
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
2418
|
+
default:
|
|
2419
|
+
const parsedBody = parsedOutput.body;
|
|
2420
|
+
return throwDefaultError({
|
|
2421
|
+
output,
|
|
2422
|
+
parsedBody,
|
|
2423
|
+
errorCode,
|
|
2424
|
+
});
|
|
2425
|
+
}
|
|
2426
|
+
};
|
|
2162
2427
|
const de_StartCalculationExecutionCommand = async (output, context) => {
|
|
2163
2428
|
if (output.statusCode >= 300) {
|
|
2164
2429
|
return de_StartCalculationExecutionCommandError(output, context);
|
|
@@ -2474,6 +2739,42 @@ const de_UntagResourceCommandError = async (output, context) => {
|
|
|
2474
2739
|
});
|
|
2475
2740
|
}
|
|
2476
2741
|
};
|
|
2742
|
+
const de_UpdateCapacityReservationCommand = async (output, context) => {
|
|
2743
|
+
if (output.statusCode >= 300) {
|
|
2744
|
+
return de_UpdateCapacityReservationCommandError(output, context);
|
|
2745
|
+
}
|
|
2746
|
+
const data = await parseBody(output.body, context);
|
|
2747
|
+
let contents = {};
|
|
2748
|
+
contents = (0, smithy_client_1._json)(data);
|
|
2749
|
+
const response = {
|
|
2750
|
+
$metadata: deserializeMetadata(output),
|
|
2751
|
+
...contents,
|
|
2752
|
+
};
|
|
2753
|
+
return response;
|
|
2754
|
+
};
|
|
2755
|
+
exports.de_UpdateCapacityReservationCommand = de_UpdateCapacityReservationCommand;
|
|
2756
|
+
const de_UpdateCapacityReservationCommandError = async (output, context) => {
|
|
2757
|
+
const parsedOutput = {
|
|
2758
|
+
...output,
|
|
2759
|
+
body: await parseErrorBody(output.body, context),
|
|
2760
|
+
};
|
|
2761
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2762
|
+
switch (errorCode) {
|
|
2763
|
+
case "InternalServerException":
|
|
2764
|
+
case "com.amazonaws.athena#InternalServerException":
|
|
2765
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
2766
|
+
case "InvalidRequestException":
|
|
2767
|
+
case "com.amazonaws.athena#InvalidRequestException":
|
|
2768
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
2769
|
+
default:
|
|
2770
|
+
const parsedBody = parsedOutput.body;
|
|
2771
|
+
return throwDefaultError({
|
|
2772
|
+
output,
|
|
2773
|
+
parsedBody,
|
|
2774
|
+
errorCode,
|
|
2775
|
+
});
|
|
2776
|
+
}
|
|
2777
|
+
};
|
|
2477
2778
|
const de_UpdateDataCatalogCommand = async (output, context) => {
|
|
2478
2779
|
if (output.statusCode >= 300) {
|
|
2479
2780
|
return de_UpdateDataCatalogCommandError(output, context);
|
|
@@ -2819,6 +3120,33 @@ const de_CalculationSummary = (output, context) => {
|
|
|
2819
3120
|
Status: (_) => de_CalculationStatus(_, context),
|
|
2820
3121
|
});
|
|
2821
3122
|
};
|
|
3123
|
+
const de_CapacityAllocation = (output, context) => {
|
|
3124
|
+
return (0, smithy_client_1.take)(output, {
|
|
3125
|
+
RequestCompletionTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
3126
|
+
RequestTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
3127
|
+
Status: smithy_client_1.expectString,
|
|
3128
|
+
StatusMessage: smithy_client_1.expectString,
|
|
3129
|
+
});
|
|
3130
|
+
};
|
|
3131
|
+
const de_CapacityReservation = (output, context) => {
|
|
3132
|
+
return (0, smithy_client_1.take)(output, {
|
|
3133
|
+
AllocatedDpus: smithy_client_1.expectInt32,
|
|
3134
|
+
CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
3135
|
+
LastAllocation: (_) => de_CapacityAllocation(_, context),
|
|
3136
|
+
LastSuccessfulAllocationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
3137
|
+
Name: smithy_client_1.expectString,
|
|
3138
|
+
Status: smithy_client_1.expectString,
|
|
3139
|
+
TargetDpus: smithy_client_1.expectInt32,
|
|
3140
|
+
});
|
|
3141
|
+
};
|
|
3142
|
+
const de_CapacityReservationsList = (output, context) => {
|
|
3143
|
+
const retVal = (output || [])
|
|
3144
|
+
.filter((e) => e != null)
|
|
3145
|
+
.map((entry) => {
|
|
3146
|
+
return de_CapacityReservation(entry, context);
|
|
3147
|
+
});
|
|
3148
|
+
return retVal;
|
|
3149
|
+
};
|
|
2822
3150
|
const de_ExportNotebookOutput = (output, context) => {
|
|
2823
3151
|
return (0, smithy_client_1.take)(output, {
|
|
2824
3152
|
NotebookMetadata: (_) => de_NotebookMetadata(_, context),
|
|
@@ -2842,6 +3170,11 @@ const de_GetCalculationExecutionStatusResponse = (output, context) => {
|
|
|
2842
3170
|
Status: (_) => de_CalculationStatus(_, context),
|
|
2843
3171
|
});
|
|
2844
3172
|
};
|
|
3173
|
+
const de_GetCapacityReservationOutput = (output, context) => {
|
|
3174
|
+
return (0, smithy_client_1.take)(output, {
|
|
3175
|
+
CapacityReservation: (_) => de_CapacityReservation(_, context),
|
|
3176
|
+
});
|
|
3177
|
+
};
|
|
2845
3178
|
const de_GetNotebookMetadataOutput = (output, context) => {
|
|
2846
3179
|
return (0, smithy_client_1.take)(output, {
|
|
2847
3180
|
NotebookMetadata: (_) => de_NotebookMetadata(_, context),
|
|
@@ -2897,6 +3230,12 @@ const de_ListCalculationExecutionsResponse = (output, context) => {
|
|
|
2897
3230
|
NextToken: smithy_client_1.expectString,
|
|
2898
3231
|
});
|
|
2899
3232
|
};
|
|
3233
|
+
const de_ListCapacityReservationsOutput = (output, context) => {
|
|
3234
|
+
return (0, smithy_client_1.take)(output, {
|
|
3235
|
+
CapacityReservations: (_) => de_CapacityReservationsList(_, context),
|
|
3236
|
+
NextToken: smithy_client_1.expectString,
|
|
3237
|
+
});
|
|
3238
|
+
};
|
|
2900
3239
|
const de_ListNotebookMetadataOutput = (output, context) => {
|
|
2901
3240
|
return (0, smithy_client_1.take)(output, {
|
|
2902
3241
|
NextToken: smithy_client_1.expectString,
|
package/dist-es/Athena.js
CHANGED
|
@@ -3,6 +3,8 @@ import { AthenaClient } from "./AthenaClient";
|
|
|
3
3
|
import { BatchGetNamedQueryCommand, } from "./commands/BatchGetNamedQueryCommand";
|
|
4
4
|
import { BatchGetPreparedStatementCommand, } from "./commands/BatchGetPreparedStatementCommand";
|
|
5
5
|
import { BatchGetQueryExecutionCommand, } from "./commands/BatchGetQueryExecutionCommand";
|
|
6
|
+
import { CancelCapacityReservationCommand, } from "./commands/CancelCapacityReservationCommand";
|
|
7
|
+
import { CreateCapacityReservationCommand, } from "./commands/CreateCapacityReservationCommand";
|
|
6
8
|
import { CreateDataCatalogCommand, } from "./commands/CreateDataCatalogCommand";
|
|
7
9
|
import { CreateNamedQueryCommand, } from "./commands/CreateNamedQueryCommand";
|
|
8
10
|
import { CreateNotebookCommand, } from "./commands/CreateNotebookCommand";
|
|
@@ -18,6 +20,8 @@ import { ExportNotebookCommand, } from "./commands/ExportNotebookCommand";
|
|
|
18
20
|
import { GetCalculationExecutionCodeCommand, } from "./commands/GetCalculationExecutionCodeCommand";
|
|
19
21
|
import { GetCalculationExecutionCommand, } from "./commands/GetCalculationExecutionCommand";
|
|
20
22
|
import { GetCalculationExecutionStatusCommand, } from "./commands/GetCalculationExecutionStatusCommand";
|
|
23
|
+
import { GetCapacityAssignmentConfigurationCommand, } from "./commands/GetCapacityAssignmentConfigurationCommand";
|
|
24
|
+
import { GetCapacityReservationCommand, } from "./commands/GetCapacityReservationCommand";
|
|
21
25
|
import { GetDatabaseCommand } from "./commands/GetDatabaseCommand";
|
|
22
26
|
import { GetDataCatalogCommand, } from "./commands/GetDataCatalogCommand";
|
|
23
27
|
import { GetNamedQueryCommand, } from "./commands/GetNamedQueryCommand";
|
|
@@ -33,6 +37,7 @@ import { GetWorkGroupCommand, } from "./commands/GetWorkGroupCommand";
|
|
|
33
37
|
import { ImportNotebookCommand, } from "./commands/ImportNotebookCommand";
|
|
34
38
|
import { ListApplicationDPUSizesCommand, } from "./commands/ListApplicationDPUSizesCommand";
|
|
35
39
|
import { ListCalculationExecutionsCommand, } from "./commands/ListCalculationExecutionsCommand";
|
|
40
|
+
import { ListCapacityReservationsCommand, } from "./commands/ListCapacityReservationsCommand";
|
|
36
41
|
import { ListDatabasesCommand, } from "./commands/ListDatabasesCommand";
|
|
37
42
|
import { ListDataCatalogsCommand, } from "./commands/ListDataCatalogsCommand";
|
|
38
43
|
import { ListEngineVersionsCommand, } from "./commands/ListEngineVersionsCommand";
|
|
@@ -46,6 +51,7 @@ import { ListSessionsCommand, } from "./commands/ListSessionsCommand";
|
|
|
46
51
|
import { ListTableMetadataCommand, } from "./commands/ListTableMetadataCommand";
|
|
47
52
|
import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
|
|
48
53
|
import { ListWorkGroupsCommand, } from "./commands/ListWorkGroupsCommand";
|
|
54
|
+
import { PutCapacityAssignmentConfigurationCommand, } from "./commands/PutCapacityAssignmentConfigurationCommand";
|
|
49
55
|
import { StartCalculationExecutionCommand, } from "./commands/StartCalculationExecutionCommand";
|
|
50
56
|
import { StartQueryExecutionCommand, } from "./commands/StartQueryExecutionCommand";
|
|
51
57
|
import { StartSessionCommand, } from "./commands/StartSessionCommand";
|
|
@@ -54,6 +60,7 @@ import { StopQueryExecutionCommand, } from "./commands/StopQueryExecutionCommand
|
|
|
54
60
|
import { TagResourceCommand } from "./commands/TagResourceCommand";
|
|
55
61
|
import { TerminateSessionCommand, } from "./commands/TerminateSessionCommand";
|
|
56
62
|
import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
|
|
63
|
+
import { UpdateCapacityReservationCommand, } from "./commands/UpdateCapacityReservationCommand";
|
|
57
64
|
import { UpdateDataCatalogCommand, } from "./commands/UpdateDataCatalogCommand";
|
|
58
65
|
import { UpdateNamedQueryCommand, } from "./commands/UpdateNamedQueryCommand";
|
|
59
66
|
import { UpdateNotebookCommand, } from "./commands/UpdateNotebookCommand";
|
|
@@ -64,6 +71,8 @@ const commands = {
|
|
|
64
71
|
BatchGetNamedQueryCommand,
|
|
65
72
|
BatchGetPreparedStatementCommand,
|
|
66
73
|
BatchGetQueryExecutionCommand,
|
|
74
|
+
CancelCapacityReservationCommand,
|
|
75
|
+
CreateCapacityReservationCommand,
|
|
67
76
|
CreateDataCatalogCommand,
|
|
68
77
|
CreateNamedQueryCommand,
|
|
69
78
|
CreateNotebookCommand,
|
|
@@ -79,6 +88,8 @@ const commands = {
|
|
|
79
88
|
GetCalculationExecutionCommand,
|
|
80
89
|
GetCalculationExecutionCodeCommand,
|
|
81
90
|
GetCalculationExecutionStatusCommand,
|
|
91
|
+
GetCapacityAssignmentConfigurationCommand,
|
|
92
|
+
GetCapacityReservationCommand,
|
|
82
93
|
GetDatabaseCommand,
|
|
83
94
|
GetDataCatalogCommand,
|
|
84
95
|
GetNamedQueryCommand,
|
|
@@ -94,6 +105,7 @@ const commands = {
|
|
|
94
105
|
ImportNotebookCommand,
|
|
95
106
|
ListApplicationDPUSizesCommand,
|
|
96
107
|
ListCalculationExecutionsCommand,
|
|
108
|
+
ListCapacityReservationsCommand,
|
|
97
109
|
ListDatabasesCommand,
|
|
98
110
|
ListDataCatalogsCommand,
|
|
99
111
|
ListEngineVersionsCommand,
|
|
@@ -107,6 +119,7 @@ const commands = {
|
|
|
107
119
|
ListTableMetadataCommand,
|
|
108
120
|
ListTagsForResourceCommand,
|
|
109
121
|
ListWorkGroupsCommand,
|
|
122
|
+
PutCapacityAssignmentConfigurationCommand,
|
|
110
123
|
StartCalculationExecutionCommand,
|
|
111
124
|
StartQueryExecutionCommand,
|
|
112
125
|
StartSessionCommand,
|
|
@@ -115,6 +128,7 @@ const commands = {
|
|
|
115
128
|
TagResourceCommand,
|
|
116
129
|
TerminateSessionCommand,
|
|
117
130
|
UntagResourceCommand,
|
|
131
|
+
UpdateCapacityReservationCommand,
|
|
118
132
|
UpdateDataCatalogCommand,
|
|
119
133
|
UpdateNamedQueryCommand,
|
|
120
134
|
UpdateNotebookCommand,
|
|
@@ -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_CancelCapacityReservationCommand, se_CancelCapacityReservationCommand } from "../protocols/Aws_json1_1";
|
|
5
|
+
export class CancelCapacityReservationCommand 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, CancelCapacityReservationCommand.getEndpointParameterInstructions()));
|
|
21
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
22
|
+
const { logger } = configuration;
|
|
23
|
+
const clientName = "AthenaClient";
|
|
24
|
+
const commandName = "CancelCapacityReservationCommand";
|
|
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_CancelCapacityReservationCommand(input, context);
|
|
37
|
+
}
|
|
38
|
+
deserialize(output, context) {
|
|
39
|
+
return de_CancelCapacityReservationCommand(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_CreateCapacityReservationCommand, se_CreateCapacityReservationCommand } from "../protocols/Aws_json1_1";
|
|
5
|
+
export class CreateCapacityReservationCommand 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, CreateCapacityReservationCommand.getEndpointParameterInstructions()));
|
|
21
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
22
|
+
const { logger } = configuration;
|
|
23
|
+
const clientName = "AthenaClient";
|
|
24
|
+
const commandName = "CreateCapacityReservationCommand";
|
|
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_CreateCapacityReservationCommand(input, context);
|
|
37
|
+
}
|
|
38
|
+
deserialize(output, context) {
|
|
39
|
+
return de_CreateCapacityReservationCommand(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_GetCapacityAssignmentConfigurationCommand, se_GetCapacityAssignmentConfigurationCommand, } from "../protocols/Aws_json1_1";
|
|
5
|
+
export class GetCapacityAssignmentConfigurationCommand 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, GetCapacityAssignmentConfigurationCommand.getEndpointParameterInstructions()));
|
|
21
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
22
|
+
const { logger } = configuration;
|
|
23
|
+
const clientName = "AthenaClient";
|
|
24
|
+
const commandName = "GetCapacityAssignmentConfigurationCommand";
|
|
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_GetCapacityAssignmentConfigurationCommand(input, context);
|
|
37
|
+
}
|
|
38
|
+
deserialize(output, context) {
|
|
39
|
+
return de_GetCapacityAssignmentConfigurationCommand(output, context);
|
|
40
|
+
}
|
|
41
|
+
}
|