@aws-sdk/client-timestream-query 3.490.0 → 3.495.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/dist-cjs/TimestreamQuery.js +1 -37
- package/dist-cjs/TimestreamQueryClient.js +1 -48
- package/dist-cjs/commands/CancelQueryCommand.js +1 -30
- package/dist-cjs/commands/CreateScheduledQueryCommand.js +1 -31
- package/dist-cjs/commands/DeleteScheduledQueryCommand.js +1 -30
- package/dist-cjs/commands/DescribeEndpointsCommand.js +1 -28
- package/dist-cjs/commands/DescribeScheduledQueryCommand.js +1 -31
- package/dist-cjs/commands/ExecuteScheduledQueryCommand.js +1 -31
- package/dist-cjs/commands/ListScheduledQueriesCommand.js +1 -30
- package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -30
- package/dist-cjs/commands/PrepareQueryCommand.js +1 -31
- package/dist-cjs/commands/QueryCommand.js +1 -31
- package/dist-cjs/commands/TagResourceCommand.js +1 -30
- package/dist-cjs/commands/UntagResourceCommand.js +1 -30
- package/dist-cjs/commands/UpdateScheduledQueryCommand.js +1 -30
- package/dist-cjs/commands/index.js +1 -16
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +1761 -11
- package/dist-cjs/models/TimestreamQueryServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -213
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListScheduledQueriesPaginator.js +1 -7
- package/dist-cjs/pagination/ListTagsForResourcePaginator.js +1 -7
- package/dist-cjs/pagination/QueryPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -7
- package/dist-cjs/protocols/Aws_json1_0.js +1 -1058
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +41 -41
|
@@ -1,1058 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UpdateScheduledQueryCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_QueryCommand = exports.de_PrepareQueryCommand = exports.de_ListTagsForResourceCommand = exports.de_ListScheduledQueriesCommand = exports.de_ExecuteScheduledQueryCommand = exports.de_DescribeScheduledQueryCommand = exports.de_DescribeEndpointsCommand = exports.de_DeleteScheduledQueryCommand = exports.de_CreateScheduledQueryCommand = exports.de_CancelQueryCommand = exports.se_UpdateScheduledQueryCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_QueryCommand = exports.se_PrepareQueryCommand = exports.se_ListTagsForResourceCommand = exports.se_ListScheduledQueriesCommand = exports.se_ExecuteScheduledQueryCommand = exports.se_DescribeScheduledQueryCommand = exports.se_DescribeEndpointsCommand = exports.se_DeleteScheduledQueryCommand = exports.se_CreateScheduledQueryCommand = exports.se_CancelQueryCommand = void 0;
|
|
4
|
-
const protocol_http_1 = require("@smithy/protocol-http");
|
|
5
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
|
-
const uuid_1 = require("uuid");
|
|
7
|
-
const models_0_1 = require("../models/models_0");
|
|
8
|
-
const TimestreamQueryServiceException_1 = require("../models/TimestreamQueryServiceException");
|
|
9
|
-
const se_CancelQueryCommand = async (input, context) => {
|
|
10
|
-
const headers = sharedHeaders("CancelQuery");
|
|
11
|
-
let body;
|
|
12
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
13
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
14
|
-
};
|
|
15
|
-
exports.se_CancelQueryCommand = se_CancelQueryCommand;
|
|
16
|
-
const se_CreateScheduledQueryCommand = async (input, context) => {
|
|
17
|
-
const headers = sharedHeaders("CreateScheduledQuery");
|
|
18
|
-
let body;
|
|
19
|
-
body = JSON.stringify(se_CreateScheduledQueryRequest(input, context));
|
|
20
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
21
|
-
};
|
|
22
|
-
exports.se_CreateScheduledQueryCommand = se_CreateScheduledQueryCommand;
|
|
23
|
-
const se_DeleteScheduledQueryCommand = async (input, context) => {
|
|
24
|
-
const headers = sharedHeaders("DeleteScheduledQuery");
|
|
25
|
-
let body;
|
|
26
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
27
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
28
|
-
};
|
|
29
|
-
exports.se_DeleteScheduledQueryCommand = se_DeleteScheduledQueryCommand;
|
|
30
|
-
const se_DescribeEndpointsCommand = async (input, context) => {
|
|
31
|
-
const headers = sharedHeaders("DescribeEndpoints");
|
|
32
|
-
let body;
|
|
33
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
34
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
35
|
-
};
|
|
36
|
-
exports.se_DescribeEndpointsCommand = se_DescribeEndpointsCommand;
|
|
37
|
-
const se_DescribeScheduledQueryCommand = async (input, context) => {
|
|
38
|
-
const headers = sharedHeaders("DescribeScheduledQuery");
|
|
39
|
-
let body;
|
|
40
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
41
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
42
|
-
};
|
|
43
|
-
exports.se_DescribeScheduledQueryCommand = se_DescribeScheduledQueryCommand;
|
|
44
|
-
const se_ExecuteScheduledQueryCommand = async (input, context) => {
|
|
45
|
-
const headers = sharedHeaders("ExecuteScheduledQuery");
|
|
46
|
-
let body;
|
|
47
|
-
body = JSON.stringify(se_ExecuteScheduledQueryRequest(input, context));
|
|
48
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
49
|
-
};
|
|
50
|
-
exports.se_ExecuteScheduledQueryCommand = se_ExecuteScheduledQueryCommand;
|
|
51
|
-
const se_ListScheduledQueriesCommand = async (input, context) => {
|
|
52
|
-
const headers = sharedHeaders("ListScheduledQueries");
|
|
53
|
-
let body;
|
|
54
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
55
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
56
|
-
};
|
|
57
|
-
exports.se_ListScheduledQueriesCommand = se_ListScheduledQueriesCommand;
|
|
58
|
-
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
59
|
-
const headers = sharedHeaders("ListTagsForResource");
|
|
60
|
-
let body;
|
|
61
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
62
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
63
|
-
};
|
|
64
|
-
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
65
|
-
const se_PrepareQueryCommand = async (input, context) => {
|
|
66
|
-
const headers = sharedHeaders("PrepareQuery");
|
|
67
|
-
let body;
|
|
68
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
69
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
70
|
-
};
|
|
71
|
-
exports.se_PrepareQueryCommand = se_PrepareQueryCommand;
|
|
72
|
-
const se_QueryCommand = async (input, context) => {
|
|
73
|
-
const headers = sharedHeaders("Query");
|
|
74
|
-
let body;
|
|
75
|
-
body = JSON.stringify(se_QueryRequest(input, context));
|
|
76
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
77
|
-
};
|
|
78
|
-
exports.se_QueryCommand = se_QueryCommand;
|
|
79
|
-
const se_TagResourceCommand = async (input, context) => {
|
|
80
|
-
const headers = sharedHeaders("TagResource");
|
|
81
|
-
let body;
|
|
82
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
83
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
84
|
-
};
|
|
85
|
-
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
86
|
-
const se_UntagResourceCommand = async (input, context) => {
|
|
87
|
-
const headers = sharedHeaders("UntagResource");
|
|
88
|
-
let body;
|
|
89
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
90
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
91
|
-
};
|
|
92
|
-
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
93
|
-
const se_UpdateScheduledQueryCommand = async (input, context) => {
|
|
94
|
-
const headers = sharedHeaders("UpdateScheduledQuery");
|
|
95
|
-
let body;
|
|
96
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
97
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
98
|
-
};
|
|
99
|
-
exports.se_UpdateScheduledQueryCommand = se_UpdateScheduledQueryCommand;
|
|
100
|
-
const de_CancelQueryCommand = async (output, context) => {
|
|
101
|
-
if (output.statusCode >= 300) {
|
|
102
|
-
return de_CancelQueryCommandError(output, context);
|
|
103
|
-
}
|
|
104
|
-
const data = await parseBody(output.body, context);
|
|
105
|
-
let contents = {};
|
|
106
|
-
contents = (0, smithy_client_1._json)(data);
|
|
107
|
-
const response = {
|
|
108
|
-
$metadata: deserializeMetadata(output),
|
|
109
|
-
...contents,
|
|
110
|
-
};
|
|
111
|
-
return response;
|
|
112
|
-
};
|
|
113
|
-
exports.de_CancelQueryCommand = de_CancelQueryCommand;
|
|
114
|
-
const de_CancelQueryCommandError = async (output, context) => {
|
|
115
|
-
const parsedOutput = {
|
|
116
|
-
...output,
|
|
117
|
-
body: await parseErrorBody(output.body, context),
|
|
118
|
-
};
|
|
119
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
120
|
-
switch (errorCode) {
|
|
121
|
-
case "AccessDeniedException":
|
|
122
|
-
case "com.amazonaws.timestreamquery#AccessDeniedException":
|
|
123
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
124
|
-
case "InternalServerException":
|
|
125
|
-
case "com.amazonaws.timestreamquery#InternalServerException":
|
|
126
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
127
|
-
case "InvalidEndpointException":
|
|
128
|
-
case "com.amazonaws.timestreamquery#InvalidEndpointException":
|
|
129
|
-
throw await de_InvalidEndpointExceptionRes(parsedOutput, context);
|
|
130
|
-
case "ThrottlingException":
|
|
131
|
-
case "com.amazonaws.timestreamquery#ThrottlingException":
|
|
132
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
133
|
-
case "ValidationException":
|
|
134
|
-
case "com.amazonaws.timestreamquery#ValidationException":
|
|
135
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
136
|
-
default:
|
|
137
|
-
const parsedBody = parsedOutput.body;
|
|
138
|
-
return throwDefaultError({
|
|
139
|
-
output,
|
|
140
|
-
parsedBody,
|
|
141
|
-
errorCode,
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
};
|
|
145
|
-
const de_CreateScheduledQueryCommand = async (output, context) => {
|
|
146
|
-
if (output.statusCode >= 300) {
|
|
147
|
-
return de_CreateScheduledQueryCommandError(output, context);
|
|
148
|
-
}
|
|
149
|
-
const data = await parseBody(output.body, context);
|
|
150
|
-
let contents = {};
|
|
151
|
-
contents = (0, smithy_client_1._json)(data);
|
|
152
|
-
const response = {
|
|
153
|
-
$metadata: deserializeMetadata(output),
|
|
154
|
-
...contents,
|
|
155
|
-
};
|
|
156
|
-
return response;
|
|
157
|
-
};
|
|
158
|
-
exports.de_CreateScheduledQueryCommand = de_CreateScheduledQueryCommand;
|
|
159
|
-
const de_CreateScheduledQueryCommandError = async (output, context) => {
|
|
160
|
-
const parsedOutput = {
|
|
161
|
-
...output,
|
|
162
|
-
body: await parseErrorBody(output.body, context),
|
|
163
|
-
};
|
|
164
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
165
|
-
switch (errorCode) {
|
|
166
|
-
case "AccessDeniedException":
|
|
167
|
-
case "com.amazonaws.timestreamquery#AccessDeniedException":
|
|
168
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
169
|
-
case "ConflictException":
|
|
170
|
-
case "com.amazonaws.timestreamquery#ConflictException":
|
|
171
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
172
|
-
case "InternalServerException":
|
|
173
|
-
case "com.amazonaws.timestreamquery#InternalServerException":
|
|
174
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
175
|
-
case "InvalidEndpointException":
|
|
176
|
-
case "com.amazonaws.timestreamquery#InvalidEndpointException":
|
|
177
|
-
throw await de_InvalidEndpointExceptionRes(parsedOutput, context);
|
|
178
|
-
case "ServiceQuotaExceededException":
|
|
179
|
-
case "com.amazonaws.timestreamquery#ServiceQuotaExceededException":
|
|
180
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
181
|
-
case "ThrottlingException":
|
|
182
|
-
case "com.amazonaws.timestreamquery#ThrottlingException":
|
|
183
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
184
|
-
case "ValidationException":
|
|
185
|
-
case "com.amazonaws.timestreamquery#ValidationException":
|
|
186
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
187
|
-
default:
|
|
188
|
-
const parsedBody = parsedOutput.body;
|
|
189
|
-
return throwDefaultError({
|
|
190
|
-
output,
|
|
191
|
-
parsedBody,
|
|
192
|
-
errorCode,
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
};
|
|
196
|
-
const de_DeleteScheduledQueryCommand = async (output, context) => {
|
|
197
|
-
if (output.statusCode >= 300) {
|
|
198
|
-
return de_DeleteScheduledQueryCommandError(output, context);
|
|
199
|
-
}
|
|
200
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
201
|
-
const response = {
|
|
202
|
-
$metadata: deserializeMetadata(output),
|
|
203
|
-
};
|
|
204
|
-
return response;
|
|
205
|
-
};
|
|
206
|
-
exports.de_DeleteScheduledQueryCommand = de_DeleteScheduledQueryCommand;
|
|
207
|
-
const de_DeleteScheduledQueryCommandError = async (output, context) => {
|
|
208
|
-
const parsedOutput = {
|
|
209
|
-
...output,
|
|
210
|
-
body: await parseErrorBody(output.body, context),
|
|
211
|
-
};
|
|
212
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
213
|
-
switch (errorCode) {
|
|
214
|
-
case "AccessDeniedException":
|
|
215
|
-
case "com.amazonaws.timestreamquery#AccessDeniedException":
|
|
216
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
217
|
-
case "InternalServerException":
|
|
218
|
-
case "com.amazonaws.timestreamquery#InternalServerException":
|
|
219
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
220
|
-
case "InvalidEndpointException":
|
|
221
|
-
case "com.amazonaws.timestreamquery#InvalidEndpointException":
|
|
222
|
-
throw await de_InvalidEndpointExceptionRes(parsedOutput, context);
|
|
223
|
-
case "ResourceNotFoundException":
|
|
224
|
-
case "com.amazonaws.timestreamquery#ResourceNotFoundException":
|
|
225
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
226
|
-
case "ThrottlingException":
|
|
227
|
-
case "com.amazonaws.timestreamquery#ThrottlingException":
|
|
228
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
229
|
-
case "ValidationException":
|
|
230
|
-
case "com.amazonaws.timestreamquery#ValidationException":
|
|
231
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
232
|
-
default:
|
|
233
|
-
const parsedBody = parsedOutput.body;
|
|
234
|
-
return throwDefaultError({
|
|
235
|
-
output,
|
|
236
|
-
parsedBody,
|
|
237
|
-
errorCode,
|
|
238
|
-
});
|
|
239
|
-
}
|
|
240
|
-
};
|
|
241
|
-
const de_DescribeEndpointsCommand = async (output, context) => {
|
|
242
|
-
if (output.statusCode >= 300) {
|
|
243
|
-
return de_DescribeEndpointsCommandError(output, context);
|
|
244
|
-
}
|
|
245
|
-
const data = await parseBody(output.body, context);
|
|
246
|
-
let contents = {};
|
|
247
|
-
contents = (0, smithy_client_1._json)(data);
|
|
248
|
-
const response = {
|
|
249
|
-
$metadata: deserializeMetadata(output),
|
|
250
|
-
...contents,
|
|
251
|
-
};
|
|
252
|
-
return response;
|
|
253
|
-
};
|
|
254
|
-
exports.de_DescribeEndpointsCommand = de_DescribeEndpointsCommand;
|
|
255
|
-
const de_DescribeEndpointsCommandError = async (output, context) => {
|
|
256
|
-
const parsedOutput = {
|
|
257
|
-
...output,
|
|
258
|
-
body: await parseErrorBody(output.body, context),
|
|
259
|
-
};
|
|
260
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
261
|
-
switch (errorCode) {
|
|
262
|
-
case "InternalServerException":
|
|
263
|
-
case "com.amazonaws.timestreamquery#InternalServerException":
|
|
264
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
265
|
-
case "ThrottlingException":
|
|
266
|
-
case "com.amazonaws.timestreamquery#ThrottlingException":
|
|
267
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
268
|
-
case "ValidationException":
|
|
269
|
-
case "com.amazonaws.timestreamquery#ValidationException":
|
|
270
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
271
|
-
default:
|
|
272
|
-
const parsedBody = parsedOutput.body;
|
|
273
|
-
return throwDefaultError({
|
|
274
|
-
output,
|
|
275
|
-
parsedBody,
|
|
276
|
-
errorCode,
|
|
277
|
-
});
|
|
278
|
-
}
|
|
279
|
-
};
|
|
280
|
-
const de_DescribeScheduledQueryCommand = async (output, context) => {
|
|
281
|
-
if (output.statusCode >= 300) {
|
|
282
|
-
return de_DescribeScheduledQueryCommandError(output, context);
|
|
283
|
-
}
|
|
284
|
-
const data = await parseBody(output.body, context);
|
|
285
|
-
let contents = {};
|
|
286
|
-
contents = de_DescribeScheduledQueryResponse(data, context);
|
|
287
|
-
const response = {
|
|
288
|
-
$metadata: deserializeMetadata(output),
|
|
289
|
-
...contents,
|
|
290
|
-
};
|
|
291
|
-
return response;
|
|
292
|
-
};
|
|
293
|
-
exports.de_DescribeScheduledQueryCommand = de_DescribeScheduledQueryCommand;
|
|
294
|
-
const de_DescribeScheduledQueryCommandError = async (output, context) => {
|
|
295
|
-
const parsedOutput = {
|
|
296
|
-
...output,
|
|
297
|
-
body: await parseErrorBody(output.body, context),
|
|
298
|
-
};
|
|
299
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
300
|
-
switch (errorCode) {
|
|
301
|
-
case "AccessDeniedException":
|
|
302
|
-
case "com.amazonaws.timestreamquery#AccessDeniedException":
|
|
303
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
304
|
-
case "InternalServerException":
|
|
305
|
-
case "com.amazonaws.timestreamquery#InternalServerException":
|
|
306
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
307
|
-
case "InvalidEndpointException":
|
|
308
|
-
case "com.amazonaws.timestreamquery#InvalidEndpointException":
|
|
309
|
-
throw await de_InvalidEndpointExceptionRes(parsedOutput, context);
|
|
310
|
-
case "ResourceNotFoundException":
|
|
311
|
-
case "com.amazonaws.timestreamquery#ResourceNotFoundException":
|
|
312
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
313
|
-
case "ThrottlingException":
|
|
314
|
-
case "com.amazonaws.timestreamquery#ThrottlingException":
|
|
315
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
316
|
-
case "ValidationException":
|
|
317
|
-
case "com.amazonaws.timestreamquery#ValidationException":
|
|
318
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
319
|
-
default:
|
|
320
|
-
const parsedBody = parsedOutput.body;
|
|
321
|
-
return throwDefaultError({
|
|
322
|
-
output,
|
|
323
|
-
parsedBody,
|
|
324
|
-
errorCode,
|
|
325
|
-
});
|
|
326
|
-
}
|
|
327
|
-
};
|
|
328
|
-
const de_ExecuteScheduledQueryCommand = async (output, context) => {
|
|
329
|
-
if (output.statusCode >= 300) {
|
|
330
|
-
return de_ExecuteScheduledQueryCommandError(output, context);
|
|
331
|
-
}
|
|
332
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
333
|
-
const response = {
|
|
334
|
-
$metadata: deserializeMetadata(output),
|
|
335
|
-
};
|
|
336
|
-
return response;
|
|
337
|
-
};
|
|
338
|
-
exports.de_ExecuteScheduledQueryCommand = de_ExecuteScheduledQueryCommand;
|
|
339
|
-
const de_ExecuteScheduledQueryCommandError = async (output, context) => {
|
|
340
|
-
const parsedOutput = {
|
|
341
|
-
...output,
|
|
342
|
-
body: await parseErrorBody(output.body, context),
|
|
343
|
-
};
|
|
344
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
345
|
-
switch (errorCode) {
|
|
346
|
-
case "AccessDeniedException":
|
|
347
|
-
case "com.amazonaws.timestreamquery#AccessDeniedException":
|
|
348
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
349
|
-
case "InternalServerException":
|
|
350
|
-
case "com.amazonaws.timestreamquery#InternalServerException":
|
|
351
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
352
|
-
case "InvalidEndpointException":
|
|
353
|
-
case "com.amazonaws.timestreamquery#InvalidEndpointException":
|
|
354
|
-
throw await de_InvalidEndpointExceptionRes(parsedOutput, context);
|
|
355
|
-
case "ResourceNotFoundException":
|
|
356
|
-
case "com.amazonaws.timestreamquery#ResourceNotFoundException":
|
|
357
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
358
|
-
case "ThrottlingException":
|
|
359
|
-
case "com.amazonaws.timestreamquery#ThrottlingException":
|
|
360
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
361
|
-
case "ValidationException":
|
|
362
|
-
case "com.amazonaws.timestreamquery#ValidationException":
|
|
363
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
364
|
-
default:
|
|
365
|
-
const parsedBody = parsedOutput.body;
|
|
366
|
-
return throwDefaultError({
|
|
367
|
-
output,
|
|
368
|
-
parsedBody,
|
|
369
|
-
errorCode,
|
|
370
|
-
});
|
|
371
|
-
}
|
|
372
|
-
};
|
|
373
|
-
const de_ListScheduledQueriesCommand = async (output, context) => {
|
|
374
|
-
if (output.statusCode >= 300) {
|
|
375
|
-
return de_ListScheduledQueriesCommandError(output, context);
|
|
376
|
-
}
|
|
377
|
-
const data = await parseBody(output.body, context);
|
|
378
|
-
let contents = {};
|
|
379
|
-
contents = de_ListScheduledQueriesResponse(data, context);
|
|
380
|
-
const response = {
|
|
381
|
-
$metadata: deserializeMetadata(output),
|
|
382
|
-
...contents,
|
|
383
|
-
};
|
|
384
|
-
return response;
|
|
385
|
-
};
|
|
386
|
-
exports.de_ListScheduledQueriesCommand = de_ListScheduledQueriesCommand;
|
|
387
|
-
const de_ListScheduledQueriesCommandError = async (output, context) => {
|
|
388
|
-
const parsedOutput = {
|
|
389
|
-
...output,
|
|
390
|
-
body: await parseErrorBody(output.body, context),
|
|
391
|
-
};
|
|
392
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
393
|
-
switch (errorCode) {
|
|
394
|
-
case "AccessDeniedException":
|
|
395
|
-
case "com.amazonaws.timestreamquery#AccessDeniedException":
|
|
396
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
397
|
-
case "InternalServerException":
|
|
398
|
-
case "com.amazonaws.timestreamquery#InternalServerException":
|
|
399
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
400
|
-
case "InvalidEndpointException":
|
|
401
|
-
case "com.amazonaws.timestreamquery#InvalidEndpointException":
|
|
402
|
-
throw await de_InvalidEndpointExceptionRes(parsedOutput, context);
|
|
403
|
-
case "ThrottlingException":
|
|
404
|
-
case "com.amazonaws.timestreamquery#ThrottlingException":
|
|
405
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
406
|
-
case "ValidationException":
|
|
407
|
-
case "com.amazonaws.timestreamquery#ValidationException":
|
|
408
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
409
|
-
default:
|
|
410
|
-
const parsedBody = parsedOutput.body;
|
|
411
|
-
return throwDefaultError({
|
|
412
|
-
output,
|
|
413
|
-
parsedBody,
|
|
414
|
-
errorCode,
|
|
415
|
-
});
|
|
416
|
-
}
|
|
417
|
-
};
|
|
418
|
-
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
419
|
-
if (output.statusCode >= 300) {
|
|
420
|
-
return de_ListTagsForResourceCommandError(output, context);
|
|
421
|
-
}
|
|
422
|
-
const data = await parseBody(output.body, context);
|
|
423
|
-
let contents = {};
|
|
424
|
-
contents = (0, smithy_client_1._json)(data);
|
|
425
|
-
const response = {
|
|
426
|
-
$metadata: deserializeMetadata(output),
|
|
427
|
-
...contents,
|
|
428
|
-
};
|
|
429
|
-
return response;
|
|
430
|
-
};
|
|
431
|
-
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
432
|
-
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
433
|
-
const parsedOutput = {
|
|
434
|
-
...output,
|
|
435
|
-
body: await parseErrorBody(output.body, context),
|
|
436
|
-
};
|
|
437
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
438
|
-
switch (errorCode) {
|
|
439
|
-
case "InvalidEndpointException":
|
|
440
|
-
case "com.amazonaws.timestreamquery#InvalidEndpointException":
|
|
441
|
-
throw await de_InvalidEndpointExceptionRes(parsedOutput, context);
|
|
442
|
-
case "ResourceNotFoundException":
|
|
443
|
-
case "com.amazonaws.timestreamquery#ResourceNotFoundException":
|
|
444
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
445
|
-
case "ThrottlingException":
|
|
446
|
-
case "com.amazonaws.timestreamquery#ThrottlingException":
|
|
447
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
448
|
-
case "ValidationException":
|
|
449
|
-
case "com.amazonaws.timestreamquery#ValidationException":
|
|
450
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
451
|
-
default:
|
|
452
|
-
const parsedBody = parsedOutput.body;
|
|
453
|
-
return throwDefaultError({
|
|
454
|
-
output,
|
|
455
|
-
parsedBody,
|
|
456
|
-
errorCode,
|
|
457
|
-
});
|
|
458
|
-
}
|
|
459
|
-
};
|
|
460
|
-
const de_PrepareQueryCommand = async (output, context) => {
|
|
461
|
-
if (output.statusCode >= 300) {
|
|
462
|
-
return de_PrepareQueryCommandError(output, context);
|
|
463
|
-
}
|
|
464
|
-
const data = await parseBody(output.body, context);
|
|
465
|
-
let contents = {};
|
|
466
|
-
contents = de_PrepareQueryResponse(data, context);
|
|
467
|
-
const response = {
|
|
468
|
-
$metadata: deserializeMetadata(output),
|
|
469
|
-
...contents,
|
|
470
|
-
};
|
|
471
|
-
return response;
|
|
472
|
-
};
|
|
473
|
-
exports.de_PrepareQueryCommand = de_PrepareQueryCommand;
|
|
474
|
-
const de_PrepareQueryCommandError = async (output, context) => {
|
|
475
|
-
const parsedOutput = {
|
|
476
|
-
...output,
|
|
477
|
-
body: await parseErrorBody(output.body, context),
|
|
478
|
-
};
|
|
479
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
480
|
-
switch (errorCode) {
|
|
481
|
-
case "AccessDeniedException":
|
|
482
|
-
case "com.amazonaws.timestreamquery#AccessDeniedException":
|
|
483
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
484
|
-
case "InternalServerException":
|
|
485
|
-
case "com.amazonaws.timestreamquery#InternalServerException":
|
|
486
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
487
|
-
case "InvalidEndpointException":
|
|
488
|
-
case "com.amazonaws.timestreamquery#InvalidEndpointException":
|
|
489
|
-
throw await de_InvalidEndpointExceptionRes(parsedOutput, context);
|
|
490
|
-
case "ThrottlingException":
|
|
491
|
-
case "com.amazonaws.timestreamquery#ThrottlingException":
|
|
492
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
493
|
-
case "ValidationException":
|
|
494
|
-
case "com.amazonaws.timestreamquery#ValidationException":
|
|
495
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
496
|
-
default:
|
|
497
|
-
const parsedBody = parsedOutput.body;
|
|
498
|
-
return throwDefaultError({
|
|
499
|
-
output,
|
|
500
|
-
parsedBody,
|
|
501
|
-
errorCode,
|
|
502
|
-
});
|
|
503
|
-
}
|
|
504
|
-
};
|
|
505
|
-
const de_QueryCommand = async (output, context) => {
|
|
506
|
-
if (output.statusCode >= 300) {
|
|
507
|
-
return de_QueryCommandError(output, context);
|
|
508
|
-
}
|
|
509
|
-
const data = await parseBody(output.body, context);
|
|
510
|
-
let contents = {};
|
|
511
|
-
contents = de_QueryResponse(data, context);
|
|
512
|
-
const response = {
|
|
513
|
-
$metadata: deserializeMetadata(output),
|
|
514
|
-
...contents,
|
|
515
|
-
};
|
|
516
|
-
return response;
|
|
517
|
-
};
|
|
518
|
-
exports.de_QueryCommand = de_QueryCommand;
|
|
519
|
-
const de_QueryCommandError = async (output, context) => {
|
|
520
|
-
const parsedOutput = {
|
|
521
|
-
...output,
|
|
522
|
-
body: await parseErrorBody(output.body, context),
|
|
523
|
-
};
|
|
524
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
525
|
-
switch (errorCode) {
|
|
526
|
-
case "AccessDeniedException":
|
|
527
|
-
case "com.amazonaws.timestreamquery#AccessDeniedException":
|
|
528
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
529
|
-
case "ConflictException":
|
|
530
|
-
case "com.amazonaws.timestreamquery#ConflictException":
|
|
531
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
532
|
-
case "InternalServerException":
|
|
533
|
-
case "com.amazonaws.timestreamquery#InternalServerException":
|
|
534
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
535
|
-
case "InvalidEndpointException":
|
|
536
|
-
case "com.amazonaws.timestreamquery#InvalidEndpointException":
|
|
537
|
-
throw await de_InvalidEndpointExceptionRes(parsedOutput, context);
|
|
538
|
-
case "QueryExecutionException":
|
|
539
|
-
case "com.amazonaws.timestreamquery#QueryExecutionException":
|
|
540
|
-
throw await de_QueryExecutionExceptionRes(parsedOutput, context);
|
|
541
|
-
case "ThrottlingException":
|
|
542
|
-
case "com.amazonaws.timestreamquery#ThrottlingException":
|
|
543
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
544
|
-
case "ValidationException":
|
|
545
|
-
case "com.amazonaws.timestreamquery#ValidationException":
|
|
546
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
547
|
-
default:
|
|
548
|
-
const parsedBody = parsedOutput.body;
|
|
549
|
-
return throwDefaultError({
|
|
550
|
-
output,
|
|
551
|
-
parsedBody,
|
|
552
|
-
errorCode,
|
|
553
|
-
});
|
|
554
|
-
}
|
|
555
|
-
};
|
|
556
|
-
const de_TagResourceCommand = async (output, context) => {
|
|
557
|
-
if (output.statusCode >= 300) {
|
|
558
|
-
return de_TagResourceCommandError(output, context);
|
|
559
|
-
}
|
|
560
|
-
const data = await parseBody(output.body, context);
|
|
561
|
-
let contents = {};
|
|
562
|
-
contents = (0, smithy_client_1._json)(data);
|
|
563
|
-
const response = {
|
|
564
|
-
$metadata: deserializeMetadata(output),
|
|
565
|
-
...contents,
|
|
566
|
-
};
|
|
567
|
-
return response;
|
|
568
|
-
};
|
|
569
|
-
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
570
|
-
const de_TagResourceCommandError = async (output, context) => {
|
|
571
|
-
const parsedOutput = {
|
|
572
|
-
...output,
|
|
573
|
-
body: await parseErrorBody(output.body, context),
|
|
574
|
-
};
|
|
575
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
576
|
-
switch (errorCode) {
|
|
577
|
-
case "InvalidEndpointException":
|
|
578
|
-
case "com.amazonaws.timestreamquery#InvalidEndpointException":
|
|
579
|
-
throw await de_InvalidEndpointExceptionRes(parsedOutput, context);
|
|
580
|
-
case "ResourceNotFoundException":
|
|
581
|
-
case "com.amazonaws.timestreamquery#ResourceNotFoundException":
|
|
582
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
583
|
-
case "ServiceQuotaExceededException":
|
|
584
|
-
case "com.amazonaws.timestreamquery#ServiceQuotaExceededException":
|
|
585
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
586
|
-
case "ThrottlingException":
|
|
587
|
-
case "com.amazonaws.timestreamquery#ThrottlingException":
|
|
588
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
589
|
-
case "ValidationException":
|
|
590
|
-
case "com.amazonaws.timestreamquery#ValidationException":
|
|
591
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
592
|
-
default:
|
|
593
|
-
const parsedBody = parsedOutput.body;
|
|
594
|
-
return throwDefaultError({
|
|
595
|
-
output,
|
|
596
|
-
parsedBody,
|
|
597
|
-
errorCode,
|
|
598
|
-
});
|
|
599
|
-
}
|
|
600
|
-
};
|
|
601
|
-
const de_UntagResourceCommand = async (output, context) => {
|
|
602
|
-
if (output.statusCode >= 300) {
|
|
603
|
-
return de_UntagResourceCommandError(output, context);
|
|
604
|
-
}
|
|
605
|
-
const data = await parseBody(output.body, context);
|
|
606
|
-
let contents = {};
|
|
607
|
-
contents = (0, smithy_client_1._json)(data);
|
|
608
|
-
const response = {
|
|
609
|
-
$metadata: deserializeMetadata(output),
|
|
610
|
-
...contents,
|
|
611
|
-
};
|
|
612
|
-
return response;
|
|
613
|
-
};
|
|
614
|
-
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
615
|
-
const de_UntagResourceCommandError = async (output, context) => {
|
|
616
|
-
const parsedOutput = {
|
|
617
|
-
...output,
|
|
618
|
-
body: await parseErrorBody(output.body, context),
|
|
619
|
-
};
|
|
620
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
621
|
-
switch (errorCode) {
|
|
622
|
-
case "InvalidEndpointException":
|
|
623
|
-
case "com.amazonaws.timestreamquery#InvalidEndpointException":
|
|
624
|
-
throw await de_InvalidEndpointExceptionRes(parsedOutput, context);
|
|
625
|
-
case "ResourceNotFoundException":
|
|
626
|
-
case "com.amazonaws.timestreamquery#ResourceNotFoundException":
|
|
627
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
628
|
-
case "ThrottlingException":
|
|
629
|
-
case "com.amazonaws.timestreamquery#ThrottlingException":
|
|
630
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
631
|
-
case "ValidationException":
|
|
632
|
-
case "com.amazonaws.timestreamquery#ValidationException":
|
|
633
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
634
|
-
default:
|
|
635
|
-
const parsedBody = parsedOutput.body;
|
|
636
|
-
return throwDefaultError({
|
|
637
|
-
output,
|
|
638
|
-
parsedBody,
|
|
639
|
-
errorCode,
|
|
640
|
-
});
|
|
641
|
-
}
|
|
642
|
-
};
|
|
643
|
-
const de_UpdateScheduledQueryCommand = async (output, context) => {
|
|
644
|
-
if (output.statusCode >= 300) {
|
|
645
|
-
return de_UpdateScheduledQueryCommandError(output, context);
|
|
646
|
-
}
|
|
647
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
648
|
-
const response = {
|
|
649
|
-
$metadata: deserializeMetadata(output),
|
|
650
|
-
};
|
|
651
|
-
return response;
|
|
652
|
-
};
|
|
653
|
-
exports.de_UpdateScheduledQueryCommand = de_UpdateScheduledQueryCommand;
|
|
654
|
-
const de_UpdateScheduledQueryCommandError = async (output, context) => {
|
|
655
|
-
const parsedOutput = {
|
|
656
|
-
...output,
|
|
657
|
-
body: await parseErrorBody(output.body, context),
|
|
658
|
-
};
|
|
659
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
660
|
-
switch (errorCode) {
|
|
661
|
-
case "AccessDeniedException":
|
|
662
|
-
case "com.amazonaws.timestreamquery#AccessDeniedException":
|
|
663
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
664
|
-
case "InternalServerException":
|
|
665
|
-
case "com.amazonaws.timestreamquery#InternalServerException":
|
|
666
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
667
|
-
case "InvalidEndpointException":
|
|
668
|
-
case "com.amazonaws.timestreamquery#InvalidEndpointException":
|
|
669
|
-
throw await de_InvalidEndpointExceptionRes(parsedOutput, context);
|
|
670
|
-
case "ResourceNotFoundException":
|
|
671
|
-
case "com.amazonaws.timestreamquery#ResourceNotFoundException":
|
|
672
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
673
|
-
case "ThrottlingException":
|
|
674
|
-
case "com.amazonaws.timestreamquery#ThrottlingException":
|
|
675
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
676
|
-
case "ValidationException":
|
|
677
|
-
case "com.amazonaws.timestreamquery#ValidationException":
|
|
678
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
679
|
-
default:
|
|
680
|
-
const parsedBody = parsedOutput.body;
|
|
681
|
-
return throwDefaultError({
|
|
682
|
-
output,
|
|
683
|
-
parsedBody,
|
|
684
|
-
errorCode,
|
|
685
|
-
});
|
|
686
|
-
}
|
|
687
|
-
};
|
|
688
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
689
|
-
const body = parsedOutput.body;
|
|
690
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
691
|
-
const exception = new models_0_1.AccessDeniedException({
|
|
692
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
693
|
-
...deserialized,
|
|
694
|
-
});
|
|
695
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
696
|
-
};
|
|
697
|
-
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
698
|
-
const body = parsedOutput.body;
|
|
699
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
700
|
-
const exception = new models_0_1.ConflictException({
|
|
701
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
702
|
-
...deserialized,
|
|
703
|
-
});
|
|
704
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
705
|
-
};
|
|
706
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
707
|
-
const body = parsedOutput.body;
|
|
708
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
709
|
-
const exception = new models_0_1.InternalServerException({
|
|
710
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
711
|
-
...deserialized,
|
|
712
|
-
});
|
|
713
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
714
|
-
};
|
|
715
|
-
const de_InvalidEndpointExceptionRes = async (parsedOutput, context) => {
|
|
716
|
-
const body = parsedOutput.body;
|
|
717
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
718
|
-
const exception = new models_0_1.InvalidEndpointException({
|
|
719
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
720
|
-
...deserialized,
|
|
721
|
-
});
|
|
722
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
723
|
-
};
|
|
724
|
-
const de_QueryExecutionExceptionRes = async (parsedOutput, context) => {
|
|
725
|
-
const body = parsedOutput.body;
|
|
726
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
727
|
-
const exception = new models_0_1.QueryExecutionException({
|
|
728
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
729
|
-
...deserialized,
|
|
730
|
-
});
|
|
731
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
732
|
-
};
|
|
733
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
734
|
-
const body = parsedOutput.body;
|
|
735
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
736
|
-
const exception = new models_0_1.ResourceNotFoundException({
|
|
737
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
738
|
-
...deserialized,
|
|
739
|
-
});
|
|
740
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
741
|
-
};
|
|
742
|
-
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
743
|
-
const body = parsedOutput.body;
|
|
744
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
745
|
-
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
746
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
747
|
-
...deserialized,
|
|
748
|
-
});
|
|
749
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
750
|
-
};
|
|
751
|
-
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
752
|
-
const body = parsedOutput.body;
|
|
753
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
754
|
-
const exception = new models_0_1.ThrottlingException({
|
|
755
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
756
|
-
...deserialized,
|
|
757
|
-
});
|
|
758
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
759
|
-
};
|
|
760
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
761
|
-
const body = parsedOutput.body;
|
|
762
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
763
|
-
const exception = new models_0_1.ValidationException({
|
|
764
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
765
|
-
...deserialized,
|
|
766
|
-
});
|
|
767
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
768
|
-
};
|
|
769
|
-
const se_CreateScheduledQueryRequest = (input, context) => {
|
|
770
|
-
return (0, smithy_client_1.take)(input, {
|
|
771
|
-
ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
772
|
-
ErrorReportConfiguration: smithy_client_1._json,
|
|
773
|
-
KmsKeyId: [],
|
|
774
|
-
Name: [],
|
|
775
|
-
NotificationConfiguration: smithy_client_1._json,
|
|
776
|
-
QueryString: [],
|
|
777
|
-
ScheduleConfiguration: smithy_client_1._json,
|
|
778
|
-
ScheduledQueryExecutionRoleArn: [],
|
|
779
|
-
Tags: smithy_client_1._json,
|
|
780
|
-
TargetConfiguration: smithy_client_1._json,
|
|
781
|
-
});
|
|
782
|
-
};
|
|
783
|
-
const se_ExecuteScheduledQueryRequest = (input, context) => {
|
|
784
|
-
return (0, smithy_client_1.take)(input, {
|
|
785
|
-
ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
786
|
-
InvocationTime: (_) => Math.round(_.getTime() / 1000),
|
|
787
|
-
ScheduledQueryArn: [],
|
|
788
|
-
});
|
|
789
|
-
};
|
|
790
|
-
const se_QueryRequest = (input, context) => {
|
|
791
|
-
return (0, smithy_client_1.take)(input, {
|
|
792
|
-
ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
793
|
-
MaxRows: [],
|
|
794
|
-
NextToken: [],
|
|
795
|
-
QueryString: [],
|
|
796
|
-
});
|
|
797
|
-
};
|
|
798
|
-
const de_ColumnInfo = (output, context) => {
|
|
799
|
-
return (0, smithy_client_1.take)(output, {
|
|
800
|
-
Name: smithy_client_1.expectString,
|
|
801
|
-
Type: (_) => de_Type(_, context),
|
|
802
|
-
});
|
|
803
|
-
};
|
|
804
|
-
const de_ColumnInfoList = (output, context) => {
|
|
805
|
-
const retVal = (output || [])
|
|
806
|
-
.filter((e) => e != null)
|
|
807
|
-
.map((entry) => {
|
|
808
|
-
return de_ColumnInfo(entry, context);
|
|
809
|
-
});
|
|
810
|
-
return retVal;
|
|
811
|
-
};
|
|
812
|
-
const de_Datum = (output, context) => {
|
|
813
|
-
return (0, smithy_client_1.take)(output, {
|
|
814
|
-
ArrayValue: (_) => de_DatumList(_, context),
|
|
815
|
-
NullValue: smithy_client_1.expectBoolean,
|
|
816
|
-
RowValue: (_) => de_Row(_, context),
|
|
817
|
-
ScalarValue: smithy_client_1.expectString,
|
|
818
|
-
TimeSeriesValue: (_) => de_TimeSeriesDataPointList(_, context),
|
|
819
|
-
});
|
|
820
|
-
};
|
|
821
|
-
const de_DatumList = (output, context) => {
|
|
822
|
-
const retVal = (output || [])
|
|
823
|
-
.filter((e) => e != null)
|
|
824
|
-
.map((entry) => {
|
|
825
|
-
return de_Datum(entry, context);
|
|
826
|
-
});
|
|
827
|
-
return retVal;
|
|
828
|
-
};
|
|
829
|
-
const de_DescribeScheduledQueryResponse = (output, context) => {
|
|
830
|
-
return (0, smithy_client_1.take)(output, {
|
|
831
|
-
ScheduledQuery: (_) => de_ScheduledQueryDescription(_, context),
|
|
832
|
-
});
|
|
833
|
-
};
|
|
834
|
-
const de_ListScheduledQueriesResponse = (output, context) => {
|
|
835
|
-
return (0, smithy_client_1.take)(output, {
|
|
836
|
-
NextToken: smithy_client_1.expectString,
|
|
837
|
-
ScheduledQueries: (_) => de_ScheduledQueryList(_, context),
|
|
838
|
-
});
|
|
839
|
-
};
|
|
840
|
-
const de_ParameterMapping = (output, context) => {
|
|
841
|
-
return (0, smithy_client_1.take)(output, {
|
|
842
|
-
Name: smithy_client_1.expectString,
|
|
843
|
-
Type: (_) => de_Type(_, context),
|
|
844
|
-
});
|
|
845
|
-
};
|
|
846
|
-
const de_ParameterMappingList = (output, context) => {
|
|
847
|
-
const retVal = (output || [])
|
|
848
|
-
.filter((e) => e != null)
|
|
849
|
-
.map((entry) => {
|
|
850
|
-
return de_ParameterMapping(entry, context);
|
|
851
|
-
});
|
|
852
|
-
return retVal;
|
|
853
|
-
};
|
|
854
|
-
const de_PrepareQueryResponse = (output, context) => {
|
|
855
|
-
return (0, smithy_client_1.take)(output, {
|
|
856
|
-
Columns: (_) => de_SelectColumnList(_, context),
|
|
857
|
-
Parameters: (_) => de_ParameterMappingList(_, context),
|
|
858
|
-
QueryString: smithy_client_1.expectString,
|
|
859
|
-
});
|
|
860
|
-
};
|
|
861
|
-
const de_QueryResponse = (output, context) => {
|
|
862
|
-
return (0, smithy_client_1.take)(output, {
|
|
863
|
-
ColumnInfo: (_) => de_ColumnInfoList(_, context),
|
|
864
|
-
NextToken: smithy_client_1.expectString,
|
|
865
|
-
QueryId: smithy_client_1.expectString,
|
|
866
|
-
QueryStatus: (_) => de_QueryStatus(_, context),
|
|
867
|
-
Rows: (_) => de_RowList(_, context),
|
|
868
|
-
});
|
|
869
|
-
};
|
|
870
|
-
const de_QueryStatus = (output, context) => {
|
|
871
|
-
return (0, smithy_client_1.take)(output, {
|
|
872
|
-
CumulativeBytesMetered: smithy_client_1.expectLong,
|
|
873
|
-
CumulativeBytesScanned: smithy_client_1.expectLong,
|
|
874
|
-
ProgressPercentage: smithy_client_1.limitedParseDouble,
|
|
875
|
-
});
|
|
876
|
-
};
|
|
877
|
-
const de_Row = (output, context) => {
|
|
878
|
-
return (0, smithy_client_1.take)(output, {
|
|
879
|
-
Data: (_) => de_DatumList(_, context),
|
|
880
|
-
});
|
|
881
|
-
};
|
|
882
|
-
const de_RowList = (output, context) => {
|
|
883
|
-
const retVal = (output || [])
|
|
884
|
-
.filter((e) => e != null)
|
|
885
|
-
.map((entry) => {
|
|
886
|
-
return de_Row(entry, context);
|
|
887
|
-
});
|
|
888
|
-
return retVal;
|
|
889
|
-
};
|
|
890
|
-
const de_ScheduledQuery = (output, context) => {
|
|
891
|
-
return (0, smithy_client_1.take)(output, {
|
|
892
|
-
Arn: smithy_client_1.expectString,
|
|
893
|
-
CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
894
|
-
ErrorReportConfiguration: smithy_client_1._json,
|
|
895
|
-
LastRunStatus: smithy_client_1.expectString,
|
|
896
|
-
Name: smithy_client_1.expectString,
|
|
897
|
-
NextInvocationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
898
|
-
PreviousInvocationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
899
|
-
State: smithy_client_1.expectString,
|
|
900
|
-
TargetDestination: smithy_client_1._json,
|
|
901
|
-
});
|
|
902
|
-
};
|
|
903
|
-
const de_ScheduledQueryDescription = (output, context) => {
|
|
904
|
-
return (0, smithy_client_1.take)(output, {
|
|
905
|
-
Arn: smithy_client_1.expectString,
|
|
906
|
-
CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
907
|
-
ErrorReportConfiguration: smithy_client_1._json,
|
|
908
|
-
KmsKeyId: smithy_client_1.expectString,
|
|
909
|
-
LastRunSummary: (_) => de_ScheduledQueryRunSummary(_, context),
|
|
910
|
-
Name: smithy_client_1.expectString,
|
|
911
|
-
NextInvocationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
912
|
-
NotificationConfiguration: smithy_client_1._json,
|
|
913
|
-
PreviousInvocationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
914
|
-
QueryString: smithy_client_1.expectString,
|
|
915
|
-
RecentlyFailedRuns: (_) => de_ScheduledQueryRunSummaryList(_, context),
|
|
916
|
-
ScheduleConfiguration: smithy_client_1._json,
|
|
917
|
-
ScheduledQueryExecutionRoleArn: smithy_client_1.expectString,
|
|
918
|
-
State: smithy_client_1.expectString,
|
|
919
|
-
TargetConfiguration: smithy_client_1._json,
|
|
920
|
-
});
|
|
921
|
-
};
|
|
922
|
-
const de_ScheduledQueryList = (output, context) => {
|
|
923
|
-
const retVal = (output || [])
|
|
924
|
-
.filter((e) => e != null)
|
|
925
|
-
.map((entry) => {
|
|
926
|
-
return de_ScheduledQuery(entry, context);
|
|
927
|
-
});
|
|
928
|
-
return retVal;
|
|
929
|
-
};
|
|
930
|
-
const de_ScheduledQueryRunSummary = (output, context) => {
|
|
931
|
-
return (0, smithy_client_1.take)(output, {
|
|
932
|
-
ErrorReportLocation: smithy_client_1._json,
|
|
933
|
-
ExecutionStats: smithy_client_1._json,
|
|
934
|
-
FailureReason: smithy_client_1.expectString,
|
|
935
|
-
InvocationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
936
|
-
RunStatus: smithy_client_1.expectString,
|
|
937
|
-
TriggerTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
938
|
-
});
|
|
939
|
-
};
|
|
940
|
-
const de_ScheduledQueryRunSummaryList = (output, context) => {
|
|
941
|
-
const retVal = (output || [])
|
|
942
|
-
.filter((e) => e != null)
|
|
943
|
-
.map((entry) => {
|
|
944
|
-
return de_ScheduledQueryRunSummary(entry, context);
|
|
945
|
-
});
|
|
946
|
-
return retVal;
|
|
947
|
-
};
|
|
948
|
-
const de_SelectColumn = (output, context) => {
|
|
949
|
-
return (0, smithy_client_1.take)(output, {
|
|
950
|
-
Aliased: smithy_client_1.expectBoolean,
|
|
951
|
-
DatabaseName: smithy_client_1.expectString,
|
|
952
|
-
Name: smithy_client_1.expectString,
|
|
953
|
-
TableName: smithy_client_1.expectString,
|
|
954
|
-
Type: (_) => de_Type(_, context),
|
|
955
|
-
});
|
|
956
|
-
};
|
|
957
|
-
const de_SelectColumnList = (output, context) => {
|
|
958
|
-
const retVal = (output || [])
|
|
959
|
-
.filter((e) => e != null)
|
|
960
|
-
.map((entry) => {
|
|
961
|
-
return de_SelectColumn(entry, context);
|
|
962
|
-
});
|
|
963
|
-
return retVal;
|
|
964
|
-
};
|
|
965
|
-
const de_TimeSeriesDataPoint = (output, context) => {
|
|
966
|
-
return (0, smithy_client_1.take)(output, {
|
|
967
|
-
Time: smithy_client_1.expectString,
|
|
968
|
-
Value: (_) => de_Datum(_, context),
|
|
969
|
-
});
|
|
970
|
-
};
|
|
971
|
-
const de_TimeSeriesDataPointList = (output, context) => {
|
|
972
|
-
const retVal = (output || [])
|
|
973
|
-
.filter((e) => e != null)
|
|
974
|
-
.map((entry) => {
|
|
975
|
-
return de_TimeSeriesDataPoint(entry, context);
|
|
976
|
-
});
|
|
977
|
-
return retVal;
|
|
978
|
-
};
|
|
979
|
-
const de_Type = (output, context) => {
|
|
980
|
-
return (0, smithy_client_1.take)(output, {
|
|
981
|
-
ArrayColumnInfo: (_) => de_ColumnInfo(_, context),
|
|
982
|
-
RowColumnInfo: (_) => de_ColumnInfoList(_, context),
|
|
983
|
-
ScalarType: smithy_client_1.expectString,
|
|
984
|
-
TimeSeriesMeasureValueColumnInfo: (_) => de_ColumnInfo(_, context),
|
|
985
|
-
});
|
|
986
|
-
};
|
|
987
|
-
const deserializeMetadata = (output) => ({
|
|
988
|
-
httpStatusCode: output.statusCode,
|
|
989
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
990
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
991
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
992
|
-
});
|
|
993
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
994
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(TimestreamQueryServiceException_1.TimestreamQueryServiceException);
|
|
995
|
-
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
996
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
997
|
-
const contents = {
|
|
998
|
-
protocol,
|
|
999
|
-
hostname,
|
|
1000
|
-
port,
|
|
1001
|
-
method: "POST",
|
|
1002
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
1003
|
-
headers,
|
|
1004
|
-
};
|
|
1005
|
-
if (resolvedHostname !== undefined) {
|
|
1006
|
-
contents.hostname = resolvedHostname;
|
|
1007
|
-
}
|
|
1008
|
-
if (body !== undefined) {
|
|
1009
|
-
contents.body = body;
|
|
1010
|
-
}
|
|
1011
|
-
return new protocol_http_1.HttpRequest(contents);
|
|
1012
|
-
};
|
|
1013
|
-
function sharedHeaders(operation) {
|
|
1014
|
-
return {
|
|
1015
|
-
"content-type": "application/x-amz-json-1.0",
|
|
1016
|
-
"x-amz-target": `Timestream_20181101.${operation}`,
|
|
1017
|
-
};
|
|
1018
|
-
}
|
|
1019
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1020
|
-
if (encoded.length) {
|
|
1021
|
-
return JSON.parse(encoded);
|
|
1022
|
-
}
|
|
1023
|
-
return {};
|
|
1024
|
-
});
|
|
1025
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
1026
|
-
const value = await parseBody(errorBody, context);
|
|
1027
|
-
value.message = value.message ?? value.Message;
|
|
1028
|
-
return value;
|
|
1029
|
-
};
|
|
1030
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
1031
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1032
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
1033
|
-
let cleanValue = rawValue;
|
|
1034
|
-
if (typeof cleanValue === "number") {
|
|
1035
|
-
cleanValue = cleanValue.toString();
|
|
1036
|
-
}
|
|
1037
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1038
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1039
|
-
}
|
|
1040
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1041
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1042
|
-
}
|
|
1043
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1044
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1045
|
-
}
|
|
1046
|
-
return cleanValue;
|
|
1047
|
-
};
|
|
1048
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1049
|
-
if (headerKey !== undefined) {
|
|
1050
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1051
|
-
}
|
|
1052
|
-
if (data.code !== undefined) {
|
|
1053
|
-
return sanitizeErrorCode(data.code);
|
|
1054
|
-
}
|
|
1055
|
-
if (data["__type"] !== undefined) {
|
|
1056
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1057
|
-
}
|
|
1058
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|