@aws-sdk/client-athena 3.310.0 → 3.312.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.
@@ -9,600 +9,420 @@ const uuid_1 = require("uuid");
9
9
  const AthenaServiceException_1 = require("../models/AthenaServiceException");
10
10
  const models_0_1 = require("../models/models_0");
11
11
  const se_BatchGetNamedQueryCommand = async (input, context) => {
12
- const headers = {
13
- "content-type": "application/x-amz-json-1.1",
14
- "x-amz-target": "AmazonAthena.BatchGetNamedQuery",
15
- };
12
+ const headers = sharedHeaders("BatchGetNamedQuery");
16
13
  let body;
17
14
  body = JSON.stringify(se_BatchGetNamedQueryInput(input, context));
18
15
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
19
16
  };
20
17
  exports.se_BatchGetNamedQueryCommand = se_BatchGetNamedQueryCommand;
21
18
  const se_BatchGetPreparedStatementCommand = async (input, context) => {
22
- const headers = {
23
- "content-type": "application/x-amz-json-1.1",
24
- "x-amz-target": "AmazonAthena.BatchGetPreparedStatement",
25
- };
19
+ const headers = sharedHeaders("BatchGetPreparedStatement");
26
20
  let body;
27
21
  body = JSON.stringify(se_BatchGetPreparedStatementInput(input, context));
28
22
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
29
23
  };
30
24
  exports.se_BatchGetPreparedStatementCommand = se_BatchGetPreparedStatementCommand;
31
25
  const se_BatchGetQueryExecutionCommand = async (input, context) => {
32
- const headers = {
33
- "content-type": "application/x-amz-json-1.1",
34
- "x-amz-target": "AmazonAthena.BatchGetQueryExecution",
35
- };
26
+ const headers = sharedHeaders("BatchGetQueryExecution");
36
27
  let body;
37
28
  body = JSON.stringify(se_BatchGetQueryExecutionInput(input, context));
38
29
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
39
30
  };
40
31
  exports.se_BatchGetQueryExecutionCommand = se_BatchGetQueryExecutionCommand;
41
32
  const se_CreateDataCatalogCommand = async (input, context) => {
42
- const headers = {
43
- "content-type": "application/x-amz-json-1.1",
44
- "x-amz-target": "AmazonAthena.CreateDataCatalog",
45
- };
33
+ const headers = sharedHeaders("CreateDataCatalog");
46
34
  let body;
47
35
  body = JSON.stringify(se_CreateDataCatalogInput(input, context));
48
36
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
49
37
  };
50
38
  exports.se_CreateDataCatalogCommand = se_CreateDataCatalogCommand;
51
39
  const se_CreateNamedQueryCommand = async (input, context) => {
52
- const headers = {
53
- "content-type": "application/x-amz-json-1.1",
54
- "x-amz-target": "AmazonAthena.CreateNamedQuery",
55
- };
40
+ const headers = sharedHeaders("CreateNamedQuery");
56
41
  let body;
57
42
  body = JSON.stringify(se_CreateNamedQueryInput(input, context));
58
43
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
59
44
  };
60
45
  exports.se_CreateNamedQueryCommand = se_CreateNamedQueryCommand;
61
46
  const se_CreateNotebookCommand = async (input, context) => {
62
- const headers = {
63
- "content-type": "application/x-amz-json-1.1",
64
- "x-amz-target": "AmazonAthena.CreateNotebook",
65
- };
47
+ const headers = sharedHeaders("CreateNotebook");
66
48
  let body;
67
49
  body = JSON.stringify(se_CreateNotebookInput(input, context));
68
50
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
69
51
  };
70
52
  exports.se_CreateNotebookCommand = se_CreateNotebookCommand;
71
53
  const se_CreatePreparedStatementCommand = async (input, context) => {
72
- const headers = {
73
- "content-type": "application/x-amz-json-1.1",
74
- "x-amz-target": "AmazonAthena.CreatePreparedStatement",
75
- };
54
+ const headers = sharedHeaders("CreatePreparedStatement");
76
55
  let body;
77
56
  body = JSON.stringify(se_CreatePreparedStatementInput(input, context));
78
57
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
79
58
  };
80
59
  exports.se_CreatePreparedStatementCommand = se_CreatePreparedStatementCommand;
81
60
  const se_CreatePresignedNotebookUrlCommand = async (input, context) => {
82
- const headers = {
83
- "content-type": "application/x-amz-json-1.1",
84
- "x-amz-target": "AmazonAthena.CreatePresignedNotebookUrl",
85
- };
61
+ const headers = sharedHeaders("CreatePresignedNotebookUrl");
86
62
  let body;
87
63
  body = JSON.stringify(se_CreatePresignedNotebookUrlRequest(input, context));
88
64
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
89
65
  };
90
66
  exports.se_CreatePresignedNotebookUrlCommand = se_CreatePresignedNotebookUrlCommand;
91
67
  const se_CreateWorkGroupCommand = async (input, context) => {
92
- const headers = {
93
- "content-type": "application/x-amz-json-1.1",
94
- "x-amz-target": "AmazonAthena.CreateWorkGroup",
95
- };
68
+ const headers = sharedHeaders("CreateWorkGroup");
96
69
  let body;
97
70
  body = JSON.stringify(se_CreateWorkGroupInput(input, context));
98
71
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
99
72
  };
100
73
  exports.se_CreateWorkGroupCommand = se_CreateWorkGroupCommand;
101
74
  const se_DeleteDataCatalogCommand = async (input, context) => {
102
- const headers = {
103
- "content-type": "application/x-amz-json-1.1",
104
- "x-amz-target": "AmazonAthena.DeleteDataCatalog",
105
- };
75
+ const headers = sharedHeaders("DeleteDataCatalog");
106
76
  let body;
107
77
  body = JSON.stringify(se_DeleteDataCatalogInput(input, context));
108
78
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
109
79
  };
110
80
  exports.se_DeleteDataCatalogCommand = se_DeleteDataCatalogCommand;
111
81
  const se_DeleteNamedQueryCommand = async (input, context) => {
112
- const headers = {
113
- "content-type": "application/x-amz-json-1.1",
114
- "x-amz-target": "AmazonAthena.DeleteNamedQuery",
115
- };
82
+ const headers = sharedHeaders("DeleteNamedQuery");
116
83
  let body;
117
84
  body = JSON.stringify(se_DeleteNamedQueryInput(input, context));
118
85
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
119
86
  };
120
87
  exports.se_DeleteNamedQueryCommand = se_DeleteNamedQueryCommand;
121
88
  const se_DeleteNotebookCommand = async (input, context) => {
122
- const headers = {
123
- "content-type": "application/x-amz-json-1.1",
124
- "x-amz-target": "AmazonAthena.DeleteNotebook",
125
- };
89
+ const headers = sharedHeaders("DeleteNotebook");
126
90
  let body;
127
91
  body = JSON.stringify(se_DeleteNotebookInput(input, context));
128
92
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
129
93
  };
130
94
  exports.se_DeleteNotebookCommand = se_DeleteNotebookCommand;
131
95
  const se_DeletePreparedStatementCommand = async (input, context) => {
132
- const headers = {
133
- "content-type": "application/x-amz-json-1.1",
134
- "x-amz-target": "AmazonAthena.DeletePreparedStatement",
135
- };
96
+ const headers = sharedHeaders("DeletePreparedStatement");
136
97
  let body;
137
98
  body = JSON.stringify(se_DeletePreparedStatementInput(input, context));
138
99
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
139
100
  };
140
101
  exports.se_DeletePreparedStatementCommand = se_DeletePreparedStatementCommand;
