@aws-sdk/client-snowball 3.926.0 → 3.928.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist-cjs/index.js +1020 -1230
  2. package/dist-cjs/runtimeConfig.shared.js +7 -0
  3. package/dist-es/SnowballClient.js +2 -0
  4. package/dist-es/commands/CancelClusterCommand.js +3 -9
  5. package/dist-es/commands/CancelJobCommand.js +3 -9
  6. package/dist-es/commands/CreateAddressCommand.js +3 -9
  7. package/dist-es/commands/CreateClusterCommand.js +3 -9
  8. package/dist-es/commands/CreateJobCommand.js +3 -10
  9. package/dist-es/commands/CreateLongTermPricingCommand.js +3 -9
  10. package/dist-es/commands/CreateReturnShippingLabelCommand.js +3 -9
  11. package/dist-es/commands/DescribeAddressCommand.js +3 -9
  12. package/dist-es/commands/DescribeAddressesCommand.js +3 -9
  13. package/dist-es/commands/DescribeClusterCommand.js +3 -9
  14. package/dist-es/commands/DescribeJobCommand.js +3 -10
  15. package/dist-es/commands/DescribeReturnShippingLabelCommand.js +3 -9
  16. package/dist-es/commands/GetJobManifestCommand.js +3 -9
  17. package/dist-es/commands/GetJobUnlockCodeCommand.js +3 -9
  18. package/dist-es/commands/GetSnowballUsageCommand.js +3 -9
  19. package/dist-es/commands/GetSoftwareUpdatesCommand.js +3 -9
  20. package/dist-es/commands/ListClusterJobsCommand.js +3 -9
  21. package/dist-es/commands/ListClustersCommand.js +3 -9
  22. package/dist-es/commands/ListCompatibleImagesCommand.js +3 -9
  23. package/dist-es/commands/ListJobsCommand.js +3 -9
  24. package/dist-es/commands/ListLongTermPricingCommand.js +3 -9
  25. package/dist-es/commands/ListPickupLocationsCommand.js +3 -9
  26. package/dist-es/commands/ListServiceVersionsCommand.js +3 -9
  27. package/dist-es/commands/UpdateClusterCommand.js +3 -9
  28. package/dist-es/commands/UpdateJobCommand.js +3 -10
  29. package/dist-es/commands/UpdateJobShipmentStateCommand.js +3 -9
  30. package/dist-es/commands/UpdateLongTermPricingCommand.js +3 -9
  31. package/dist-es/models/models_0.js +0 -23
  32. package/dist-es/runtimeConfig.shared.js +7 -0
  33. package/dist-es/schemas/schemas_0.js +935 -0
  34. package/dist-types/SnowballClient.d.ts +10 -1
  35. package/dist-types/models/models_0.d.ts +0 -20
  36. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  37. package/dist-types/runtimeConfig.d.ts +1 -0
  38. package/dist-types/runtimeConfig.native.d.ts +1 -0
  39. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  40. package/dist-types/schemas/schemas_0.d.ts +145 -0
  41. package/dist-types/ts3.4/SnowballClient.d.ts +4 -0
  42. package/dist-types/ts3.4/models/models_0.d.ts +0 -13
  43. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  44. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  45. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  46. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  47. package/dist-types/ts3.4/schemas/schemas_0.d.ts +151 -0
  48. package/package.json +5 -5
  49. package/dist-es/protocols/Aws_json1_1.js +0 -985
  50. package/dist-types/protocols/Aws_json1_1.d.ts +0 -245
  51. package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +0 -329
