@aws-sdk/client-iotsecuretunneling 3.180.0 → 3.183.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/CHANGELOG.md +20 -0
- package/dist-cjs/protocols/Aws_json1_1.js +14 -8
- package/dist-es/IoTSecureTunneling.js +34 -41
- package/dist-es/IoTSecureTunnelingClient.js +22 -28
- package/dist-es/commands/CloseTunnelCommand.js +21 -28
- package/dist-es/commands/DescribeTunnelCommand.js +21 -28
- package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
- package/dist-es/commands/ListTunnelsCommand.js +21 -28
- package/dist-es/commands/OpenTunnelCommand.js +21 -28
- package/dist-es/commands/RotateTunnelAccessTokenCommand.js +21 -28
- package/dist-es/commands/TagResourceCommand.js +21 -28
- package/dist-es/commands/UntagResourceCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/IoTSecureTunnelingServiceException.js +5 -10
- package/dist-es/models/models_0.js +92 -45
- package/dist-es/pagination/ListTunnelsPaginator.js +25 -68
- package/dist-es/protocols/Aws_json1_1.js +486 -619
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/package.json +33 -33
|
@@ -1,576 +1,453 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
2
|
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { IoTSecureTunnelingServiceException as __BaseException } from "../models/IoTSecureTunnelingServiceException";
|
|
5
4
|
import { LimitExceededException, ResourceNotFoundException, } from "../models/models_0";
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
return
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
switch (_a.label) {
|
|
343
|
-
case 0:
|
|
344
|
-
if (output.statusCode >= 300) {
|
|
345
|
-
return [2, deserializeAws_json1_1RotateTunnelAccessTokenCommandError(output, context)];
|
|
346
|
-
}
|
|
347
|
-
return [4, parseBody(output.body, context)];
|
|
348
|
-
case 1:
|
|
349
|
-
data = _a.sent();
|
|
350
|
-
contents = {};
|
|
351
|
-
contents = deserializeAws_json1_1RotateTunnelAccessTokenResponse(data, context);
|
|
352
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
353
|
-
return [2, Promise.resolve(response)];
|
|
354
|
-
}
|
|
355
|
-
});
|
|
356
|
-
}); };
|
|
357
|
-
var deserializeAws_json1_1RotateTunnelAccessTokenCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
358
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
359
|
-
var _c;
|
|
360
|
-
return __generator(this, function (_d) {
|
|
361
|
-
switch (_d.label) {
|
|
362
|
-
case 0:
|
|
363
|
-
_a = [__assign({}, output)];
|
|
364
|
-
_c = {};
|
|
365
|
-
return [4, parseBody(output.body, context)];
|
|
366
|
-
case 1:
|
|
367
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
368
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
369
|
-
_b = errorCode;
|
|
370
|
-
switch (_b) {
|
|
371
|
-
case "ResourceNotFoundException": return [3, 2];
|
|
372
|
-
case "com.amazonaws.iotsecuretunneling#ResourceNotFoundException": return [3, 2];
|
|
373
|
-
}
|
|
374
|
-
return [3, 4];
|
|
375
|
-
case 2: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
376
|
-
case 3: throw _d.sent();
|
|
377
|
-
case 4:
|
|
378
|
-
parsedBody = parsedOutput.body;
|
|
379
|
-
throwDefaultError({
|
|
380
|
-
output: output,
|
|
381
|
-
parsedBody: parsedBody,
|
|
382
|
-
exceptionCtor: __BaseException,
|
|
383
|
-
errorCode: errorCode,
|
|
384
|
-
});
|
|
385
|
-
_d.label = 5;
|
|
386
|
-
case 5: return [2];
|
|
387
|
-
}
|
|
388
|
-
});
|
|
389
|
-
}); };
|
|
390
|
-
export var deserializeAws_json1_1TagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
391
|
-
var data, contents, response;
|
|
392
|
-
return __generator(this, function (_a) {
|
|
393
|
-
switch (_a.label) {
|
|
394
|
-
case 0:
|
|
395
|
-
if (output.statusCode >= 300) {
|
|
396
|
-
return [2, deserializeAws_json1_1TagResourceCommandError(output, context)];
|
|
397
|
-
}
|
|
398
|
-
return [4, parseBody(output.body, context)];
|
|
399
|
-
case 1:
|
|
400
|
-
data = _a.sent();
|
|
401
|
-
contents = {};
|
|
402
|
-
contents = deserializeAws_json1_1TagResourceResponse(data, context);
|
|
403
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
404
|
-
return [2, Promise.resolve(response)];
|
|
405
|
-
}
|
|
406
|
-
});
|
|
407
|
-
}); };
|
|
408
|
-
var deserializeAws_json1_1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
409
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
410
|
-
var _c;
|
|
411
|
-
return __generator(this, function (_d) {
|
|
412
|
-
switch (_d.label) {
|
|
413
|
-
case 0:
|
|
414
|
-
_a = [__assign({}, output)];
|
|
415
|
-
_c = {};
|
|
416
|
-
return [4, parseBody(output.body, context)];
|
|
417
|
-
case 1:
|
|
418
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
419
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
420
|
-
_b = errorCode;
|
|
421
|
-
switch (_b) {
|
|
422
|
-
case "ResourceNotFoundException": return [3, 2];
|
|
423
|
-
case "com.amazonaws.iotsecuretunneling#ResourceNotFoundException": return [3, 2];
|
|
424
|
-
}
|
|
425
|
-
return [3, 4];
|
|
426
|
-
case 2: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
427
|
-
case 3: throw _d.sent();
|
|
428
|
-
case 4:
|
|
429
|
-
parsedBody = parsedOutput.body;
|
|
430
|
-
throwDefaultError({
|
|
431
|
-
output: output,
|
|
432
|
-
parsedBody: parsedBody,
|
|
433
|
-
exceptionCtor: __BaseException,
|
|
434
|
-
errorCode: errorCode,
|
|
435
|
-
});
|
|
436
|
-
_d.label = 5;
|
|
437
|
-
case 5: return [2];
|
|
438
|
-
}
|
|
439
|
-
});
|
|
440
|
-
}); };
|
|
441
|
-
export var deserializeAws_json1_1UntagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
442
|
-
var data, contents, response;
|
|
443
|
-
return __generator(this, function (_a) {
|
|
444
|
-
switch (_a.label) {
|
|
445
|
-
case 0:
|
|
446
|
-
if (output.statusCode >= 300) {
|
|
447
|
-
return [2, deserializeAws_json1_1UntagResourceCommandError(output, context)];
|
|
448
|
-
}
|
|
449
|
-
return [4, parseBody(output.body, context)];
|
|
450
|
-
case 1:
|
|
451
|
-
data = _a.sent();
|
|
452
|
-
contents = {};
|
|
453
|
-
contents = deserializeAws_json1_1UntagResourceResponse(data, context);
|
|
454
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
455
|
-
return [2, Promise.resolve(response)];
|
|
456
|
-
}
|
|
457
|
-
});
|
|
458
|
-
}); };
|
|
459
|
-
var deserializeAws_json1_1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
460
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
461
|
-
var _c;
|
|
462
|
-
return __generator(this, function (_d) {
|
|
463
|
-
switch (_d.label) {
|
|
464
|
-
case 0:
|
|
465
|
-
_a = [__assign({}, output)];
|
|
466
|
-
_c = {};
|
|
467
|
-
return [4, parseBody(output.body, context)];
|
|
468
|
-
case 1:
|
|
469
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
470
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
471
|
-
_b = errorCode;
|
|
472
|
-
switch (_b) {
|
|
473
|
-
case "ResourceNotFoundException": return [3, 2];
|
|
474
|
-
case "com.amazonaws.iotsecuretunneling#ResourceNotFoundException": return [3, 2];
|
|
475
|
-
}
|
|
476
|
-
return [3, 4];
|
|
477
|
-
case 2: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
478
|
-
case 3: throw _d.sent();
|
|
479
|
-
case 4:
|
|
480
|
-
parsedBody = parsedOutput.body;
|
|
481
|
-
throwDefaultError({
|
|
482
|
-
output: output,
|
|
483
|
-
parsedBody: parsedBody,
|
|
484
|
-
exceptionCtor: __BaseException,
|
|
485
|
-
errorCode: errorCode,
|
|
486
|
-
});
|
|
487
|
-
_d.label = 5;
|
|
488
|
-
case 5: return [2];
|
|
489
|
-
}
|
|
490
|
-
});
|
|
491
|
-
}); };
|
|
492
|
-
var deserializeAws_json1_1LimitExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
493
|
-
var body, deserialized, exception;
|
|
494
|
-
return __generator(this, function (_a) {
|
|
495
|
-
body = parsedOutput.body;
|
|
496
|
-
deserialized = deserializeAws_json1_1LimitExceededException(body, context);
|
|
497
|
-
exception = new LimitExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
498
|
-
return [2, __decorateServiceException(exception, body)];
|
|
5
|
+
export const serializeAws_json1_1CloseTunnelCommand = async (input, context) => {
|
|
6
|
+
const headers = {
|
|
7
|
+
"content-type": "application/x-amz-json-1.1",
|
|
8
|
+
"x-amz-target": "IoTSecuredTunneling.CloseTunnel",
|
|
9
|
+
};
|
|
10
|
+
let body;
|
|
11
|
+
body = JSON.stringify(serializeAws_json1_1CloseTunnelRequest(input, context));
|
|
12
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
13
|
+
};
|
|
14
|
+
export const serializeAws_json1_1DescribeTunnelCommand = async (input, context) => {
|
|
15
|
+
const headers = {
|
|
16
|
+
"content-type": "application/x-amz-json-1.1",
|
|
17
|
+
"x-amz-target": "IoTSecuredTunneling.DescribeTunnel",
|
|
18
|
+
};
|
|
19
|
+
let body;
|
|
20
|
+
body = JSON.stringify(serializeAws_json1_1DescribeTunnelRequest(input, context));
|
|
21
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
22
|
+
};
|
|
23
|
+
export const serializeAws_json1_1ListTagsForResourceCommand = async (input, context) => {
|
|
24
|
+
const headers = {
|
|
25
|
+
"content-type": "application/x-amz-json-1.1",
|
|
26
|
+
"x-amz-target": "IoTSecuredTunneling.ListTagsForResource",
|
|
27
|
+
};
|
|
28
|
+
let body;
|
|
29
|
+
body = JSON.stringify(serializeAws_json1_1ListTagsForResourceRequest(input, context));
|
|
30
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
31
|
+
};
|
|
32
|
+
export const serializeAws_json1_1ListTunnelsCommand = async (input, context) => {
|
|
33
|
+
const headers = {
|
|
34
|
+
"content-type": "application/x-amz-json-1.1",
|
|
35
|
+
"x-amz-target": "IoTSecuredTunneling.ListTunnels",
|
|
36
|
+
};
|
|
37
|
+
let body;
|
|
38
|
+
body = JSON.stringify(serializeAws_json1_1ListTunnelsRequest(input, context));
|
|
39
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
40
|
+
};
|
|
41
|
+
export const serializeAws_json1_1OpenTunnelCommand = async (input, context) => {
|
|
42
|
+
const headers = {
|
|
43
|
+
"content-type": "application/x-amz-json-1.1",
|
|
44
|
+
"x-amz-target": "IoTSecuredTunneling.OpenTunnel",
|
|
45
|
+
};
|
|
46
|
+
let body;
|
|
47
|
+
body = JSON.stringify(serializeAws_json1_1OpenTunnelRequest(input, context));
|
|
48
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
49
|
+
};
|
|
50
|
+
export const serializeAws_json1_1RotateTunnelAccessTokenCommand = async (input, context) => {
|
|
51
|
+
const headers = {
|
|
52
|
+
"content-type": "application/x-amz-json-1.1",
|
|
53
|
+
"x-amz-target": "IoTSecuredTunneling.RotateTunnelAccessToken",
|
|
54
|
+
};
|
|
55
|
+
let body;
|
|
56
|
+
body = JSON.stringify(serializeAws_json1_1RotateTunnelAccessTokenRequest(input, context));
|
|
57
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
58
|
+
};
|
|
59
|
+
export const serializeAws_json1_1TagResourceCommand = async (input, context) => {
|
|
60
|
+
const headers = {
|
|
61
|
+
"content-type": "application/x-amz-json-1.1",
|
|
62
|
+
"x-amz-target": "IoTSecuredTunneling.TagResource",
|
|
63
|
+
};
|
|
64
|
+
let body;
|
|
65
|
+
body = JSON.stringify(serializeAws_json1_1TagResourceRequest(input, context));
|
|
66
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
67
|
+
};
|
|
68
|
+
export const serializeAws_json1_1UntagResourceCommand = async (input, context) => {
|
|
69
|
+
const headers = {
|
|
70
|
+
"content-type": "application/x-amz-json-1.1",
|
|
71
|
+
"x-amz-target": "IoTSecuredTunneling.UntagResource",
|
|
72
|
+
};
|
|
73
|
+
let body;
|
|
74
|
+
body = JSON.stringify(serializeAws_json1_1UntagResourceRequest(input, context));
|
|
75
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
76
|
+
};
|
|
77
|
+
export const deserializeAws_json1_1CloseTunnelCommand = async (output, context) => {
|
|
78
|
+
if (output.statusCode >= 300) {
|
|
79
|
+
return deserializeAws_json1_1CloseTunnelCommandError(output, context);
|
|
80
|
+
}
|
|
81
|
+
const data = await parseBody(output.body, context);
|
|
82
|
+
let contents = {};
|
|
83
|
+
contents = deserializeAws_json1_1CloseTunnelResponse(data, context);
|
|
84
|
+
const response = {
|
|
85
|
+
$metadata: deserializeMetadata(output),
|
|
86
|
+
...contents,
|
|
87
|
+
};
|
|
88
|
+
return Promise.resolve(response);
|
|
89
|
+
};
|
|
90
|
+
const deserializeAws_json1_1CloseTunnelCommandError = async (output, context) => {
|
|
91
|
+
const parsedOutput = {
|
|
92
|
+
...output,
|
|
93
|
+
body: await parseErrorBody(output.body, context),
|
|
94
|
+
};
|
|
95
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
96
|
+
switch (errorCode) {
|
|
97
|
+
case "ResourceNotFoundException":
|
|
98
|
+
case "com.amazonaws.iotsecuretunneling#ResourceNotFoundException":
|
|
99
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
100
|
+
default:
|
|
101
|
+
const parsedBody = parsedOutput.body;
|
|
102
|
+
throwDefaultError({
|
|
103
|
+
output,
|
|
104
|
+
parsedBody,
|
|
105
|
+
exceptionCtor: __BaseException,
|
|
106
|
+
errorCode,
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
export const deserializeAws_json1_1DescribeTunnelCommand = async (output, context) => {
|
|
111
|
+
if (output.statusCode >= 300) {
|
|
112
|
+
return deserializeAws_json1_1DescribeTunnelCommandError(output, context);
|
|
113
|
+
}
|
|
114
|
+
const data = await parseBody(output.body, context);
|
|
115
|
+
let contents = {};
|
|
116
|
+
contents = deserializeAws_json1_1DescribeTunnelResponse(data, context);
|
|
117
|
+
const response = {
|
|
118
|
+
$metadata: deserializeMetadata(output),
|
|
119
|
+
...contents,
|
|
120
|
+
};
|
|
121
|
+
return Promise.resolve(response);
|
|
122
|
+
};
|
|
123
|
+
const deserializeAws_json1_1DescribeTunnelCommandError = async (output, context) => {
|
|
124
|
+
const parsedOutput = {
|
|
125
|
+
...output,
|
|
126
|
+
body: await parseErrorBody(output.body, context),
|
|
127
|
+
};
|
|
128
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
129
|
+
switch (errorCode) {
|
|
130
|
+
case "ResourceNotFoundException":
|
|
131
|
+
case "com.amazonaws.iotsecuretunneling#ResourceNotFoundException":
|
|
132
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
133
|
+
default:
|
|
134
|
+
const parsedBody = parsedOutput.body;
|
|
135
|
+
throwDefaultError({
|
|
136
|
+
output,
|
|
137
|
+
parsedBody,
|
|
138
|
+
exceptionCtor: __BaseException,
|
|
139
|
+
errorCode,
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
export const deserializeAws_json1_1ListTagsForResourceCommand = async (output, context) => {
|
|
144
|
+
if (output.statusCode >= 300) {
|
|
145
|
+
return deserializeAws_json1_1ListTagsForResourceCommandError(output, context);
|
|
146
|
+
}
|
|
147
|
+
const data = await parseBody(output.body, context);
|
|
148
|
+
let contents = {};
|
|
149
|
+
contents = deserializeAws_json1_1ListTagsForResourceResponse(data, context);
|
|
150
|
+
const response = {
|
|
151
|
+
$metadata: deserializeMetadata(output),
|
|
152
|
+
...contents,
|
|
153
|
+
};
|
|
154
|
+
return Promise.resolve(response);
|
|
155
|
+
};
|
|
156
|
+
const deserializeAws_json1_1ListTagsForResourceCommandError = 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 "ResourceNotFoundException":
|
|
164
|
+
case "com.amazonaws.iotsecuretunneling#ResourceNotFoundException":
|
|
165
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
166
|
+
default:
|
|
167
|
+
const parsedBody = parsedOutput.body;
|
|
168
|
+
throwDefaultError({
|
|
169
|
+
output,
|
|
170
|
+
parsedBody,
|
|
171
|
+
exceptionCtor: __BaseException,
|
|
172
|
+
errorCode,
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
export const deserializeAws_json1_1ListTunnelsCommand = async (output, context) => {
|
|
177
|
+
if (output.statusCode >= 300) {
|
|
178
|
+
return deserializeAws_json1_1ListTunnelsCommandError(output, context);
|
|
179
|
+
}
|
|
180
|
+
const data = await parseBody(output.body, context);
|
|
181
|
+
let contents = {};
|
|
182
|
+
contents = deserializeAws_json1_1ListTunnelsResponse(data, context);
|
|
183
|
+
const response = {
|
|
184
|
+
$metadata: deserializeMetadata(output),
|
|
185
|
+
...contents,
|
|
186
|
+
};
|
|
187
|
+
return Promise.resolve(response);
|
|
188
|
+
};
|
|
189
|
+
const deserializeAws_json1_1ListTunnelsCommandError = async (output, context) => {
|
|
190
|
+
const parsedOutput = {
|
|
191
|
+
...output,
|
|
192
|
+
body: await parseErrorBody(output.body, context),
|
|
193
|
+
};
|
|
194
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
195
|
+
const parsedBody = parsedOutput.body;
|
|
196
|
+
throwDefaultError({
|
|
197
|
+
output,
|
|
198
|
+
parsedBody,
|
|
199
|
+
exceptionCtor: __BaseException,
|
|
200
|
+
errorCode,
|
|
201
|
+
});
|
|
202
|
+
};
|
|
203
|
+
export const deserializeAws_json1_1OpenTunnelCommand = async (output, context) => {
|
|
204
|
+
if (output.statusCode >= 300) {
|
|
205
|
+
return deserializeAws_json1_1OpenTunnelCommandError(output, context);
|
|
206
|
+
}
|
|
207
|
+
const data = await parseBody(output.body, context);
|
|
208
|
+
let contents = {};
|
|
209
|
+
contents = deserializeAws_json1_1OpenTunnelResponse(data, context);
|
|
210
|
+
const response = {
|
|
211
|
+
$metadata: deserializeMetadata(output),
|
|
212
|
+
...contents,
|
|
213
|
+
};
|
|
214
|
+
return Promise.resolve(response);
|
|
215
|
+
};
|
|
216
|
+
const deserializeAws_json1_1OpenTunnelCommandError = async (output, context) => {
|
|
217
|
+
const parsedOutput = {
|
|
218
|
+
...output,
|
|
219
|
+
body: await parseErrorBody(output.body, context),
|
|
220
|
+
};
|
|
221
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
222
|
+
switch (errorCode) {
|
|
223
|
+
case "LimitExceededException":
|
|
224
|
+
case "com.amazonaws.iotsecuretunneling#LimitExceededException":
|
|
225
|
+
throw await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context);
|
|
226
|
+
default:
|
|
227
|
+
const parsedBody = parsedOutput.body;
|
|
228
|
+
throwDefaultError({
|
|
229
|
+
output,
|
|
230
|
+
parsedBody,
|
|
231
|
+
exceptionCtor: __BaseException,
|
|
232
|
+
errorCode,
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
export const deserializeAws_json1_1RotateTunnelAccessTokenCommand = async (output, context) => {
|
|
237
|
+
if (output.statusCode >= 300) {
|
|
238
|
+
return deserializeAws_json1_1RotateTunnelAccessTokenCommandError(output, context);
|
|
239
|
+
}
|
|
240
|
+
const data = await parseBody(output.body, context);
|
|
241
|
+
let contents = {};
|
|
242
|
+
contents = deserializeAws_json1_1RotateTunnelAccessTokenResponse(data, context);
|
|
243
|
+
const response = {
|
|
244
|
+
$metadata: deserializeMetadata(output),
|
|
245
|
+
...contents,
|
|
246
|
+
};
|
|
247
|
+
return Promise.resolve(response);
|
|
248
|
+
};
|
|
249
|
+
const deserializeAws_json1_1RotateTunnelAccessTokenCommandError = async (output, context) => {
|
|
250
|
+
const parsedOutput = {
|
|
251
|
+
...output,
|
|
252
|
+
body: await parseErrorBody(output.body, context),
|
|
253
|
+
};
|
|
254
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
255
|
+
switch (errorCode) {
|
|
256
|
+
case "ResourceNotFoundException":
|
|
257
|
+
case "com.amazonaws.iotsecuretunneling#ResourceNotFoundException":
|
|
258
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
259
|
+
default:
|
|
260
|
+
const parsedBody = parsedOutput.body;
|
|
261
|
+
throwDefaultError({
|
|
262
|
+
output,
|
|
263
|
+
parsedBody,
|
|
264
|
+
exceptionCtor: __BaseException,
|
|
265
|
+
errorCode,
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
};
|
|
269
|
+
export const deserializeAws_json1_1TagResourceCommand = async (output, context) => {
|
|
270
|
+
if (output.statusCode >= 300) {
|
|
271
|
+
return deserializeAws_json1_1TagResourceCommandError(output, context);
|
|
272
|
+
}
|
|
273
|
+
const data = await parseBody(output.body, context);
|
|
274
|
+
let contents = {};
|
|
275
|
+
contents = deserializeAws_json1_1TagResourceResponse(data, context);
|
|
276
|
+
const response = {
|
|
277
|
+
$metadata: deserializeMetadata(output),
|
|
278
|
+
...contents,
|
|
279
|
+
};
|
|
280
|
+
return Promise.resolve(response);
|
|
281
|
+
};
|
|
282
|
+
const deserializeAws_json1_1TagResourceCommandError = async (output, context) => {
|
|
283
|
+
const parsedOutput = {
|
|
284
|
+
...output,
|
|
285
|
+
body: await parseErrorBody(output.body, context),
|
|
286
|
+
};
|
|
287
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
288
|
+
switch (errorCode) {
|
|
289
|
+
case "ResourceNotFoundException":
|
|
290
|
+
case "com.amazonaws.iotsecuretunneling#ResourceNotFoundException":
|
|
291
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
292
|
+
default:
|
|
293
|
+
const parsedBody = parsedOutput.body;
|
|
294
|
+
throwDefaultError({
|
|
295
|
+
output,
|
|
296
|
+
parsedBody,
|
|
297
|
+
exceptionCtor: __BaseException,
|
|
298
|
+
errorCode,
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
};
|
|
302
|
+
export const deserializeAws_json1_1UntagResourceCommand = async (output, context) => {
|
|
303
|
+
if (output.statusCode >= 300) {
|
|
304
|
+
return deserializeAws_json1_1UntagResourceCommandError(output, context);
|
|
305
|
+
}
|
|
306
|
+
const data = await parseBody(output.body, context);
|
|
307
|
+
let contents = {};
|
|
308
|
+
contents = deserializeAws_json1_1UntagResourceResponse(data, context);
|
|
309
|
+
const response = {
|
|
310
|
+
$metadata: deserializeMetadata(output),
|
|
311
|
+
...contents,
|
|
312
|
+
};
|
|
313
|
+
return Promise.resolve(response);
|
|
314
|
+
};
|
|
315
|
+
const deserializeAws_json1_1UntagResourceCommandError = async (output, context) => {
|
|
316
|
+
const parsedOutput = {
|
|
317
|
+
...output,
|
|
318
|
+
body: await parseErrorBody(output.body, context),
|
|
319
|
+
};
|
|
320
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
321
|
+
switch (errorCode) {
|
|
322
|
+
case "ResourceNotFoundException":
|
|
323
|
+
case "com.amazonaws.iotsecuretunneling#ResourceNotFoundException":
|
|
324
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
325
|
+
default:
|
|
326
|
+
const parsedBody = parsedOutput.body;
|
|
327
|
+
throwDefaultError({
|
|
328
|
+
output,
|
|
329
|
+
parsedBody,
|
|
330
|
+
exceptionCtor: __BaseException,
|
|
331
|
+
errorCode,
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
};
|
|
335
|
+
const deserializeAws_json1_1LimitExceededExceptionResponse = async (parsedOutput, context) => {
|
|
336
|
+
const body = parsedOutput.body;
|
|
337
|
+
const deserialized = deserializeAws_json1_1LimitExceededException(body, context);
|
|
338
|
+
const exception = new LimitExceededException({
|
|
339
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
340
|
+
...deserialized,
|
|
499
341
|
});
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
342
|
+
return __decorateServiceException(exception, body);
|
|
343
|
+
};
|
|
344
|
+
const deserializeAws_json1_1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
345
|
+
const body = parsedOutput.body;
|
|
346
|
+
const deserialized = deserializeAws_json1_1ResourceNotFoundException(body, context);
|
|
347
|
+
const exception = new ResourceNotFoundException({
|
|
348
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
349
|
+
...deserialized,
|
|
508
350
|
});
|
|
509
|
-
|
|
510
|
-
var serializeAws_json1_1CloseTunnelRequest = function (input, context) {
|
|
511
|
-
return __assign(__assign({}, (input.delete != null && { delete: input.delete })), (input.tunnelId != null && { tunnelId: input.tunnelId }));
|
|
351
|
+
return __decorateServiceException(exception, body);
|
|
512
352
|
};
|
|
513
|
-
|
|
514
|
-
return
|
|
353
|
+
const serializeAws_json1_1CloseTunnelRequest = (input, context) => {
|
|
354
|
+
return {
|
|
355
|
+
...(input.delete != null && { delete: input.delete }),
|
|
356
|
+
...(input.tunnelId != null && { tunnelId: input.tunnelId }),
|
|
357
|
+
};
|
|
515
358
|
};
|
|
516
|
-
|
|
517
|
-
return
|
|
359
|
+
const serializeAws_json1_1DescribeTunnelRequest = (input, context) => {
|
|
360
|
+
return {
|
|
361
|
+
...(input.tunnelId != null && { tunnelId: input.tunnelId }),
|
|
362
|
+
};
|
|
363
|
+
};
|
|
364
|
+
const serializeAws_json1_1DestinationConfig = (input, context) => {
|
|
365
|
+
return {
|
|
366
|
+
...(input.services != null && { services: serializeAws_json1_1ServiceList(input.services, context) }),
|
|
367
|
+
...(input.thingName != null && { thingName: input.thingName }),
|
|
368
|
+
};
|
|
518
369
|
};
|
|
519
|
-
|
|
520
|
-
return
|
|
370
|
+
const serializeAws_json1_1ListTagsForResourceRequest = (input, context) => {
|
|
371
|
+
return {
|
|
372
|
+
...(input.resourceArn != null && { resourceArn: input.resourceArn }),
|
|
373
|
+
};
|
|
521
374
|
};
|
|
522
|
-
|
|
523
|
-
return
|
|
375
|
+
const serializeAws_json1_1ListTunnelsRequest = (input, context) => {
|
|
376
|
+
return {
|
|
377
|
+
...(input.maxResults != null && { maxResults: input.maxResults }),
|
|
378
|
+
...(input.nextToken != null && { nextToken: input.nextToken }),
|
|
379
|
+
...(input.thingName != null && { thingName: input.thingName }),
|
|
380
|
+
};
|
|
524
381
|
};
|
|
525
|
-
|
|
526
|
-
return
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
382
|
+
const serializeAws_json1_1OpenTunnelRequest = (input, context) => {
|
|
383
|
+
return {
|
|
384
|
+
...(input.description != null && { description: input.description }),
|
|
385
|
+
...(input.destinationConfig != null && {
|
|
386
|
+
destinationConfig: serializeAws_json1_1DestinationConfig(input.destinationConfig, context),
|
|
387
|
+
}),
|
|
388
|
+
...(input.tags != null && { tags: serializeAws_json1_1TagList(input.tags, context) }),
|
|
389
|
+
...(input.timeoutConfig != null && {
|
|
390
|
+
timeoutConfig: serializeAws_json1_1TimeoutConfig(input.timeoutConfig, context),
|
|
391
|
+
}),
|
|
392
|
+
};
|
|
531
393
|
};
|
|
532
|
-
|
|
533
|
-
return
|
|
534
|
-
|
|
535
|
-
|
|
394
|
+
const serializeAws_json1_1RotateTunnelAccessTokenRequest = (input, context) => {
|
|
395
|
+
return {
|
|
396
|
+
...(input.clientMode != null && { clientMode: input.clientMode }),
|
|
397
|
+
...(input.destinationConfig != null && {
|
|
398
|
+
destinationConfig: serializeAws_json1_1DestinationConfig(input.destinationConfig, context),
|
|
399
|
+
}),
|
|
400
|
+
...(input.tunnelId != null && { tunnelId: input.tunnelId }),
|
|
401
|
+
};
|
|
536
402
|
};
|
|
537
|
-
|
|
403
|
+
const serializeAws_json1_1ServiceList = (input, context) => {
|
|
538
404
|
return input
|
|
539
|
-
.filter(
|
|
540
|
-
.map(
|
|
405
|
+
.filter((e) => e != null)
|
|
406
|
+
.map((entry) => {
|
|
541
407
|
return entry;
|
|
542
408
|
});
|
|
543
409
|
};
|
|
544
|
-
|
|
545
|
-
return
|
|
410
|
+
const serializeAws_json1_1Tag = (input, context) => {
|
|
411
|
+
return {
|
|
412
|
+
...(input.key != null && { key: input.key }),
|
|
413
|
+
...(input.value != null && { value: input.value }),
|
|
414
|
+
};
|
|
546
415
|
};
|
|
547
|
-
|
|
416
|
+
const serializeAws_json1_1TagKeyList = (input, context) => {
|
|
548
417
|
return input
|
|
549
|
-
.filter(
|
|
550
|
-
.map(
|
|
418
|
+
.filter((e) => e != null)
|
|
419
|
+
.map((entry) => {
|
|
551
420
|
return entry;
|
|
552
421
|
});
|
|
553
422
|
};
|
|
554
|
-
|
|
423
|
+
const serializeAws_json1_1TagList = (input, context) => {
|
|
555
424
|
return input
|
|
556
|
-
.filter(
|
|
557
|
-
.map(
|
|
425
|
+
.filter((e) => e != null)
|
|
426
|
+
.map((entry) => {
|
|
558
427
|
return serializeAws_json1_1Tag(entry, context);
|
|
559
428
|
});
|
|
560
429
|
};
|
|
561
|
-
|
|
562
|
-
return
|
|
430
|
+
const serializeAws_json1_1TagResourceRequest = (input, context) => {
|
|
431
|
+
return {
|
|
432
|
+
...(input.resourceArn != null && { resourceArn: input.resourceArn }),
|
|
433
|
+
...(input.tags != null && { tags: serializeAws_json1_1TagList(input.tags, context) }),
|
|
434
|
+
};
|
|
563
435
|
};
|
|
564
|
-
|
|
565
|
-
return
|
|
436
|
+
const serializeAws_json1_1TimeoutConfig = (input, context) => {
|
|
437
|
+
return {
|
|
438
|
+
...(input.maxLifetimeTimeoutMinutes != null && { maxLifetimeTimeoutMinutes: input.maxLifetimeTimeoutMinutes }),
|
|
439
|
+
};
|
|
566
440
|
};
|
|
567
|
-
|
|
568
|
-
return
|
|
441
|
+
const serializeAws_json1_1UntagResourceRequest = (input, context) => {
|
|
442
|
+
return {
|
|
443
|
+
...(input.resourceArn != null && { resourceArn: input.resourceArn }),
|
|
444
|
+
...(input.tagKeys != null && { tagKeys: serializeAws_json1_1TagKeyList(input.tagKeys, context) }),
|
|
445
|
+
};
|
|
569
446
|
};
|
|
570
|
-
|
|
447
|
+
const deserializeAws_json1_1CloseTunnelResponse = (output, context) => {
|
|
571
448
|
return {};
|
|
572
449
|
};
|
|
573
|
-
|
|
450
|
+
const deserializeAws_json1_1ConnectionState = (output, context) => {
|
|
574
451
|
return {
|
|
575
452
|
lastUpdatedAt: output.lastUpdatedAt != null
|
|
576
453
|
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt)))
|
|
@@ -578,28 +455,28 @@ var deserializeAws_json1_1ConnectionState = function (output, context) {
|
|
|
578
455
|
status: __expectString(output.status),
|
|
579
456
|
};
|
|
580
457
|
};
|
|
581
|
-
|
|
458
|
+
const deserializeAws_json1_1DescribeTunnelResponse = (output, context) => {
|
|
582
459
|
return {
|
|
583
460
|
tunnel: output.tunnel != null ? deserializeAws_json1_1Tunnel(output.tunnel, context) : undefined,
|
|
584
461
|
};
|
|
585
462
|
};
|
|
586
|
-
|
|
463
|
+
const deserializeAws_json1_1DestinationConfig = (output, context) => {
|
|
587
464
|
return {
|
|
588
465
|
services: output.services != null ? deserializeAws_json1_1ServiceList(output.services, context) : undefined,
|
|
589
466
|
thingName: __expectString(output.thingName),
|
|
590
467
|
};
|
|
591
468
|
};
|
|
592
|
-
|
|
469
|
+
const deserializeAws_json1_1LimitExceededException = (output, context) => {
|
|
593
470
|
return {
|
|
594
471
|
message: __expectString(output.message),
|
|
595
472
|
};
|
|
596
473
|
};
|
|
597
|
-
|
|
474
|
+
const deserializeAws_json1_1ListTagsForResourceResponse = (output, context) => {
|
|
598
475
|
return {
|
|
599
476
|
tags: output.tags != null ? deserializeAws_json1_1TagList(output.tags, context) : undefined,
|
|
600
477
|
};
|
|
601
478
|
};
|
|
602
|
-
|
|
479
|
+
const deserializeAws_json1_1ListTunnelsResponse = (output, context) => {
|
|
603
480
|
return {
|
|
604
481
|
nextToken: __expectString(output.nextToken),
|
|
605
482
|
tunnelSummaries: output.tunnelSummaries != null
|
|
@@ -607,7 +484,7 @@ var deserializeAws_json1_1ListTunnelsResponse = function (output, context) {
|
|
|
607
484
|
: undefined,
|
|
608
485
|
};
|
|
609
486
|
};
|
|
610
|
-
|
|
487
|
+
const deserializeAws_json1_1OpenTunnelResponse = (output, context) => {
|
|
611
488
|
return {
|
|
612
489
|
destinationAccessToken: __expectString(output.destinationAccessToken),
|
|
613
490
|
sourceAccessToken: __expectString(output.sourceAccessToken),
|
|
@@ -615,22 +492,22 @@ var deserializeAws_json1_1OpenTunnelResponse = function (output, context) {
|
|
|
615
492
|
tunnelId: __expectString(output.tunnelId),
|
|
616
493
|
};
|
|
617
494
|
};
|
|
618
|
-
|
|
495
|
+
const deserializeAws_json1_1ResourceNotFoundException = (output, context) => {
|
|
619
496
|
return {
|
|
620
497
|
message: __expectString(output.message),
|
|
621
498
|
};
|
|
622
499
|
};
|
|
623
|
-
|
|
500
|
+
const deserializeAws_json1_1RotateTunnelAccessTokenResponse = (output, context) => {
|
|
624
501
|
return {
|
|
625
502
|
destinationAccessToken: __expectString(output.destinationAccessToken),
|
|
626
503
|
sourceAccessToken: __expectString(output.sourceAccessToken),
|
|
627
504
|
tunnelArn: __expectString(output.tunnelArn),
|
|
628
505
|
};
|
|
629
506
|
};
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
.filter(
|
|
633
|
-
.map(
|
|
507
|
+
const deserializeAws_json1_1ServiceList = (output, context) => {
|
|
508
|
+
const retVal = (output || [])
|
|
509
|
+
.filter((e) => e != null)
|
|
510
|
+
.map((entry) => {
|
|
634
511
|
if (entry === null) {
|
|
635
512
|
return null;
|
|
636
513
|
}
|
|
@@ -638,16 +515,16 @@ var deserializeAws_json1_1ServiceList = function (output, context) {
|
|
|
638
515
|
});
|
|
639
516
|
return retVal;
|
|
640
517
|
};
|
|
641
|
-
|
|
518
|
+
const deserializeAws_json1_1Tag = (output, context) => {
|
|
642
519
|
return {
|
|
643
520
|
key: __expectString(output.key),
|
|
644
521
|
value: __expectString(output.value),
|
|
645
522
|
};
|
|
646
523
|
};
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
.filter(
|
|
650
|
-
.map(
|
|
524
|
+
const deserializeAws_json1_1TagList = (output, context) => {
|
|
525
|
+
const retVal = (output || [])
|
|
526
|
+
.filter((e) => e != null)
|
|
527
|
+
.map((entry) => {
|
|
651
528
|
if (entry === null) {
|
|
652
529
|
return null;
|
|
653
530
|
}
|
|
@@ -655,15 +532,15 @@ var deserializeAws_json1_1TagList = function (output, context) {
|
|
|
655
532
|
});
|
|
656
533
|
return retVal;
|
|
657
534
|
};
|
|
658
|
-
|
|
535
|
+
const deserializeAws_json1_1TagResourceResponse = (output, context) => {
|
|
659
536
|
return {};
|
|
660
537
|
};
|
|
661
|
-
|
|
538
|
+
const deserializeAws_json1_1TimeoutConfig = (output, context) => {
|
|
662
539
|
return {
|
|
663
540
|
maxLifetimeTimeoutMinutes: __expectInt32(output.maxLifetimeTimeoutMinutes),
|
|
664
541
|
};
|
|
665
542
|
};
|
|
666
|
-
|
|
543
|
+
const deserializeAws_json1_1Tunnel = (output, context) => {
|
|
667
544
|
return {
|
|
668
545
|
createdAt: output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined,
|
|
669
546
|
description: __expectString(output.description),
|
|
@@ -686,7 +563,7 @@ var deserializeAws_json1_1Tunnel = function (output, context) {
|
|
|
686
563
|
tunnelId: __expectString(output.tunnelId),
|
|
687
564
|
};
|
|
688
565
|
};
|
|
689
|
-
|
|
566
|
+
const deserializeAws_json1_1TunnelSummary = (output, context) => {
|
|
690
567
|
return {
|
|
691
568
|
createdAt: output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined,
|
|
692
569
|
description: __expectString(output.description),
|
|
@@ -698,10 +575,10 @@ var deserializeAws_json1_1TunnelSummary = function (output, context) {
|
|
|
698
575
|
tunnelId: __expectString(output.tunnelId),
|
|
699
576
|
};
|
|
700
577
|
};
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
.filter(
|
|
704
|
-
.map(
|
|
578
|
+
const deserializeAws_json1_1TunnelSummaryList = (output, context) => {
|
|
579
|
+
const retVal = (output || [])
|
|
580
|
+
.filter((e) => e != null)
|
|
581
|
+
.map((entry) => {
|
|
705
582
|
if (entry === null) {
|
|
706
583
|
return null;
|
|
707
584
|
}
|
|
@@ -709,65 +586,55 @@ var deserializeAws_json1_1TunnelSummaryList = function (output, context) {
|
|
|
709
586
|
});
|
|
710
587
|
return retVal;
|
|
711
588
|
};
|
|
712
|
-
|
|
589
|
+
const deserializeAws_json1_1UntagResourceResponse = (output, context) => {
|
|
713
590
|
return {};
|
|
714
591
|
};
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
});
|
|
723
|
-
};
|
|
724
|
-
var collectBody = function (streamBody, context) {
|
|
725
|
-
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
592
|
+
const deserializeMetadata = (output) => ({
|
|
593
|
+
httpStatusCode: output.statusCode,
|
|
594
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
595
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
596
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
597
|
+
});
|
|
598
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
726
599
|
if (streamBody instanceof Uint8Array) {
|
|
727
600
|
return Promise.resolve(streamBody);
|
|
728
601
|
}
|
|
729
602
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
730
603
|
};
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
};
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
if (resolvedHostname !== undefined) {
|
|
750
|
-
contents.hostname = resolvedHostname;
|
|
751
|
-
}
|
|
752
|
-
if (body !== undefined) {
|
|
753
|
-
contents.body = body;
|
|
754
|
-
}
|
|
755
|
-
return [2, new __HttpRequest(contents)];
|
|
756
|
-
}
|
|
757
|
-
});
|
|
758
|
-
}); };
|
|
759
|
-
var parseBody = function (streamBody, context) {
|
|
760
|
-
return collectBodyString(streamBody, context).then(function (encoded) {
|
|
761
|
-
if (encoded.length) {
|
|
762
|
-
return JSON.parse(encoded);
|
|
763
|
-
}
|
|
764
|
-
return {};
|
|
765
|
-
});
|
|
604
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
605
|
+
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
606
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
607
|
+
const contents = {
|
|
608
|
+
protocol,
|
|
609
|
+
hostname,
|
|
610
|
+
port,
|
|
611
|
+
method: "POST",
|
|
612
|
+
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
613
|
+
headers,
|
|
614
|
+
};
|
|
615
|
+
if (resolvedHostname !== undefined) {
|
|
616
|
+
contents.hostname = resolvedHostname;
|
|
617
|
+
}
|
|
618
|
+
if (body !== undefined) {
|
|
619
|
+
contents.body = body;
|
|
620
|
+
}
|
|
621
|
+
return new __HttpRequest(contents);
|
|
766
622
|
};
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
623
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
624
|
+
if (encoded.length) {
|
|
625
|
+
return JSON.parse(encoded);
|
|
626
|
+
}
|
|
627
|
+
return {};
|
|
628
|
+
});
|
|
629
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
630
|
+
const value = await parseBody(errorBody, context);
|
|
631
|
+
value.message = value.message ?? value.Message;
|
|
632
|
+
return value;
|
|
633
|
+
};
|
|
634
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
635
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
636
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
637
|
+
let cleanValue = rawValue;
|
|
771
638
|
if (typeof cleanValue === "number") {
|
|
772
639
|
cleanValue = cleanValue.toString();
|
|
773
640
|
}
|
|
@@ -782,7 +649,7 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
782
649
|
}
|
|
783
650
|
return cleanValue;
|
|
784
651
|
};
|
|
785
|
-
|
|
652
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
786
653
|
if (headerKey !== undefined) {
|
|
787
654
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
788
655
|
}
|