141
102
  const se_DeleteWorkGroupCommand = async (input, context) => {
142
- const headers = {
143
- "content-type": "application/x-amz-json-1.1",
144
- "x-amz-target": "AmazonAthena.DeleteWorkGroup",
145
- };
103
+ const headers = sharedHeaders("DeleteWorkGroup");
146
104
  let body;
147
105
  body = JSON.stringify(se_DeleteWorkGroupInput(input, context));
148
106
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
149
107
  };
150
108
  exports.se_DeleteWorkGroupCommand = se_DeleteWorkGroupCommand;
151
109
  const se_ExportNotebookCommand = async (input, context) => {
152
- const headers = {
153
- "content-type": "application/x-amz-json-1.1",
154
- "x-amz-target": "AmazonAthena.ExportNotebook",
155
- };
110
+ const headers = sharedHeaders("ExportNotebook");
156
111
  let body;
157
112
  body = JSON.stringify(se_ExportNotebookInput(input, context));
158
113
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
159
114
  };
160
115
  exports.se_ExportNotebookCommand = se_ExportNotebookCommand;
161
116
  const se_GetCalculationExecutionCommand = async (input, context) => {
162
- const headers = {
163
- "content-type": "application/x-amz-json-1.1",
164
- "x-amz-target": "AmazonAthena.GetCalculationExecution",
165
- };
117
+ const headers = sharedHeaders("GetCalculationExecution");
166
118
  let body;
167
119
  body = JSON.stringify(se_GetCalculationExecutionRequest(input, context));
168
120
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
169
121
  };
170
122
  exports.se_GetCalculationExecutionCommand = se_GetCalculationExecutionCommand;
171
123
  const se_GetCalculationExecutionCodeCommand = async (input, context) => {
172
- const headers = {
173
- "content-type": "application/x-amz-json-1.1",
174
- "x-amz-target": "AmazonAthena.GetCalculationExecutionCode",
175
- };
124
+ const headers = sharedHeaders("GetCalculationExecutionCode");
176
125
  let body;
177
126
  body = JSON.stringify(se_GetCalculationExecutionCodeRequest(input, context));
178
127
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
179
128
  };
180
129
  exports.se_GetCalculationExecutionCodeCommand = se_GetCalculationExecutionCodeCommand;
181
130
  const se_GetCalculationExecutionStatusCommand = async (input, context) => {
182
- const headers = {
183
- "content-type": "application/x-amz-json-1.1",
184
- "x-amz-target": "AmazonAthena.GetCalculationExecutionStatus",
185
- };
131
+ const headers = sharedHeaders("GetCalculationExecutionStatus");
186
132
  let body;
187
133
  body = JSON.stringify(se_GetCalculationExecutionStatusRequest(input, context));
188
134
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
189
135
  };
190
136
  exports.se_GetCalculationExecutionStatusCommand = se_GetCalculationExecutionStatusCommand;
191
137
  const se_GetDatabaseCommand = async (input, context) => {
192
- const headers = {
193
- "content-type": "application/x-amz-json-1.1",
194
- "x-amz-target": "AmazonAthena.GetDatabase",
195
- };
138
+ const headers = sharedHeaders("GetDatabase");
196
139
  let body;
197
140
  body = JSON.stringify(se_GetDatabaseInput(input, context));
198
141
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
199
142
  };
200
143
  exports.se_GetDatabaseCommand = se_GetDatabaseCommand;
201
144
  const se_GetDataCatalogCommand = async (input, context) => {
202
- const headers = {
203
- "content-type": "application/x-amz-json-1.1",
204
- "x-amz-target": "AmazonAthena.GetDataCatalog",
205
- };
145
+ const headers = sharedHeaders("GetDataCatalog");
206
146
  let body;
207
147
  body = JSON.stringify(se_GetDataCatalogInput(input, context));
208
148
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
209
149
  };
210
150
  exports.se_GetDataCatalogCommand = se_GetDataCatalogCommand;
211
151
  const se_GetNamedQueryCommand = async (input, context) => {
212
- const headers = {
213
- "content-type": "application/x-amz-json-1.1",
214
- "x-amz-target": "AmazonAthena.GetNamedQuery",
215
- };
152
+ const headers = sharedHeaders("GetNamedQuery");
216
153
  let body;
217
154
  body = JSON.stringify(se_GetNamedQueryInput(input, context));
218
155
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
219
156
  };
220
157
  exports.se_GetNamedQueryCommand = se_GetNamedQueryCommand;
221
158
  const se_GetNotebookMetadataCommand = async (input, context) => {
222
- const headers = {
223
- "content-type": "application/x-amz-json-1.1",
224
- "x-amz-target": "AmazonAthena.GetNotebookMetadata",
225
- };
159
+ const headers = sharedHeaders("GetNotebookMetadata");
226
160
  let body;
227
161
  body = JSON.stringify(se_GetNotebookMetadataInput(input, context));
228
162
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
229
163
  };
230
164
  exports.se_GetNotebookMetadataCommand = se_GetNotebookMetadataCommand;
231
165
  const se_GetPreparedStatementCommand = async (input, context) => {
232
- const headers = {
233
- "content-type": "application/x-amz-json-1.1",
234
- "x-amz-target": "AmazonAthena.GetPreparedStatement",
235
- };
166
+ const headers = sharedHeaders("GetPreparedStatement");
236
167
  let body;
237
168
  body = JSON.stringify(se_GetPreparedStatementInput(input, context));
238
169
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
239
170
  };
240
171
  exports.se_GetPreparedStatementCommand = se_GetPreparedStatementCommand;
241
172
  const se_GetQueryExecutionCommand = async (input, context) => {
242
- const headers = {
243
- "content-type": "application/x-amz-json-1.1",
244
- "x-amz-target": "AmazonAthena.GetQueryExecution",
245
- };
173
+ const headers = sharedHeaders("GetQueryExecution");
246
174
  let body;
247
175
  body = JSON.stringify(se_GetQueryExecutionInput(input, context));
248
176
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
249
177
  };
250
178
  exports.se_GetQueryExecutionCommand = se_GetQueryExecutionCommand;
251
179
  const se_GetQueryResultsCommand = async (input, context) => {
252
- const headers = {
253
- "content-type": "application/x-amz-json-1.1",
254
- "x-amz-target": "AmazonAthena.GetQueryResults",
255
- };
180
+ const headers = sharedHeaders("GetQueryResults");
256
181
  let body;
257
182
  body = JSON.stringify(se_GetQueryResultsInput(input, context));
258
183
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
259
184
  };
260
185
  exports.se_GetQueryResultsCommand = se_GetQueryResultsCommand;
261
186
  const se_GetQueryRuntimeStatisticsCommand = async (input, context) => {
262
- const headers = {
263
- "content-type": "application/x-amz-json-1.1",
264
- "x-amz-target": "AmazonAthena.GetQueryRuntimeStatistics",
265
- };
187
+ const headers = sharedHeaders("GetQueryRuntimeStatistics");
266
188
  let body;
267
189
  body = JSON.stringify(se_GetQueryRuntimeStatisticsInput(input, context));
268
190
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
269
191
  };
270
192
  exports.se_GetQueryRuntimeStatisticsCommand = se_GetQueryRuntimeStatisticsCommand;
271
193
  const se_GetSessionCommand = async (input, context) => {
272
- const headers = {
273
- "content-type": "application/x-amz-json-1.1",
274
- "x-amz-target": "AmazonAthena.GetSession",
275
- };
194
+ const headers = sharedHeaders("GetSession");
276
195
  let body;
277
196
  body = JSON.stringify(se_GetSessionRequest(input, context));
278
197
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
279
198
  };
280
199
  exports.se_GetSessionCommand = se_GetSessionCommand;