@@ -1,985 +0,0 @@
1
- import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
4
- import { ClusterLimitExceededException, ConflictException, Ec2RequestFailedException, InvalidAddressException, InvalidInputCombinationException, InvalidJobStateException, InvalidNextTokenException, InvalidResourceException, KMSRequestFailedException, ReturnShippingLabelAlreadyExistsException, UnsupportedAddressException, } from "../models/models_0";
5
- import { SnowballServiceException as __BaseException } from "../models/SnowballServiceException";
6
- export const se_CancelClusterCommand = async (input, context) => {
7
- const headers = sharedHeaders("CancelCluster");
8
- let body;
9
- body = JSON.stringify(_json(input));
10
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
11
- };
12
- export const se_CancelJobCommand = async (input, context) => {
13
- const headers = sharedHeaders("CancelJob");
14
- let body;
15
- body = JSON.stringify(_json(input));
16
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
17
- };
18
- export const se_CreateAddressCommand = async (input, context) => {
19
- const headers = sharedHeaders("CreateAddress");
20
- let body;
21
- body = JSON.stringify(_json(input));
22
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
23
- };
24
- export const se_CreateClusterCommand = async (input, context) => {
25
- const headers = sharedHeaders("CreateCluster");
26
- let body;
27
- body = JSON.stringify(se_CreateClusterRequest(input, context));
28
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
29
- };
30
- export const se_CreateJobCommand = async (input, context) => {
31
- const headers = sharedHeaders("CreateJob");
32
- let body;
33
- body = JSON.stringify(se_CreateJobRequest(input, context));
34
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
35
- };
36
- export const se_CreateLongTermPricingCommand = async (input, context) => {
37
- const headers = sharedHeaders("CreateLongTermPricing");
38
- let body;
39
- body = JSON.stringify(_json(input));
40
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
- };
42
- export const se_CreateReturnShippingLabelCommand = async (input, context) => {
43
- const headers = sharedHeaders("CreateReturnShippingLabel");
44
- let body;
45
- body = JSON.stringify(_json(input));
46
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
47
- };
48
- export const se_DescribeAddressCommand = async (input, context) => {
49
- const headers = sharedHeaders("DescribeAddress");
50
- let body;
51
- body = JSON.stringify(_json(input));
52
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
53
- };
54
- export const se_DescribeAddressesCommand = async (input, context) => {
55
- const headers = sharedHeaders("DescribeAddresses");
56
- let body;
57
- body = JSON.stringify(_json(input));
58
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
59
- };
60
- export const se_DescribeClusterCommand = async (input, context) => {
61
- const headers = sharedHeaders("DescribeCluster");
62
- let body;
63
- body = JSON.stringify(_json(input));
64
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
65
- };
66
- export const se_DescribeJobCommand = async (input, context) => {
67
- const headers = sharedHeaders("DescribeJob");
68
- let body;
69
- body = JSON.stringify(_json(input));
70
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
71
- };
72
- export const se_DescribeReturnShippingLabelCommand = async (input, context) => {
73
- const headers = sharedHeaders("DescribeReturnShippingLabel");
74
- let body;
75
- body = JSON.stringify(_json(input));
76
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
- };
78
- export const se_GetJobManifestCommand = async (input, context) => {
79
- const headers = sharedHeaders("GetJobManifest");
80
- let body;
81
- body = JSON.stringify(_json(input));
82
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
83
- };
84
- export const se_GetJobUnlockCodeCommand = async (input, context) => {
85
- const headers = sharedHeaders("GetJobUnlockCode");
86
- let body;
87
- body = JSON.stringify(_json(input));
88
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
89
- };
90
- export const se_GetSnowballUsageCommand = async (input, context) => {
91
- const headers = sharedHeaders("GetSnowballUsage");
92
- let body;
93
- body = JSON.stringify(_json(input));
94
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
95
- };
96
- export const se_GetSoftwareUpdatesCommand = async (input, context) => {
97
- const headers = sharedHeaders("GetSoftwareUpdates");
98
- let body;
99
- body = JSON.stringify(_json(input));
100
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
101
- };
102
- export const se_ListClusterJobsCommand = async (input, context) => {
103
- const headers = sharedHeaders("ListClusterJobs");
104
- let body;
105
- body = JSON.stringify(_json(input));
106
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
107
- };
108
- export const se_ListClustersCommand = async (input, context) => {
109
- const headers = sharedHeaders("ListClusters");
110
- let body;
111
- body = JSON.stringify(_json(input));
112
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
113
- };
114
- export const se_ListCompatibleImagesCommand = async (input, context) => {
115
- const headers = sharedHeaders("ListCompatibleImages");
116
- let body;
117
- body = JSON.stringify(_json(input));
118
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
119
- };
120
- export const se_ListJobsCommand = async (input, context) => {
121
- const headers = sharedHeaders("ListJobs");
122
- let body;
123
- body = JSON.stringify(_json(input));
124
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
125
- };
126
- export const se_ListLongTermPricingCommand = async (input, context) => {
127
- const headers = sharedHeaders("ListLongTermPricing");
128
- let body;
129
- body = JSON.stringify(_json(input));
130
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
131
- };
132
- export const se_ListPickupLocationsCommand = async (input, context) => {
133
- const headers = sharedHeaders("ListPickupLocations");
134
- let body;
135
- body = JSON.stringify(_json(input));
136
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
137
- };
138
- export const se_ListServiceVersionsCommand = async (input, context) => {
139
- const headers = sharedHeaders("ListServiceVersions");
140
- let body;
141
- body = JSON.stringify(_json(input));
142
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
143
- };
144
- export const se_UpdateClusterCommand = async (input, context) => {
145
- const headers = sharedHeaders("UpdateCluster");
146
- let body;
147
- body = JSON.stringify(se_UpdateClusterRequest(input, context));
148
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
149
- };
150
- export const se_UpdateJobCommand = async (input, context) => {
151
- const headers = sharedHeaders("UpdateJob");
152
- let body;
153
- body = JSON.stringify(se_UpdateJobRequest(input, context));
154
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
155
- };
156
- export const se_UpdateJobShipmentStateCommand = async (input, context) => {
157
- const headers = sharedHeaders("UpdateJobShipmentState");
158
- let body;
159
- body = JSON.stringify(_json(input));
160
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
161
- };
162
- export const se_UpdateLongTermPricingCommand = async (input, context) => {
163
- const headers = sharedHeaders("UpdateLongTermPricing");
164
- let body;
165
- body = JSON.stringify(_json(input));
166
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
167
- };
168
- export const de_CancelClusterCommand = async (output, context) => {
169
- if (output.statusCode >= 300) {
170
- return de_CommandError(output, context);
171
- }
172
- const data = await parseBody(output.body, context);
173
- let contents = {};
174
- contents = _json(data);
175
- const response = {
176
- $metadata: deserializeMetadata(output),
177
- ...contents,
178
- };
179
- return response;
180
- };
181
- export const de_CancelJobCommand = async (output, context) => {
182
- if (output.statusCode >= 300) {
183
- return de_CommandError(output, context);
184
- }
185
- const data = await parseBody(output.body, context);
186
- let contents = {};
187
- contents = _json(data);
188
- const response = {
189
- $metadata: deserializeMetadata(output),
190
- ...contents,
191
- };
192
- return response;
193
- };
194
- export const de_CreateAddressCommand = async (output, context) => {
195
- if (output.statusCode >= 300) {
196
- return de_CommandError(output, context);
197
- }
198
- const data = await parseBody(output.body, context);
199
- let contents = {};
200
- contents = _json(data);
201
- const response = {
202
- $metadata: deserializeMetadata(output),
203
- ...contents,
204
- };
205
- return response;
206
- };
207
- export const de_CreateClusterCommand = async (output, context) => {
208
- if (output.statusCode >= 300) {
209
- return de_CommandError(output, context);
210
- }
211
- const data = await parseBody(output.body, context);
212
- let contents = {};
213
- contents = de_CreateClusterResult(data, context);
214
- const response = {
215
- $metadata: deserializeMetadata(output),
216
- ...contents,
217
- };
218
- return response;
219
- };
220
- export const de_CreateJobCommand = async (output, context) => {
221
- if (output.statusCode >= 300) {
222
- return de_CommandError(output, context);
223
- }
224
- const data = await parseBody(output.body, context);
225
- let contents = {};
226
- contents = _json(data);
227
- const response = {
228
- $metadata: deserializeMetadata(output),
229
- ...contents,
230
- };
231
- return response;
232
- };
233
- export const de_CreateLongTermPricingCommand = async (output, context) => {
234
- if (output.statusCode >= 300) {
235
- return de_CommandError(output, context);
236
- }
237
- const data = await parseBody(output.body, context);
238
- let contents = {};
239
- contents = _json(data);
240
- const response = {
241
- $metadata: deserializeMetadata(output),
242
- ...contents,
243
- };
244
- return response;
245
- };
246
- export const de_CreateReturnShippingLabelCommand = async (output, context) => {
247
- if (output.statusCode >= 300) {
248
- return de_CommandError(output, context);
249
- }
250
- const data = await parseBody(output.body, context);
251
- let contents = {};
252
- contents = _json(data);
253
- const response = {
254
- $metadata: deserializeMetadata(output),
255
- ...contents,
256
- };
257
- return response;
258
- };
259
- export const de_DescribeAddressCommand = async (output, context) => {
260
- if (output.statusCode >= 300) {
261
- return de_CommandError(output, context);
262
- }
263
- const data = await parseBody(output.body, context);
264
- let contents = {};
265
- contents = _json(data);
266
- const response = {
267
- $metadata: deserializeMetadata(output),
268
- ...contents,
269
- };
270
- return response;
271
- };
272
- export const de_DescribeAddressesCommand = async (output, context) => {
273
- if (output.statusCode >= 300) {
274
- return de_CommandError(output, context);
275
- }
276
- const data = await parseBody(output.body, context);
277
- let contents = {};
278
- contents = _json(data);
279
- const response = {
280
- $metadata: deserializeMetadata(output),
281
- ...contents,
282
- };
283
- return response;
284
- };
285
- export const de_DescribeClusterCommand = async (output, context) => {
286
- if (output.statusCode >= 300) {
287
- return de_CommandError(output, context);
288
- }
289
- const data = await parseBody(output.body, context);
290
- let contents = {};
291
- contents = de_DescribeClusterResult(data, context);
292
- const response = {
293
- $metadata: deserializeMetadata(output),
294
- ...contents,
295
- };
296
- return response;
297
- };
298
- export const de_DescribeJobCommand = async (output, context) => {
299
- if (output.statusCode >= 300) {
300
- return de_CommandError(output, context);
301
- }
302
- const data = await parseBody(output.body, context);
303
- let contents = {};
304
- contents = de_DescribeJobResult(data, context);
305
- const response = {
306
- $metadata: deserializeMetadata(output),
307
- ...contents,
308
- };
309
- return response;
310
- };
311
- export const de_DescribeReturnShippingLabelCommand = async (output, context) => {
312
- if (output.statusCode >= 300) {
313
- return de_CommandError(output, context);
314
- }
315
- const data = await parseBody(output.body, context);
316
- let contents = {};
317
- contents = de_DescribeReturnShippingLabelResult(data, context);
318
- const response = {
319
- $metadata: deserializeMetadata(output),
320
- ...contents,
321
- };
322
- return response;
323
- };
324
- export const de_GetJobManifestCommand = async (output, context) => {
325
- if (output.statusCode >= 300) {
326
- return de_CommandError(output, context);
327
- }
328
- const data = await parseBody(output.body, context);
329
- let contents = {};
330
- contents = _json(data);
331
- const response = {
332
- $metadata: deserializeMetadata(output),
333
- ...contents,
334
- };
335
- return response;
336
- };
337
- export const de_GetJobUnlockCodeCommand = async (output, context) => {
338
- if (output.statusCode >= 300) {
339
- return de_CommandError(output, context);
340
- }
341
- const data = await parseBody(output.body, context);
342
- let contents = {};
343
- contents = _json(data);
344
- const response = {
345
- $metadata: deserializeMetadata(output),
346
- ...contents,
347
- };
348
- return response;
349
- };
350
- export const de_GetSnowballUsageCommand = async (output, context) => {
351
- if (output.statusCode >= 300) {
352
- return de_CommandError(output, context);
353
- }
354
- const data = await parseBody(output.body, context);
355
- let contents = {};
356
- contents = _json(data);
357
- const response = {
358
- $metadata: deserializeMetadata(output),
359
- ...contents,
360
- };
361
- return response;
362
- };
363
- export const de_GetSoftwareUpdatesCommand = async (output, context) => {
364
- if (output.statusCode >= 300) {
365
- return de_CommandError(output, context);
366
- }
367
- const data = await parseBody(output.body, context);
368
- let contents = {};
369
- contents = _json(data);
370
- const response = {
371
- $metadata: deserializeMetadata(output),
372
- ...contents,
373
- };
374
- return response;
375
- };
376
- export const de_ListClusterJobsCommand = async (output, context) => {
377
- if (output.statusCode >= 300) {
378
- return de_CommandError(output, context);
379
- }
380
- const data = await parseBody(output.body, context);
381
- let contents = {};
382
- contents = de_ListClusterJobsResult(data, context);
383
- const response = {
384
- $metadata: deserializeMetadata(output),
385
- ...contents,
386
- };
387
- return response;
388
- };
389
- export const de_ListClustersCommand = async (output, context) => {
390
- if (output.statusCode >= 300) {
391
- return de_CommandError(output, context);
392
- }
393
- const data = await parseBody(output.body, context);
394
- let contents = {};
395
- contents = de_ListClustersResult(data, context);
396
- const response = {
397
- $metadata: deserializeMetadata(output),
398
- ...contents,
399
- };
400
- return response;
401
- };
402
- export const de_ListCompatibleImagesCommand = async (output, context) => {
403
- if (output.statusCode >= 300) {
404
- return de_CommandError(output, context);
405
- }
406
- const data = await parseBody(output.body, context);
407
- let contents = {};
408
- contents = _json(data);
409
- const response = {
410
- $metadata: deserializeMetadata(output),
411
- ...contents,
412
- };
413
- return response;
414
- };
415
- export const de_ListJobsCommand = async (output, context) => {
416
- if (output.statusCode >= 300) {
417
- return de_CommandError(output, context);
418
- }
419
- const data = await parseBody(output.body, context);
420
- let contents = {};
421
- contents = de_ListJobsResult(data, context);
422
- const response = {
423
- $metadata: deserializeMetadata(output),
424
- ...contents,
425
- };
426
- return response;
427
- };
428
- export const de_ListLongTermPricingCommand = async (output, context) => {
429
- if (output.statusCode >= 300) {
430
- return de_CommandError(output, context);
431
- }
432
- const data = await parseBody(output.body, context);
433
- let contents = {};
434
- contents = de_ListLongTermPricingResult(data, context);
435
- const response = {
436
- $metadata: deserializeMetadata(output),
437
- ...contents,
438
- };
439
- return response;
440
- };
441
- export const de_ListPickupLocationsCommand = async (output, context) => {
442
- if (output.statusCode >= 300) {
443
- return de_CommandError(output, context);
444
- }
445
- const data = await parseBody(output.body, context);
446
- let contents = {};
447
- contents = _json(data);
448
- const response = {
449
- $metadata: deserializeMetadata(output),
450
- ...contents,
451
- };
452
- return response;
453
- };
454
- export const de_ListServiceVersionsCommand = async (output, context) => {
455
- if (output.statusCode >= 300) {
456
- return de_CommandError(output, context);
457
- }
458
- const data = await parseBody(output.body, context);
459
- let contents = {};
460
- contents = _json(data);
461
- const response = {
462
- $metadata: deserializeMetadata(output),
463
- ...contents,
464
- };
465
- return response;
466
- };
467
- export const de_UpdateClusterCommand = async (output, context) => {
468
- if (output.statusCode >= 300) {
469
- return de_CommandError(output, context);
470
- }
471
- const data = await parseBody(output.body, context);
472
- let contents = {};
473
- contents = _json(data);
474
- const response = {
475
- $metadata: deserializeMetadata(output),
476
- ...contents,
477
- };
478
- return response;
479
- };
480
- export const de_UpdateJobCommand = async (output, context) => {
481
- if (output.statusCode >= 300) {
482
- return de_CommandError(output, context);
483
- }
484
- const data = await parseBody(output.body, context);
485
- let contents = {};
486
- contents = _json(data);
487
- const response = {
488
- $metadata: deserializeMetadata(output),
489
- ...contents,
490
- };
491
- return response;
492
- };
493
- export const de_UpdateJobShipmentStateCommand = async (output, context) => {
494
- if (output.statusCode >= 300) {
495
- return de_CommandError(output, context);
496
- }
497
- const data = await parseBody(output.body, context);
498
- let contents = {};
499
- contents = _json(data);
500
- const response = {
501
- $metadata: deserializeMetadata(output),
502
- ...contents,
503
- };
504
- return response;
505
- };
506
- export const de_UpdateLongTermPricingCommand = async (output, context) => {
507
- if (output.statusCode >= 300) {
508
- return de_CommandError(output, context);
509
- }
510
- const data = await parseBody(output.body, context);
511
- let contents = {};
512
- contents = _json(data);
513
- const response = {
514
- $metadata: deserializeMetadata(output),
515
- ...contents,
516
- };
517
- return response;
518
- };
519
- const de_CommandError = async (output, context) => {
520
- const parsedOutput = {
521
- ...output,
522
- body: await parseErrorBody(output.body, context),
523
- };
524
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
525
- switch (errorCode) {
526
- case "InvalidJobStateException":
527
- case "com.amazonaws.snowball#InvalidJobStateException":
528
- throw await de_InvalidJobStateExceptionRes(parsedOutput, context);
529
- case "InvalidResourceException":
530
- case "com.amazonaws.snowball#InvalidResourceException":
531
- throw await de_InvalidResourceExceptionRes(parsedOutput, context);
532
- case "KMSRequestFailedException":
533
- case "com.amazonaws.snowball#KMSRequestFailedException":
534
- throw await de_KMSRequestFailedExceptionRes(parsedOutput, context);
535
- case "InvalidAddressException":
536
- case "com.amazonaws.snowball#InvalidAddressException":
537
- throw await de_InvalidAddressExceptionRes(parsedOutput, context);
538
- case "UnsupportedAddressException":
539
- case "com.amazonaws.snowball#UnsupportedAddressException":
540
- throw await de_UnsupportedAddressExceptionRes(parsedOutput, context);
541
- case "Ec2RequestFailedException":
542
- case "com.amazonaws.snowball#Ec2RequestFailedException":
543
- throw await de_Ec2RequestFailedExceptionRes(parsedOutput, context);
544
- case "InvalidInputCombinationException":
545
- case "com.amazonaws.snowball#InvalidInputCombinationException":
546
- throw await de_InvalidInputCombinationExceptionRes(parsedOutput, context);
547
- case "ClusterLimitExceededException":
548
- case "com.amazonaws.snowball#ClusterLimitExceededException":
549
- throw await de_ClusterLimitExceededExceptionRes(parsedOutput, context);
550
- case "ConflictException":
551
- case "com.amazonaws.snowball#ConflictException":
552
- throw await de_ConflictExceptionRes(parsedOutput, context);
553
- case "ReturnShippingLabelAlreadyExistsException":
554
- case "com.amazonaws.snowball#ReturnShippingLabelAlreadyExistsException":
555
- throw await de_ReturnShippingLabelAlreadyExistsExceptionRes(parsedOutput, context);
556
- case "InvalidNextTokenException":
557
- case "com.amazonaws.snowball#InvalidNextTokenException":
558
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
559
- default:
560
- const parsedBody = parsedOutput.body;
561
- return throwDefaultError({
562
- output,
563
- parsedBody,
564
- errorCode,
565
- });
566
- }
567
- };
568
- const de_ClusterLimitExceededExceptionRes = async (parsedOutput, context) => {
569
- const body = parsedOutput.body;
570
- const deserialized = _json(body);
571
- const exception = new ClusterLimitExceededException({
572
- $metadata: deserializeMetadata(parsedOutput),
573
- ...deserialized,
574
- });
575
- return __decorateServiceException(exception, body);
576
- };
577
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
578
- const body = parsedOutput.body;
579
- const deserialized = _json(body);
580
- const exception = new ConflictException({
581
- $metadata: deserializeMetadata(parsedOutput),
582
- ...deserialized,
583
- });
584
- return __decorateServiceException(exception, body);
585
- };
586
- const de_Ec2RequestFailedExceptionRes = async (parsedOutput, context) => {
587
- const body = parsedOutput.body;
588
- const deserialized = _json(body);
589
- const exception = new Ec2RequestFailedException({
590
- $metadata: deserializeMetadata(parsedOutput),
591
- ...deserialized,
592
- });
593
- return __decorateServiceException(exception, body);
594
- };
595
- const de_InvalidAddressExceptionRes = async (parsedOutput, context) => {
596
- const body = parsedOutput.body;
597
- const deserialized = _json(body);
598
- const exception = new InvalidAddressException({
599
- $metadata: deserializeMetadata(parsedOutput),
600
- ...deserialized,
601
- });
602
- return __decorateServiceException(exception, body);
603
- };
604
- const de_InvalidInputCombinationExceptionRes = async (parsedOutput, context) => {
605
- const body = parsedOutput.body;
606
- const deserialized = _json(body);
607
- const exception = new InvalidInputCombinationException({
608
- $metadata: deserializeMetadata(parsedOutput),
609
- ...deserialized,
610
- });
611
- return __decorateServiceException(exception, body);
612
- };
613
- const de_InvalidJobStateExceptionRes = async (parsedOutput, context) => {
614
- const body = parsedOutput.body;
615
- const deserialized = _json(body);
616
- const exception = new InvalidJobStateException({
617
- $metadata: deserializeMetadata(parsedOutput),
618
- ...deserialized,
619
- });
620
- return __decorateServiceException(exception, body);
621
- };
622
- const de_InvalidNextTokenExceptionRes = async (parsedOutput, context) => {
623
- const body = parsedOutput.body;
624
- const deserialized = _json(body);
625
- const exception = new InvalidNextTokenException({
626
- $metadata: deserializeMetadata(parsedOutput),
627
- ...deserialized,
628
- });
629
- return __decorateServiceException(exception, body);
630
- };
631
- const de_InvalidResourceExceptionRes = async (parsedOutput, context) => {
632
- const body = parsedOutput.body;
633
- const deserialized = _json(body);
634
- const exception = new InvalidResourceException({
635
- $metadata: deserializeMetadata(parsedOutput),
636
- ...deserialized,
637
- });
638
- return __decorateServiceException(exception, body);
639
- };
640
- const de_KMSRequestFailedExceptionRes = async (parsedOutput, context) => {
641
- const body = parsedOutput.body;
642
- const deserialized = _json(body);
643
- const exception = new KMSRequestFailedException({
644
- $metadata: deserializeMetadata(parsedOutput),
645
- ...deserialized,
646
- });
647
- return __decorateServiceException(exception, body);
648
- };
649
- const de_ReturnShippingLabelAlreadyExistsExceptionRes = async (parsedOutput, context) => {
650
- const body = parsedOutput.body;
651
- const deserialized = _json(body);
652
- const exception = new ReturnShippingLabelAlreadyExistsException({
653
- $metadata: deserializeMetadata(parsedOutput),
654
- ...deserialized,
655
- });
656
- return __decorateServiceException(exception, body);
657
- };
658
- const de_UnsupportedAddressExceptionRes = async (parsedOutput, context) => {
659
- const body = parsedOutput.body;
660
- const deserialized = _json(body);
661
- const exception = new UnsupportedAddressException({
662
- $metadata: deserializeMetadata(parsedOutput),
663
- ...deserialized,
664
- });
665
- return __decorateServiceException(exception, body);
666
- };
667
- const se_CreateClusterRequest = (input, context) => {
668
- return take(input, {
669
- AddressId: [],
670
- Description: [],
671
- ForceCreateJobs: [],
672
- ForwardingAddressId: [],
673
- InitialClusterSize: [],
674
- JobType: [],
675
- KmsKeyARN: [],
676
- LongTermPricingIds: _json,
677
- Notification: _json,
678
- OnDeviceServiceConfiguration: (_) => se_OnDeviceServiceConfiguration(_, context),
679
- RemoteManagement: [],
680
- Resources: _json,
681
- RoleARN: [],
682
- ShippingOption: [],
683
- SnowballCapacityPreference: [],
684
- SnowballType: [],
685
- TaxDocuments: _json,
686
- });
687
- };
688
- const se_CreateJobRequest = (input, context) => {
689
- return take(input, {
690
- AddressId: [],
691
- ClusterId: [],
692
- Description: [],
693
- DeviceConfiguration: _json,
694
- ForwardingAddressId: [],
695
- ImpactLevel: [],
696
- JobType: [],
697
- KmsKeyARN: [],
698
- LongTermPricingId: [],
699
- Notification: _json,
700
- OnDeviceServiceConfiguration: (_) => se_OnDeviceServiceConfiguration(_, context),
701
- PickupDetails: (_) => se_PickupDetails(_, context),
702
- RemoteManagement: [],
703
- Resources: _json,
704
- RoleARN: [],
705
- ShippingOption: [],
706
- SnowballCapacityPreference: [],
707
- SnowballType: [],
708
- TaxDocuments: _json,
709
- });
710
- };
711
- const se_OnDeviceServiceConfiguration = (input, context) => {
712
- return take(input, {
713
- EKSOnDeviceService: _json,
714
- NFSOnDeviceService: _json,
715
- S3OnDeviceService: (_) => se_S3OnDeviceServiceConfiguration(_, context),
716
- TGWOnDeviceService: _json,
717
- });
718
- };
719
- const se_PickupDetails = (input, context) => {
720
- return take(input, {
721
- DevicePickupId: [],
722
- Email: [],
723
- IdentificationExpirationDate: (_) => _.getTime() / 1_000,
724
- IdentificationIssuingOrg: [],
725
- IdentificationNumber: [],
726
- Name: [],
727
- PhoneNumber: [],
728
- });
729
- };
730
- const se_S3OnDeviceServiceConfiguration = (input, context) => {
731
- return take(input, {
732
- FaultTolerance: [],
733
- ServiceSize: [],
734
- StorageLimit: __serializeFloat,
735
- StorageUnit: [],
736
- });
737
- };
738
- const se_UpdateClusterRequest = (input, context) => {
739
- return take(input, {
740
- AddressId: [],
741
- ClusterId: [],
742
- Description: [],
743
- ForwardingAddressId: [],
744
- Notification: _json,
745
- OnDeviceServiceConfiguration: (_) => se_OnDeviceServiceConfiguration(_, context),
746
- Resources: _json,
747
- RoleARN: [],
748
- ShippingOption: [],
749
- });
750
- };
751
- const se_UpdateJobRequest = (input, context) => {
752
- return take(input, {
753
- AddressId: [],
754
- Description: [],
755
- ForwardingAddressId: [],
756
- JobId: [],
757
- Notification: _json,
758
- OnDeviceServiceConfiguration: (_) => se_OnDeviceServiceConfiguration(_, context),
759
- PickupDetails: (_) => se_PickupDetails(_, context),
760
- Resources: _json,
761
- RoleARN: [],
762
- ShippingOption: [],
763
- SnowballCapacityPreference: [],
764
- });
765
- };
766
- const de_ClusterListEntry = (output, context) => {
767
- return take(output, {
768
- ClusterId: __expectString,
769
- ClusterState: __expectString,
770
- CreationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
771
- Description: __expectString,
772
- });
773
- };
774
- const de_ClusterListEntryList = (output, context) => {
775
- const retVal = (output || [])
776
- .filter((e) => e != null)
777
- .map((entry) => {
778
- return de_ClusterListEntry(entry, context);
779
- });
780
- return retVal;
781
- };
782
- const de_ClusterMetadata = (output, context) => {
783
- return take(output, {
784
- AddressId: __expectString,
785
- ClusterId: __expectString,
786
- ClusterState: __expectString,
787
- CreationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
788
- Description: __expectString,
789
- ForwardingAddressId: __expectString,
790
- JobType: __expectString,
791
- KmsKeyARN: __expectString,
792
- Notification: _json,
793
- OnDeviceServiceConfiguration: (_) => de_OnDeviceServiceConfiguration(_, context),
794
- Resources: _json,
795
- RoleARN: __expectString,
796
- ShippingOption: __expectString,
797
- SnowballType: __expectString,
798
- TaxDocuments: _json,
799
- });
800
- };
801
- const de_CreateClusterResult = (output, context) => {
802
- return take(output, {
803
- ClusterId: __expectString,
804
- JobListEntries: (_) => de_JobListEntryList(_, context),
805
- });
806
- };
807
- const de_DescribeClusterResult = (output, context) => {
808
- return take(output, {
809
- ClusterMetadata: (_) => de_ClusterMetadata(_, context),
810
- });
811
- };
812
- const de_DescribeJobResult = (output, context) => {
813
- return take(output, {
814
- JobMetadata: (_) => de_JobMetadata(_, context),
815
- SubJobMetadata: (_) => de_JobMetadataList(_, context),
816
- });
817
- };
818
- const de_DescribeReturnShippingLabelResult = (output, context) => {
819
- return take(output, {
820
- ExpirationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
821
- ReturnShippingLabelURI: __expectString,
822
- Status: __expectString,
823
- });
824
- };
825
- const de_JobListEntry = (output, context) => {
826
- return take(output, {
827
- CreationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
828
- Description: __expectString,
829
- IsMaster: __expectBoolean,
830
- JobId: __expectString,
831
- JobState: __expectString,
832
- JobType: __expectString,
833
- SnowballType: __expectString,
834
- });
835
- };
836
- const de_JobListEntryList = (output, context) => {
837
- const retVal = (output || [])
838
- .filter((e) => e != null)
839
- .map((entry) => {
840
- return de_JobListEntry(entry, context);
841
- });
842
- return retVal;
843
- };
844
- const de_JobMetadata = (output, context) => {
845
- return take(output, {
846
- AddressId: __expectString,
847
- ClusterId: __expectString,
848
- CreationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
849
- DataTransferProgress: _json,
850
- Description: __expectString,
851
- DeviceConfiguration: _json,
852
- ForwardingAddressId: __expectString,
853
- ImpactLevel: __expectString,
854
- JobId: __expectString,
855
- JobLogInfo: _json,
856
- JobState: __expectString,
857
- JobType: __expectString,
858
- KmsKeyARN: __expectString,
859
- LongTermPricingId: __expectString,
860
- Notification: _json,
861
- OnDeviceServiceConfiguration: (_) => de_OnDeviceServiceConfiguration(_, context),
862
- PickupDetails: (_) => de_PickupDetails(_, context),
863
- RemoteManagement: __expectString,
864
- Resources: _json,
865
- RoleARN: __expectString,
866
- ShippingDetails: _json,
867
- SnowballCapacityPreference: __expectString,
868
- SnowballId: __expectString,
869
- SnowballType: __expectString,
870
- TaxDocuments: _json,
871
- });
872
- };
873
- const de_JobMetadataList = (output, context) => {
874
- const retVal = (output || [])
875
- .filter((e) => e != null)
876
- .map((entry) => {
877
- return de_JobMetadata(entry, context);
878
- });
879
- return retVal;
880
- };
881
- const de_ListClusterJobsResult = (output, context) => {
882
- return take(output, {
883
- JobListEntries: (_) => de_JobListEntryList(_, context),
884
- NextToken: __expectString,
885
- });
886
- };
887
- const de_ListClustersResult = (output, context) => {
888
- return take(output, {
889
- ClusterListEntries: (_) => de_ClusterListEntryList(_, context),
890
- NextToken: __expectString,
891
- });
892
- };
893
- const de_ListJobsResult = (output, context) => {
894
- return take(output, {
895
- JobListEntries: (_) => de_JobListEntryList(_, context),
896
- NextToken: __expectString,
897
- });
898
- };
899
- const de_ListLongTermPricingResult = (output, context) => {
900
- return take(output, {
901
- LongTermPricingEntries: (_) => de_LongTermPricingEntryList(_, context),
902
- NextToken: __expectString,
903
- });
904
- };
905
- const de_LongTermPricingEntryList = (output, context) => {
906
- const retVal = (output || [])
907
- .filter((e) => e != null)
908
- .map((entry) => {
909
- return de_LongTermPricingListEntry(entry, context);
910
- });
911
- return retVal;
912
- };
913
- const de_LongTermPricingListEntry = (output, context) => {
914
- return take(output, {
915
- CurrentActiveJob: __expectString,
916
- IsLongTermPricingAutoRenew: __expectBoolean,
917
- JobIds: _json,
918
- LongTermPricingEndDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
919
- LongTermPricingId: __expectString,
920
- LongTermPricingStartDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
921
- LongTermPricingStatus: __expectString,
922
- LongTermPricingType: __expectString,
923
- ReplacementJob: __expectString,
924
- SnowballType: __expectString,
925
- });
926
- };
927
- const de_OnDeviceServiceConfiguration = (output, context) => {
928
- return take(output, {
929
- EKSOnDeviceService: _json,
930
- NFSOnDeviceService: _json,
931
- S3OnDeviceService: (_) => de_S3OnDeviceServiceConfiguration(_, context),
932
- TGWOnDeviceService: _json,
933
- });
934
- };
935
- const de_PickupDetails = (output, context) => {
936
- return take(output, {
937
- DevicePickupId: __expectString,
938
- Email: __expectString,
939
- IdentificationExpirationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
940
- IdentificationIssuingOrg: __expectString,
941
- IdentificationNumber: __expectString,
942
- Name: __expectString,
943
- PhoneNumber: __expectString,
944
- });
945
- };
946
- const de_S3OnDeviceServiceConfiguration = (output, context) => {
947
- return take(output, {
948
- FaultTolerance: __expectInt32,
949
- ServiceSize: __expectInt32,
950
- StorageLimit: __limitedParseDouble,
951
- StorageUnit: __expectString,
952
- });
953
- };
954
- const deserializeMetadata = (output) => ({
955
- httpStatusCode: output.statusCode,
956
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
957
- extendedRequestId: output.headers["x-amz-id-2"],
958
- cfId: output.headers["x-amz-cf-id"],
959
- });
960
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
961
- const throwDefaultError = withBaseException(__BaseException);
962
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
963
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
964
- const contents = {
965
- protocol,
966
- hostname,
967
- port,
968
- method: "POST",
969
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
970
- headers,
971
- };
972
- if (resolvedHostname !== undefined) {
973
- contents.hostname = resolvedHostname;
974
- }
975
- if (body !== undefined) {
976
- contents.body = body;
977
- }
978
- return new __HttpRequest(contents);
979
- };
980
- function sharedHeaders(operation) {
981
- return {
982
- "content-type": "application/x-amz-json-1.1",
983
- "x-amz-target": `AWSIESnowballJobManagementService.${operation}`,
984
- };
985
- }