@aws-sdk/client-docdb-elastic 3.928.0 → 3.930.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 (43) hide show
  1. package/dist-cjs/index.js +729 -830
  2. package/dist-cjs/runtimeConfig.shared.js +2 -0
  3. package/dist-es/DocDBElasticClient.js +2 -0
  4. package/dist-es/commands/ApplyPendingMaintenanceActionCommand.js +3 -9
  5. package/dist-es/commands/CopyClusterSnapshotCommand.js +3 -9
  6. package/dist-es/commands/CreateClusterCommand.js +3 -10
  7. package/dist-es/commands/CreateClusterSnapshotCommand.js +3 -9
  8. package/dist-es/commands/DeleteClusterCommand.js +3 -9
  9. package/dist-es/commands/DeleteClusterSnapshotCommand.js +3 -9
  10. package/dist-es/commands/GetClusterCommand.js +3 -9
  11. package/dist-es/commands/GetClusterSnapshotCommand.js +3 -9
  12. package/dist-es/commands/GetPendingMaintenanceActionCommand.js +3 -9
  13. package/dist-es/commands/ListClusterSnapshotsCommand.js +3 -9
  14. package/dist-es/commands/ListClustersCommand.js +3 -9
  15. package/dist-es/commands/ListPendingMaintenanceActionsCommand.js +3 -9
  16. package/dist-es/commands/ListTagsForResourceCommand.js +3 -9
  17. package/dist-es/commands/RestoreClusterFromSnapshotCommand.js +3 -9
  18. package/dist-es/commands/StartClusterCommand.js +3 -9
  19. package/dist-es/commands/StopClusterCommand.js +3 -9
  20. package/dist-es/commands/TagResourceCommand.js +3 -9
  21. package/dist-es/commands/UntagResourceCommand.js +3 -9
  22. package/dist-es/commands/UpdateClusterCommand.js +3 -10
  23. package/dist-es/models/models_0.js +0 -9
  24. package/dist-es/runtimeConfig.shared.js +2 -0
  25. package/dist-es/schemas/schemas_0.js +677 -0
  26. package/dist-types/DocDBElasticClient.d.ts +10 -1
  27. package/dist-types/models/models_0.d.ts +0 -8
  28. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  29. package/dist-types/runtimeConfig.d.ts +1 -0
  30. package/dist-types/runtimeConfig.native.d.ts +1 -0
  31. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  32. package/dist-types/schemas/schemas_0.d.ts +84 -0
  33. package/dist-types/ts3.4/DocDBElasticClient.d.ts +4 -0
  34. package/dist-types/ts3.4/models/models_0.d.ts +0 -6
  35. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  36. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  37. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  38. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  39. package/dist-types/ts3.4/schemas/schemas_0.d.ts +90 -0
  40. package/package.json +33 -34
  41. package/dist-es/protocols/Aws_restJson1.js +0 -673
  42. package/dist-types/protocols/Aws_restJson1.d.ts +0 -173
  43. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -233