281
200
  const se_GetSessionStatusCommand = async (input, context) => {
282
- const headers = {
283
- "content-type": "application/x-amz-json-1.1",
284
- "x-amz-target": "AmazonAthena.GetSessionStatus",
285
- };
201
+ const headers = sharedHeaders("GetSessionStatus");
286
202
  let body;
287
203
  body = JSON.stringify(se_GetSessionStatusRequest(input, context));
288
204
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
289
205
  };
290
206
  exports.se_GetSessionStatusCommand = se_GetSessionStatusCommand;
291
207
  const se_GetTableMetadataCommand = async (input, context) => {
292
- const headers = {
293
- "content-type": "application/x-amz-json-1.1",
294
- "x-amz-target": "AmazonAthena.GetTableMetadata",
295
- };
208
+ const headers = sharedHeaders("GetTableMetadata");
296
209
  let body;
297
210
  body = JSON.stringify(se_GetTableMetadataInput(input, context));
298
211
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
299
212
  };
300
213
  exports.se_GetTableMetadataCommand = se_GetTableMetadataCommand;
301
214
  const se_GetWorkGroupCommand = async (input, context) => {
302
- const headers = {
303
- "content-type": "application/x-amz-json-1.1",
304
- "x-amz-target": "AmazonAthena.GetWorkGroup",
305
- };
215
+ const headers = sharedHeaders("GetWorkGroup");
306
216
  let body;
307
217
  body = JSON.stringify(se_GetWorkGroupInput(input, context));
308
218
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
309
219
  };
310
220
  exports.se_GetWorkGroupCommand = se_GetWorkGroupCommand;
311
221
  const se_ImportNotebookCommand = async (input, context) => {
312
- const headers = {
313
- "content-type": "application/x-amz-json-1.1",
314
- "x-amz-target": "AmazonAthena.ImportNotebook",
315
- };
222
+ const headers = sharedHeaders("ImportNotebook");
316
223
  let body;
317
224
  body = JSON.stringify(se_ImportNotebookInput(input, context));
318
225
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
319
226
  };
320
227
  exports.se_ImportNotebookCommand = se_ImportNotebookCommand;
321
228
  const se_ListApplicationDPUSizesCommand = async (input, context) => {
322
- const headers = {
323
- "content-type": "application/x-amz-json-1.1",
324
- "x-amz-target": "AmazonAthena.ListApplicationDPUSizes",
325
- };
229
+ const headers = sharedHeaders("ListApplicationDPUSizes");
326
230
  let body;
327
231
  body = JSON.stringify(se_ListApplicationDPUSizesInput(input, context));
328
232
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
329
233
  };
330
234
  exports.se_ListApplicationDPUSizesCommand = se_ListApplicationDPUSizesCommand;
331
235
  const se_ListCalculationExecutionsCommand = async (input, context) => {
332
- const headers = {
333
- "content-type": "application/x-amz-json-1.1",
334
- "x-amz-target": "AmazonAthena.ListCalculationExecutions",
335
- };
236
+ const headers = sharedHeaders("ListCalculationExecutions");
336
237
  let body;
337
238
  body = JSON.stringify(se_ListCalculationExecutionsRequest(input, context));
338
239
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
339
240
  };
340
241
  exports.se_ListCalculationExecutionsCommand = se_ListCalculationExecutionsCommand;
341
242
  const se_ListDatabasesCommand = async (input, context) => {
342
- const headers = {
343
- "content-type": "application/x-amz-json-1.1",
344
- "x-amz-target": "AmazonAthena.ListDatabases",
345
- };
243
+ const headers = sharedHeaders("ListDatabases");
346
244
  let body;
347
245
  body = JSON.stringify(se_ListDatabasesInput(input, context));
348
246
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
349
247
  };
350
248
  exports.se_ListDatabasesCommand = se_ListDatabasesCommand;
351
249
  const se_ListDataCatalogsCommand = async (input, context) => {
352
- const headers = {
353
- "content-type": "application/x-amz-json-1.1",
354
- "x-amz-target": "AmazonAthena.ListDataCatalogs",
355
- };
250
+ const headers = sharedHeaders("ListDataCatalogs");
356
251
  let body;
357
252
  body = JSON.stringify(se_ListDataCatalogsInput(input, context));
358
253
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
359
254
  };
360
255
  exports.se_ListDataCatalogsCommand = se_ListDataCatalogsCommand;
361
256
  const se_ListEngineVersionsCommand = async (input, context) => {
362
- const headers = {
363
- "content-type": "application/x-amz-json-1.1",
364
- "x-amz-target": "AmazonAthena.ListEngineVersions",
365
- };
257
+ const headers = sharedHeaders("ListEngineVersions");
366
258
  let body;
367
259
  body = JSON.stringify(se_ListEngineVersionsInput(input, context));
368
260
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
369
261
  };
370
262
  exports.se_ListEngineVersionsCommand = se_ListEngineVersionsCommand;
371
263
  const se_ListExecutorsCommand = async (input, context) => {
372
- const headers = {
373
- "content-type": "application/x-amz-json-1.1",
374
- "x-amz-target": "AmazonAthena.ListExecutors",
375
- };
264
+ const headers = sharedHeaders("ListExecutors");
376
265
  let body;
377
266
  body = JSON.stringify(se_ListExecutorsRequest(input, context));
378
267
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
379
268
  };
380
269
  exports.se_ListExecutorsCommand = se_ListExecutorsCommand;
381
270
  const se_ListNamedQueriesCommand = async (input, context) => {
382
- const headers = {
383
- "content-type": "application/x-amz-json-1.1",
384
- "x-amz-target": "AmazonAthena.ListNamedQueries",
385
- };
271
+ const headers = sharedHeaders("ListNamedQueries");
386
272
  let body;
387
273
  body = JSON.stringify(se_ListNamedQueriesInput(input, context));
388
274
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
389
275
  };
390
276
  exports.se_ListNamedQueriesCommand = se_ListNamedQueriesCommand;
391
277
  const se_ListNotebookMetadataCommand = async (input, context) => {
392
- const headers = {
393
- "content-type": "application/x-amz-json-1.1",
394
- "x-amz-target": "AmazonAthena.ListNotebookMetadata",
395
- };
278
+ const headers = sharedHeaders("ListNotebookMetadata");
396
279
  let body;
397
280
  body = JSON.stringify(se_ListNotebookMetadataInput(input, context));
398
281
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
399
282
  };
400
283
  exports.se_ListNotebookMetadataCommand = se_ListNotebookMetadataCommand;
401
284
  const se_ListNotebookSessionsCommand = async (input, context) => {
402
- const headers = {
403
- "content-type": "application/x-amz-json-1.1",
404
- "x-amz-target": "AmazonAthena.ListNotebookSessions",
405
- };
285
+ const headers = sharedHeaders("ListNotebookSessions");
406
286
  let body;
407
287
  body = JSON.stringify(se_ListNotebookSessionsRequest(input, context));
408
288
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
409
289
  };
410
290
  exports.se_ListNotebookSessionsCommand = se_ListNotebookSessionsCommand;
411
291
  const se_ListPreparedStatementsCommand = async (input, context) => {
412
- const headers = {
413
- "content-type": "application/x-amz-json-1.1",
414
- "x-amz-target": "AmazonAthena.ListPreparedStatements",
415
- };
292
+ const headers = sharedHeaders("ListPreparedStatements");
416
293
  let body;
417
294
  body = JSON.stringify(se_ListPreparedStatementsInput(input, context));
418
295
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
419
296
  };
420
297
  exports.se_ListPreparedStatementsCommand = se_ListPreparedStatementsCommand;
421
298
  const se_ListQueryExecutionsCommand = async (input, context) => {
422
- const headers = {
423
- "content-type": "application/x-amz-json-1.1",
424
- "x-amz-target": "AmazonAthena.ListQueryExecutions",
425
- };
299
+ const headers = sharedHeaders("ListQueryExecutions");
426
300
  let body;
427
301
  body = JSON.stringify(se_ListQueryExecutionsInput(input, context));
428
302
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
429
303
  };
