@aws-sdk/client-savingsplans 3.504.0 → 3.507.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist-cjs/index.js CHANGED
@@ -495,7 +495,7 @@ var se_UntagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
495
495
  }, "se_UntagResourceCommand");
496
496
  var de_CreateSavingsPlanCommand = /* @__PURE__ */ __name(async (output, context) => {
497
497
  if (output.statusCode !== 200 && output.statusCode >= 300) {
498
- return de_CreateSavingsPlanCommandError(output, context);
498
+ return de_CommandError(output, context);
499
499
  }
500
500
  const contents = (0, import_smithy_client.map)({
501
501
  $metadata: deserializeMetadata(output)
@@ -507,37 +507,9 @@ var de_CreateSavingsPlanCommand = /* @__PURE__ */ __name(async (output, context)
507
507
  Object.assign(contents, doc);
508
508
  return contents;
509
509
  }, "de_CreateSavingsPlanCommand");
510
- var de_CreateSavingsPlanCommandError = /* @__PURE__ */ __name(async (output, context) => {
511
- const parsedOutput = {
512
- ...output,
513
- body: await parseErrorBody(output.body, context)
514
- };
515
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
516
- switch (errorCode) {
517
- case "InternalServerException":
518
- case "com.amazonaws.savingsplans#InternalServerException":
519
- throw await de_InternalServerExceptionRes(parsedOutput, context);
520
- case "ResourceNotFoundException":
521
- case "com.amazonaws.savingsplans#ResourceNotFoundException":
522
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
523
- case "ServiceQuotaExceededException":
524
- case "com.amazonaws.savingsplans#ServiceQuotaExceededException":
525
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
526
- case "ValidationException":
527
- case "com.amazonaws.savingsplans#ValidationException":
528
- throw await de_ValidationExceptionRes(parsedOutput, context);
529
- default:
530
- const parsedBody = parsedOutput.body;
531
- return throwDefaultError({
532
- output,
533
- parsedBody,
534
- errorCode
535
- });
536
- }
537
- }, "de_CreateSavingsPlanCommandError");
538
510
  var de_DeleteQueuedSavingsPlanCommand = /* @__PURE__ */ __name(async (output, context) => {
539
511
  if (output.statusCode !== 200 && output.statusCode >= 300) {
540
- return de_DeleteQueuedSavingsPlanCommandError(output, context);
512
+ return de_CommandError(output, context);
541
513
  }
542
514
  const contents = (0, import_smithy_client.map)({
543
515
  $metadata: deserializeMetadata(output)
@@ -545,37 +517,9 @@ var de_DeleteQueuedSavingsPlanCommand = /* @__PURE__ */ __name(async (output, co
545
517
  await (0, import_smithy_client.collectBody)(output.body, context);
546
518
  return contents;
547
519
  }, "de_DeleteQueuedSavingsPlanCommand");
548
- var de_DeleteQueuedSavingsPlanCommandError = /* @__PURE__ */ __name(async (output, context) => {
549
- const parsedOutput = {
550
- ...output,
551
- body: await parseErrorBody(output.body, context)
552
- };
553
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
554
- switch (errorCode) {
555
- case "InternalServerException":
556
- case "com.amazonaws.savingsplans#InternalServerException":
557
- throw await de_InternalServerExceptionRes(parsedOutput, context);
558
- case "ResourceNotFoundException":
559
- case "com.amazonaws.savingsplans#ResourceNotFoundException":
560
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
561
- case "ServiceQuotaExceededException":
562
- case "com.amazonaws.savingsplans#ServiceQuotaExceededException":
563
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
564
- case "ValidationException":
565
- case "com.amazonaws.savingsplans#ValidationException":
566
- throw await de_ValidationExceptionRes(parsedOutput, context);
567
- default:
568
- const parsedBody = parsedOutput.body;
569
- return throwDefaultError({
570
- output,
571
- parsedBody,
572
- errorCode
573
- });
574
- }
575
- }, "de_DeleteQueuedSavingsPlanCommandError");
576
520
  var de_DescribeSavingsPlanRatesCommand = /* @__PURE__ */ __name(async (output, context) => {
577
521
  if (output.statusCode !== 200 && output.statusCode >= 300) {
578
- return de_DescribeSavingsPlanRatesCommandError(output, context);
522
+ return de_CommandError(output, context);
579
523
  }
580
524
  const contents = (0, import_smithy_client.map)({
581
525
  $metadata: deserializeMetadata(output)
@@ -589,31 +533,9 @@ var de_DescribeSavingsPlanRatesCommand = /* @__PURE__ */ __name(async (output, c
589
533
  Object.assign(contents, doc);
590
534
  return contents;
591
535
  }, "de_DescribeSavingsPlanRatesCommand");
592
- var de_DescribeSavingsPlanRatesCommandError = /* @__PURE__ */ __name(async (output, context) => {
593
- const parsedOutput = {
594
- ...output,
595
- body: await parseErrorBody(output.body, context)
596
- };
597
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
598
- switch (errorCode) {
599
- case "ResourceNotFoundException":
600
- case "com.amazonaws.savingsplans#ResourceNotFoundException":
601
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
602
- case "ValidationException":
603
- case "com.amazonaws.savingsplans#ValidationException":
604
- throw await de_ValidationExceptionRes(parsedOutput, context);
605
- default:
606
- const parsedBody = parsedOutput.body;
607
- return throwDefaultError({
608
- output,
609
- parsedBody,
610
- errorCode
611
- });
612
- }
613
- }, "de_DescribeSavingsPlanRatesCommandError");
614
536
  var de_DescribeSavingsPlansCommand = /* @__PURE__ */ __name(async (output, context) => {
615
537
  if (output.statusCode !== 200 && output.statusCode >= 300) {
616
- return de_DescribeSavingsPlansCommandError(output, context);
538
+ return de_CommandError(output, context);
617
539
  }
618
540
  const contents = (0, import_smithy_client.map)({
619
541
  $metadata: deserializeMetadata(output)
@@ -626,31 +548,9 @@ var de_DescribeSavingsPlansCommand = /* @__PURE__ */ __name(async (output, conte
626
548
  Object.assign(contents, doc);
627
549
  return contents;
628
550
  }, "de_DescribeSavingsPlansCommand");
629
- var de_DescribeSavingsPlansCommandError = /* @__PURE__ */ __name(async (output, context) => {
630
- const parsedOutput = {
631
- ...output,
632
- body: await parseErrorBody(output.body, context)
633
- };
634
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
635
- switch (errorCode) {
636
- case "InternalServerException":
637
- case "com.amazonaws.savingsplans#InternalServerException":
638
- throw await de_InternalServerExceptionRes(parsedOutput, context);
639
- case "ValidationException":
640
- case "com.amazonaws.savingsplans#ValidationException":
641
- throw await de_ValidationExceptionRes(parsedOutput, context);
642
- default:
643
- const parsedBody = parsedOutput.body;
644
- return throwDefaultError({
645
- output,
646
- parsedBody,
647
- errorCode
648
- });
649
- }
650
- }, "de_DescribeSavingsPlansCommandError");
651
551
  var de_DescribeSavingsPlansOfferingRatesCommand = /* @__PURE__ */ __name(async (output, context) => {
652
552
  if (output.statusCode !== 200 && output.statusCode >= 300) {
653
- return de_DescribeSavingsPlansOfferingRatesCommandError(output, context);
553
+ return de_CommandError(output, context);
654
554
  }
655
555
  const contents = (0, import_smithy_client.map)({
656
556
  $metadata: deserializeMetadata(output)
@@ -663,31 +563,9 @@ var de_DescribeSavingsPlansOfferingRatesCommand = /* @__PURE__ */ __name(async (
663
563
  Object.assign(contents, doc);
664
564
  return contents;
665
565
  }, "de_DescribeSavingsPlansOfferingRatesCommand");
666
- var de_DescribeSavingsPlansOfferingRatesCommandError = /* @__PURE__ */ __name(async (output, context) => {
667
- const parsedOutput = {
668
- ...output,
669
- body: await parseErrorBody(output.body, context)
670
- };
671
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
672
- switch (errorCode) {
673
- case "InternalServerException":
674
- case "com.amazonaws.savingsplans#InternalServerException":
675
- throw await de_InternalServerExceptionRes(parsedOutput, context);
676
- case "ValidationException":
677
- case "com.amazonaws.savingsplans#ValidationException":
678
- throw await de_ValidationExceptionRes(parsedOutput, context);
679
- default:
680
- const parsedBody = parsedOutput.body;
681
- return throwDefaultError({
682
- output,
683
- parsedBody,
684
- errorCode
685
- });
686
- }
687
- }, "de_DescribeSavingsPlansOfferingRatesCommandError");
688
566
  var de_DescribeSavingsPlansOfferingsCommand = /* @__PURE__ */ __name(async (output, context) => {
689
567
  if (output.statusCode !== 200 && output.statusCode >= 300) {
690
- return de_DescribeSavingsPlansOfferingsCommandError(output, context);
568
+ return de_CommandError(output, context);
691
569
  }
692
570
  const contents = (0, import_smithy_client.map)({
693
571
  $metadata: deserializeMetadata(output)
@@ -700,31 +578,9 @@ var de_DescribeSavingsPlansOfferingsCommand = /* @__PURE__ */ __name(async (outp
700
578
  Object.assign(contents, doc);
701
579
  return contents;
702
580
  }, "de_DescribeSavingsPlansOfferingsCommand");
703
- var de_DescribeSavingsPlansOfferingsCommandError = /* @__PURE__ */ __name(async (output, context) => {
704
- const parsedOutput = {
705
- ...output,
706
- body: await parseErrorBody(output.body, context)
707
- };
708
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
709
- switch (errorCode) {
710
- case "InternalServerException":
711
- case "com.amazonaws.savingsplans#InternalServerException":
712
- throw await de_InternalServerExceptionRes(parsedOutput, context);
713
- case "ValidationException":
714
- case "com.amazonaws.savingsplans#ValidationException":
715
- throw await de_ValidationExceptionRes(parsedOutput, context);
716
- default:
717
- const parsedBody = parsedOutput.body;
718
- return throwDefaultError({
719
- output,
720
- parsedBody,
721
- errorCode
722
- });
723
- }
724
- }, "de_DescribeSavingsPlansOfferingsCommandError");
725
581
  var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
726
582
  if (output.statusCode !== 200 && output.statusCode >= 300) {
727
- return de_ListTagsForResourceCommandError(output, context);
583
+ return de_CommandError(output, context);
728
584
  }
729
585
  const contents = (0, import_smithy_client.map)({
730
586
  $metadata: deserializeMetadata(output)
@@ -736,34 +592,9 @@ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, contex
736
592
  Object.assign(contents, doc);
737
593
  return contents;
738
594
  }, "de_ListTagsForResourceCommand");
739
- var de_ListTagsForResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
740
- const parsedOutput = {
741
- ...output,
742
- body: await parseErrorBody(output.body, context)
743
- };
744
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
745
- switch (errorCode) {
746
- case "InternalServerException":
747
- case "com.amazonaws.savingsplans#InternalServerException":
748
- throw await de_InternalServerExceptionRes(parsedOutput, context);
749
- case "ResourceNotFoundException":
750
- case "com.amazonaws.savingsplans#ResourceNotFoundException":
751
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
752
- case "ValidationException":
753
- case "com.amazonaws.savingsplans#ValidationException":
754
- throw await de_ValidationExceptionRes(parsedOutput, context);
755
- default:
756
- const parsedBody = parsedOutput.body;
757
- return throwDefaultError({
758
- output,
759
- parsedBody,
760
- errorCode
761
- });
762
- }
763
- }, "de_ListTagsForResourceCommandError");
764
595
  var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
765
596
  if (output.statusCode !== 200 && output.statusCode >= 300) {
766
- return de_TagResourceCommandError(output, context);
597
+ return de_CommandError(output, context);
767
598
  }
768
599
  const contents = (0, import_smithy_client.map)({
769
600
  $metadata: deserializeMetadata(output)
@@ -771,37 +602,9 @@ var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
771
602
  await (0, import_smithy_client.collectBody)(output.body, context);
772
603
  return contents;
773
604
  }, "de_TagResourceCommand");
774
- var de_TagResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
775
- const parsedOutput = {
776
- ...output,
777
- body: await parseErrorBody(output.body, context)
778
- };
779
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
780
- switch (errorCode) {
781
- case "InternalServerException":
782
- case "com.amazonaws.savingsplans#InternalServerException":
783
- throw await de_InternalServerExceptionRes(parsedOutput, context);
784
- case "ResourceNotFoundException":
785
- case "com.amazonaws.savingsplans#ResourceNotFoundException":
786
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
787
- case "ServiceQuotaExceededException":
788
- case "com.amazonaws.savingsplans#ServiceQuotaExceededException":
789
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
790
- case "ValidationException":
791
- case "com.amazonaws.savingsplans#ValidationException":
792
- throw await de_ValidationExceptionRes(parsedOutput, context);
793
- default:
794
- const parsedBody = parsedOutput.body;
795
- return throwDefaultError({
796
- output,
797
- parsedBody,
798
- errorCode
799
- });
800
- }
801
- }, "de_TagResourceCommandError");
802
605
  var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
803
606
  if (output.statusCode !== 200 && output.statusCode >= 300) {
804
- return de_UntagResourceCommandError(output, context);
607
+ return de_CommandError(output, context);
805
608
  }
806
609
  const contents = (0, import_smithy_client.map)({
807
610
  $metadata: deserializeMetadata(output)
@@ -809,7 +612,7 @@ var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) =>
809
612
  await (0, import_smithy_client.collectBody)(output.body, context);
810
613
  return contents;
811
614
  }, "de_UntagResourceCommand");
812
- var de_UntagResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
615
+ var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
813
616
  const parsedOutput = {
814
617
  ...output,
815
618
  body: await parseErrorBody(output.body, context)
@@ -822,6 +625,9 @@ var de_UntagResourceCommandError = /* @__PURE__ */ __name(async (output, context
822
625
  case "ResourceNotFoundException":
823
626
  case "com.amazonaws.savingsplans#ResourceNotFoundException":
824
627
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
628
+ case "ServiceQuotaExceededException":
629
+ case "com.amazonaws.savingsplans#ServiceQuotaExceededException":
630
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
825
631
  case "ValidationException":
826
632
  case "com.amazonaws.savingsplans#ValidationException":
827
633
  throw await de_ValidationExceptionRes(parsedOutput, context);
@@ -833,7 +639,7 @@ var de_UntagResourceCommandError = /* @__PURE__ */ __name(async (output, context
833
639
  errorCode
834
640
  });
835
641
  }
836
- }, "de_UntagResourceCommandError");
642
+ }, "de_CommandError");
837
643
  var throwDefaultError = (0, import_smithy_client.withBaseException)(SavingsplansServiceException);
838
644
  var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
839
645
  const contents = (0, import_smithy_client.map)({});
@@ -158,7 +158,7 @@ export const se_UntagResourceCommand = async (input, context) => {
158
158
  };
159
159
  export const de_CreateSavingsPlanCommand = async (output, context) => {
160
160
  if (output.statusCode !== 200 && output.statusCode >= 300) {
161
- return de_CreateSavingsPlanCommandError(output, context);
161
+ return de_CommandError(output, context);
162
162
  }
163
163
  const contents = map({
164
164
  $metadata: deserializeMetadata(output),
@@ -170,37 +170,9 @@ export const de_CreateSavingsPlanCommand = async (output, context) => {
170
170
  Object.assign(contents, doc);
171
171
  return contents;
172
172
  };
173
- const de_CreateSavingsPlanCommandError = async (output, context) => {
174
- const parsedOutput = {
175
- ...output,
176
- body: await parseErrorBody(output.body, context),
177
- };
178
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
179
- switch (errorCode) {
180
- case "InternalServerException":
181
- case "com.amazonaws.savingsplans#InternalServerException":
182
- throw await de_InternalServerExceptionRes(parsedOutput, context);
183
- case "ResourceNotFoundException":
184
- case "com.amazonaws.savingsplans#ResourceNotFoundException":
185
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
186
- case "ServiceQuotaExceededException":
187
- case "com.amazonaws.savingsplans#ServiceQuotaExceededException":
188
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
189
- case "ValidationException":
190
- case "com.amazonaws.savingsplans#ValidationException":
191
- throw await de_ValidationExceptionRes(parsedOutput, context);
192
- default:
193
- const parsedBody = parsedOutput.body;
194
- return throwDefaultError({
195
- output,
196
- parsedBody,
197
- errorCode,
198
- });
199
- }
200
- };
201
173
  export const de_DeleteQueuedSavingsPlanCommand = async (output, context) => {
202
174
  if (output.statusCode !== 200 && output.statusCode >= 300) {
203
- return de_DeleteQueuedSavingsPlanCommandError(output, context);
175
+ return de_CommandError(output, context);
204
176
  }
205
177
  const contents = map({
206
178
  $metadata: deserializeMetadata(output),
@@ -208,37 +180,9 @@ export const de_DeleteQueuedSavingsPlanCommand = async (output, context) => {
208
180
  await collectBody(output.body, context);
209
181
  return contents;
210
182
  };
211
- const de_DeleteQueuedSavingsPlanCommandError = async (output, context) => {
212
- const parsedOutput = {
213
- ...output,
214
- body: await parseErrorBody(output.body, context),
215
- };
216
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
217
- switch (errorCode) {
218
- case "InternalServerException":
219
- case "com.amazonaws.savingsplans#InternalServerException":
220
- throw await de_InternalServerExceptionRes(parsedOutput, context);
221
- case "ResourceNotFoundException":
222
- case "com.amazonaws.savingsplans#ResourceNotFoundException":
223
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
224
- case "ServiceQuotaExceededException":
225
- case "com.amazonaws.savingsplans#ServiceQuotaExceededException":
226
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
227
- case "ValidationException":
228
- case "com.amazonaws.savingsplans#ValidationException":
229
- throw await de_ValidationExceptionRes(parsedOutput, context);
230
- default:
231
- const parsedBody = parsedOutput.body;
232
- return throwDefaultError({
233
- output,
234
- parsedBody,
235
- errorCode,
236
- });
237
- }
238
- };
239
183
  export const de_DescribeSavingsPlanRatesCommand = async (output, context) => {
240
184
  if (output.statusCode !== 200 && output.statusCode >= 300) {
241
- return de_DescribeSavingsPlanRatesCommandError(output, context);
185
+ return de_CommandError(output, context);
242
186
  }
243
187
  const contents = map({
244
188
  $metadata: deserializeMetadata(output),
@@ -252,31 +196,9 @@ export const de_DescribeSavingsPlanRatesCommand = async (output, context) => {
252
196
  Object.assign(contents, doc);
253
197
  return contents;
254
198
  };
255
- const de_DescribeSavingsPlanRatesCommandError = async (output, context) => {
256
- const parsedOutput = {
257
- ...output,
258
- body: await parseErrorBody(output.body, context),
259
- };
260
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
261
- switch (errorCode) {
262
- case "ResourceNotFoundException":
263
- case "com.amazonaws.savingsplans#ResourceNotFoundException":
264
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
265
- case "ValidationException":
266
- case "com.amazonaws.savingsplans#ValidationException":
267
- throw await de_ValidationExceptionRes(parsedOutput, context);
268
- default:
269
- const parsedBody = parsedOutput.body;
270
- return throwDefaultError({
271
- output,
272
- parsedBody,
273
- errorCode,
274
- });
275
- }
276
- };
277
199
  export const de_DescribeSavingsPlansCommand = async (output, context) => {
278
200
  if (output.statusCode !== 200 && output.statusCode >= 300) {
279
- return de_DescribeSavingsPlansCommandError(output, context);
201
+ return de_CommandError(output, context);
280
202
  }
281
203
  const contents = map({
282
204
  $metadata: deserializeMetadata(output),
@@ -289,31 +211,9 @@ export const de_DescribeSavingsPlansCommand = async (output, context) => {
289
211
  Object.assign(contents, doc);
290
212
  return contents;
291
213
  };
292
- const de_DescribeSavingsPlansCommandError = async (output, context) => {
293
- const parsedOutput = {
294
- ...output,
295
- body: await parseErrorBody(output.body, context),
296
- };
297
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
298
- switch (errorCode) {
299
- case "InternalServerException":
300
- case "com.amazonaws.savingsplans#InternalServerException":
301
- throw await de_InternalServerExceptionRes(parsedOutput, context);
302
- case "ValidationException":
303
- case "com.amazonaws.savingsplans#ValidationException":
304
- throw await de_ValidationExceptionRes(parsedOutput, context);
305
- default:
306
- const parsedBody = parsedOutput.body;
307
- return throwDefaultError({
308
- output,
309
- parsedBody,
310
- errorCode,
311
- });
312
- }
313
- };
314
214
  export const de_DescribeSavingsPlansOfferingRatesCommand = async (output, context) => {
315
215
  if (output.statusCode !== 200 && output.statusCode >= 300) {
316
- return de_DescribeSavingsPlansOfferingRatesCommandError(output, context);
216
+ return de_CommandError(output, context);
317
217
  }
318
218
  const contents = map({
319
219
  $metadata: deserializeMetadata(output),
@@ -326,31 +226,9 @@ export const de_DescribeSavingsPlansOfferingRatesCommand = async (output, contex
326
226
  Object.assign(contents, doc);
327
227
  return contents;
328
228
  };
329
- const de_DescribeSavingsPlansOfferingRatesCommandError = async (output, context) => {
330
- const parsedOutput = {
331
- ...output,
332
- body: await parseErrorBody(output.body, context),
333
- };
334
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
335
- switch (errorCode) {
336
- case "InternalServerException":
337
- case "com.amazonaws.savingsplans#InternalServerException":
338
- throw await de_InternalServerExceptionRes(parsedOutput, context);
339
- case "ValidationException":
340
- case "com.amazonaws.savingsplans#ValidationException":
341
- throw await de_ValidationExceptionRes(parsedOutput, context);
342
- default:
343
- const parsedBody = parsedOutput.body;
344
- return throwDefaultError({
345
- output,
346
- parsedBody,
347
- errorCode,
348
- });
349
- }
350
- };
351
229
  export const de_DescribeSavingsPlansOfferingsCommand = async (output, context) => {
352
230
  if (output.statusCode !== 200 && output.statusCode >= 300) {
353
- return de_DescribeSavingsPlansOfferingsCommandError(output, context);
231
+ return de_CommandError(output, context);
354
232
  }
355
233
  const contents = map({
356
234
  $metadata: deserializeMetadata(output),
@@ -363,31 +241,9 @@ export const de_DescribeSavingsPlansOfferingsCommand = async (output, context) =
363
241
  Object.assign(contents, doc);
364
242
  return contents;
365
243
  };
366
- const de_DescribeSavingsPlansOfferingsCommandError = async (output, context) => {
367
- const parsedOutput = {
368
- ...output,
369
- body: await parseErrorBody(output.body, context),
370
- };
371
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
372
- switch (errorCode) {
373
- case "InternalServerException":
374
- case "com.amazonaws.savingsplans#InternalServerException":
375
- throw await de_InternalServerExceptionRes(parsedOutput, context);
376
- case "ValidationException":
377
- case "com.amazonaws.savingsplans#ValidationException":
378
- throw await de_ValidationExceptionRes(parsedOutput, context);
379
- default:
380
- const parsedBody = parsedOutput.body;
381
- return throwDefaultError({
382
- output,
383
- parsedBody,
384
- errorCode,
385
- });
386
- }
387
- };
388
244
  export const de_ListTagsForResourceCommand = async (output, context) => {
389
245
  if (output.statusCode !== 200 && output.statusCode >= 300) {
390
- return de_ListTagsForResourceCommandError(output, context);
246
+ return de_CommandError(output, context);
391
247
  }
392
248
  const contents = map({
393
249
  $metadata: deserializeMetadata(output),
@@ -399,34 +255,9 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
399
255
  Object.assign(contents, doc);
400
256
  return contents;
401
257
  };
402
- const de_ListTagsForResourceCommandError = async (output, context) => {
403
- const parsedOutput = {
404
- ...output,
405
- body: await parseErrorBody(output.body, context),
406
- };
407
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
408
- switch (errorCode) {
409
- case "InternalServerException":
410
- case "com.amazonaws.savingsplans#InternalServerException":
411
- throw await de_InternalServerExceptionRes(parsedOutput, context);
412
- case "ResourceNotFoundException":
413
- case "com.amazonaws.savingsplans#ResourceNotFoundException":
414
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
415
- case "ValidationException":
416
- case "com.amazonaws.savingsplans#ValidationException":
417
- throw await de_ValidationExceptionRes(parsedOutput, context);
418
- default:
419
- const parsedBody = parsedOutput.body;
420
- return throwDefaultError({
421
- output,
422
- parsedBody,
423
- errorCode,
424
- });
425
- }
426
- };
427
258
  export const de_TagResourceCommand = async (output, context) => {
428
259
  if (output.statusCode !== 200 && output.statusCode >= 300) {
429
- return de_TagResourceCommandError(output, context);
260
+ return de_CommandError(output, context);
430
261
  }
431
262
  const contents = map({
432
263
  $metadata: deserializeMetadata(output),
@@ -434,37 +265,9 @@ export const de_TagResourceCommand = async (output, context) => {
434
265
  await collectBody(output.body, context);
435
266
  return contents;
436
267
  };
437
- const de_TagResourceCommandError = async (output, context) => {
438
- const parsedOutput = {
439
- ...output,
440
- body: await parseErrorBody(output.body, context),
441
- };
442
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
443
- switch (errorCode) {
444
- case "InternalServerException":
445
- case "com.amazonaws.savingsplans#InternalServerException":
446
- throw await de_InternalServerExceptionRes(parsedOutput, context);
447
- case "ResourceNotFoundException":
448
- case "com.amazonaws.savingsplans#ResourceNotFoundException":
449
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
450
- case "ServiceQuotaExceededException":
451
- case "com.amazonaws.savingsplans#ServiceQuotaExceededException":
452
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
453
- case "ValidationException":
454
- case "com.amazonaws.savingsplans#ValidationException":
455
- throw await de_ValidationExceptionRes(parsedOutput, context);
456
- default:
457
- const parsedBody = parsedOutput.body;
458
- return throwDefaultError({
459
- output,
460
- parsedBody,
461
- errorCode,
462
- });
463
- }
464
- };
465
268
  export const de_UntagResourceCommand = async (output, context) => {
466
269
  if (output.statusCode !== 200 && output.statusCode >= 300) {
467
- return de_UntagResourceCommandError(output, context);
270
+ return de_CommandError(output, context);
468
271
  }
469
272
  const contents = map({
470
273
  $metadata: deserializeMetadata(output),
@@ -472,7 +275,7 @@ export const de_UntagResourceCommand = async (output, context) => {
472
275
  await collectBody(output.body, context);
473
276
  return contents;
474
277
  };
475
- const de_UntagResourceCommandError = async (output, context) => {
278
+ const de_CommandError = async (output, context) => {
476
279
  const parsedOutput = {
477
280
  ...output,
478
281
  body: await parseErrorBody(output.body, context),
@@ -485,6 +288,9 @@ const de_UntagResourceCommandError = async (output, context) => {
485
288
  case "ResourceNotFoundException":
486
289
  case "com.amazonaws.savingsplans#ResourceNotFoundException":
487
290
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
291
+ case "ServiceQuotaExceededException":
292
+ case "com.amazonaws.savingsplans#ServiceQuotaExceededException":
293
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
488
294
  case "ValidationException":
489
295
  case "com.amazonaws.savingsplans#ValidationException":
490
296
  throw await de_ValidationExceptionRes(parsedOutput, context);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-savingsplans",
3
3
  "description": "AWS SDK for JavaScript Savingsplans Client for Node.js, Browser and React Native",
4
- "version": "3.504.0",
4
+ "version": "3.507.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-savingsplans",
@@ -20,9 +20,9 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.504.0",
23
+ "@aws-sdk/client-sts": "3.507.0",
24
24
  "@aws-sdk/core": "3.496.0",
25
- "@aws-sdk/credential-provider-node": "3.504.0",
25
+ "@aws-sdk/credential-provider-node": "3.507.0",
26
26
  "@aws-sdk/middleware-host-header": "3.502.0",
27
27
  "@aws-sdk/middleware-logger": "3.502.0",
28
28
  "@aws-sdk/middleware-recursion-detection": "3.502.0",