@@ -1,673 +0,0 @@
1
- import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
- import { requestBuilder as rb } from "@smithy/core";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
4
- import { v4 as generateIdempotencyToken } from "@smithy/uuid";
5
- import { DocDBElasticServiceException as __BaseException } from "../models/DocDBElasticServiceException";
6
- import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
7
- export const se_ApplyPendingMaintenanceActionCommand = async (input, context) => {
8
- const b = rb(input, context);
9
- const headers = {
10
- "content-type": "application/json",
11
- };
12
- b.bp("/pending-action");
13
- let body;
14
- body = JSON.stringify(take(input, {
15
- applyAction: [],
16
- applyOn: [],
17
- optInType: [],
18
- resourceArn: [],
19
- }));
20
- b.m("POST").h(headers).b(body);
21
- return b.build();
22
- };
23
- export const se_CopyClusterSnapshotCommand = async (input, context) => {
24
- const b = rb(input, context);
25
- const headers = {
26
- "content-type": "application/json",
27
- };
28
- b.bp("/cluster-snapshot/{snapshotArn}/copy");
29
- b.p("snapshotArn", () => input.snapshotArn, "{snapshotArn}", false);
30
- let body;
31
- body = JSON.stringify(take(input, {
32
- copyTags: [],
33
- kmsKeyId: [],
34
- tags: (_) => _json(_),
35
- targetSnapshotName: [],
36
- }));
37
- b.m("POST").h(headers).b(body);
38
- return b.build();
39
- };
40
- export const se_CreateClusterCommand = async (input, context) => {
41
- const b = rb(input, context);
42
- const headers = {
43
- "content-type": "application/json",
44
- };
45
- b.bp("/cluster");
46
- let body;
47
- body = JSON.stringify(take(input, {
48
- adminUserName: [],
49
- adminUserPassword: [],
50
- authType: [],
51
- backupRetentionPeriod: [],
52
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
53
- clusterName: [],
54
- kmsKeyId: [],
55
- preferredBackupWindow: [],
56
- preferredMaintenanceWindow: [],
57
- shardCapacity: [],
58
- shardCount: [],
59
- shardInstanceCount: [],
60
- subnetIds: (_) => _json(_),
61
- tags: (_) => _json(_),
62
- vpcSecurityGroupIds: (_) => _json(_),
63
- }));
64
- b.m("POST").h(headers).b(body);
65
- return b.build();
66
- };
67
- export const se_CreateClusterSnapshotCommand = async (input, context) => {
68
- const b = rb(input, context);
69
- const headers = {
70
- "content-type": "application/json",
71
- };
72
- b.bp("/cluster-snapshot");
73
- let body;
74
- body = JSON.stringify(take(input, {
75
- clusterArn: [],
76
- snapshotName: [],
77
- tags: (_) => _json(_),
78
- }));
79
- b.m("POST").h(headers).b(body);
80
- return b.build();
81
- };
82
- export const se_DeleteClusterCommand = async (input, context) => {
83
- const b = rb(input, context);
84
- const headers = {};
85
- b.bp("/cluster/{clusterArn}");
86
- b.p("clusterArn", () => input.clusterArn, "{clusterArn}", false);
87
- let body;
88
- b.m("DELETE").h(headers).b(body);
89
- return b.build();
90
- };
91
- export const se_DeleteClusterSnapshotCommand = async (input, context) => {
92
- const b = rb(input, context);
93
- const headers = {};
94
- b.bp("/cluster-snapshot/{snapshotArn}");
95
- b.p("snapshotArn", () => input.snapshotArn, "{snapshotArn}", false);
96
- let body;
97
- b.m("DELETE").h(headers).b(body);
98
- return b.build();
99
- };
100
- export const se_GetClusterCommand = async (input, context) => {
101
- const b = rb(input, context);
102
- const headers = {};
103
- b.bp("/cluster/{clusterArn}");
104
- b.p("clusterArn", () => input.clusterArn, "{clusterArn}", false);
105
- let body;
106
- b.m("GET").h(headers).b(body);
107
- return b.build();
108
- };
109
- export const se_GetClusterSnapshotCommand = async (input, context) => {
110
- const b = rb(input, context);
111
- const headers = {};
112
- b.bp("/cluster-snapshot/{snapshotArn}");
113
- b.p("snapshotArn", () => input.snapshotArn, "{snapshotArn}", false);
114
- let body;
115
- b.m("GET").h(headers).b(body);
116
- return b.build();
117
- };
118
- export const se_GetPendingMaintenanceActionCommand = async (input, context) => {
119
- const b = rb(input, context);
120
- const headers = {};
121
- b.bp("/pending-action/{resourceArn}");
122
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
123
- let body;
124
- b.m("GET").h(headers).b(body);
125
- return b.build();
126
- };
127
- export const se_ListClustersCommand = async (input, context) => {
128
- const b = rb(input, context);
129
- const headers = {};
130
- b.bp("/clusters");
131
- const query = map({
132
- [_nT]: [, input[_nT]],
133
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
134
- });
135
- let body;
136
- b.m("GET").h(headers).q(query).b(body);
137
- return b.build();
138
- };
139
- export const se_ListClusterSnapshotsCommand = async (input, context) => {
140
- const b = rb(input, context);
141
- const headers = {};
142
- b.bp("/cluster-snapshots");
143
- const query = map({
144
- [_cA]: [, input[_cA]],
145
- [_nT]: [, input[_nT]],
146
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
147
- [_sT]: [, input[_sT]],
148
- });
149
- let body;
150
- b.m("GET").h(headers).q(query).b(body);
151
- return b.build();
152
- };
153
- export const se_ListPendingMaintenanceActionsCommand = async (input, context) => {
154
- const b = rb(input, context);
155
- const headers = {};
156
- b.bp("/pending-actions");
157
- const query = map({
158
- [_nT]: [, input[_nT]],
159
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
160
- });
161
- let body;
162
- b.m("GET").h(headers).q(query).b(body);
163
- return b.build();
164
- };
165
- export const se_ListTagsForResourceCommand = async (input, context) => {
166
- const b = rb(input, context);
167
- const headers = {};
168
- b.bp("/tags/{resourceArn}");
169
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
170
- let body;
171
- b.m("GET").h(headers).b(body);
172
- return b.build();
173
- };
174
- export const se_RestoreClusterFromSnapshotCommand = async (input, context) => {
175
- const b = rb(input, context);
176
- const headers = {
177
- "content-type": "application/json",
178
- };
179
- b.bp("/cluster-snapshot/{snapshotArn}/restore");
180
- b.p("snapshotArn", () => input.snapshotArn, "{snapshotArn}", false);
181
- let body;
182
- body = JSON.stringify(take(input, {
183
- clusterName: [],
184
- kmsKeyId: [],
185
- shardCapacity: [],
186
- shardInstanceCount: [],
187
- subnetIds: (_) => _json(_),
188
- tags: (_) => _json(_),
189
- vpcSecurityGroupIds: (_) => _json(_),
190
- }));
191
- b.m("POST").h(headers).b(body);
192
- return b.build();
193
- };
194
- export const se_StartClusterCommand = async (input, context) => {
195
- const b = rb(input, context);
196
- const headers = {};
197
- b.bp("/cluster/{clusterArn}/start");
198
- b.p("clusterArn", () => input.clusterArn, "{clusterArn}", false);
199
- let body;
200
- b.m("POST").h(headers).b(body);
201
- return b.build();
202
- };
203
- export const se_StopClusterCommand = async (input, context) => {
204
- const b = rb(input, context);
205
- const headers = {};
206
- b.bp("/cluster/{clusterArn}/stop");
207
- b.p("clusterArn", () => input.clusterArn, "{clusterArn}", false);
208
- let body;
209
- b.m("POST").h(headers).b(body);
210
- return b.build();
211
- };
212
- export const se_TagResourceCommand = async (input, context) => {
213
- const b = rb(input, context);
214
- const headers = {
215
- "content-type": "application/json",
216
- };
217
- b.bp("/tags/{resourceArn}");
218
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
219
- let body;
220
- body = JSON.stringify(take(input, {
221
- tags: (_) => _json(_),
222
- }));
223
- b.m("POST").h(headers).b(body);
224
- return b.build();
225
- };
226
- export const se_UntagResourceCommand = async (input, context) => {
227
- const b = rb(input, context);
228
- const headers = {};
229
- b.bp("/tags/{resourceArn}");
230
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
231
- const query = map({
232
- [_tK]: [__expectNonNull(input.tagKeys, `tagKeys`) != null, () => input[_tK] || []],
233
- });
234
- let body;
235
- b.m("DELETE").h(headers).q(query).b(body);
236
- return b.build();
237
- };
238
- export const se_UpdateClusterCommand = async (input, context) => {
239
- const b = rb(input, context);
240
- const headers = {
241
- "content-type": "application/json",
242
- };
243
- b.bp("/cluster/{clusterArn}");
244
- b.p("clusterArn", () => input.clusterArn, "{clusterArn}", false);
245
- let body;
246
- body = JSON.stringify(take(input, {
247
- adminUserPassword: [],
248
- authType: [],
249
- backupRetentionPeriod: [],
250
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
251
- preferredBackupWindow: [],
252
- preferredMaintenanceWindow: [],
253
- shardCapacity: [],
254
- shardCount: [],
255
- shardInstanceCount: [],
256
- subnetIds: (_) => _json(_),
257
- vpcSecurityGroupIds: (_) => _json(_),
258
- }));
259
- b.m("PUT").h(headers).b(body);
260
- return b.build();
261
- };
262
- export const de_ApplyPendingMaintenanceActionCommand = async (output, context) => {
263
- if (output.statusCode !== 200 && output.statusCode >= 300) {
264
- return de_CommandError(output, context);
265
- }
266
- const contents = map({
267
- $metadata: deserializeMetadata(output),
268
- });
269
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
270
- const doc = take(data, {
271
- resourcePendingMaintenanceAction: _json,
272
- });
273
- Object.assign(contents, doc);
274
- return contents;
275
- };
276
- export const de_CopyClusterSnapshotCommand = async (output, context) => {
277
- if (output.statusCode !== 200 && output.statusCode >= 300) {
278
- return de_CommandError(output, context);
279
- }
280
- const contents = map({
281
- $metadata: deserializeMetadata(output),
282
- });
283
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
284
- const doc = take(data, {
285
- snapshot: _json,
286
- });
287
- Object.assign(contents, doc);
288
- return contents;
289
- };
290
- export const de_CreateClusterCommand = async (output, context) => {
291
- if (output.statusCode !== 200 && output.statusCode >= 300) {
292
- return de_CommandError(output, context);
293
- }
294
- const contents = map({
295
- $metadata: deserializeMetadata(output),
296
- });
297
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
298
- const doc = take(data, {
299
- cluster: _json,
300
- });
301
- Object.assign(contents, doc);
302
- return contents;
303
- };
304
- export const de_CreateClusterSnapshotCommand = async (output, context) => {
305
- if (output.statusCode !== 200 && output.statusCode >= 300) {
306
- return de_CommandError(output, context);
307
- }
308
- const contents = map({
309
- $metadata: deserializeMetadata(output),
310
- });
311
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
312
- const doc = take(data, {
313
- snapshot: _json,
314
- });
315
- Object.assign(contents, doc);
316
- return contents;
317
- };
318
- export const de_DeleteClusterCommand = async (output, context) => {
319
- if (output.statusCode !== 200 && output.statusCode >= 300) {
320
- return de_CommandError(output, context);
321
- }
322
- const contents = map({
323
- $metadata: deserializeMetadata(output),
324
- });
325
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
326
- const doc = take(data, {
327
- cluster: _json,
328
- });
329
- Object.assign(contents, doc);
330
- return contents;
331
- };
332
- export const de_DeleteClusterSnapshotCommand = async (output, context) => {
333
- if (output.statusCode !== 200 && output.statusCode >= 300) {
334
- return de_CommandError(output, context);
335
- }
336
- const contents = map({
337
- $metadata: deserializeMetadata(output),
338
- });
339
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
340
- const doc = take(data, {
341
- snapshot: _json,
342
- });
343
- Object.assign(contents, doc);
344
- return contents;
345
- };
346
- export const de_GetClusterCommand = async (output, context) => {
347
- if (output.statusCode !== 200 && output.statusCode >= 300) {
348
- return de_CommandError(output, context);
349
- }
350
- const contents = map({
351
- $metadata: deserializeMetadata(output),
352
- });
353
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
354
- const doc = take(data, {
355
- cluster: _json,
356
- });
357
- Object.assign(contents, doc);
358
- return contents;
359
- };
360
- export const de_GetClusterSnapshotCommand = async (output, context) => {
361
- if (output.statusCode !== 200 && output.statusCode >= 300) {
362
- return de_CommandError(output, context);
363
- }
364
- const contents = map({
365
- $metadata: deserializeMetadata(output),
366
- });
367
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
368
- const doc = take(data, {
369
- snapshot: _json,
370
- });
371
- Object.assign(contents, doc);
372
- return contents;
373
- };
374
- export const de_GetPendingMaintenanceActionCommand = async (output, context) => {
375
- if (output.statusCode !== 200 && output.statusCode >= 300) {
376
- return de_CommandError(output, context);
377
- }
378
- const contents = map({
379
- $metadata: deserializeMetadata(output),
380
- });
381
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
382
- const doc = take(data, {
383
- resourcePendingMaintenanceAction: _json,
384
- });
385
- Object.assign(contents, doc);
386
- return contents;
387
- };
388
- export const de_ListClustersCommand = async (output, context) => {
389
- if (output.statusCode !== 200 && output.statusCode >= 300) {
390
- return de_CommandError(output, context);
391
- }
392
- const contents = map({
393
- $metadata: deserializeMetadata(output),
394
- });
395
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
396
- const doc = take(data, {
397
- clusters: _json,
398
- nextToken: __expectString,
399
- });
400
- Object.assign(contents, doc);
401
- return contents;
402
- };
403
- export const de_ListClusterSnapshotsCommand = async (output, context) => {
404
- if (output.statusCode !== 200 && output.statusCode >= 300) {
405
- return de_CommandError(output, context);
406
- }
407
- const contents = map({
408
- $metadata: deserializeMetadata(output),
409
- });
410
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
411
- const doc = take(data, {
412
- nextToken: __expectString,
413
- snapshots: _json,
414
- });
415
- Object.assign(contents, doc);
416
- return contents;
417
- };
418
- export const de_ListPendingMaintenanceActionsCommand = async (output, context) => {
419
- if (output.statusCode !== 200 && output.statusCode >= 300) {
420
- return de_CommandError(output, context);
421
- }
422
- const contents = map({
423
- $metadata: deserializeMetadata(output),
424
- });
425
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
426
- const doc = take(data, {
427
- nextToken: __expectString,
428
- resourcePendingMaintenanceActions: _json,
429
- });
430
- Object.assign(contents, doc);
431
- return contents;
432
- };
433
- export const de_ListTagsForResourceCommand = async (output, context) => {
434
- if (output.statusCode !== 200 && output.statusCode >= 300) {
435
- return de_CommandError(output, context);
436
- }
437
- const contents = map({
438
- $metadata: deserializeMetadata(output),
439
- });
440
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
441
- const doc = take(data, {
442
- tags: _json,
443
- });
444
- Object.assign(contents, doc);
445
- return contents;
446
- };
447
- export const de_RestoreClusterFromSnapshotCommand = async (output, context) => {
448
- if (output.statusCode !== 200 && output.statusCode >= 300) {
449
- return de_CommandError(output, context);
450
- }
451
- const contents = map({
452
- $metadata: deserializeMetadata(output),
453
- });
454
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
455
- const doc = take(data, {
456
- cluster: _json,
457
- });
458
- Object.assign(contents, doc);
459
- return contents;
460
- };
461
- export const de_StartClusterCommand = async (output, context) => {
462
- if (output.statusCode !== 200 && output.statusCode >= 300) {
463
- return de_CommandError(output, context);
464
- }
465
- const contents = map({
466
- $metadata: deserializeMetadata(output),
467
- });
468
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
469
- const doc = take(data, {
470
- cluster: _json,
471
- });
472
- Object.assign(contents, doc);
473
- return contents;
474
- };
475
- export const de_StopClusterCommand = async (output, context) => {
476
- if (output.statusCode !== 200 && output.statusCode >= 300) {
477
- return de_CommandError(output, context);
478
- }
479
- const contents = map({
480
- $metadata: deserializeMetadata(output),
481
- });
482
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
483
- const doc = take(data, {
484
- cluster: _json,
485
- });
486
- Object.assign(contents, doc);
487
- return contents;
488
- };
489
- export const de_TagResourceCommand = async (output, context) => {
490
- if (output.statusCode !== 200 && output.statusCode >= 300) {
491
- return de_CommandError(output, context);
492
- }
493
- const contents = map({
494
- $metadata: deserializeMetadata(output),
495
- });
496
- await collectBody(output.body, context);
497
- return contents;
498
- };
499
- export const de_UntagResourceCommand = async (output, context) => {
500
- if (output.statusCode !== 200 && output.statusCode >= 300) {
501
- return de_CommandError(output, context);
502
- }
503
- const contents = map({
504
- $metadata: deserializeMetadata(output),
505
- });
506
- await collectBody(output.body, context);
507
- return contents;
508
- };
509
- export const de_UpdateClusterCommand = async (output, context) => {
510
- if (output.statusCode !== 200 && output.statusCode >= 300) {
511
- return de_CommandError(output, context);
512
- }
513
- const contents = map({
514
- $metadata: deserializeMetadata(output),
515
- });
516
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
517
- const doc = take(data, {
518
- cluster: _json,
519
- });
520
- Object.assign(contents, doc);
521
- return contents;
522
- };
523
- const de_CommandError = async (output, context) => {
524
- const parsedOutput = {
525
- ...output,
526
- body: await parseErrorBody(output.body, context),
527
- };
528
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
529
- switch (errorCode) {
530
- case "AccessDeniedException":
531
- case "com.amazonaws.docdbelastic#AccessDeniedException":
532
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
533
- case "ConflictException":
534
- case "com.amazonaws.docdbelastic#ConflictException":
535
- throw await de_ConflictExceptionRes(parsedOutput, context);
536
- case "InternalServerException":
537
- case "com.amazonaws.docdbelastic#InternalServerException":
538
- throw await de_InternalServerExceptionRes(parsedOutput, context);
539
- case "ResourceNotFoundException":
540
- case "com.amazonaws.docdbelastic#ResourceNotFoundException":
541
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
542
- case "ThrottlingException":
543
- case "com.amazonaws.docdbelastic#ThrottlingException":
544
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
545
- case "ValidationException":
546
- case "com.amazonaws.docdbelastic#ValidationException":
547
- throw await de_ValidationExceptionRes(parsedOutput, context);
548
- case "ServiceQuotaExceededException":
549
- case "com.amazonaws.docdbelastic#ServiceQuotaExceededException":
550
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
551
- default:
552
- const parsedBody = parsedOutput.body;
553
- return throwDefaultError({
554
- output,
555
- parsedBody,
556
- errorCode,
557
- });
558
- }
559
- };
560
- const throwDefaultError = withBaseException(__BaseException);
561
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
562
- const contents = map({});
563
- const data = parsedOutput.body;
564
- const doc = take(data, {
565
- message: __expectString,
566
- });
567
- Object.assign(contents, doc);
568
- const exception = new AccessDeniedException({
569
- $metadata: deserializeMetadata(parsedOutput),
570
- ...contents,
571
- });
572
- return __decorateServiceException(exception, parsedOutput.body);
573
- };
574
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
575
- const contents = map({});
576
- const data = parsedOutput.body;
577
- const doc = take(data, {
578
- message: __expectString,
579
- resourceId: __expectString,
580
- resourceType: __expectString,
581
- });
582
- Object.assign(contents, doc);
583
- const exception = new ConflictException({
584
- $metadata: deserializeMetadata(parsedOutput),
585
- ...contents,
586
- });
587
- return __decorateServiceException(exception, parsedOutput.body);
588
- };
589
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
590
- const contents = map({});
591
- const data = parsedOutput.body;
592
- const doc = take(data, {
593
- message: __expectString,
594
- });
595
- Object.assign(contents, doc);
596
- const exception = new InternalServerException({
597
- $metadata: deserializeMetadata(parsedOutput),
598
- ...contents,
599
- });
600
- return __decorateServiceException(exception, parsedOutput.body);
601
- };
602
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
603
- const contents = map({});
604
- const data = parsedOutput.body;
605
- const doc = take(data, {
606
- message: __expectString,
607
- resourceId: __expectString,
608
- resourceType: __expectString,
609
- });
610
- Object.assign(contents, doc);
611
- const exception = new ResourceNotFoundException({
612
- $metadata: deserializeMetadata(parsedOutput),
613
- ...contents,
614
- });
615
- return __decorateServiceException(exception, parsedOutput.body);
616
- };
617
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
618
- const contents = map({});
619
- const data = parsedOutput.body;
620
- const doc = take(data, {
621
- message: __expectString,
622
- });
623
- Object.assign(contents, doc);
624
- const exception = new ServiceQuotaExceededException({
625
- $metadata: deserializeMetadata(parsedOutput),
626
- ...contents,
627
- });
628
- return __decorateServiceException(exception, parsedOutput.body);
629
- };
630
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
631
- const contents = map({
632
- [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => __strictParseInt32(parsedOutput.headers[_ra])],
633
- });
634
- const data = parsedOutput.body;
635
- const doc = take(data, {
636
- message: __expectString,
637
- });
638
- Object.assign(contents, doc);
639
- const exception = new ThrottlingException({
640
- $metadata: deserializeMetadata(parsedOutput),
641
- ...contents,
642
- });
643
- return __decorateServiceException(exception, parsedOutput.body);
644
- };
645
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
646
- const contents = map({});
647
- const data = parsedOutput.body;
648
- const doc = take(data, {
649
- fieldList: _json,
650
- message: __expectString,
651
- reason: __expectString,
652
- });
653
- Object.assign(contents, doc);
654
- const exception = new ValidationException({
655
- $metadata: deserializeMetadata(parsedOutput),
656
- ...contents,
657
- });
658
- return __decorateServiceException(exception, parsedOutput.body);
659
- };
660
- const deserializeMetadata = (output) => ({
661
- httpStatusCode: output.statusCode,
662
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
663
- extendedRequestId: output.headers["x-amz-id-2"],
664
- cfId: output.headers["x-amz-cf-id"],
665
- });
666
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
667
- const _cA = "clusterArn";
668
- const _mR = "maxResults";
669
- const _nT = "nextToken";
670
- const _rAS = "retryAfterSeconds";
671
- const _ra = "retry-after";
672
- const _sT = "snapshotType";
673
- const _tK = "tagKeys";