430
304
  exports.se_ListQueryExecutionsCommand = se_ListQueryExecutionsCommand;
431
305
  const se_ListSessionsCommand = async (input, context) => {
432
- const headers = {
433
- "content-type": "application/x-amz-json-1.1",
434
- "x-amz-target": "AmazonAthena.ListSessions",
435
- };
306
+ const headers = sharedHeaders("ListSessions");
436
307
  let body;
437
308
  body = JSON.stringify(se_ListSessionsRequest(input, context));
438
309
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
439
310
  };
440
311
  exports.se_ListSessionsCommand = se_ListSessionsCommand;
441
312
  const se_ListTableMetadataCommand = async (input, context) => {
442
- const headers = {
443
- "content-type": "application/x-amz-json-1.1",
444
- "x-amz-target": "AmazonAthena.ListTableMetadata",
445
- };
313
+ const headers = sharedHeaders("ListTableMetadata");
446
314
  let body;
447
315
  body = JSON.stringify(se_ListTableMetadataInput(input, context));
448
316
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
449
317
  };
450
318
  exports.se_ListTableMetadataCommand = se_ListTableMetadataCommand;
451
319
  const se_ListTagsForResourceCommand = async (input, context) => {
452
- const headers = {
453
- "content-type": "application/x-amz-json-1.1",
454
- "x-amz-target": "AmazonAthena.ListTagsForResource",
455
- };
320
+ const headers = sharedHeaders("ListTagsForResource");
456
321
  let body;
457
322
  body = JSON.stringify(se_ListTagsForResourceInput(input, context));
458
323
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
459
324
  };
460
325
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
461
326
  const se_ListWorkGroupsCommand = async (input, context) => {
462
- const headers = {
463
- "content-type": "application/x-amz-json-1.1",
464
- "x-amz-target": "AmazonAthena.ListWorkGroups",
465
- };
327
+ const headers = sharedHeaders("ListWorkGroups");
466
328
  let body;
467
329
  body = JSON.stringify(se_ListWorkGroupsInput(input, context));
468
330
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
469
331
  };
470
332
  exports.se_ListWorkGroupsCommand = se_ListWorkGroupsCommand;
471
333
  const se_StartCalculationExecutionCommand = async (input, context) => {
472
- const headers = {
473
- "content-type": "application/x-amz-json-1.1",
474
- "x-amz-target": "AmazonAthena.StartCalculationExecution",
475
- };
334
+ const headers = sharedHeaders("StartCalculationExecution");
476
335
  let body;
477
336
  body = JSON.stringify(se_StartCalculationExecutionRequest(input, context));
478
337
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
479
338
  };
480
339
  exports.se_StartCalculationExecutionCommand = se_StartCalculationExecutionCommand;
481
340
  const se_StartQueryExecutionCommand = async (input, context) => {
482
- const headers = {
483
- "content-type": "application/x-amz-json-1.1",
484
- "x-amz-target": "AmazonAthena.StartQueryExecution",
485
- };
341
+ const headers = sharedHeaders("StartQueryExecution");
486
342
  let body;
487
343
  body = JSON.stringify(se_StartQueryExecutionInput(input, context));
488
344
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
489
345
  };
490
346
  exports.se_StartQueryExecutionCommand = se_StartQueryExecutionCommand;
491
347
  const se_StartSessionCommand = async (input, context) => {
492
- const headers = {
493
- "content-type": "application/x-amz-json-1.1",
494
- "x-amz-target": "AmazonAthena.StartSession",
495
- };
348
+ const headers = sharedHeaders("StartSession");
496
349
  let body;
497
350
  body = JSON.stringify(se_StartSessionRequest(input, context));
498
351
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
499
352
  };
500
353
  exports.se_StartSessionCommand = se_StartSessionCommand;
501
354
  const se_StopCalculationExecutionCommand = async (input, context) => {
502
- const headers = {
503
- "content-type": "application/x-amz-json-1.1",
504
- "x-amz-target": "AmazonAthena.StopCalculationExecution",
505
- };
355
+ const headers = sharedHeaders("StopCalculationExecution");
506
356
  let body;
507
357
  body = JSON.stringify(se_StopCalculationExecutionRequest(input, context));
508
358
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
509
359
  };
510
360
  exports.se_StopCalculationExecutionCommand = se_StopCalculationExecutionCommand;
511
361
  const se_StopQueryExecutionCommand = async (input, context) => {
512
- const headers = {
513
- "content-type": "application/x-amz-json-1.1",
514
- "x-amz-target": "AmazonAthena.StopQueryExecution",
515
- };
362
+ const headers = sharedHeaders("StopQueryExecution");
516
363
  let body;
517
364
  body = JSON.stringify(se_StopQueryExecutionInput(input, context));
518
365
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
519
366
  };
520
367
  exports.se_StopQueryExecutionCommand = se_StopQueryExecutionCommand;
521
368
  const se_TagResourceCommand = async (input, context) => {
522
- const headers = {
523
- "content-type": "application/x-amz-json-1.1",
524
- "x-amz-target": "AmazonAthena.TagResource",
525
- };
369
+ const headers = sharedHeaders("TagResource");
526
370
  let body;
527
371
  body = JSON.stringify(se_TagResourceInput(input, context));
528
372
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
529
373
  };
530
374
  exports.se_TagResourceCommand = se_TagResourceCommand;
531
375
  const se_TerminateSessionCommand = async (input, context) => {
532
- const headers = {
533
- "content-type": "application/x-amz-json-1.1",
534
- "x-amz-target": "AmazonAthena.TerminateSession",
535
- };
376
+ const headers = sharedHeaders("TerminateSession");
536
377
  let body;
537
378
  body = JSON.stringify(se_TerminateSessionRequest(input, context));
538
379
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
539
380
  };
540
381
  exports.se_TerminateSessionCommand = se_TerminateSessionCommand;
541
382
  const se_UntagResourceCommand = async (input, context) => {
542
- const headers = {
543
- "content-type": "application/x-amz-json-1.1",
544
- "x-amz-target": "AmazonAthena.UntagResource",
545
- };
383
+ const headers = sharedHeaders("UntagResource");
546
384
  let body;
547
385
  body = JSON.stringify(se_UntagResourceInput(input, context));
548
386
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
549
387
  };
550
388
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
551
389
  const se_UpdateDataCatalogCommand = async (input, context) => {
552
- const headers = {
553
- "content-type": "application/x-amz-json-1.1",
554
- "x-amz-target": "AmazonAthena.UpdateDataCatalog",
555
- };
390
+ const headers = sharedHeaders("UpdateDataCatalog");
556
391
  let body;
557
392
  body = JSON.stringify(se_UpdateDataCatalogInput(input, context));
558
393
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
559
394
  };
560
395
  exports.se_UpdateDataCatalogCommand = se_UpdateDataCatalogCommand;
561
396
  const se_UpdateNamedQueryCommand = async (input, context) => {
562
- const headers = {
563
- "content-type": "application/x-amz-json-1.1",
564
- "x-amz-target": "AmazonAthena.UpdateNamedQuery",
565
- };
397
+ const headers = sharedHeaders("UpdateNamedQuery");
566
398
  let body;
567
399
  body = JSON.stringify(se_UpdateNamedQueryInput(input, context));
568
400
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
569
401
  };
570
402
  exports.se_UpdateNamedQueryCommand = se_UpdateNamedQueryCommand;
