@aws-sdk/client-timestream-write 3.927.0 → 3.928.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/index.js +690 -771
- package/dist-cjs/runtimeConfig.shared.js +7 -0
- package/dist-es/TimestreamWriteClient.js +2 -0
- package/dist-es/commands/CreateBatchLoadTaskCommand.js +2 -7
- package/dist-es/commands/CreateDatabaseCommand.js +2 -6
- package/dist-es/commands/CreateTableCommand.js +2 -6
- package/dist-es/commands/DeleteDatabaseCommand.js +2 -6
- package/dist-es/commands/DeleteTableCommand.js +2 -6
- package/dist-es/commands/DescribeBatchLoadTaskCommand.js +2 -6
- package/dist-es/commands/DescribeDatabaseCommand.js +2 -6
- package/dist-es/commands/DescribeEndpointsCommand.js +3 -9
- package/dist-es/commands/DescribeTableCommand.js +2 -6
- package/dist-es/commands/ListBatchLoadTasksCommand.js +2 -6
- package/dist-es/commands/ListDatabasesCommand.js +2 -6
- package/dist-es/commands/ListTablesCommand.js +2 -6
- package/dist-es/commands/ListTagsForResourceCommand.js +2 -6
- package/dist-es/commands/ResumeBatchLoadTaskCommand.js +2 -6
- package/dist-es/commands/TagResourceCommand.js +2 -6
- package/dist-es/commands/UntagResourceCommand.js +2 -6
- package/dist-es/commands/UpdateDatabaseCommand.js +2 -6
- package/dist-es/commands/UpdateTableCommand.js +2 -6
- package/dist-es/commands/WriteRecordsCommand.js +2 -6
- package/dist-es/models/models_0.js +0 -5
- package/dist-es/runtimeConfig.shared.js +7 -0
- package/dist-es/schemas/schemas_0.js +634 -0
- package/dist-types/TimestreamWriteClient.d.ts +10 -1
- package/dist-types/models/models_0.d.ts +0 -4
- package/dist-types/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/runtimeConfig.d.ts +1 -0
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/runtimeConfig.shared.d.ts +1 -0
- package/dist-types/schemas/schemas_0.d.ts +112 -0
- package/dist-types/ts3.4/TimestreamWriteClient.d.ts +4 -0
- package/dist-types/ts3.4/models/models_0.d.ts +0 -3
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +118 -0
- package/package.json +5 -6
- package/dist-es/protocols/Aws_json1_0.js +0 -656
- package/dist-types/protocols/Aws_json1_0.d.ts +0 -173
- package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +0 -233
|
@@ -1,656 +0,0 @@
|
|
|
1
|
-
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
|
|
2
|
-
import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
|
|
3
|
-
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
|
-
import { v4 as generateIdempotencyToken } from "@smithy/uuid";
|
|
5
|
-
import { AccessDeniedException, ConflictException, InternalServerException, InvalidEndpointException, RejectedRecordsException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
6
|
-
import { TimestreamWriteServiceException as __BaseException } from "../models/TimestreamWriteServiceException";
|
|
7
|
-
export const se_CreateBatchLoadTaskCommand = async (input, context) => {
|
|
8
|
-
const headers = sharedHeaders("CreateBatchLoadTask");
|
|
9
|
-
let body;
|
|
10
|
-
body = JSON.stringify(se_CreateBatchLoadTaskRequest(input, context));
|
|
11
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
12
|
-
};
|
|
13
|
-
export const se_CreateDatabaseCommand = async (input, context) => {
|
|
14
|
-
const headers = sharedHeaders("CreateDatabase");
|
|
15
|
-
let body;
|
|
16
|
-
body = JSON.stringify(_json(input));
|
|
17
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
18
|
-
};
|
|
19
|
-
export const se_CreateTableCommand = async (input, context) => {
|
|
20
|
-
const headers = sharedHeaders("CreateTable");
|
|
21
|
-
let body;
|
|
22
|
-
body = JSON.stringify(_json(input));
|
|
23
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
24
|
-
};
|
|
25
|
-
export const se_DeleteDatabaseCommand = async (input, context) => {
|
|
26
|
-
const headers = sharedHeaders("DeleteDatabase");
|
|
27
|
-
let body;
|
|
28
|
-
body = JSON.stringify(_json(input));
|
|
29
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
30
|
-
};
|
|
31
|
-
export const se_DeleteTableCommand = async (input, context) => {
|
|
32
|
-
const headers = sharedHeaders("DeleteTable");
|
|
33
|
-
let body;
|
|
34
|
-
body = JSON.stringify(_json(input));
|
|
35
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
36
|
-
};
|
|
37
|
-
export const se_DescribeBatchLoadTaskCommand = async (input, context) => {
|
|
38
|
-
const headers = sharedHeaders("DescribeBatchLoadTask");
|
|
39
|
-
let body;
|
|
40
|
-
body = JSON.stringify(_json(input));
|
|
41
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
42
|
-
};
|
|
43
|
-
export const se_DescribeDatabaseCommand = async (input, context) => {
|
|
44
|
-
const headers = sharedHeaders("DescribeDatabase");
|
|
45
|
-
let body;
|
|
46
|
-
body = JSON.stringify(_json(input));
|
|
47
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
48
|
-
};
|
|
49
|
-
export const se_DescribeEndpointsCommand = async (input, context) => {
|
|
50
|
-
const headers = sharedHeaders("DescribeEndpoints");
|
|
51
|
-
let body;
|
|
52
|
-
body = JSON.stringify(_json(input));
|
|
53
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
54
|
-
};
|
|
55
|
-
export const se_DescribeTableCommand = async (input, context) => {
|
|
56
|
-
const headers = sharedHeaders("DescribeTable");
|
|
57
|
-
let body;
|
|
58
|
-
body = JSON.stringify(_json(input));
|
|
59
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
60
|
-
};
|
|
61
|
-
export const se_ListBatchLoadTasksCommand = async (input, context) => {
|
|
62
|
-
const headers = sharedHeaders("ListBatchLoadTasks");
|
|
63
|
-
let body;
|
|
64
|
-
body = JSON.stringify(_json(input));
|
|
65
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
66
|
-
};
|
|
67
|
-
export const se_ListDatabasesCommand = async (input, context) => {
|
|
68
|
-
const headers = sharedHeaders("ListDatabases");
|
|
69
|
-
let body;
|
|
70
|
-
body = JSON.stringify(_json(input));
|
|
71
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
72
|
-
};
|
|
73
|
-
export const se_ListTablesCommand = async (input, context) => {
|
|
74
|
-
const headers = sharedHeaders("ListTables");
|
|
75
|
-
let body;
|
|
76
|
-
body = JSON.stringify(_json(input));
|
|
77
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
78
|
-
};
|
|
79
|
-
export const se_ListTagsForResourceCommand = async (input, context) => {
|
|
80
|
-
const headers = sharedHeaders("ListTagsForResource");
|
|
81
|
-
let body;
|
|
82
|
-
body = JSON.stringify(_json(input));
|
|
83
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
84
|
-
};
|
|
85
|
-
export const se_ResumeBatchLoadTaskCommand = async (input, context) => {
|
|
86
|
-
const headers = sharedHeaders("ResumeBatchLoadTask");
|
|
87
|
-
let body;
|
|
88
|
-
body = JSON.stringify(_json(input));
|
|
89
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
90
|
-
};
|
|
91
|
-
export const se_TagResourceCommand = async (input, context) => {
|
|
92
|
-
const headers = sharedHeaders("TagResource");
|
|
93
|
-
let body;
|
|
94
|
-
body = JSON.stringify(_json(input));
|
|
95
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
96
|
-
};
|
|
97
|
-
export const se_UntagResourceCommand = async (input, context) => {
|
|
98
|
-
const headers = sharedHeaders("UntagResource");
|
|
99
|
-
let body;
|
|
100
|
-
body = JSON.stringify(_json(input));
|
|
101
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
102
|
-
};
|
|
103
|
-
export const se_UpdateDatabaseCommand = async (input, context) => {
|
|
104
|
-
const headers = sharedHeaders("UpdateDatabase");
|
|
105
|
-
let body;
|
|
106
|
-
body = JSON.stringify(_json(input));
|
|
107
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
108
|
-
};
|
|
109
|
-
export const se_UpdateTableCommand = async (input, context) => {
|
|
110
|
-
const headers = sharedHeaders("UpdateTable");
|
|
111
|
-
let body;
|
|
112
|
-
body = JSON.stringify(_json(input));
|
|
113
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
114
|
-
};
|
|
115
|
-
export const se_WriteRecordsCommand = async (input, context) => {
|
|
116
|
-
const headers = sharedHeaders("WriteRecords");
|
|
117
|
-
let body;
|
|
118
|
-
body = JSON.stringify(_json(input));
|
|
119
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
120
|
-
};
|
|
121
|
-
export const de_CreateBatchLoadTaskCommand = async (output, context) => {
|
|
122
|
-
if (output.statusCode >= 300) {
|
|
123
|
-
return de_CommandError(output, context);
|
|
124
|
-
}
|
|
125
|
-
const data = await parseBody(output.body, context);
|
|
126
|
-
let contents = {};
|
|
127
|
-
contents = _json(data);
|
|
128
|
-
const response = {
|
|
129
|
-
$metadata: deserializeMetadata(output),
|
|
130
|
-
...contents,
|
|
131
|
-
};
|
|
132
|
-
return response;
|
|
133
|
-
};
|
|
134
|
-
export const de_CreateDatabaseCommand = async (output, context) => {
|
|
135
|
-
if (output.statusCode >= 300) {
|
|
136
|
-
return de_CommandError(output, context);
|
|
137
|
-
}
|
|
138
|
-
const data = await parseBody(output.body, context);
|
|
139
|
-
let contents = {};
|
|
140
|
-
contents = de_CreateDatabaseResponse(data, context);
|
|
141
|
-
const response = {
|
|
142
|
-
$metadata: deserializeMetadata(output),
|
|
143
|
-
...contents,
|
|
144
|
-
};
|
|
145
|
-
return response;
|
|
146
|
-
};
|
|
147
|
-
export const de_CreateTableCommand = async (output, context) => {
|
|
148
|
-
if (output.statusCode >= 300) {
|
|
149
|
-
return de_CommandError(output, context);
|
|
150
|
-
}
|
|
151
|
-
const data = await parseBody(output.body, context);
|
|
152
|
-
let contents = {};
|
|
153
|
-
contents = de_CreateTableResponse(data, context);
|
|
154
|
-
const response = {
|
|
155
|
-
$metadata: deserializeMetadata(output),
|
|
156
|
-
...contents,
|
|
157
|
-
};
|
|
158
|
-
return response;
|
|
159
|
-
};
|
|
160
|
-
export const de_DeleteDatabaseCommand = async (output, context) => {
|
|
161
|
-
if (output.statusCode >= 300) {
|
|
162
|
-
return de_CommandError(output, context);
|
|
163
|
-
}
|
|
164
|
-
await collectBody(output.body, context);
|
|
165
|
-
const response = {
|
|
166
|
-
$metadata: deserializeMetadata(output),
|
|
167
|
-
};
|
|
168
|
-
return response;
|
|
169
|
-
};
|
|
170
|
-
export const de_DeleteTableCommand = async (output, context) => {
|
|
171
|
-
if (output.statusCode >= 300) {
|
|
172
|
-
return de_CommandError(output, context);
|
|
173
|
-
}
|
|
174
|
-
await collectBody(output.body, context);
|
|
175
|
-
const response = {
|
|
176
|
-
$metadata: deserializeMetadata(output),
|
|
177
|
-
};
|
|
178
|
-
return response;
|
|
179
|
-
};
|
|
180
|
-
export const de_DescribeBatchLoadTaskCommand = async (output, context) => {
|
|
181
|
-
if (output.statusCode >= 300) {
|
|
182
|
-
return de_CommandError(output, context);
|
|
183
|
-
}
|
|
184
|
-
const data = await parseBody(output.body, context);
|
|
185
|
-
let contents = {};
|
|
186
|
-
contents = de_DescribeBatchLoadTaskResponse(data, context);
|
|
187
|
-
const response = {
|
|
188
|
-
$metadata: deserializeMetadata(output),
|
|
189
|
-
...contents,
|
|
190
|
-
};
|
|
191
|
-
return response;
|
|
192
|
-
};
|
|
193
|
-
export const de_DescribeDatabaseCommand = async (output, context) => {
|
|
194
|
-
if (output.statusCode >= 300) {
|
|
195
|
-
return de_CommandError(output, context);
|
|
196
|
-
}
|
|
197
|
-
const data = await parseBody(output.body, context);
|
|
198
|
-
let contents = {};
|
|
199
|
-
contents = de_DescribeDatabaseResponse(data, context);
|
|
200
|
-
const response = {
|
|
201
|
-
$metadata: deserializeMetadata(output),
|
|
202
|
-
...contents,
|
|
203
|
-
};
|
|
204
|
-
return response;
|
|
205
|
-
};
|
|
206
|
-
export const de_DescribeEndpointsCommand = async (output, context) => {
|
|
207
|
-
if (output.statusCode >= 300) {
|
|
208
|
-
return de_CommandError(output, context);
|
|
209
|
-
}
|
|
210
|
-
const data = await parseBody(output.body, context);
|
|
211
|
-
let contents = {};
|
|
212
|
-
contents = _json(data);
|
|
213
|
-
const response = {
|
|
214
|
-
$metadata: deserializeMetadata(output),
|
|
215
|
-
...contents,
|
|
216
|
-
};
|
|
217
|
-
return response;
|
|
218
|
-
};
|
|
219
|
-
export const de_DescribeTableCommand = async (output, context) => {
|
|
220
|
-
if (output.statusCode >= 300) {
|
|
221
|
-
return de_CommandError(output, context);
|
|
222
|
-
}
|
|
223
|
-
const data = await parseBody(output.body, context);
|
|
224
|
-
let contents = {};
|
|
225
|
-
contents = de_DescribeTableResponse(data, context);
|
|
226
|
-
const response = {
|
|
227
|
-
$metadata: deserializeMetadata(output),
|
|
228
|
-
...contents,
|
|
229
|
-
};
|
|
230
|
-
return response;
|
|
231
|
-
};
|
|
232
|
-
export const de_ListBatchLoadTasksCommand = async (output, context) => {
|
|
233
|
-
if (output.statusCode >= 300) {
|
|
234
|
-
return de_CommandError(output, context);
|
|
235
|
-
}
|
|
236
|
-
const data = await parseBody(output.body, context);
|
|
237
|
-
let contents = {};
|
|
238
|
-
contents = de_ListBatchLoadTasksResponse(data, context);
|
|
239
|
-
const response = {
|
|
240
|
-
$metadata: deserializeMetadata(output),
|
|
241
|
-
...contents,
|
|
242
|
-
};
|
|
243
|
-
return response;
|
|
244
|
-
};
|
|
245
|
-
export const de_ListDatabasesCommand = async (output, context) => {
|
|
246
|
-
if (output.statusCode >= 300) {
|
|
247
|
-
return de_CommandError(output, context);
|
|
248
|
-
}
|
|
249
|
-
const data = await parseBody(output.body, context);
|
|
250
|
-
let contents = {};
|
|
251
|
-
contents = de_ListDatabasesResponse(data, context);
|
|
252
|
-
const response = {
|
|
253
|
-
$metadata: deserializeMetadata(output),
|
|
254
|
-
...contents,
|
|
255
|
-
};
|
|
256
|
-
return response;
|
|
257
|
-
};
|
|
258
|
-
export const de_ListTablesCommand = async (output, context) => {
|
|
259
|
-
if (output.statusCode >= 300) {
|
|
260
|
-
return de_CommandError(output, context);
|
|
261
|
-
}
|
|
262
|
-
const data = await parseBody(output.body, context);
|
|
263
|
-
let contents = {};
|
|
264
|
-
contents = de_ListTablesResponse(data, context);
|
|
265
|
-
const response = {
|
|
266
|
-
$metadata: deserializeMetadata(output),
|
|
267
|
-
...contents,
|
|
268
|
-
};
|
|
269
|
-
return response;
|
|
270
|
-
};
|
|
271
|
-
export const de_ListTagsForResourceCommand = async (output, context) => {
|
|
272
|
-
if (output.statusCode >= 300) {
|
|
273
|
-
return de_CommandError(output, context);
|
|
274
|
-
}
|
|
275
|
-
const data = await parseBody(output.body, context);
|
|
276
|
-
let contents = {};
|
|
277
|
-
contents = _json(data);
|
|
278
|
-
const response = {
|
|
279
|
-
$metadata: deserializeMetadata(output),
|
|
280
|
-
...contents,
|
|
281
|
-
};
|
|
282
|
-
return response;
|
|
283
|
-
};
|
|
284
|
-
export const de_ResumeBatchLoadTaskCommand = async (output, context) => {
|
|
285
|
-
if (output.statusCode >= 300) {
|
|
286
|
-
return de_CommandError(output, context);
|
|
287
|
-
}
|
|
288
|
-
const data = await parseBody(output.body, context);
|
|
289
|
-
let contents = {};
|
|
290
|
-
contents = _json(data);
|
|
291
|
-
const response = {
|
|
292
|
-
$metadata: deserializeMetadata(output),
|
|
293
|
-
...contents,
|
|
294
|
-
};
|
|
295
|
-
return response;
|
|
296
|
-
};
|
|
297
|
-
export const de_TagResourceCommand = async (output, context) => {
|
|
298
|
-
if (output.statusCode >= 300) {
|
|
299
|
-
return de_CommandError(output, context);
|
|
300
|
-
}
|
|
301
|
-
const data = await parseBody(output.body, context);
|
|
302
|
-
let contents = {};
|
|
303
|
-
contents = _json(data);
|
|
304
|
-
const response = {
|
|
305
|
-
$metadata: deserializeMetadata(output),
|
|
306
|
-
...contents,
|
|
307
|
-
};
|
|
308
|
-
return response;
|
|
309
|
-
};
|
|
310
|
-
export const de_UntagResourceCommand = async (output, context) => {
|
|
311
|
-
if (output.statusCode >= 300) {
|
|
312
|
-
return de_CommandError(output, context);
|
|
313
|
-
}
|
|
314
|
-
const data = await parseBody(output.body, context);
|
|
315
|
-
let contents = {};
|
|
316
|
-
contents = _json(data);
|
|
317
|
-
const response = {
|
|
318
|
-
$metadata: deserializeMetadata(output),
|
|
319
|
-
...contents,
|
|
320
|
-
};
|
|
321
|
-
return response;
|
|
322
|
-
};
|
|
323
|
-
export const de_UpdateDatabaseCommand = async (output, context) => {
|
|
324
|
-
if (output.statusCode >= 300) {
|
|
325
|
-
return de_CommandError(output, context);
|
|
326
|
-
}
|
|
327
|
-
const data = await parseBody(output.body, context);
|
|
328
|
-
let contents = {};
|
|
329
|
-
contents = de_UpdateDatabaseResponse(data, context);
|
|
330
|
-
const response = {
|
|
331
|
-
$metadata: deserializeMetadata(output),
|
|
332
|
-
...contents,
|
|
333
|
-
};
|
|
334
|
-
return response;
|
|
335
|
-
};
|
|
336
|
-
export const de_UpdateTableCommand = async (output, context) => {
|
|
337
|
-
if (output.statusCode >= 300) {
|
|
338
|
-
return de_CommandError(output, context);
|
|
339
|
-
}
|
|
340
|
-
const data = await parseBody(output.body, context);
|
|
341
|
-
let contents = {};
|
|
342
|
-
contents = de_UpdateTableResponse(data, context);
|
|
343
|
-
const response = {
|
|
344
|
-
$metadata: deserializeMetadata(output),
|
|
345
|
-
...contents,
|
|
346
|
-
};
|
|
347
|
-
return response;
|
|
348
|
-
};
|
|
349
|
-
export const de_WriteRecordsCommand = async (output, context) => {
|
|
350
|
-
if (output.statusCode >= 300) {
|
|
351
|
-
return de_CommandError(output, context);
|
|
352
|
-
}
|
|
353
|
-
const data = await parseBody(output.body, context);
|
|
354
|
-
let contents = {};
|
|
355
|
-
contents = _json(data);
|
|
356
|
-
const response = {
|
|
357
|
-
$metadata: deserializeMetadata(output),
|
|
358
|
-
...contents,
|
|
359
|
-
};
|
|
360
|
-
return response;
|
|
361
|
-
};
|
|
362
|
-
const de_CommandError = async (output, context) => {
|
|
363
|
-
const parsedOutput = {
|
|
364
|
-
...output,
|
|
365
|
-
body: await parseErrorBody(output.body, context),
|
|
366
|
-
};
|
|
367
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
368
|
-
switch (errorCode) {
|
|
369
|
-
case "AccessDeniedException":
|
|
370
|
-
case "com.amazonaws.timestreamwrite#AccessDeniedException":
|
|
371
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
372
|
-
case "ConflictException":
|
|
373
|
-
case "com.amazonaws.timestreamwrite#ConflictException":
|
|
374
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
375
|
-
case "InternalServerException":
|
|
376
|
-
case "com.amazonaws.timestreamwrite#InternalServerException":
|
|
377
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
378
|
-
case "InvalidEndpointException":
|
|
379
|
-
case "com.amazonaws.timestreamwrite#InvalidEndpointException":
|
|
380
|
-
throw await de_InvalidEndpointExceptionRes(parsedOutput, context);
|
|
381
|
-
case "ResourceNotFoundException":
|
|
382
|
-
case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
|
|
383
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
384
|
-
case "ServiceQuotaExceededException":
|
|
385
|
-
case "com.amazonaws.timestreamwrite#ServiceQuotaExceededException":
|
|
386
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
387
|
-
case "ThrottlingException":
|
|
388
|
-
case "com.amazonaws.timestreamwrite#ThrottlingException":
|
|
389
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
390
|
-
case "ValidationException":
|
|
391
|
-
case "com.amazonaws.timestreamwrite#ValidationException":
|
|
392
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
393
|
-
case "RejectedRecordsException":
|
|
394
|
-
case "com.amazonaws.timestreamwrite#RejectedRecordsException":
|
|
395
|
-
throw await de_RejectedRecordsExceptionRes(parsedOutput, context);
|
|
396
|
-
default:
|
|
397
|
-
const parsedBody = parsedOutput.body;
|
|
398
|
-
return throwDefaultError({
|
|
399
|
-
output,
|
|
400
|
-
parsedBody,
|
|
401
|
-
errorCode,
|
|
402
|
-
});
|
|
403
|
-
}
|
|
404
|
-
};
|
|
405
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
406
|
-
const body = parsedOutput.body;
|
|
407
|
-
const deserialized = _json(body);
|
|
408
|
-
const exception = new AccessDeniedException({
|
|
409
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
410
|
-
...deserialized,
|
|
411
|
-
});
|
|
412
|
-
return __decorateServiceException(exception, body);
|
|
413
|
-
};
|
|
414
|
-
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
415
|
-
const body = parsedOutput.body;
|
|
416
|
-
const deserialized = _json(body);
|
|
417
|
-
const exception = new ConflictException({
|
|
418
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
419
|
-
...deserialized,
|
|
420
|
-
});
|
|
421
|
-
return __decorateServiceException(exception, body);
|
|
422
|
-
};
|
|
423
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
424
|
-
const body = parsedOutput.body;
|
|
425
|
-
const deserialized = _json(body);
|
|
426
|
-
const exception = new InternalServerException({
|
|
427
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
428
|
-
...deserialized,
|
|
429
|
-
});
|
|
430
|
-
return __decorateServiceException(exception, body);
|
|
431
|
-
};
|
|
432
|
-
const de_InvalidEndpointExceptionRes = async (parsedOutput, context) => {
|
|
433
|
-
const body = parsedOutput.body;
|
|
434
|
-
const deserialized = _json(body);
|
|
435
|
-
const exception = new InvalidEndpointException({
|
|
436
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
437
|
-
...deserialized,
|
|
438
|
-
});
|
|
439
|
-
return __decorateServiceException(exception, body);
|
|
440
|
-
};
|
|
441
|
-
const de_RejectedRecordsExceptionRes = async (parsedOutput, context) => {
|
|
442
|
-
const body = parsedOutput.body;
|
|
443
|
-
const deserialized = _json(body);
|
|
444
|
-
const exception = new RejectedRecordsException({
|
|
445
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
446
|
-
...deserialized,
|
|
447
|
-
});
|
|
448
|
-
return __decorateServiceException(exception, body);
|
|
449
|
-
};
|
|
450
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
451
|
-
const body = parsedOutput.body;
|
|
452
|
-
const deserialized = _json(body);
|
|
453
|
-
const exception = new ResourceNotFoundException({
|
|
454
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
455
|
-
...deserialized,
|
|
456
|
-
});
|
|
457
|
-
return __decorateServiceException(exception, body);
|
|
458
|
-
};
|
|
459
|
-
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
460
|
-
const body = parsedOutput.body;
|
|
461
|
-
const deserialized = _json(body);
|
|
462
|
-
const exception = new ServiceQuotaExceededException({
|
|
463
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
464
|
-
...deserialized,
|
|
465
|
-
});
|
|
466
|
-
return __decorateServiceException(exception, body);
|
|
467
|
-
};
|
|
468
|
-
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
469
|
-
const body = parsedOutput.body;
|
|
470
|
-
const deserialized = _json(body);
|
|
471
|
-
const exception = new ThrottlingException({
|
|
472
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
473
|
-
...deserialized,
|
|
474
|
-
});
|
|
475
|
-
return __decorateServiceException(exception, body);
|
|
476
|
-
};
|
|
477
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
478
|
-
const body = parsedOutput.body;
|
|
479
|
-
const deserialized = _json(body);
|
|
480
|
-
const exception = new ValidationException({
|
|
481
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
482
|
-
...deserialized,
|
|
483
|
-
});
|
|
484
|
-
return __decorateServiceException(exception, body);
|
|
485
|
-
};
|
|
486
|
-
const se_CreateBatchLoadTaskRequest = (input, context) => {
|
|
487
|
-
return take(input, {
|
|
488
|
-
ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
489
|
-
DataModelConfiguration: _json,
|
|
490
|
-
DataSourceConfiguration: _json,
|
|
491
|
-
RecordVersion: [],
|
|
492
|
-
ReportConfiguration: _json,
|
|
493
|
-
TargetDatabaseName: [],
|
|
494
|
-
TargetTableName: [],
|
|
495
|
-
});
|
|
496
|
-
};
|
|
497
|
-
const de_BatchLoadTask = (output, context) => {
|
|
498
|
-
return take(output, {
|
|
499
|
-
CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
500
|
-
DatabaseName: __expectString,
|
|
501
|
-
LastUpdatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
502
|
-
ResumableUntil: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
503
|
-
TableName: __expectString,
|
|
504
|
-
TaskId: __expectString,
|
|
505
|
-
TaskStatus: __expectString,
|
|
506
|
-
});
|
|
507
|
-
};
|
|
508
|
-
const de_BatchLoadTaskDescription = (output, context) => {
|
|
509
|
-
return take(output, {
|
|
510
|
-
CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
511
|
-
DataModelConfiguration: _json,
|
|
512
|
-
DataSourceConfiguration: _json,
|
|
513
|
-
ErrorMessage: __expectString,
|
|
514
|
-
LastUpdatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
515
|
-
ProgressReport: _json,
|
|
516
|
-
RecordVersion: __expectLong,
|
|
517
|
-
ReportConfiguration: _json,
|
|
518
|
-
ResumableUntil: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
519
|
-
TargetDatabaseName: __expectString,
|
|
520
|
-
TargetTableName: __expectString,
|
|
521
|
-
TaskId: __expectString,
|
|
522
|
-
TaskStatus: __expectString,
|
|
523
|
-
});
|
|
524
|
-
};
|
|
525
|
-
const de_BatchLoadTaskList = (output, context) => {
|
|
526
|
-
const retVal = (output || [])
|
|
527
|
-
.filter((e) => e != null)
|
|
528
|
-
.map((entry) => {
|
|
529
|
-
return de_BatchLoadTask(entry, context);
|
|
530
|
-
});
|
|
531
|
-
return retVal;
|
|
532
|
-
};
|
|
533
|
-
const de_CreateDatabaseResponse = (output, context) => {
|
|
534
|
-
return take(output, {
|
|
535
|
-
Database: (_) => de_Database(_, context),
|
|
536
|
-
});
|
|
537
|
-
};
|
|
538
|
-
const de_CreateTableResponse = (output, context) => {
|
|
539
|
-
return take(output, {
|
|
540
|
-
Table: (_) => de_Table(_, context),
|
|
541
|
-
});
|
|
542
|
-
};
|
|
543
|
-
const de_Database = (output, context) => {
|
|
544
|
-
return take(output, {
|
|
545
|
-
Arn: __expectString,
|
|
546
|
-
CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
547
|
-
DatabaseName: __expectString,
|
|
548
|
-
KmsKeyId: __expectString,
|
|
549
|
-
LastUpdatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
550
|
-
TableCount: __expectLong,
|
|
551
|
-
});
|
|
552
|
-
};
|
|
553
|
-
const de_DatabaseList = (output, context) => {
|
|
554
|
-
const retVal = (output || [])
|
|
555
|
-
.filter((e) => e != null)
|
|
556
|
-
.map((entry) => {
|
|
557
|
-
return de_Database(entry, context);
|
|
558
|
-
});
|
|
559
|
-
return retVal;
|
|
560
|
-
};
|
|
561
|
-
const de_DescribeBatchLoadTaskResponse = (output, context) => {
|
|
562
|
-
return take(output, {
|
|
563
|
-
BatchLoadTaskDescription: (_) => de_BatchLoadTaskDescription(_, context),
|
|
564
|
-
});
|
|
565
|
-
};
|
|
566
|
-
const de_DescribeDatabaseResponse = (output, context) => {
|
|
567
|
-
return take(output, {
|
|
568
|
-
Database: (_) => de_Database(_, context),
|
|
569
|
-
});
|
|
570
|
-
};
|
|
571
|
-
const de_DescribeTableResponse = (output, context) => {
|
|
572
|
-
return take(output, {
|
|
573
|
-
Table: (_) => de_Table(_, context),
|
|
574
|
-
});
|
|
575
|
-
};
|
|
576
|
-
const de_ListBatchLoadTasksResponse = (output, context) => {
|
|
577
|
-
return take(output, {
|
|
578
|
-
BatchLoadTasks: (_) => de_BatchLoadTaskList(_, context),
|
|
579
|
-
NextToken: __expectString,
|
|
580
|
-
});
|
|
581
|
-
};
|
|
582
|
-
const de_ListDatabasesResponse = (output, context) => {
|
|
583
|
-
return take(output, {
|
|
584
|
-
Databases: (_) => de_DatabaseList(_, context),
|
|
585
|
-
NextToken: __expectString,
|
|
586
|
-
});
|
|
587
|
-
};
|
|
588
|
-
const de_ListTablesResponse = (output, context) => {
|
|
589
|
-
return take(output, {
|
|
590
|
-
NextToken: __expectString,
|
|
591
|
-
Tables: (_) => de_TableList(_, context),
|
|
592
|
-
});
|
|
593
|
-
};
|
|
594
|
-
const de_Table = (output, context) => {
|
|
595
|
-
return take(output, {
|
|
596
|
-
Arn: __expectString,
|
|
597
|
-
CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
598
|
-
DatabaseName: __expectString,
|
|
599
|
-
LastUpdatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
600
|
-
MagneticStoreWriteProperties: _json,
|
|
601
|
-
RetentionProperties: _json,
|
|
602
|
-
Schema: _json,
|
|
603
|
-
TableName: __expectString,
|
|
604
|
-
TableStatus: __expectString,
|
|
605
|
-
});
|
|
606
|
-
};
|
|
607
|
-
const de_TableList = (output, context) => {
|
|
608
|
-
const retVal = (output || [])
|
|
609
|
-
.filter((e) => e != null)
|
|
610
|
-
.map((entry) => {
|
|
611
|
-
return de_Table(entry, context);
|
|
612
|
-
});
|
|
613
|
-
return retVal;
|
|
614
|
-
};
|
|
615
|
-
const de_UpdateDatabaseResponse = (output, context) => {
|
|
616
|
-
return take(output, {
|
|
617
|
-
Database: (_) => de_Database(_, context),
|
|
618
|
-
});
|
|
619
|
-
};
|
|
620
|
-
const de_UpdateTableResponse = (output, context) => {
|
|
621
|
-
return take(output, {
|
|
622
|
-
Table: (_) => de_Table(_, context),
|
|
623
|
-
});
|
|
624
|
-
};
|
|
625
|
-
const deserializeMetadata = (output) => ({
|
|
626
|
-
httpStatusCode: output.statusCode,
|
|
627
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
628
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
629
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
630
|
-
});
|
|
631
|
-
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
632
|
-
const throwDefaultError = withBaseException(__BaseException);
|
|
633
|
-
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
634
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
635
|
-
const contents = {
|
|
636
|
-
protocol,
|
|
637
|
-
hostname,
|
|
638
|
-
port,
|
|
639
|
-
method: "POST",
|
|
640
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
641
|
-
headers,
|
|
642
|
-
};
|
|
643
|
-
if (resolvedHostname !== undefined) {
|
|
644
|
-
contents.hostname = resolvedHostname;
|
|
645
|
-
}
|
|
646
|
-
if (body !== undefined) {
|
|
647
|
-
contents.body = body;
|
|
648
|
-
}
|
|
649
|
-
return new __HttpRequest(contents);
|
|
650
|
-
};
|
|
651
|
-
function sharedHeaders(operation) {
|
|
652
|
-
return {
|
|
653
|
-
"content-type": "application/x-amz-json-1.0",
|
|
654
|
-
"x-amz-target": `Timestream_20181101.${operation}`,
|
|
655
|
-
};
|
|
656
|
-
}
|