@aws-sdk/client-timestream-write 3.489.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/TimestreamWrite.js +1 -49
- package/dist-cjs/TimestreamWriteClient.js +1 -48
- package/dist-cjs/commands/CreateBatchLoadTaskCommand.js +1 -31
- package/dist-cjs/commands/CreateDatabaseCommand.js +1 -30
- package/dist-cjs/commands/CreateTableCommand.js +1 -30
- package/dist-cjs/commands/DeleteDatabaseCommand.js +1 -30
- package/dist-cjs/commands/DeleteTableCommand.js +1 -30
- package/dist-cjs/commands/DescribeBatchLoadTaskCommand.js +1 -30
- package/dist-cjs/commands/DescribeDatabaseCommand.js +1 -30
- package/dist-cjs/commands/DescribeEndpointsCommand.js +1 -28
- package/dist-cjs/commands/DescribeTableCommand.js +1 -30
- package/dist-cjs/commands/ListBatchLoadTasksCommand.js +1 -30
- package/dist-cjs/commands/ListDatabasesCommand.js +1 -30
- package/dist-cjs/commands/ListTablesCommand.js +1 -30
- package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -30
- package/dist-cjs/commands/ResumeBatchLoadTaskCommand.js +1 -30
- package/dist-cjs/commands/TagResourceCommand.js +1 -30
- package/dist-cjs/commands/UntagResourceCommand.js +1 -30
- package/dist-cjs/commands/UpdateDatabaseCommand.js +1 -30
- package/dist-cjs/commands/UpdateTableCommand.js +1 -30
- package/dist-cjs/commands/WriteRecordsCommand.js +1 -30
- package/dist-cjs/commands/index.js +1 -22
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +2139 -11
- package/dist-cjs/models/TimestreamWriteServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -189
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListBatchLoadTasksPaginator.js +1 -7
- package/dist-cjs/pagination/ListDatabasesPaginator.js +1 -7
- package/dist-cjs/pagination/ListTablesPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -7
- package/dist-cjs/protocols/Aws_json1_0.js +1 -1330
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +41 -41
|
@@ -1,1330 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_WriteRecordsCommand = exports.de_UpdateTableCommand = exports.de_UpdateDatabaseCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_ResumeBatchLoadTaskCommand = exports.de_ListTagsForResourceCommand = exports.de_ListTablesCommand = exports.de_ListDatabasesCommand = exports.de_ListBatchLoadTasksCommand = exports.de_DescribeTableCommand = exports.de_DescribeEndpointsCommand = exports.de_DescribeDatabaseCommand = exports.de_DescribeBatchLoadTaskCommand = exports.de_DeleteTableCommand = exports.de_DeleteDatabaseCommand = exports.de_CreateTableCommand = exports.de_CreateDatabaseCommand = exports.de_CreateBatchLoadTaskCommand = exports.se_WriteRecordsCommand = exports.se_UpdateTableCommand = exports.se_UpdateDatabaseCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_ResumeBatchLoadTaskCommand = exports.se_ListTagsForResourceCommand = exports.se_ListTablesCommand = exports.se_ListDatabasesCommand = exports.se_ListBatchLoadTasksCommand = exports.se_DescribeTableCommand = exports.se_DescribeEndpointsCommand = exports.se_DescribeDatabaseCommand = exports.se_DescribeBatchLoadTaskCommand = exports.se_DeleteTableCommand = exports.se_DeleteDatabaseCommand = exports.se_CreateTableCommand = exports.se_CreateDatabaseCommand = exports.se_CreateBatchLoadTaskCommand = 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 TimestreamWriteServiceException_1 = require("../models/TimestreamWriteServiceException");
|
|
9
|
-
const se_CreateBatchLoadTaskCommand = async (input, context) => {
|
|
10
|
-
const headers = sharedHeaders("CreateBatchLoadTask");
|
|
11
|
-
let body;
|
|
12
|
-
body = JSON.stringify(se_CreateBatchLoadTaskRequest(input, context));
|
|
13
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
14
|
-
};
|
|
15
|
-
exports.se_CreateBatchLoadTaskCommand = se_CreateBatchLoadTaskCommand;
|
|
16
|
-
const se_CreateDatabaseCommand = async (input, context) => {
|
|
17
|
-
const headers = sharedHeaders("CreateDatabase");
|
|
18
|
-
let body;
|
|
19
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
20
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
21
|
-
};
|
|
22
|
-
exports.se_CreateDatabaseCommand = se_CreateDatabaseCommand;
|
|
23
|
-
const se_CreateTableCommand = async (input, context) => {
|
|
24
|
-
const headers = sharedHeaders("CreateTable");
|
|
25
|
-
let body;
|
|
26
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
27
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
28
|
-
};
|
|
29
|
-
exports.se_CreateTableCommand = se_CreateTableCommand;
|
|
30
|
-
const se_DeleteDatabaseCommand = async (input, context) => {
|
|
31
|
-
const headers = sharedHeaders("DeleteDatabase");
|
|
32
|
-
let body;
|
|
33
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
34
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
35
|
-
};
|
|
36
|
-
exports.se_DeleteDatabaseCommand = se_DeleteDatabaseCommand;
|
|
37
|
-
const se_DeleteTableCommand = async (input, context) => {
|
|
38
|
-
const headers = sharedHeaders("DeleteTable");
|
|
39
|
-
let body;
|
|
40
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
41
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
42
|
-
};
|
|
43
|
-
exports.se_DeleteTableCommand = se_DeleteTableCommand;
|
|
44
|
-
const se_DescribeBatchLoadTaskCommand = async (input, context) => {
|
|
45
|
-
const headers = sharedHeaders("DescribeBatchLoadTask");
|
|
46
|
-
let body;
|
|
47
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
48
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
49
|
-
};
|
|
50
|
-
exports.se_DescribeBatchLoadTaskCommand = se_DescribeBatchLoadTaskCommand;
|
|
51
|
-
const se_DescribeDatabaseCommand = async (input, context) => {
|
|
52
|
-
const headers = sharedHeaders("DescribeDatabase");
|
|
53
|
-
let body;
|
|
54
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
55
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
56
|
-
};
|
|
57
|
-
exports.se_DescribeDatabaseCommand = se_DescribeDatabaseCommand;
|
|
58
|
-
const se_DescribeEndpointsCommand = async (input, context) => {
|
|
59
|
-
const headers = sharedHeaders("DescribeEndpoints");
|
|
60
|
-
let body;
|
|
61
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
62
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
63
|
-
};
|
|
64
|
-
exports.se_DescribeEndpointsCommand = se_DescribeEndpointsCommand;
|
|
65
|
-
const se_DescribeTableCommand = async (input, context) => {
|
|
66
|
-
const headers = sharedHeaders("DescribeTable");
|
|
67
|
-
let body;
|
|
68
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
69
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
70
|
-
};
|
|
71
|
-
exports.se_DescribeTableCommand = se_DescribeTableCommand;
|
|
72
|
-
const se_ListBatchLoadTasksCommand = async (input, context) => {
|
|
73
|
-
const headers = sharedHeaders("ListBatchLoadTasks");
|
|
74
|
-
let body;
|
|
75
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
76
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
77
|
-
};
|
|
78
|
-
exports.se_ListBatchLoadTasksCommand = se_ListBatchLoadTasksCommand;
|
|
79
|
-
const se_ListDatabasesCommand = async (input, context) => {
|
|
80
|
-
const headers = sharedHeaders("ListDatabases");
|
|
81
|
-
let body;
|
|
82
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
83
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
84
|
-
};
|
|
85
|
-
exports.se_ListDatabasesCommand = se_ListDatabasesCommand;
|
|
86
|
-
const se_ListTablesCommand = async (input, context) => {
|
|
87
|
-
const headers = sharedHeaders("ListTables");
|
|
88
|
-
let body;
|
|
89
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
90
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
91
|
-
};
|
|
92
|
-
exports.se_ListTablesCommand = se_ListTablesCommand;
|
|
93
|
-
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
94
|
-
const headers = sharedHeaders("ListTagsForResource");
|
|
95
|
-
let body;
|
|
96
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
97
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
98
|
-
};
|
|
99
|
-
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
100
|
-
const se_ResumeBatchLoadTaskCommand = async (input, context) => {
|
|
101
|
-
const headers = sharedHeaders("ResumeBatchLoadTask");
|
|
102
|
-
let body;
|
|
103
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
104
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
105
|
-
};
|
|
106
|
-
exports.se_ResumeBatchLoadTaskCommand = se_ResumeBatchLoadTaskCommand;
|
|
107
|
-
const se_TagResourceCommand = async (input, context) => {
|
|
108
|
-
const headers = sharedHeaders("TagResource");
|
|
109
|
-
let body;
|
|
110
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
111
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
112
|
-
};
|
|
113
|
-
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
114
|
-
const se_UntagResourceCommand = async (input, context) => {
|
|
115
|
-
const headers = sharedHeaders("UntagResource");
|
|
116
|
-
let body;
|
|
117
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
118
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
119
|
-
};
|
|
120
|
-
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
121
|
-
const se_UpdateDatabaseCommand = async (input, context) => {
|
|
122
|
-
const headers = sharedHeaders("UpdateDatabase");
|
|
123
|
-
let body;
|
|
124
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
125
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
126
|
-
};
|
|
127
|
-
exports.se_UpdateDatabaseCommand = se_UpdateDatabaseCommand;
|
|
128
|
-
const se_UpdateTableCommand = async (input, context) => {
|
|
129
|
-
const headers = sharedHeaders("UpdateTable");
|
|
130
|
-
let body;
|
|
131
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
132
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
133
|
-
};
|
|
134
|
-
exports.se_UpdateTableCommand = se_UpdateTableCommand;
|
|
135
|
-
const se_WriteRecordsCommand = async (input, context) => {
|
|
136
|
-
const headers = sharedHeaders("WriteRecords");
|
|
137
|
-
let body;
|
|
138
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
139
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
140
|
-
};
|
|
141
|
-
exports.se_WriteRecordsCommand = se_WriteRecordsCommand;
|
|
142
|
-
const de_CreateBatchLoadTaskCommand = async (output, context) => {
|
|
143
|
-
if (output.statusCode >= 300) {
|
|
144
|
-
return de_CreateBatchLoadTaskCommandError(output, context);
|
|
145
|
-
}
|
|
146
|
-
const data = await parseBody(output.body, context);
|
|
147
|
-
let contents = {};
|
|
148
|
-
contents = (0, smithy_client_1._json)(data);
|
|
149
|
-
const response = {
|
|
150
|
-
$metadata: deserializeMetadata(output),
|
|
151
|
-
...contents,
|
|
152
|
-
};
|
|
153
|
-
return response;
|
|
154
|
-
};
|
|
155
|
-
exports.de_CreateBatchLoadTaskCommand = de_CreateBatchLoadTaskCommand;
|
|
156
|
-
const de_CreateBatchLoadTaskCommandError = async (output, context) => {
|
|
157
|
-
const parsedOutput = {
|
|
158
|
-
...output,
|
|
159
|
-
body: await parseErrorBody(output.body, context),
|
|
160
|
-
};
|
|
161
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
162
|
-
switch (errorCode) {
|
|
163
|
-
case "AccessDeniedException":
|
|
164
|
-
case "com.amazonaws.timestreamwrite#AccessDeniedException":
|
|
165
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
166
|
-
case "ConflictException":
|
|
167
|
-
case "com.amazonaws.timestreamwrite#ConflictException":
|
|
168
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
169
|
-
case "InternalServerException":
|
|
170
|
-
case "com.amazonaws.timestreamwrite#InternalServerException":
|
|
171
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
172
|
-
case "InvalidEndpointException":
|
|
173
|
-
case "com.amazonaws.timestreamwrite#InvalidEndpointException":
|
|
174
|
-
throw await de_InvalidEndpointExceptionRes(parsedOutput, context);
|
|
175
|
-
case "ResourceNotFoundException":
|
|
176
|
-
case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
|
|
177
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
178
|
-
case "ServiceQuotaExceededException":
|
|
179
|
-
case "com.amazonaws.timestreamwrite#ServiceQuotaExceededException":
|
|
180
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
181
|
-
case "ThrottlingException":
|
|
182
|
-
case "com.amazonaws.timestreamwrite#ThrottlingException":
|
|
183
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
184
|
-
case "ValidationException":
|
|
185
|
-
case "com.amazonaws.timestreamwrite#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_CreateDatabaseCommand = async (output, context) => {
|
|
197
|
-
if (output.statusCode >= 300) {
|
|
198
|
-
return de_CreateDatabaseCommandError(output, context);
|
|
199
|
-
}
|
|
200
|
-
const data = await parseBody(output.body, context);
|
|
201
|
-
let contents = {};
|
|
202
|
-
contents = de_CreateDatabaseResponse(data, context);
|
|
203
|
-
const response = {
|
|
204
|
-
$metadata: deserializeMetadata(output),
|
|
205
|
-
...contents,
|
|
206
|
-
};
|
|
207
|
-
return response;
|
|
208
|
-
};
|
|
209
|
-
exports.de_CreateDatabaseCommand = de_CreateDatabaseCommand;
|
|
210
|
-
const de_CreateDatabaseCommandError = async (output, context) => {
|
|
211
|
-
const parsedOutput = {
|
|
212
|
-
...output,
|
|
213
|
-
body: await parseErrorBody(output.body, context),
|
|
214
|
-
};
|
|
215
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
216
|
-
switch (errorCode) {
|
|
217
|
-
case "AccessDeniedException":
|
|
218
|
-
case "com.amazonaws.timestreamwrite#AccessDeniedException":
|
|
219
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
220
|
-
case "ConflictException":
|
|
221
|
-
case "com.amazonaws.timestreamwrite#ConflictException":
|
|
222
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
223
|
-
case "InternalServerException":
|
|
224
|
-
case "com.amazonaws.timestreamwrite#InternalServerException":
|
|
225
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
226
|
-
case "InvalidEndpointException":
|
|
227
|
-
case "com.amazonaws.timestreamwrite#InvalidEndpointException":
|
|
228
|
-
throw await de_InvalidEndpointExceptionRes(parsedOutput, context);
|
|
229
|
-
case "ServiceQuotaExceededException":
|
|
230
|
-
case "com.amazonaws.timestreamwrite#ServiceQuotaExceededException":
|
|
231
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
232
|
-
case "ThrottlingException":
|
|
233
|
-
case "com.amazonaws.timestreamwrite#ThrottlingException":
|
|
234
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
235
|
-
case "ValidationException":
|
|
236
|
-
case "com.amazonaws.timestreamwrite#ValidationException":
|
|
237
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
238
|
-
default:
|
|
239
|
-
const parsedBody = parsedOutput.body;
|
|
240
|
-
return throwDefaultError({
|
|
241
|
-
output,
|
|
242
|
-
parsedBody,
|
|
243
|
-
errorCode,
|
|
244
|
-
});
|
|
245
|
-
}
|
|
246
|
-
};
|
|
247
|
-
const de_CreateTableCommand = async (output, context) => {
|
|
248
|
-
if (output.statusCode >= 300) {
|
|
249
|
-
return de_CreateTableCommandError(output, context);
|
|
250
|
-
}
|
|
251
|
-
const data = await parseBody(output.body, context);
|
|
252
|
-
let contents = {};
|
|
253
|
-
contents = de_CreateTableResponse(data, context);
|
|
254
|
-
const response = {
|
|
255
|
-
$metadata: deserializeMetadata(output),
|
|
256
|
-
...contents,
|
|
257
|
-
};
|
|
258
|
-
return response;
|
|
259
|
-
};
|
|
260
|
-
exports.de_CreateTableCommand = de_CreateTableCommand;
|
|
261
|
-
const de_CreateTableCommandError = async (output, context) => {
|
|
262
|
-
const parsedOutput = {
|
|
263
|
-
...output,
|
|
264
|
-
body: await parseErrorBody(output.body, context),
|
|
265
|
-
};
|
|
266
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
267
|
-
switch (errorCode) {
|
|
268
|
-
case "AccessDeniedException":
|
|
269
|
-
case "com.amazonaws.timestreamwrite#AccessDeniedException":
|
|
270
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
271
|
-
case "ConflictException":
|
|
272
|
-
case "com.amazonaws.timestreamwrite#ConflictException":
|
|
273
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
274
|
-
case "InternalServerException":
|
|
275
|
-
case "com.amazonaws.timestreamwrite#InternalServerException":
|
|
276
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
277
|
-
case "InvalidEndpointException":
|
|
278
|
-
case "com.amazonaws.timestreamwrite#InvalidEndpointException":
|
|
279
|
-
throw await de_InvalidEndpointExceptionRes(parsedOutput, context);
|
|
280
|
-
case "ResourceNotFoundException":
|
|
281
|
-
case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
|
|
282
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
283
|
-
case "ServiceQuotaExceededException":
|
|
284
|
-
case "com.amazonaws.timestreamwrite#ServiceQuotaExceededException":
|
|
285
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
286
|
-
case "ThrottlingException":
|
|
287
|
-
case "com.amazonaws.timestreamwrite#ThrottlingException":
|
|
288
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
289
|
-
case "ValidationException":
|
|
290
|
-
case "com.amazonaws.timestreamwrite#ValidationException":
|
|
291
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
292
|
-
default:
|
|
293
|
-
const parsedBody = parsedOutput.body;
|
|
294
|
-
return throwDefaultError({
|
|
295
|
-
output,
|
|
296
|
-
parsedBody,
|
|
297
|
-
errorCode,
|
|
298
|
-
});
|
|
299
|
-
}
|
|
300
|
-
};
|
|
301
|
-
const de_DeleteDatabaseCommand = async (output, context) => {
|
|
302
|
-
if (output.statusCode >= 300) {
|
|
303
|
-
return de_DeleteDatabaseCommandError(output, context);
|
|
304
|
-
}
|
|
305
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
306
|
-
const response = {
|
|
307
|
-
$metadata: deserializeMetadata(output),
|
|
308
|
-
};
|
|
309
|
-
return response;
|
|
310
|
-
};
|
|
311
|
-
exports.de_DeleteDatabaseCommand = de_DeleteDatabaseCommand;
|
|
312
|
-
const de_DeleteDatabaseCommandError = async (output, context) => {
|
|
313
|
-
const parsedOutput = {
|
|
314
|
-
...output,
|
|
315
|
-
body: await parseErrorBody(output.body, context),
|
|
316
|
-
};
|
|
317
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
318
|
-
switch (errorCode) {
|
|
319
|
-
case "AccessDeniedException":
|
|
320
|
-
case "com.amazonaws.timestreamwrite#AccessDeniedException":
|
|
321
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
322
|
-
case "InternalServerException":
|
|
323
|
-
case "com.amazonaws.timestreamwrite#InternalServerException":
|
|
324
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
325
|
-
case "InvalidEndpointException":
|
|
326
|
-
case "com.amazonaws.timestreamwrite#InvalidEndpointException":
|
|
327
|
-
throw await de_InvalidEndpointExceptionRes(parsedOutput, context);
|
|
328
|
-
case "ResourceNotFoundException":
|
|
329
|
-
case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
|
|
330
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
331
|
-
case "ThrottlingException":
|
|
332
|
-
case "com.amazonaws.timestreamwrite#ThrottlingException":
|
|
333
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
334
|
-
case "ValidationException":
|
|
335
|
-
case "com.amazonaws.timestreamwrite#ValidationException":
|
|
336
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
337
|
-
default:
|
|
338
|
-
const parsedBody = parsedOutput.body;
|
|
339
|
-
return throwDefaultError({
|
|
340
|
-
output,
|
|
341
|
-
parsedBody,
|
|
342
|
-
errorCode,
|
|
343
|
-
});
|
|
344
|
-
}
|
|
345
|
-
};
|
|
346
|
-
const de_DeleteTableCommand = async (output, context) => {
|
|
347
|
-
if (output.statusCode >= 300) {
|
|
348
|
-
return de_DeleteTableCommandError(output, context);
|
|
349
|
-
}
|
|
350
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
351
|
-
const response = {
|
|
352
|
-
$metadata: deserializeMetadata(output),
|
|
353
|
-
};
|
|
354
|
-
return response;
|
|
355
|
-
};
|
|
356
|
-
exports.de_DeleteTableCommand = de_DeleteTableCommand;
|
|
357
|
-
const de_DeleteTableCommandError = async (output, context) => {
|
|
358
|
-
const parsedOutput = {
|
|
359
|
-
...output,
|
|
360
|
-
body: await parseErrorBody(output.body, context),
|
|
361
|
-
};
|
|
362
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
363
|
-
switch (errorCode) {
|
|
364
|
-
case "AccessDeniedException":
|
|
365
|
-
case "com.amazonaws.timestreamwrite#AccessDeniedException":
|
|
366
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
367
|
-
case "InternalServerException":
|
|
368
|
-
case "com.amazonaws.timestreamwrite#InternalServerException":
|
|
369
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
370
|
-
case "InvalidEndpointException":
|
|
371
|
-
case "com.amazonaws.timestreamwrite#InvalidEndpointException":
|
|
372
|
-
throw await de_InvalidEndpointExceptionRes(parsedOutput, context);
|
|
373
|
-
case "ResourceNotFoundException":
|
|
374
|
-
case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
|
|
375
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
376
|
-
case "ThrottlingException":
|
|
377
|
-
case "com.amazonaws.timestreamwrite#ThrottlingException":
|
|
378
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
379
|
-
case "ValidationException":
|
|
380
|
-
case "com.amazonaws.timestreamwrite#ValidationException":
|
|
381
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
382
|
-
default:
|
|
383
|
-
const parsedBody = parsedOutput.body;
|
|
384
|
-
return throwDefaultError({
|
|
385
|
-
output,
|
|
386
|
-
parsedBody,
|
|
387
|
-
errorCode,
|
|
388
|
-
});
|
|
389
|
-
}
|
|
390
|
-
};
|
|
391
|
-
const de_DescribeBatchLoadTaskCommand = async (output, context) => {
|
|
392
|
-
if (output.statusCode >= 300) {
|
|
393
|
-
return de_DescribeBatchLoadTaskCommandError(output, context);
|
|
394
|
-
}
|
|
395
|
-
const data = await parseBody(output.body, context);
|
|
396
|
-
let contents = {};
|
|
397
|
-
contents = de_DescribeBatchLoadTaskResponse(data, context);
|
|
398
|
-
const response = {
|
|
399
|
-
$metadata: deserializeMetadata(output),
|
|
400
|
-
...contents,
|
|
401
|
-
};
|
|
402
|
-
return response;
|
|
403
|
-
};
|
|
404
|
-
exports.de_DescribeBatchLoadTaskCommand = de_DescribeBatchLoadTaskCommand;
|
|
405
|
-
const de_DescribeBatchLoadTaskCommandError = async (output, context) => {
|
|
406
|
-
const parsedOutput = {
|
|
407
|
-
...output,
|
|
408
|
-
body: await parseErrorBody(output.body, context),
|
|
409
|
-
};
|
|
410
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
411
|
-
switch (errorCode) {
|
|
412
|
-
case "AccessDeniedException":
|
|
413
|
-
case "com.amazonaws.timestreamwrite#AccessDeniedException":
|
|
414
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
415
|
-
case "InternalServerException":
|
|
416
|
-
case "com.amazonaws.timestreamwrite#InternalServerException":
|
|
417
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
418
|
-
case "InvalidEndpointException":
|
|
419
|
-
case "com.amazonaws.timestreamwrite#InvalidEndpointException":
|
|
420
|
-
throw await de_InvalidEndpointExceptionRes(parsedOutput, context);
|
|
421
|
-
case "ResourceNotFoundException":
|
|
422
|
-
case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
|
|
423
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
424
|
-
case "ThrottlingException":
|
|
425
|
-
case "com.amazonaws.timestreamwrite#ThrottlingException":
|
|
426
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
427
|
-
default:
|
|
428
|
-
const parsedBody = parsedOutput.body;
|
|
429
|
-
return throwDefaultError({
|
|
430
|
-
output,
|
|
431
|
-
parsedBody,
|
|
432
|
-
errorCode,
|
|
433
|
-
});
|
|
434
|
-
}
|
|
435
|
-
};
|
|
436
|
-
const de_DescribeDatabaseCommand = async (output, context) => {
|
|
437
|
-
if (output.statusCode >= 300) {
|
|
438
|
-
return de_DescribeDatabaseCommandError(output, context);
|
|
439
|
-
}
|
|
440
|
-
const data = await parseBody(output.body, context);
|
|
441
|
-
let contents = {};
|
|
442
|
-
contents = de_DescribeDatabaseResponse(data, context);
|
|
443
|
-
const response = {
|
|
444
|
-
$metadata: deserializeMetadata(output),
|
|
445
|
-
...contents,
|
|
446
|
-
};
|
|
447
|
-
return response;
|
|
448
|
-
};
|
|
449
|
-
exports.de_DescribeDatabaseCommand = de_DescribeDatabaseCommand;
|
|
450
|
-
const de_DescribeDatabaseCommandError = async (output, context) => {
|
|
451
|
-
const parsedOutput = {
|
|
452
|
-
...output,
|
|
453
|
-
body: await parseErrorBody(output.body, context),
|
|
454
|
-
};
|
|
455
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
456
|
-
switch (errorCode) {
|
|
457
|
-
case "AccessDeniedException":
|
|
458
|
-
case "com.amazonaws.timestreamwrite#AccessDeniedException":
|
|
459
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
460
|
-
case "InternalServerException":
|
|
461
|
-
case "com.amazonaws.timestreamwrite#InternalServerException":
|
|
462
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
463
|
-
case "InvalidEndpointException":
|
|
464
|
-
case "com.amazonaws.timestreamwrite#InvalidEndpointException":
|
|
465
|
-
throw await de_InvalidEndpointExceptionRes(parsedOutput, context);
|
|
466
|
-
case "ResourceNotFoundException":
|
|
467
|
-
case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
|
|
468
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
469
|
-
case "ThrottlingException":
|
|
470
|
-
case "com.amazonaws.timestreamwrite#ThrottlingException":
|
|
471
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
472
|
-
case "ValidationException":
|
|
473
|
-
case "com.amazonaws.timestreamwrite#ValidationException":
|
|
474
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
475
|
-
default:
|
|
476
|
-
const parsedBody = parsedOutput.body;
|
|
477
|
-
return throwDefaultError({
|
|
478
|
-
output,
|
|
479
|
-
parsedBody,
|
|
480
|
-
errorCode,
|
|
481
|
-
});
|
|
482
|
-
}
|
|
483
|
-
};
|
|
484
|
-
const de_DescribeEndpointsCommand = async (output, context) => {
|
|
485
|
-
if (output.statusCode >= 300) {
|
|
486
|
-
return de_DescribeEndpointsCommandError(output, context);
|
|
487
|
-
}
|
|
488
|
-
const data = await parseBody(output.body, context);
|
|
489
|
-
let contents = {};
|
|
490
|
-
contents = (0, smithy_client_1._json)(data);
|
|
491
|
-
const response = {
|
|
492
|
-
$metadata: deserializeMetadata(output),
|
|
493
|
-
...contents,
|
|
494
|
-
};
|
|
495
|
-
return response;
|
|
496
|
-
};
|
|
497
|
-
exports.de_DescribeEndpointsCommand = de_DescribeEndpointsCommand;
|
|
498
|
-
const de_DescribeEndpointsCommandError = async (output, context) => {
|
|
499
|
-
const parsedOutput = {
|
|
500
|
-
...output,
|
|
501
|
-
body: await parseErrorBody(output.body, context),
|
|
502
|
-
};
|
|
503
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
504
|
-
switch (errorCode) {
|
|
505
|
-
case "InternalServerException":
|
|
506
|
-
case "com.amazonaws.timestreamwrite#InternalServerException":
|
|
507
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
508
|
-
case "ThrottlingException":
|
|
509
|
-
case "com.amazonaws.timestreamwrite#ThrottlingException":
|
|
510
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
511
|
-
case "ValidationException":
|
|
512
|
-
case "com.amazonaws.timestreamwrite#ValidationException":
|
|
513
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
514
|
-
default:
|
|
515
|
-
const parsedBody = parsedOutput.body;
|
|
516
|
-
return throwDefaultError({
|
|
517
|
-
output,
|
|
518
|
-
parsedBody,
|
|
519
|
-
errorCode,
|
|
520
|
-
});
|
|
521
|
-
}
|
|
522
|
-
};
|
|
523
|
-
const de_DescribeTableCommand = async (output, context) => {
|
|
524
|
-
if (output.statusCode >= 300) {
|
|
525
|
-
return de_DescribeTableCommandError(output, context);
|
|
526
|
-
}
|
|
527
|
-
const data = await parseBody(output.body, context);
|
|
528
|
-
let contents = {};
|
|
529
|
-
contents = de_DescribeTableResponse(data, context);
|
|
530
|
-
const response = {
|
|
531
|
-
$metadata: deserializeMetadata(output),
|
|
532
|
-
...contents,
|
|
533
|
-
};
|
|
534
|
-
return response;
|
|
535
|
-
};
|
|
536
|
-
exports.de_DescribeTableCommand = de_DescribeTableCommand;
|
|
537
|
-
const de_DescribeTableCommandError = async (output, context) => {
|
|
538
|
-
const parsedOutput = {
|
|
539
|
-
...output,
|
|
540
|
-
body: await parseErrorBody(output.body, context),
|
|
541
|
-
};
|
|
542
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
543
|
-
switch (errorCode) {
|
|
544
|
-
case "AccessDeniedException":
|
|
545
|
-
case "com.amazonaws.timestreamwrite#AccessDeniedException":
|
|
546
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
547
|
-
case "InternalServerException":
|
|
548
|
-
case "com.amazonaws.timestreamwrite#InternalServerException":
|
|
549
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
550
|
-
case "InvalidEndpointException":
|
|
551
|
-
case "com.amazonaws.timestreamwrite#InvalidEndpointException":
|
|
552
|
-
throw await de_InvalidEndpointExceptionRes(parsedOutput, context);
|
|
553
|
-
case "ResourceNotFoundException":
|
|
554
|
-
case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
|
|
555
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
556
|
-
case "ThrottlingException":
|
|
557
|
-
case "com.amazonaws.timestreamwrite#ThrottlingException":
|
|
558
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
559
|
-
case "ValidationException":
|
|
560
|
-
case "com.amazonaws.timestreamwrite#ValidationException":
|
|
561
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
562
|
-
default:
|
|
563
|
-
const parsedBody = parsedOutput.body;
|
|
564
|
-
return throwDefaultError({
|
|
565
|
-
output,
|
|
566
|
-
parsedBody,
|
|
567
|
-
errorCode,
|
|
568
|
-
});
|
|
569
|
-
}
|
|
570
|
-
};
|
|
571
|
-
const de_ListBatchLoadTasksCommand = async (output, context) => {
|
|
572
|
-
if (output.statusCode >= 300) {
|
|
573
|
-
return de_ListBatchLoadTasksCommandError(output, context);
|
|
574
|
-
}
|
|
575
|
-
const data = await parseBody(output.body, context);
|
|
576
|
-
let contents = {};
|
|
577
|
-
contents = de_ListBatchLoadTasksResponse(data, context);
|
|
578
|
-
const response = {
|
|
579
|
-
$metadata: deserializeMetadata(output),
|
|
580
|
-
...contents,
|
|
581
|
-
};
|
|
582
|
-
return response;
|
|
583
|
-
};
|
|
584
|
-
exports.de_ListBatchLoadTasksCommand = de_ListBatchLoadTasksCommand;
|
|
585
|
-
const de_ListBatchLoadTasksCommandError = async (output, context) => {
|
|
586
|
-
const parsedOutput = {
|
|
587
|
-
...output,
|
|
588
|
-
body: await parseErrorBody(output.body, context),
|
|
589
|
-
};
|
|
590
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
591
|
-
switch (errorCode) {
|
|
592
|
-
case "AccessDeniedException":
|
|
593
|
-
case "com.amazonaws.timestreamwrite#AccessDeniedException":
|
|
594
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
595
|
-
case "InternalServerException":
|
|
596
|
-
case "com.amazonaws.timestreamwrite#InternalServerException":
|
|
597
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
598
|
-
case "InvalidEndpointException":
|
|
599
|
-
case "com.amazonaws.timestreamwrite#InvalidEndpointException":
|
|
600
|
-
throw await de_InvalidEndpointExceptionRes(parsedOutput, context);
|
|
601
|
-
case "ThrottlingException":
|
|
602
|
-
case "com.amazonaws.timestreamwrite#ThrottlingException":
|
|
603
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
604
|
-
case "ValidationException":
|
|
605
|
-
case "com.amazonaws.timestreamwrite#ValidationException":
|
|
606
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
607
|
-
default:
|
|
608
|
-
const parsedBody = parsedOutput.body;
|
|
609
|
-
return throwDefaultError({
|
|
610
|
-
output,
|
|
611
|
-
parsedBody,
|
|
612
|
-
errorCode,
|
|
613
|
-
});
|
|
614
|
-
}
|
|
615
|
-
};
|
|
616
|
-
const de_ListDatabasesCommand = async (output, context) => {
|
|
617
|
-
if (output.statusCode >= 300) {
|
|
618
|
-
return de_ListDatabasesCommandError(output, context);
|
|
619
|
-
}
|
|
620
|
-
const data = await parseBody(output.body, context);
|
|
621
|
-
let contents = {};
|
|
622
|
-
contents = de_ListDatabasesResponse(data, context);
|
|
623
|
-
const response = {
|
|
624
|
-
$metadata: deserializeMetadata(output),
|
|
625
|
-
...contents,
|
|
626
|
-
};
|
|
627
|
-
return response;
|
|
628
|
-
};
|
|
629
|
-
exports.de_ListDatabasesCommand = de_ListDatabasesCommand;
|
|
630
|
-
const de_ListDatabasesCommandError = async (output, context) => {
|
|
631
|
-
const parsedOutput = {
|
|
632
|
-
...output,
|
|
633
|
-
body: await parseErrorBody(output.body, context),
|
|
634
|
-
};
|
|
635
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
636
|
-
switch (errorCode) {
|
|
637
|
-
case "AccessDeniedException":
|
|
638
|
-
case "com.amazonaws.timestreamwrite#AccessDeniedException":
|
|
639
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
640
|
-
case "InternalServerException":
|
|
641
|
-
case "com.amazonaws.timestreamwrite#InternalServerException":
|
|
642
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
643
|
-
case "InvalidEndpointException":
|
|
644
|
-
case "com.amazonaws.timestreamwrite#InvalidEndpointException":
|
|
645
|
-
throw await de_InvalidEndpointExceptionRes(parsedOutput, context);
|
|
646
|
-
case "ThrottlingException":
|
|
647
|
-
case "com.amazonaws.timestreamwrite#ThrottlingException":
|
|
648
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
649
|
-
case "ValidationException":
|
|
650
|
-
case "com.amazonaws.timestreamwrite#ValidationException":
|
|
651
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
652
|
-
default:
|
|
653
|
-
const parsedBody = parsedOutput.body;
|
|
654
|
-
return throwDefaultError({
|
|
655
|
-
output,
|
|
656
|
-
parsedBody,
|
|
657
|
-
errorCode,
|
|
658
|
-
});
|
|
659
|
-
}
|
|
660
|
-
};
|
|
661
|
-
const de_ListTablesCommand = async (output, context) => {
|
|
662
|
-
if (output.statusCode >= 300) {
|
|
663
|
-
return de_ListTablesCommandError(output, context);
|
|
664
|
-
}
|
|
665
|
-
const data = await parseBody(output.body, context);
|
|
666
|
-
let contents = {};
|
|
667
|
-
contents = de_ListTablesResponse(data, context);
|
|
668
|
-
const response = {
|
|
669
|
-
$metadata: deserializeMetadata(output),
|
|
670
|
-
...contents,
|
|
671
|
-
};
|
|
672
|
-
return response;
|
|
673
|
-
};
|
|
674
|
-
exports.de_ListTablesCommand = de_ListTablesCommand;
|
|
675
|
-
const de_ListTablesCommandError = async (output, context) => {
|
|
676
|
-
const parsedOutput = {
|
|
677
|
-
...output,
|
|
678
|
-
body: await parseErrorBody(output.body, context),
|
|
679
|
-
};
|
|
680
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
681
|
-
switch (errorCode) {
|
|
682
|
-
case "AccessDeniedException":
|
|
683
|
-
case "com.amazonaws.timestreamwrite#AccessDeniedException":
|
|
684
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
685
|
-
case "InternalServerException":
|
|
686
|
-
case "com.amazonaws.timestreamwrite#InternalServerException":
|
|
687
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
688
|
-
case "InvalidEndpointException":
|
|
689
|
-
case "com.amazonaws.timestreamwrite#InvalidEndpointException":
|
|
690
|
-
throw await de_InvalidEndpointExceptionRes(parsedOutput, context);
|
|
691
|
-
case "ResourceNotFoundException":
|
|
692
|
-
case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
|
|
693
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
694
|
-
case "ThrottlingException":
|
|
695
|
-
case "com.amazonaws.timestreamwrite#ThrottlingException":
|
|
696
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
697
|
-
case "ValidationException":
|
|
698
|
-
case "com.amazonaws.timestreamwrite#ValidationException":
|
|
699
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
700
|
-
default:
|
|
701
|
-
const parsedBody = parsedOutput.body;
|
|
702
|
-
return throwDefaultError({
|
|
703
|
-
output,
|
|
704
|
-
parsedBody,
|
|
705
|
-
errorCode,
|
|
706
|
-
});
|
|
707
|
-
}
|
|
708
|
-
};
|
|
709
|
-
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
710
|
-
if (output.statusCode >= 300) {
|
|
711
|
-
return de_ListTagsForResourceCommandError(output, context);
|
|
712
|
-
}
|
|
713
|
-
const data = await parseBody(output.body, context);
|
|
714
|
-
let contents = {};
|
|
715
|
-
contents = (0, smithy_client_1._json)(data);
|
|
716
|
-
const response = {
|
|
717
|
-
$metadata: deserializeMetadata(output),
|
|
718
|
-
...contents,
|
|
719
|
-
};
|
|
720
|
-
return response;
|
|
721
|
-
};
|
|
722
|
-
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
723
|
-
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
724
|
-
const parsedOutput = {
|
|
725
|
-
...output,
|
|
726
|
-
body: await parseErrorBody(output.body, context),
|
|
727
|
-
};
|
|
728
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
729
|
-
switch (errorCode) {
|
|
730
|
-
case "InvalidEndpointException":
|
|
731
|
-
case "com.amazonaws.timestreamwrite#InvalidEndpointException":
|
|
732
|
-
throw await de_InvalidEndpointExceptionRes(parsedOutput, context);
|
|
733
|
-
case "ResourceNotFoundException":
|
|
734
|
-
case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
|
|
735
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
736
|
-
case "ThrottlingException":
|
|
737
|
-
case "com.amazonaws.timestreamwrite#ThrottlingException":
|
|
738
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
739
|
-
case "ValidationException":
|
|
740
|
-
case "com.amazonaws.timestreamwrite#ValidationException":
|
|
741
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
742
|
-
default:
|
|
743
|
-
const parsedBody = parsedOutput.body;
|
|
744
|
-
return throwDefaultError({
|
|
745
|
-
output,
|
|
746
|
-
parsedBody,
|
|
747
|
-
errorCode,
|
|
748
|
-
});
|
|
749
|
-
}
|
|
750
|
-
};
|
|
751
|
-
const de_ResumeBatchLoadTaskCommand = async (output, context) => {
|
|
752
|
-
if (output.statusCode >= 300) {
|
|
753
|
-
return de_ResumeBatchLoadTaskCommandError(output, context);
|
|
754
|
-
}
|
|
755
|
-
const data = await parseBody(output.body, context);
|
|
756
|
-
let contents = {};
|
|
757
|
-
contents = (0, smithy_client_1._json)(data);
|
|
758
|
-
const response = {
|
|
759
|
-
$metadata: deserializeMetadata(output),
|
|
760
|
-
...contents,
|
|
761
|
-
};
|
|
762
|
-
return response;
|
|
763
|
-
};
|
|
764
|
-
exports.de_ResumeBatchLoadTaskCommand = de_ResumeBatchLoadTaskCommand;
|
|
765
|
-
const de_ResumeBatchLoadTaskCommandError = async (output, context) => {
|
|
766
|
-
const parsedOutput = {
|
|
767
|
-
...output,
|
|
768
|
-
body: await parseErrorBody(output.body, context),
|
|
769
|
-
};
|
|
770
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
771
|
-
switch (errorCode) {
|
|
772
|
-
case "AccessDeniedException":
|
|
773
|
-
case "com.amazonaws.timestreamwrite#AccessDeniedException":
|
|
774
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
775
|
-
case "InternalServerException":
|
|
776
|
-
case "com.amazonaws.timestreamwrite#InternalServerException":
|
|
777
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
778
|
-
case "InvalidEndpointException":
|
|
779
|
-
case "com.amazonaws.timestreamwrite#InvalidEndpointException":
|
|
780
|
-
throw await de_InvalidEndpointExceptionRes(parsedOutput, context);
|
|
781
|
-
case "ResourceNotFoundException":
|
|
782
|
-
case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
|
|
783
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
784
|
-
case "ThrottlingException":
|
|
785
|
-
case "com.amazonaws.timestreamwrite#ThrottlingException":
|
|
786
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
787
|
-
case "ValidationException":
|
|
788
|
-
case "com.amazonaws.timestreamwrite#ValidationException":
|
|
789
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
790
|
-
default:
|
|
791
|
-
const parsedBody = parsedOutput.body;
|
|
792
|
-
return throwDefaultError({
|
|
793
|
-
output,
|
|
794
|
-
parsedBody,
|
|
795
|
-
errorCode,
|
|
796
|
-
});
|
|
797
|
-
}
|
|
798
|
-
};
|
|
799
|
-
const de_TagResourceCommand = async (output, context) => {
|
|
800
|
-
if (output.statusCode >= 300) {
|
|
801
|
-
return de_TagResourceCommandError(output, context);
|
|
802
|
-
}
|
|
803
|
-
const data = await parseBody(output.body, context);
|
|
804
|
-
let contents = {};
|
|
805
|
-
contents = (0, smithy_client_1._json)(data);
|
|
806
|
-
const response = {
|
|
807
|
-
$metadata: deserializeMetadata(output),
|
|
808
|
-
...contents,
|
|
809
|
-
};
|
|
810
|
-
return response;
|
|
811
|
-
};
|
|
812
|
-
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
813
|
-
const de_TagResourceCommandError = async (output, context) => {
|
|
814
|
-
const parsedOutput = {
|
|
815
|
-
...output,
|
|
816
|
-
body: await parseErrorBody(output.body, context),
|
|
817
|
-
};
|
|
818
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
819
|
-
switch (errorCode) {
|
|
820
|
-
case "InvalidEndpointException":
|
|
821
|
-
case "com.amazonaws.timestreamwrite#InvalidEndpointException":
|
|
822
|
-
throw await de_InvalidEndpointExceptionRes(parsedOutput, context);
|
|
823
|
-
case "ResourceNotFoundException":
|
|
824
|
-
case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
|
|
825
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
826
|
-
case "ServiceQuotaExceededException":
|
|
827
|
-
case "com.amazonaws.timestreamwrite#ServiceQuotaExceededException":
|
|
828
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
829
|
-
case "ThrottlingException":
|
|
830
|
-
case "com.amazonaws.timestreamwrite#ThrottlingException":
|
|
831
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
832
|
-
case "ValidationException":
|
|
833
|
-
case "com.amazonaws.timestreamwrite#ValidationException":
|
|
834
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
835
|
-
default:
|
|
836
|
-
const parsedBody = parsedOutput.body;
|
|
837
|
-
return throwDefaultError({
|
|
838
|
-
output,
|
|
839
|
-
parsedBody,
|
|
840
|
-
errorCode,
|
|
841
|
-
});
|
|
842
|
-
}
|
|
843
|
-
};
|
|
844
|
-
const de_UntagResourceCommand = async (output, context) => {
|
|
845
|
-
if (output.statusCode >= 300) {
|
|
846
|
-
return de_UntagResourceCommandError(output, context);
|
|
847
|
-
}
|
|
848
|
-
const data = await parseBody(output.body, context);
|
|
849
|
-
let contents = {};
|
|
850
|
-
contents = (0, smithy_client_1._json)(data);
|
|
851
|
-
const response = {
|
|
852
|
-
$metadata: deserializeMetadata(output),
|
|
853
|
-
...contents,
|
|
854
|
-
};
|
|
855
|
-
return response;
|
|
856
|
-
};
|
|
857
|
-
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
858
|
-
const de_UntagResourceCommandError = async (output, context) => {
|
|
859
|
-
const parsedOutput = {
|
|
860
|
-
...output,
|
|
861
|
-
body: await parseErrorBody(output.body, context),
|
|
862
|
-
};
|
|
863
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
864
|
-
switch (errorCode) {
|
|
865
|
-
case "InvalidEndpointException":
|
|
866
|
-
case "com.amazonaws.timestreamwrite#InvalidEndpointException":
|
|
867
|
-
throw await de_InvalidEndpointExceptionRes(parsedOutput, context);
|
|
868
|
-
case "ResourceNotFoundException":
|
|
869
|
-
case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
|
|
870
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
871
|
-
case "ServiceQuotaExceededException":
|
|
872
|
-
case "com.amazonaws.timestreamwrite#ServiceQuotaExceededException":
|
|
873
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
874
|
-
case "ThrottlingException":
|
|
875
|
-
case "com.amazonaws.timestreamwrite#ThrottlingException":
|
|
876
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
877
|
-
case "ValidationException":
|
|
878
|
-
case "com.amazonaws.timestreamwrite#ValidationException":
|
|
879
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
880
|
-
default:
|
|
881
|
-
const parsedBody = parsedOutput.body;
|
|
882
|
-
return throwDefaultError({
|
|
883
|
-
output,
|
|
884
|
-
parsedBody,
|
|
885
|
-
errorCode,
|
|
886
|
-
});
|
|
887
|
-
}
|
|
888
|
-
};
|
|
889
|
-
const de_UpdateDatabaseCommand = async (output, context) => {
|
|
890
|
-
if (output.statusCode >= 300) {
|
|
891
|
-
return de_UpdateDatabaseCommandError(output, context);
|
|
892
|
-
}
|
|
893
|
-
const data = await parseBody(output.body, context);
|
|
894
|
-
let contents = {};
|
|
895
|
-
contents = de_UpdateDatabaseResponse(data, context);
|
|
896
|
-
const response = {
|
|
897
|
-
$metadata: deserializeMetadata(output),
|
|
898
|
-
...contents,
|
|
899
|
-
};
|
|
900
|
-
return response;
|
|
901
|
-
};
|
|
902
|
-
exports.de_UpdateDatabaseCommand = de_UpdateDatabaseCommand;
|
|
903
|
-
const de_UpdateDatabaseCommandError = async (output, context) => {
|
|
904
|
-
const parsedOutput = {
|
|
905
|
-
...output,
|
|
906
|
-
body: await parseErrorBody(output.body, context),
|
|
907
|
-
};
|
|
908
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
909
|
-
switch (errorCode) {
|
|
910
|
-
case "AccessDeniedException":
|
|
911
|
-
case "com.amazonaws.timestreamwrite#AccessDeniedException":
|
|
912
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
913
|
-
case "InternalServerException":
|
|
914
|
-
case "com.amazonaws.timestreamwrite#InternalServerException":
|
|
915
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
916
|
-
case "InvalidEndpointException":
|
|
917
|
-
case "com.amazonaws.timestreamwrite#InvalidEndpointException":
|
|
918
|
-
throw await de_InvalidEndpointExceptionRes(parsedOutput, context);
|
|
919
|
-
case "ResourceNotFoundException":
|
|
920
|
-
case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
|
|
921
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
922
|
-
case "ServiceQuotaExceededException":
|
|
923
|
-
case "com.amazonaws.timestreamwrite#ServiceQuotaExceededException":
|
|
924
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
925
|
-
case "ThrottlingException":
|
|
926
|
-
case "com.amazonaws.timestreamwrite#ThrottlingException":
|
|
927
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
928
|
-
case "ValidationException":
|
|
929
|
-
case "com.amazonaws.timestreamwrite#ValidationException":
|
|
930
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
931
|
-
default:
|
|
932
|
-
const parsedBody = parsedOutput.body;
|
|
933
|
-
return throwDefaultError({
|
|
934
|
-
output,
|
|
935
|
-
parsedBody,
|
|
936
|
-
errorCode,
|
|
937
|
-
});
|
|
938
|
-
}
|
|
939
|
-
};
|
|
940
|
-
const de_UpdateTableCommand = async (output, context) => {
|
|
941
|
-
if (output.statusCode >= 300) {
|
|
942
|
-
return de_UpdateTableCommandError(output, context);
|
|
943
|
-
}
|
|
944
|
-
const data = await parseBody(output.body, context);
|
|
945
|
-
let contents = {};
|
|
946
|
-
contents = de_UpdateTableResponse(data, context);
|
|
947
|
-
const response = {
|
|
948
|
-
$metadata: deserializeMetadata(output),
|
|
949
|
-
...contents,
|
|
950
|
-
};
|
|
951
|
-
return response;
|
|
952
|
-
};
|
|
953
|
-
exports.de_UpdateTableCommand = de_UpdateTableCommand;
|
|
954
|
-
const de_UpdateTableCommandError = async (output, context) => {
|
|
955
|
-
const parsedOutput = {
|
|
956
|
-
...output,
|
|
957
|
-
body: await parseErrorBody(output.body, context),
|
|
958
|
-
};
|
|
959
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
960
|
-
switch (errorCode) {
|
|
961
|
-
case "AccessDeniedException":
|
|
962
|
-
case "com.amazonaws.timestreamwrite#AccessDeniedException":
|
|
963
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
964
|
-
case "InternalServerException":
|
|
965
|
-
case "com.amazonaws.timestreamwrite#InternalServerException":
|
|
966
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
967
|
-
case "InvalidEndpointException":
|
|
968
|
-
case "com.amazonaws.timestreamwrite#InvalidEndpointException":
|
|
969
|
-
throw await de_InvalidEndpointExceptionRes(parsedOutput, context);
|
|
970
|
-
case "ResourceNotFoundException":
|
|
971
|
-
case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
|
|
972
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
973
|
-
case "ThrottlingException":
|
|
974
|
-
case "com.amazonaws.timestreamwrite#ThrottlingException":
|
|
975
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
976
|
-
case "ValidationException":
|
|
977
|
-
case "com.amazonaws.timestreamwrite#ValidationException":
|
|
978
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
979
|
-
default:
|
|
980
|
-
const parsedBody = parsedOutput.body;
|
|
981
|
-
return throwDefaultError({
|
|
982
|
-
output,
|
|
983
|
-
parsedBody,
|
|
984
|
-
errorCode,
|
|
985
|
-
});
|
|
986
|
-
}
|
|
987
|
-
};
|
|
988
|
-
const de_WriteRecordsCommand = async (output, context) => {
|
|
989
|
-
if (output.statusCode >= 300) {
|
|
990
|
-
return de_WriteRecordsCommandError(output, context);
|
|
991
|
-
}
|
|
992
|
-
const data = await parseBody(output.body, context);
|
|
993
|
-
let contents = {};
|
|
994
|
-
contents = (0, smithy_client_1._json)(data);
|
|
995
|
-
const response = {
|
|
996
|
-
$metadata: deserializeMetadata(output),
|
|
997
|
-
...contents,
|
|
998
|
-
};
|
|
999
|
-
return response;
|
|
1000
|
-
};
|
|
1001
|
-
exports.de_WriteRecordsCommand = de_WriteRecordsCommand;
|
|
1002
|
-
const de_WriteRecordsCommandError = async (output, context) => {
|
|
1003
|
-
const parsedOutput = {
|
|
1004
|
-
...output,
|
|
1005
|
-
body: await parseErrorBody(output.body, context),
|
|
1006
|
-
};
|
|
1007
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1008
|
-
switch (errorCode) {
|
|
1009
|
-
case "AccessDeniedException":
|
|
1010
|
-
case "com.amazonaws.timestreamwrite#AccessDeniedException":
|
|
1011
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1012
|
-
case "InternalServerException":
|
|
1013
|
-
case "com.amazonaws.timestreamwrite#InternalServerException":
|
|
1014
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1015
|
-
case "InvalidEndpointException":
|
|
1016
|
-
case "com.amazonaws.timestreamwrite#InvalidEndpointException":
|
|
1017
|
-
throw await de_InvalidEndpointExceptionRes(parsedOutput, context);
|
|
1018
|
-
case "RejectedRecordsException":
|
|
1019
|
-
case "com.amazonaws.timestreamwrite#RejectedRecordsException":
|
|
1020
|
-
throw await de_RejectedRecordsExceptionRes(parsedOutput, context);
|
|
1021
|
-
case "ResourceNotFoundException":
|
|
1022
|
-
case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
|
|
1023
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1024
|
-
case "ThrottlingException":
|
|
1025
|
-
case "com.amazonaws.timestreamwrite#ThrottlingException":
|
|
1026
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1027
|
-
case "ValidationException":
|
|
1028
|
-
case "com.amazonaws.timestreamwrite#ValidationException":
|
|
1029
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1030
|
-
default:
|
|
1031
|
-
const parsedBody = parsedOutput.body;
|
|
1032
|
-
return throwDefaultError({
|
|
1033
|
-
output,
|
|
1034
|
-
parsedBody,
|
|
1035
|
-
errorCode,
|
|
1036
|
-
});
|
|
1037
|
-
}
|
|
1038
|
-
};
|
|
1039
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
1040
|
-
const body = parsedOutput.body;
|
|
1041
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1042
|
-
const exception = new models_0_1.AccessDeniedException({
|
|
1043
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1044
|
-
...deserialized,
|
|
1045
|
-
});
|
|
1046
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1047
|
-
};
|
|
1048
|
-
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
1049
|
-
const body = parsedOutput.body;
|
|
1050
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1051
|
-
const exception = new models_0_1.ConflictException({
|
|
1052
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1053
|
-
...deserialized,
|
|
1054
|
-
});
|
|
1055
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1056
|
-
};
|
|
1057
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
1058
|
-
const body = parsedOutput.body;
|
|
1059
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1060
|
-
const exception = new models_0_1.InternalServerException({
|
|
1061
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1062
|
-
...deserialized,
|
|
1063
|
-
});
|
|
1064
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1065
|
-
};
|
|
1066
|
-
const de_InvalidEndpointExceptionRes = async (parsedOutput, context) => {
|
|
1067
|
-
const body = parsedOutput.body;
|
|
1068
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1069
|
-
const exception = new models_0_1.InvalidEndpointException({
|
|
1070
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1071
|
-
...deserialized,
|
|
1072
|
-
});
|
|
1073
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1074
|
-
};
|
|
1075
|
-
const de_RejectedRecordsExceptionRes = async (parsedOutput, context) => {
|
|
1076
|
-
const body = parsedOutput.body;
|
|
1077
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1078
|
-
const exception = new models_0_1.RejectedRecordsException({
|
|
1079
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1080
|
-
...deserialized,
|
|
1081
|
-
});
|
|
1082
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1083
|
-
};
|
|
1084
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1085
|
-
const body = parsedOutput.body;
|
|
1086
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1087
|
-
const exception = new models_0_1.ResourceNotFoundException({
|
|
1088
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1089
|
-
...deserialized,
|
|
1090
|
-
});
|
|
1091
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1092
|
-
};
|
|
1093
|
-
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
1094
|
-
const body = parsedOutput.body;
|
|
1095
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1096
|
-
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
1097
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1098
|
-
...deserialized,
|
|
1099
|
-
});
|
|
1100
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1101
|
-
};
|
|
1102
|
-
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
1103
|
-
const body = parsedOutput.body;
|
|
1104
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1105
|
-
const exception = new models_0_1.ThrottlingException({
|
|
1106
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1107
|
-
...deserialized,
|
|
1108
|
-
});
|
|
1109
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1110
|
-
};
|
|
1111
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
1112
|
-
const body = parsedOutput.body;
|
|
1113
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1114
|
-
const exception = new models_0_1.ValidationException({
|
|
1115
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1116
|
-
...deserialized,
|
|
1117
|
-
});
|
|
1118
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1119
|
-
};
|
|
1120
|
-
const se_CreateBatchLoadTaskRequest = (input, context) => {
|
|
1121
|
-
return (0, smithy_client_1.take)(input, {
|
|
1122
|
-
ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
1123
|
-
DataModelConfiguration: smithy_client_1._json,
|
|
1124
|
-
DataSourceConfiguration: smithy_client_1._json,
|
|
1125
|
-
RecordVersion: [],
|
|
1126
|
-
ReportConfiguration: smithy_client_1._json,
|
|
1127
|
-
TargetDatabaseName: [],
|
|
1128
|
-
TargetTableName: [],
|
|
1129
|
-
});
|
|
1130
|
-
};
|
|
1131
|
-
const de_BatchLoadTask = (output, context) => {
|
|
1132
|
-
return (0, smithy_client_1.take)(output, {
|
|
1133
|
-
CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1134
|
-
DatabaseName: smithy_client_1.expectString,
|
|
1135
|
-
LastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1136
|
-
ResumableUntil: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1137
|
-
TableName: smithy_client_1.expectString,
|
|
1138
|
-
TaskId: smithy_client_1.expectString,
|
|
1139
|
-
TaskStatus: smithy_client_1.expectString,
|
|
1140
|
-
});
|
|
1141
|
-
};
|
|
1142
|
-
const de_BatchLoadTaskDescription = (output, context) => {
|
|
1143
|
-
return (0, smithy_client_1.take)(output, {
|
|
1144
|
-
CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1145
|
-
DataModelConfiguration: smithy_client_1._json,
|
|
1146
|
-
DataSourceConfiguration: smithy_client_1._json,
|
|
1147
|
-
ErrorMessage: smithy_client_1.expectString,
|
|
1148
|
-
LastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1149
|
-
ProgressReport: smithy_client_1._json,
|
|
1150
|
-
RecordVersion: smithy_client_1.expectLong,
|
|
1151
|
-
ReportConfiguration: smithy_client_1._json,
|
|
1152
|
-
ResumableUntil: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1153
|
-
TargetDatabaseName: smithy_client_1.expectString,
|
|
1154
|
-
TargetTableName: smithy_client_1.expectString,
|
|
1155
|
-
TaskId: smithy_client_1.expectString,
|
|
1156
|
-
TaskStatus: smithy_client_1.expectString,
|
|
1157
|
-
});
|
|
1158
|
-
};
|
|
1159
|
-
const de_BatchLoadTaskList = (output, context) => {
|
|
1160
|
-
const retVal = (output || [])
|
|
1161
|
-
.filter((e) => e != null)
|
|
1162
|
-
.map((entry) => {
|
|
1163
|
-
return de_BatchLoadTask(entry, context);
|
|
1164
|
-
});
|
|
1165
|
-
return retVal;
|
|
1166
|
-
};
|
|
1167
|
-
const de_CreateDatabaseResponse = (output, context) => {
|
|
1168
|
-
return (0, smithy_client_1.take)(output, {
|
|
1169
|
-
Database: (_) => de_Database(_, context),
|
|
1170
|
-
});
|
|
1171
|
-
};
|
|
1172
|
-
const de_CreateTableResponse = (output, context) => {
|
|
1173
|
-
return (0, smithy_client_1.take)(output, {
|
|
1174
|
-
Table: (_) => de_Table(_, context),
|
|
1175
|
-
});
|
|
1176
|
-
};
|
|
1177
|
-
const de_Database = (output, context) => {
|
|
1178
|
-
return (0, smithy_client_1.take)(output, {
|
|
1179
|
-
Arn: smithy_client_1.expectString,
|
|
1180
|
-
CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1181
|
-
DatabaseName: smithy_client_1.expectString,
|
|
1182
|
-
KmsKeyId: smithy_client_1.expectString,
|
|
1183
|
-
LastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1184
|
-
TableCount: smithy_client_1.expectLong,
|
|
1185
|
-
});
|
|
1186
|
-
};
|
|
1187
|
-
const de_DatabaseList = (output, context) => {
|
|
1188
|
-
const retVal = (output || [])
|
|
1189
|
-
.filter((e) => e != null)
|
|
1190
|
-
.map((entry) => {
|
|
1191
|
-
return de_Database(entry, context);
|
|
1192
|
-
});
|
|
1193
|
-
return retVal;
|
|
1194
|
-
};
|
|
1195
|
-
const de_DescribeBatchLoadTaskResponse = (output, context) => {
|
|
1196
|
-
return (0, smithy_client_1.take)(output, {
|
|
1197
|
-
BatchLoadTaskDescription: (_) => de_BatchLoadTaskDescription(_, context),
|
|
1198
|
-
});
|
|
1199
|
-
};
|
|
1200
|
-
const de_DescribeDatabaseResponse = (output, context) => {
|
|
1201
|
-
return (0, smithy_client_1.take)(output, {
|
|
1202
|
-
Database: (_) => de_Database(_, context),
|
|
1203
|
-
});
|
|
1204
|
-
};
|
|
1205
|
-
const de_DescribeTableResponse = (output, context) => {
|
|
1206
|
-
return (0, smithy_client_1.take)(output, {
|
|
1207
|
-
Table: (_) => de_Table(_, context),
|
|
1208
|
-
});
|
|
1209
|
-
};
|
|
1210
|
-
const de_ListBatchLoadTasksResponse = (output, context) => {
|
|
1211
|
-
return (0, smithy_client_1.take)(output, {
|
|
1212
|
-
BatchLoadTasks: (_) => de_BatchLoadTaskList(_, context),
|
|
1213
|
-
NextToken: smithy_client_1.expectString,
|
|
1214
|
-
});
|
|
1215
|
-
};
|
|
1216
|
-
const de_ListDatabasesResponse = (output, context) => {
|
|
1217
|
-
return (0, smithy_client_1.take)(output, {
|
|
1218
|
-
Databases: (_) => de_DatabaseList(_, context),
|
|
1219
|
-
NextToken: smithy_client_1.expectString,
|
|
1220
|
-
});
|
|
1221
|
-
};
|
|
1222
|
-
const de_ListTablesResponse = (output, context) => {
|
|
1223
|
-
return (0, smithy_client_1.take)(output, {
|
|
1224
|
-
NextToken: smithy_client_1.expectString,
|
|
1225
|
-
Tables: (_) => de_TableList(_, context),
|
|
1226
|
-
});
|
|
1227
|
-
};
|
|
1228
|
-
const de_Table = (output, context) => {
|
|
1229
|
-
return (0, smithy_client_1.take)(output, {
|
|
1230
|
-
Arn: smithy_client_1.expectString,
|
|
1231
|
-
CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1232
|
-
DatabaseName: smithy_client_1.expectString,
|
|
1233
|
-
LastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1234
|
-
MagneticStoreWriteProperties: smithy_client_1._json,
|
|
1235
|
-
RetentionProperties: smithy_client_1._json,
|
|
1236
|
-
Schema: smithy_client_1._json,
|
|
1237
|
-
TableName: smithy_client_1.expectString,
|
|
1238
|
-
TableStatus: smithy_client_1.expectString,
|
|
1239
|
-
});
|
|
1240
|
-
};
|
|
1241
|
-
const de_TableList = (output, context) => {
|
|
1242
|
-
const retVal = (output || [])
|
|
1243
|
-
.filter((e) => e != null)
|
|
1244
|
-
.map((entry) => {
|
|
1245
|
-
return de_Table(entry, context);
|
|
1246
|
-
});
|
|
1247
|
-
return retVal;
|
|
1248
|
-
};
|
|
1249
|
-
const de_UpdateDatabaseResponse = (output, context) => {
|
|
1250
|
-
return (0, smithy_client_1.take)(output, {
|
|
1251
|
-
Database: (_) => de_Database(_, context),
|
|
1252
|
-
});
|
|
1253
|
-
};
|
|
1254
|
-
const de_UpdateTableResponse = (output, context) => {
|
|
1255
|
-
return (0, smithy_client_1.take)(output, {
|
|
1256
|
-
Table: (_) => de_Table(_, context),
|
|
1257
|
-
});
|
|
1258
|
-
};
|
|
1259
|
-
const deserializeMetadata = (output) => ({
|
|
1260
|
-
httpStatusCode: output.statusCode,
|
|
1261
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1262
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1263
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
1264
|
-
});
|
|
1265
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1266
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(TimestreamWriteServiceException_1.TimestreamWriteServiceException);
|
|
1267
|
-
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
1268
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1269
|
-
const contents = {
|
|
1270
|
-
protocol,
|
|
1271
|
-
hostname,
|
|
1272
|
-
port,
|
|
1273
|
-
method: "POST",
|
|
1274
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
1275
|
-
headers,
|
|
1276
|
-
};
|
|
1277
|
-
if (resolvedHostname !== undefined) {
|
|
1278
|
-
contents.hostname = resolvedHostname;
|
|
1279
|
-
}
|
|
1280
|
-
if (body !== undefined) {
|
|
1281
|
-
contents.body = body;
|
|
1282
|
-
}
|
|
1283
|
-
return new protocol_http_1.HttpRequest(contents);
|
|
1284
|
-
};
|
|
1285
|
-
function sharedHeaders(operation) {
|
|
1286
|
-
return {
|
|
1287
|
-
"content-type": "application/x-amz-json-1.0",
|
|
1288
|
-
"x-amz-target": `Timestream_20181101.${operation}`,
|
|
1289
|
-
};
|
|
1290
|
-
}
|
|
1291
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1292
|
-
if (encoded.length) {
|
|
1293
|
-
return JSON.parse(encoded);
|
|
1294
|
-
}
|
|
1295
|
-
return {};
|
|
1296
|
-
});
|
|
1297
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
1298
|
-
const value = await parseBody(errorBody, context);
|
|
1299
|
-
value.message = value.message ?? value.Message;
|
|
1300
|
-
return value;
|
|
1301
|
-
};
|
|
1302
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
1303
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1304
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
1305
|
-
let cleanValue = rawValue;
|
|
1306
|
-
if (typeof cleanValue === "number") {
|
|
1307
|
-
cleanValue = cleanValue.toString();
|
|
1308
|
-
}
|
|
1309
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1310
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1311
|
-
}
|
|
1312
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1313
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1314
|
-
}
|
|
1315
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1316
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1317
|
-
}
|
|
1318
|
-
return cleanValue;
|
|
1319
|
-
};
|
|
1320
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1321
|
-
if (headerKey !== undefined) {
|
|
1322
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1323
|
-
}
|
|
1324
|
-
if (data.code !== undefined) {
|
|
1325
|
-
return sanitizeErrorCode(data.code);
|
|
1326
|
-
}
|
|
1327
|
-
if (data["__type"] !== undefined) {
|
|
1328
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1329
|
-
}
|
|
1330
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|