571
403
  const se_UpdateNotebookCommand = async (input, context) => {
572
- const headers = {
573
- "content-type": "application/x-amz-json-1.1",
574
- "x-amz-target": "AmazonAthena.UpdateNotebook",
575
- };
404
+ const headers = sharedHeaders("UpdateNotebook");
576
405
  let body;
577
406
  body = JSON.stringify(se_UpdateNotebookInput(input, context));
578
407
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
579
408
  };
580
409
  exports.se_UpdateNotebookCommand = se_UpdateNotebookCommand;
581
410
  const se_UpdateNotebookMetadataCommand = async (input, context) => {
582
- const headers = {
583
- "content-type": "application/x-amz-json-1.1",
584
- "x-amz-target": "AmazonAthena.UpdateNotebookMetadata",
585
- };
411
+ const headers = sharedHeaders("UpdateNotebookMetadata");
586
412
  let body;
587
413
  body = JSON.stringify(se_UpdateNotebookMetadataInput(input, context));
588
414
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
589
415
  };
590
416
  exports.se_UpdateNotebookMetadataCommand = se_UpdateNotebookMetadataCommand;
591
417
  const se_UpdatePreparedStatementCommand = async (input, context) => {
592
- const headers = {
593
- "content-type": "application/x-amz-json-1.1",
594
- "x-amz-target": "AmazonAthena.UpdatePreparedStatement",
595
- };
418
+ const headers = sharedHeaders("UpdatePreparedStatement");
596
419
  let body;
597
420
  body = JSON.stringify(se_UpdatePreparedStatementInput(input, context));
598
421
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
599
422
  };
600
423
  exports.se_UpdatePreparedStatementCommand = se_UpdatePreparedStatementCommand;
601
424
  const se_UpdateWorkGroupCommand = async (input, context) => {
602
- const headers = {
603
- "content-type": "application/x-amz-json-1.1",
604
- "x-amz-target": "AmazonAthena.UpdateWorkGroup",
605
- };
425
+ const headers = sharedHeaders("UpdateWorkGroup");
606
426
  let body;
607
427
  body = JSON.stringify(se_UpdateWorkGroupInput(input, context));
608
428
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
@@ -4774,6 +4594,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
4774
4594
  }
4775
4595
  return new protocol_http_1.HttpRequest(contents);
4776
4596
  };
4597
+ function sharedHeaders(operation) {
4598
+ return {
4599
+ "content-type": "application/x-amz-json-1.1",
4600
+ "x-amz-target": `AmazonAthena.${operation}`,
4601
+ };
4602
+ }
4777
4603
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
4778
4604
  if (encoded.length) {
4779
4605
  return JSON.parse(encoded);
@@ -4,541 +4,361 @@ 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";
6
6
  export const se_BatchGetNamedQueryCommand = async (input, context) => {
7
- const headers = {
8
- "content-type": "application/x-amz-json-1.1",
9
- "x-amz-target": "AmazonAthena.BatchGetNamedQuery",
10
- };
7
+ const headers = sharedHeaders("BatchGetNamedQuery");
11
8
  let body;
12
9
  body = JSON.stringify(se_BatchGetNamedQueryInput(input, context));
13
10
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
14
11
  };
15
12
  export const se_BatchGetPreparedStatementCommand = async (input, context) => {
16
- const headers = {
17
- "content-type": "application/x-amz-json-1.1",
18
- "x-amz-target": "AmazonAthena.BatchGetPreparedStatement",
19
- };
13
+ const headers = sharedHeaders("BatchGetPreparedStatement");
20
14
  let body;
21
15
  body = JSON.stringify(se_BatchGetPreparedStatementInput(input, context));
22
16
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
23
17
  };
24
18
  export const se_BatchGetQueryExecutionCommand = async (input, context) => {
25
- const headers = {
26
- "content-type": "application/x-amz-json-1.1",
27
- "x-amz-target": "AmazonAthena.BatchGetQueryExecution",
28
- };
19
+ const headers = sharedHeaders("BatchGetQueryExecution");
29
20
  let body;
30
21
  body = JSON.stringify(se_BatchGetQueryExecutionInput(input, context));
31
22
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
32
23
  };
33
24
  export const se_CreateDataCatalogCommand = async (input, context) => {
34
- const headers = {
35
- "content-type": "application/x-amz-json-1.1",
36
- "x-amz-target": "AmazonAthena.CreateDataCatalog",
37
- };
25
+ const headers = sharedHeaders("CreateDataCatalog");
38
26
  let body;
39
27
  body = JSON.stringify(se_CreateDataCatalogInput(input, context));
40
28
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
29
  };
42
30
  export const se_CreateNamedQueryCommand = async (input, context) => {
43
- const headers = {
44
- "content-type": "application/x-amz-json-1.1",
45
- "x-amz-target": "AmazonAthena.CreateNamedQuery",
46
- };
31
+ const headers = sharedHeaders("CreateNamedQuery");
47
32
  let body;
48
33
  body = JSON.stringify(se_CreateNamedQueryInput(input, context));
49
34
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
50
35
  };
51
36
  export const se_CreateNotebookCommand = async (input, context) => {
52
- const headers = {
53
- "content-type": "application/x-amz-json-1.1",
54
- "x-amz-target": "AmazonAthena.CreateNotebook",
55
- };
37
+ const headers = sharedHeaders("CreateNotebook");
56
38
  let body;
57
39
  body = JSON.stringify(se_CreateNotebookInput(input, context));
58
40
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
59
41
  };
60
42
  export const se_CreatePreparedStatementCommand = async (input, context) => {
61
- const headers = {
62
- "content-type": "application/x-amz-json-1.1",
63
- "x-amz-target": "AmazonAthena.CreatePreparedStatement",
64
- };
43
+ const headers = sharedHeaders("CreatePreparedStatement");
65
44
  let body;
66
45
  body = JSON.stringify(se_CreatePreparedStatementInput(input, context));
67
46
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
68
47
  };
69
48
  export const se_CreatePresignedNotebookUrlCommand = async (input, context) => {
70
- const headers = {
71
- "content-type": "application/x-amz-json-1.1",
72
- "x-amz-target": "AmazonAthena.CreatePresignedNotebookUrl",
73
- };
49
+ const headers = sharedHeaders("CreatePresignedNotebookUrl");
74
50
  let body;
75
51
  body = JSON.stringify(se_CreatePresignedNotebookUrlRequest(input, context));
76
52
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
53
  };
78
54
  export const se_CreateWorkGroupCommand = async (input, context) => {
79
- const headers = {
80
- "content-type": "application/x-amz-json-1.1",
81
- "x-amz-target": "AmazonAthena.CreateWorkGroup",
82
- };
55
+ const headers = sharedHeaders("CreateWorkGroup");
83
56
  let body;
84
57
  body = JSON.stringify(se_CreateWorkGroupInput(input, context));
85
58
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
86
59
  };
87
60
  export const se_DeleteDataCatalogCommand = async (input, context) => {
88
- const headers = {
89
- "content-type": "application/x-amz-json-1.1",
90
- "x-amz-target": "AmazonAthena.DeleteDataCatalog",
91
- };
61
+ const headers = sharedHeaders("DeleteDataCatalog");
92
62
  let body;
93
63
  body = JSON.stringify(se_DeleteDataCatalogInput(input, context));
94
64
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
95
65
  };
96
66
  export const se_DeleteNamedQueryCommand = async (input, context) => {
97
- const headers = {
98
- "content-type": "application/x-amz-json-1.1",
99
- "x-amz-target": "AmazonAthena.DeleteNamedQuery",
100
- };
67
+ const headers = sharedHeaders("DeleteNamedQuery");
101
68
  let body;
102
69
  body = JSON.stringify(se_DeleteNamedQueryInput(input, context));
103
70
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
104
71
  };
105
72
  export const se_DeleteNotebookCommand = async (input, context) => {
106
- const headers = {
107
- "content-type": "application/x-amz-json-1.1",
108
- "x-amz-target": "AmazonAthena.DeleteNotebook",
109
- };
73
+ const headers = sharedHeaders("DeleteNotebook");
110
74
  let body;
111
75
  body = JSON.stringify(se_DeleteNotebookInput(input, context));
112
76
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
113
77
  };
114
78
  export const se_DeletePreparedStatementCommand = async (input, context) => {
115
- const headers = {
116
- "content-type": "application/x-amz-json-1.1",
117
- "x-amz-target": "AmazonAthena.DeletePreparedStatement",
118
- };
79
+ const headers = sharedHeaders("DeletePreparedStatement");
119
80
  let body;
120
81
  body = JSON.stringify(se_DeletePreparedStatementInput(input, context));
121
82
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
122
83
  };
123
84
  export const se_DeleteWorkGroupCommand = async (input, context) => {
124
- const headers = {
125
- "content-type": "application/x-amz-json-1.1",
126
- "x-amz-target": "AmazonAthena.DeleteWorkGroup",
127
- };
85
+ const headers = sharedHeaders("DeleteWorkGroup");
128
86
  let body;
129
87
  body = JSON.stringify(se_DeleteWorkGroupInput(input, context));
130
88
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
131
89
  };
132
90
  export const se_ExportNotebookCommand = async (input, context) => {
133
- const headers = {
134
- "content-type": "application/x-amz-json-1.1",
135
- "x-amz-target": "AmazonAthena.ExportNotebook",
136
- };
91
+ const headers = sharedHeaders("ExportNotebook");
137
92
  let body;
138
93
  body = JSON.stringify(se_ExportNotebookInput(input, context));
139
94
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
140
95
  };
141
96
  export const se_GetCalculationExecutionCommand = async (input, context) => {
142
- const headers = {
143
- "content-type": "application/x-amz-json-1.1",
144
- "x-amz-target": "AmazonAthena.GetCalculationExecution",
145
- };
97
+ const headers = sharedHeaders("GetCalculationExecution");
146
98
  let body;
147
99
  body = JSON.stringify(se_GetCalculationExecutionRequest(input, context));
148
100
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
149
101
  };
150
102
  export const se_GetCalculationExecutionCodeCommand = async (input, context) => {
151
- const headers = {
152
- "content-type": "application/x-amz-json-1.1",
153
- "x-amz-target": "AmazonAthena.GetCalculationExecutionCode",
154
- };
103
+ const headers = sharedHeaders("GetCalculationExecutionCode");
155
104
  let body;
156
105
  body = JSON.stringify(se_GetCalculationExecutionCodeRequest(input, context));
157
106
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
158
107
  };
159
108
  export const se_GetCalculationExecutionStatusCommand = async (input, context) => {
160
- const headers = {
161
- "content-type": "application/x-amz-json-1.1",
162
- "x-amz-target": "AmazonAthena.GetCalculationExecutionStatus",
163
- };
109
+ const headers = sharedHeaders("GetCalculationExecutionStatus");
164
110
  let body;
165
111
  body = JSON.stringify(se_GetCalculationExecutionStatusRequest(input, context));
166
112
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
167
113
  };
168
114
  export const se_GetDatabaseCommand = async (input, context) => {
169
- const headers = {
170
- "content-type": "application/x-amz-json-1.1",
171
- "x-amz-target": "AmazonAthena.GetDatabase",
172
- };
115
+ const headers = sharedHeaders("GetDatabase");
173
116
  let body;
174
117
  body = JSON.stringify(se_GetDatabaseInput(input, context));
175
118
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
176
119
  };
177
120
  export const se_GetDataCatalogCommand = async (input, context) => {
178
- const headers = {
179
- "content-type": "application/x-amz-json-1.1",
180
- "x-amz-target": "AmazonAthena.GetDataCatalog",
181
- };
121
+ const headers = sharedHeaders("GetDataCatalog");
182
122
  let body;
183
123
  body = JSON.stringify(se_GetDataCatalogInput(input, context));
184
124
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
185
125
  };
186
126
  export const se_GetNamedQueryCommand = async (input, context) => {
187
- const headers = {
188
- "content-type": "application/x-amz-json-1.1",
189
- "x-amz-target": "AmazonAthena.GetNamedQuery",
190
- };
127
+ const headers = sharedHeaders("GetNamedQuery");
191
128
  let body;
192
129
  body = JSON.stringify(se_GetNamedQueryInput(input, context));
193
130
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
194
131
  };
195
132
  export const se_GetNotebookMetadataCommand = async (input, context) => {
196
- const headers = {
197
- "content-type": "application/x-amz-json-1.1",
198
- "x-amz-target": "AmazonAthena.GetNotebookMetadata",
199
- };
133
+ const headers = sharedHeaders("GetNotebookMetadata");
200
134
  let body;
201
135
  body = JSON.stringify(se_GetNotebookMetadataInput(input, context));
202
136
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
203
137
  };
204
138
  export const se_GetPreparedStatementCommand = async (input, context) => {
205
- const headers = {
206
- "content-type": "application/x-amz-json-1.1",
207
- "x-amz-target": "AmazonAthena.GetPreparedStatement",
208
- };
139
+ const headers = sharedHeaders("GetPreparedStatement");
209
140
  let body;
210
141
  body = JSON.stringify(se_GetPreparedStatementInput(input, context));
211
142
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
212
143
  };
213
144
  export const se_GetQueryExecutionCommand = async (input, context) => {
214
- const headers = {
215
- "content-type": "application/x-amz-json-1.1",
216
- "x-amz-target": "AmazonAthena.GetQueryExecution",
217
- };
145
+ const headers = sharedHeaders("GetQueryExecution");
218
146
  let body;
219
147
  body = JSON.stringify(se_GetQueryExecutionInput(input, context));
220
148
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
221
149
  };
222
150
  export const se_GetQueryResultsCommand = async (input, context) => {
223
- const headers = {
224
- "content-type": "application/x-amz-json-1.1",
225
- "x-amz-target": "AmazonAthena.GetQueryResults",
226
- };
151
+ const headers = sharedHeaders("GetQueryResults");
227
152
  let body;
228
153
  body = JSON.stringify(se_GetQueryResultsInput(input, context));
229
154
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
230
155
  };
231
156
  export const se_GetQueryRuntimeStatisticsCommand = async (input, context) => {
232
- const headers = {
233
- "content-type": "application/x-amz-json-1.1",
234
- "x-amz-target": "AmazonAthena.GetQueryRuntimeStatistics",
235
- };
157
+ const headers = sharedHeaders("GetQueryRuntimeStatistics");
236
158
  let body;
237
159
  body = JSON.stringify(se_GetQueryRuntimeStatisticsInput(input, context));
238
160
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
239
161
  };
240
162
  export const se_GetSessionCommand = async (input, context) => {
241
- const headers = {
242
- "content-type": "application/x-amz-json-1.1",
243
- "x-amz-target": "AmazonAthena.GetSession",
244
- };
163
+ const headers = sharedHeaders("GetSession");
245
164
  let body;
246
165
  body = JSON.stringify(se_GetSessionRequest(input, context));
247
166
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
248
167
  };
249
168
  export const se_GetSessionStatusCommand = async (input, context) => {
250
- const headers = {
251
- "content-type": "application/x-amz-json-1.1",
252
- "x-amz-target": "AmazonAthena.GetSessionStatus",
253
- };
169
+ const headers = sharedHeaders("GetSessionStatus");
254
170
  let body;
255
171
  body = JSON.stringify(se_GetSessionStatusRequest(input, context));
256
172
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
257
173
  };
258
174
  export const se_GetTableMetadataCommand = async (input, context) => {
259
- const headers = {
260
- "content-type": "application/x-amz-json-1.1",
261
- "x-amz-target": "AmazonAthena.GetTableMetadata",
262
- };
175
+ const headers = sharedHeaders("GetTableMetadata");
263
176
  let body;
264
177
  body = JSON.stringify(se_GetTableMetadataInput(input, context));
265
178
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
266
179
  };
267
180
  export const se_GetWorkGroupCommand = async (input, context) => {
268
- const headers = {
269
- "content-type": "application/x-amz-json-1.1",
270
- "x-amz-target": "AmazonAthena.GetWorkGroup",
271
- };
181
+ const headers = sharedHeaders("GetWorkGroup");
272
182
  let body;
273
183
  body = JSON.stringify(se_GetWorkGroupInput(input, context));
274
184
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
275
185
  };
276
186
  export const se_ImportNotebookCommand = async (input, context) => {
277
- const headers = {
278
- "content-type": "application/x-amz-json-1.1",
279
- "x-amz-target": "AmazonAthena.ImportNotebook",
280
- };
187
+ const headers = sharedHeaders("ImportNotebook");
281
188
  let body;
282
189
  body = JSON.stringify(se_ImportNotebookInput(input, context));
283
190
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
284
191
  };
285
192
  export const se_ListApplicationDPUSizesCommand = async (input, context) => {
286
- const headers = {
287
- "content-type": "application/x-amz-json-1.1",
288
- "x-amz-target": "AmazonAthena.ListApplicationDPUSizes",
289
- };
193
+ const headers = sharedHeaders("ListApplicationDPUSizes");
290
194
  let body;
291
195
  body = JSON.stringify(se_ListApplicationDPUSizesInput(input, context));
292
196
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
293
197
  };
294
198
  export const se_ListCalculationExecutionsCommand = async (input, context) => {
295
- const headers = {
296
- "content-type": "application/x-amz-json-1.1",
297
- "x-amz-target": "AmazonAthena.ListCalculationExecutions",
298
- };
199
+ const headers = sharedHeaders("ListCalculationExecutions");
299
200
  let body;
300
201
  body = JSON.stringify(se_ListCalculationExecutionsRequest(input, context));
301
202
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
302
203
  };
303
204
  export const se_ListDatabasesCommand = async (input, context) => {
304
- const headers = {
305
- "content-type": "application/x-amz-json-1.1",
306
- "x-amz-target": "AmazonAthena.ListDatabases",
307
- };
205
+ const headers = sharedHeaders("ListDatabases");
308
206
  let body;
309
207
  body = JSON.stringify(se_ListDatabasesInput(input, context));
310
208
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
311
209
  };
312
210
  export const se_ListDataCatalogsCommand = async (input, context) => {
313
- const headers = {
314
- "content-type": "application/x-amz-json-1.1",
315
- "x-amz-target": "AmazonAthena.ListDataCatalogs",
316
- };
211
+ const headers = sharedHeaders("ListDataCatalogs");
317
212
  let body;
318
213
  body = JSON.stringify(se_ListDataCatalogsInput(input, context));
319
214
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
320
215
  };
321
216
  export const se_ListEngineVersionsCommand = async (input, context) => {
322
- const headers = {
323
- "content-type": "application/x-amz-json-1.1",
324
- "x-amz-target": "AmazonAthena.ListEngineVersions",
325
- };
217
+ const headers = sharedHeaders("ListEngineVersions");
326
218
  let body;
327
219
  body = JSON.stringify(se_ListEngineVersionsInput(input, context));
328
220
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
329
221
  };
330
222
  export const se_ListExecutorsCommand = async (input, context) => {
331
- const headers = {
332
- "content-type": "application/x-amz-json-1.1",
333
- "x-amz-target": "AmazonAthena.ListExecutors",
334
- };
223
+ const headers = sharedHeaders("ListExecutors");
335
224
  let body;
336
225
  body = JSON.stringify(se_ListExecutorsRequest(input, context));
337
226
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
338
227
  };
339
228
  export const se_ListNamedQueriesCommand = async (input, context) => {
340
- const headers = {
341
- "content-type": "application/x-amz-json-1.1",
342
- "x-amz-target": "AmazonAthena.ListNamedQueries",
343
- };
229
+ const headers = sharedHeaders("ListNamedQueries");
344
230
  let body;
345
231
  body = JSON.stringify(se_ListNamedQueriesInput(input, context));
346
232
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
347
233
  };
348
234
  export const se_ListNotebookMetadataCommand = async (input, context) => {
349
- const headers = {
350
- "content-type": "application/x-amz-json-1.1",
351
- "x-amz-target": "AmazonAthena.ListNotebookMetadata",
352
- };
235
+ const headers = sharedHeaders("ListNotebookMetadata");
353
236
  let body;
354
237
  body = JSON.stringify(se_ListNotebookMetadataInput(input, context));
355
238
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
356
239
  };
357
240
  export const se_ListNotebookSessionsCommand = async (input, context) => {
358
- const headers = {
359
- "content-type": "application/x-amz-json-1.1",
360
- "x-amz-target": "AmazonAthena.ListNotebookSessions",
361
- };
241
+ const headers = sharedHeaders("ListNotebookSessions");
362
242
  let body;
363
243
  body = JSON.stringify(se_ListNotebookSessionsRequest(input, context));
364
244
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
365
245
  };
366
246
  export const se_ListPreparedStatementsCommand = async (input, context) => {
367
- const headers = {
368
- "content-type": "application/x-amz-json-1.1",
369
- "x-amz-target": "AmazonAthena.ListPreparedStatements",
370
- };
247
+ const headers = sharedHeaders("ListPreparedStatements");
371
248
  let body;
372
249
  body = JSON.stringify(se_ListPreparedStatementsInput(input, context));
373
250
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
374
251
  };
375
252
  export const se_ListQueryExecutionsCommand = async (input, context) => {
376
- const headers = {
377
- "content-type": "application/x-amz-json-1.1",
378
- "x-amz-target": "AmazonAthena.ListQueryExecutions",
379
- };
253
+ const headers = sharedHeaders("ListQueryExecutions");
380
254
  let body;
381
255
  body = JSON.stringify(se_ListQueryExecutionsInput(input, context));
382
256
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
383
257
  };
384
258
  export const se_ListSessionsCommand = async (input, context) => {
385
- const headers = {
386
- "content-type": "application/x-amz-json-1.1",
387
- "x-amz-target": "AmazonAthena.ListSessions",
388
- };
259
+ const headers = sharedHeaders("ListSessions");
389
260
  let body;
390
261
  body = JSON.stringify(se_ListSessionsRequest(input, context));
391
262
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
392
263
  };
393
264
  export const se_ListTableMetadataCommand = async (input, context) => {
394
- const headers = {
395
- "content-type": "application/x-amz-json-1.1",
396
- "x-amz-target": "AmazonAthena.ListTableMetadata",
397
- };
265
+ const headers = sharedHeaders("ListTableMetadata");
398
266
  let body;
399
267
  body = JSON.stringify(se_ListTableMetadataInput(input, context));
400
268
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
401
269
  };
402
270
  export const se_ListTagsForResourceCommand = async (input, context) => {
403
- const headers = {
404
- "content-type": "application/x-amz-json-1.1",
405
- "x-amz-target": "AmazonAthena.ListTagsForResource",
406
- };
271
+ const headers = sharedHeaders("ListTagsForResource");
407
272
  let body;
408
273
  body = JSON.stringify(se_ListTagsForResourceInput(input, context));
409
274
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
410
275
  };
411
276
  export const se_ListWorkGroupsCommand = async (input, context) => {
412
- const headers = {
413
- "content-type": "application/x-amz-json-1.1",
414
- "x-amz-target": "AmazonAthena.ListWorkGroups",
415
- };
277
+ const headers = sharedHeaders("ListWorkGroups");
416
278
  let body;
417
279
  body = JSON.stringify(se_ListWorkGroupsInput(input, context));
418
280
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
419
281
  };
420
282
  export const se_StartCalculationExecutionCommand = async (input, context) => {
421
- const headers = {
422
- "content-type": "application/x-amz-json-1.1",
423
- "x-amz-target": "AmazonAthena.StartCalculationExecution",
424
- };
283
+ const headers = sharedHeaders("StartCalculationExecution");
425
284
  let body;
426
285
  body = JSON.stringify(se_StartCalculationExecutionRequest(input, context));
427
286
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
428
287
  };
429
288
  export const se_StartQueryExecutionCommand = async (input, context) => {
430
- const headers = {
431
- "content-type": "application/x-amz-json-1.1",
432
- "x-amz-target": "AmazonAthena.StartQueryExecution",
433
- };
289
+ const headers = sharedHeaders("StartQueryExecution");
434
290
  let body;
435
291
  body = JSON.stringify(se_StartQueryExecutionInput(input, context));
436
292
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
437
293
  };
438
294
  export const se_StartSessionCommand = async (input, context) => {
439
- const headers = {
440
- "content-type": "application/x-amz-json-1.1",
441
- "x-amz-target": "AmazonAthena.StartSession",
442
- };
295
+ const headers = sharedHeaders("StartSession");
443
296
  let body;
444
297
  body = JSON.stringify(se_StartSessionRequest(input, context));
445
298
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
446
299
  };
447
300
  export const se_StopCalculationExecutionCommand = async (input, context) => {
448
- const headers = {
449
- "content-type": "application/x-amz-json-1.1",
450
- "x-amz-target": "AmazonAthena.StopCalculationExecution",
451
- };
301
+ const headers = sharedHeaders("StopCalculationExecution");
452
302
  let body;
453
303
  body = JSON.stringify(se_StopCalculationExecutionRequest(input, context));
454
304
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
455
305
  };
456
306
  export const se_StopQueryExecutionCommand = async (input, context) => {
457
- const headers = {
458
- "content-type": "application/x-amz-json-1.1",
459
- "x-amz-target": "AmazonAthena.StopQueryExecution",
460
- };
307
+ const headers = sharedHeaders("StopQueryExecution");
461
308
  let body;
462
309
  body = JSON.stringify(se_StopQueryExecutionInput(input, context));
463
310
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
464
311
  };
465
312
  export const se_TagResourceCommand = async (input, context) => {
466
- const headers = {
467
- "content-type": "application/x-amz-json-1.1",
468
- "x-amz-target": "AmazonAthena.TagResource",
469
- };
313
+ const headers = sharedHeaders("TagResource");
470
314
  let body;
471
315
  body = JSON.stringify(se_TagResourceInput(input, context));
472
316
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
473
317
  };
474
318
  export const se_TerminateSessionCommand = async (input, context) => {
475
- const headers = {
476
- "content-type": "application/x-amz-json-1.1",
477
- "x-amz-target": "AmazonAthena.TerminateSession",
478
- };
319
+ const headers = sharedHeaders("TerminateSession");
479
320
  let body;
480
321
  body = JSON.stringify(se_TerminateSessionRequest(input, context));
481
322
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
482
323
  };
483
324
  export const se_UntagResourceCommand = async (input, context) => {
484
- const headers = {
485
- "content-type": "application/x-amz-json-1.1",
486
- "x-amz-target": "AmazonAthena.UntagResource",
487
- };
325
+ const headers = sharedHeaders("UntagResource");
488
326
  let body;
489
327
  body = JSON.stringify(se_UntagResourceInput(input, context));
490
328
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
491
329
  };
492
330
  export const se_UpdateDataCatalogCommand = async (input, context) => {
493
- const headers = {
494
- "content-type": "application/x-amz-json-1.1",
495
- "x-amz-target": "AmazonAthena.UpdateDataCatalog",
496
- };
331
+ const headers = sharedHeaders("UpdateDataCatalog");
497
332
  let body;
498
333
  body = JSON.stringify(se_UpdateDataCatalogInput(input, context));
499
334
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
500
335
  };
501
336
  export const se_UpdateNamedQueryCommand = async (input, context) => {
502
- const headers = {
503
- "content-type": "application/x-amz-json-1.1",
504
- "x-amz-target": "AmazonAthena.UpdateNamedQuery",
505
- };
337
+ const headers = sharedHeaders("UpdateNamedQuery");
506
338
  let body;
507
339
  body = JSON.stringify(se_UpdateNamedQueryInput(input, context));
508
340
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
509
341
  };
510
342
  export const se_UpdateNotebookCommand = async (input, context) => {
511
- const headers = {
512
- "content-type": "application/x-amz-json-1.1",
513
- "x-amz-target": "AmazonAthena.UpdateNotebook",
514
- };
343
+ const headers = sharedHeaders("UpdateNotebook");
515
344
  let body;
516
345
  body = JSON.stringify(se_UpdateNotebookInput(input, context));
517
346
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
518
347
  };
519
348
  export const se_UpdateNotebookMetadataCommand = async (input, context) => {
520
- const headers = {
521
- "content-type": "application/x-amz-json-1.1",
522
- "x-amz-target": "AmazonAthena.UpdateNotebookMetadata",
523
- };
349
+ const headers = sharedHeaders("UpdateNotebookMetadata");
524
350
  let body;
525
351
  body = JSON.stringify(se_UpdateNotebookMetadataInput(input, context));
526
352
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
527
353
  };
528
354
  export const se_UpdatePreparedStatementCommand = async (input, context) => {
529
- const headers = {
530
- "content-type": "application/x-amz-json-1.1",
531
- "x-amz-target": "AmazonAthena.UpdatePreparedStatement",
532
- };
355
+ const headers = sharedHeaders("UpdatePreparedStatement");
533
356
  let body;
534
357
  body = JSON.stringify(se_UpdatePreparedStatementInput(input, context));
535
358
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
536
359
  };
537
360
  export const se_UpdateWorkGroupCommand = async (input, context) => {
538
- const headers = {
539
- "content-type": "application/x-amz-json-1.1",
540
- "x-amz-target": "AmazonAthena.UpdateWorkGroup",
541
- };
361
+ const headers = sharedHeaders("UpdateWorkGroup");
542
362
  let body;
543
363
  body = JSON.stringify(se_UpdateWorkGroupInput(input, context));
544
364
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
@@ -4649,6 +4469,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
4649
4469
  }
4650
4470
  return new __HttpRequest(contents);
4651
4471
  };
4472
+ function sharedHeaders(operation) {
4473
+ return {
4474
+ "content-type": "application/x-amz-json-1.1",
4475
+ "x-amz-target": `AmazonAthena.${operation}`,
4476
+ };
4477
+ }
4652
4478
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
4653
4479
  if (encoded.length) {
4654
4480
  return JSON.parse(encoded);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-athena",
3
3
  "description": "AWS SDK for JavaScript Athena Client for Node.js, Browser and React Native",
4
- "version": "3.310.0",
4
+ "version": "3.312.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -21,7 +21,7 @@
21
21
  "dependencies": {
22
22
  "@aws-crypto/sha256-browser": "3.0.0",
23
23
  "@aws-crypto/sha256-js": "3.0.0",
24
- "@aws-sdk/client-sts": "3.310.0",
24
+ "@aws-sdk/client-sts": "3.312.0",
25
25
  "@aws-sdk/config-resolver": "3.310.0",
26
26
  "@aws-sdk/credential-provider-node": "3.310.0",
27
27
  "@aws-sdk/fetch-http-handler": "3.310.0",