@aws-sdk/client-redshift-data 3.504.0 → 3.509.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
@@ -397,7 +397,7 @@ var se_ListTablesCommand = /* @__PURE__ */ __name(async (input, context) => {
397
397
  }, "se_ListTablesCommand");
398
398
  var de_BatchExecuteStatementCommand = /* @__PURE__ */ __name(async (output, context) => {
399
399
  if (output.statusCode >= 300) {
400
- return de_BatchExecuteStatementCommandError(output, context);
400
+ return de_CommandError(output, context);
401
401
  }
402
402
  const data = await parseBody(output.body, context);
403
403
  let contents = {};
@@ -408,34 +408,9 @@ var de_BatchExecuteStatementCommand = /* @__PURE__ */ __name(async (output, cont
408
408
  };
409
409
  return response;
410
410
  }, "de_BatchExecuteStatementCommand");
411
- var de_BatchExecuteStatementCommandError = /* @__PURE__ */ __name(async (output, context) => {
412
- const parsedOutput = {
413
- ...output,
414
- body: await parseErrorBody(output.body, context)
415
- };
416
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
417
- switch (errorCode) {
418
- case "ActiveStatementsExceededException":
419
- case "com.amazonaws.redshiftdata#ActiveStatementsExceededException":
420
- throw await de_ActiveStatementsExceededExceptionRes(parsedOutput, context);
421
- case "BatchExecuteStatementException":
422
- case "com.amazonaws.redshiftdata#BatchExecuteStatementException":
423
- throw await de_BatchExecuteStatementExceptionRes(parsedOutput, context);
424
- case "ValidationException":
425
- case "com.amazonaws.redshiftdata#ValidationException":
426
- throw await de_ValidationExceptionRes(parsedOutput, context);
427
- default:
428
- const parsedBody = parsedOutput.body;
429
- return throwDefaultError({
430
- output,
431
- parsedBody,
432
- errorCode
433
- });
434
- }
435
- }, "de_BatchExecuteStatementCommandError");
436
411
  var de_CancelStatementCommand = /* @__PURE__ */ __name(async (output, context) => {
437
412
  if (output.statusCode >= 300) {
438
- return de_CancelStatementCommandError(output, context);
413
+ return de_CommandError(output, context);
439
414
  }
440
415
  const data = await parseBody(output.body, context);
441
416
  let contents = {};
@@ -446,37 +421,9 @@ var de_CancelStatementCommand = /* @__PURE__ */ __name(async (output, context) =
446
421
  };
447
422
  return response;
448
423
  }, "de_CancelStatementCommand");
449
- var de_CancelStatementCommandError = /* @__PURE__ */ __name(async (output, context) => {
450
- const parsedOutput = {
451
- ...output,
452
- body: await parseErrorBody(output.body, context)
453
- };
454
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
455
- switch (errorCode) {
456
- case "DatabaseConnectionException":
457
- case "com.amazonaws.redshiftdata#DatabaseConnectionException":
458
- throw await de_DatabaseConnectionExceptionRes(parsedOutput, context);
459
- case "InternalServerException":
460
- case "com.amazonaws.redshiftdata#InternalServerException":
461
- throw await de_InternalServerExceptionRes(parsedOutput, context);
462
- case "ResourceNotFoundException":
463
- case "com.amazonaws.redshiftdata#ResourceNotFoundException":
464
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
465
- case "ValidationException":
466
- case "com.amazonaws.redshiftdata#ValidationException":
467
- throw await de_ValidationExceptionRes(parsedOutput, context);
468
- default:
469
- const parsedBody = parsedOutput.body;
470
- return throwDefaultError({
471
- output,
472
- parsedBody,
473
- errorCode
474
- });
475
- }
476
- }, "de_CancelStatementCommandError");
477
424
  var de_DescribeStatementCommand = /* @__PURE__ */ __name(async (output, context) => {
478
425
  if (output.statusCode >= 300) {
479
- return de_DescribeStatementCommandError(output, context);
426
+ return de_CommandError(output, context);
480
427
  }
481
428
  const data = await parseBody(output.body, context);
482
429
  let contents = {};
@@ -487,34 +434,9 @@ var de_DescribeStatementCommand = /* @__PURE__ */ __name(async (output, context)
487
434
  };
488
435
  return response;
489
436
  }, "de_DescribeStatementCommand");
490
- var de_DescribeStatementCommandError = /* @__PURE__ */ __name(async (output, context) => {
491
- const parsedOutput = {
492
- ...output,
493
- body: await parseErrorBody(output.body, context)
494
- };
495
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
496
- switch (errorCode) {
497
- case "InternalServerException":
498
- case "com.amazonaws.redshiftdata#InternalServerException":
499
- throw await de_InternalServerExceptionRes(parsedOutput, context);
500
- case "ResourceNotFoundException":
501
- case "com.amazonaws.redshiftdata#ResourceNotFoundException":
502
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
503
- case "ValidationException":
504
- case "com.amazonaws.redshiftdata#ValidationException":
505
- throw await de_ValidationExceptionRes(parsedOutput, context);
506
- default:
507
- const parsedBody = parsedOutput.body;
508
- return throwDefaultError({
509
- output,
510
- parsedBody,
511
- errorCode
512
- });
513
- }
514
- }, "de_DescribeStatementCommandError");
515
437
  var de_DescribeTableCommand = /* @__PURE__ */ __name(async (output, context) => {
516
438
  if (output.statusCode >= 300) {
517
- return de_DescribeTableCommandError(output, context);
439
+ return de_CommandError(output, context);
518
440
  }
519
441
  const data = await parseBody(output.body, context);
520
442
  let contents = {};
@@ -525,34 +447,9 @@ var de_DescribeTableCommand = /* @__PURE__ */ __name(async (output, context) =>
525
447
  };
526
448
  return response;
527
449
  }, "de_DescribeTableCommand");
528
- var de_DescribeTableCommandError = /* @__PURE__ */ __name(async (output, context) => {
529
- const parsedOutput = {
530
- ...output,
531
- body: await parseErrorBody(output.body, context)
532
- };
533
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
534
- switch (errorCode) {
535
- case "DatabaseConnectionException":
536
- case "com.amazonaws.redshiftdata#DatabaseConnectionException":
537
- throw await de_DatabaseConnectionExceptionRes(parsedOutput, context);
538
- case "InternalServerException":
539
- case "com.amazonaws.redshiftdata#InternalServerException":
540
- throw await de_InternalServerExceptionRes(parsedOutput, context);
541
- case "ValidationException":
542
- case "com.amazonaws.redshiftdata#ValidationException":
543
- throw await de_ValidationExceptionRes(parsedOutput, context);
544
- default:
545
- const parsedBody = parsedOutput.body;
546
- return throwDefaultError({
547
- output,
548
- parsedBody,
549
- errorCode
550
- });
551
- }
552
- }, "de_DescribeTableCommandError");
553
450
  var de_ExecuteStatementCommand = /* @__PURE__ */ __name(async (output, context) => {
554
451
  if (output.statusCode >= 300) {
555
- return de_ExecuteStatementCommandError(output, context);
452
+ return de_CommandError(output, context);
556
453
  }
557
454
  const data = await parseBody(output.body, context);
558
455
  let contents = {};
@@ -563,34 +460,9 @@ var de_ExecuteStatementCommand = /* @__PURE__ */ __name(async (output, context)
563
460
  };
564
461
  return response;
565
462
  }, "de_ExecuteStatementCommand");
566
- var de_ExecuteStatementCommandError = /* @__PURE__ */ __name(async (output, context) => {
567
- const parsedOutput = {
568
- ...output,
569
- body: await parseErrorBody(output.body, context)
570
- };
571
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
572
- switch (errorCode) {
573
- case "ActiveStatementsExceededException":
574
- case "com.amazonaws.redshiftdata#ActiveStatementsExceededException":
575
- throw await de_ActiveStatementsExceededExceptionRes(parsedOutput, context);
576
- case "ExecuteStatementException":
577
- case "com.amazonaws.redshiftdata#ExecuteStatementException":
578
- throw await de_ExecuteStatementExceptionRes(parsedOutput, context);
579
- case "ValidationException":
580
- case "com.amazonaws.redshiftdata#ValidationException":
581
- throw await de_ValidationExceptionRes(parsedOutput, context);
582
- default:
583
- const parsedBody = parsedOutput.body;
584
- return throwDefaultError({
585
- output,
586
- parsedBody,
587
- errorCode
588
- });
589
- }
590
- }, "de_ExecuteStatementCommandError");
591
463
  var de_GetStatementResultCommand = /* @__PURE__ */ __name(async (output, context) => {
592
464
  if (output.statusCode >= 300) {
593
- return de_GetStatementResultCommandError(output, context);
465
+ return de_CommandError(output, context);
594
466
  }
595
467
  const data = await parseBody(output.body, context);
596
468
  let contents = {};
@@ -601,34 +473,9 @@ var de_GetStatementResultCommand = /* @__PURE__ */ __name(async (output, context
601
473
  };
602
474
  return response;
603
475
  }, "de_GetStatementResultCommand");
604
- var de_GetStatementResultCommandError = /* @__PURE__ */ __name(async (output, context) => {
605
- const parsedOutput = {
606
- ...output,
607
- body: await parseErrorBody(output.body, context)
608
- };
609
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
610
- switch (errorCode) {
611
- case "InternalServerException":
612
- case "com.amazonaws.redshiftdata#InternalServerException":
613
- throw await de_InternalServerExceptionRes(parsedOutput, context);
614
- case "ResourceNotFoundException":
615
- case "com.amazonaws.redshiftdata#ResourceNotFoundException":
616
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
617
- case "ValidationException":
618
- case "com.amazonaws.redshiftdata#ValidationException":
619
- throw await de_ValidationExceptionRes(parsedOutput, context);
620
- default:
621
- const parsedBody = parsedOutput.body;
622
- return throwDefaultError({
623
- output,
624
- parsedBody,
625
- errorCode
626
- });
627
- }
628
- }, "de_GetStatementResultCommandError");
629
476
  var de_ListDatabasesCommand = /* @__PURE__ */ __name(async (output, context) => {
630
477
  if (output.statusCode >= 300) {
631
- return de_ListDatabasesCommandError(output, context);
478
+ return de_CommandError(output, context);
632
479
  }
633
480
  const data = await parseBody(output.body, context);
634
481
  let contents = {};
@@ -639,34 +486,9 @@ var de_ListDatabasesCommand = /* @__PURE__ */ __name(async (output, context) =>
639
486
  };
640
487
  return response;
641
488
  }, "de_ListDatabasesCommand");
642
- var de_ListDatabasesCommandError = /* @__PURE__ */ __name(async (output, context) => {
643
- const parsedOutput = {
644
- ...output,
645
- body: await parseErrorBody(output.body, context)
646
- };
647
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
648
- switch (errorCode) {
649
- case "DatabaseConnectionException":
650
- case "com.amazonaws.redshiftdata#DatabaseConnectionException":
651
- throw await de_DatabaseConnectionExceptionRes(parsedOutput, context);
652
- case "InternalServerException":
653
- case "com.amazonaws.redshiftdata#InternalServerException":
654
- throw await de_InternalServerExceptionRes(parsedOutput, context);
655
- case "ValidationException":
656
- case "com.amazonaws.redshiftdata#ValidationException":
657
- throw await de_ValidationExceptionRes(parsedOutput, context);
658
- default:
659
- const parsedBody = parsedOutput.body;
660
- return throwDefaultError({
661
- output,
662
- parsedBody,
663
- errorCode
664
- });
665
- }
666
- }, "de_ListDatabasesCommandError");
667
489
  var de_ListSchemasCommand = /* @__PURE__ */ __name(async (output, context) => {
668
490
  if (output.statusCode >= 300) {
669
- return de_ListSchemasCommandError(output, context);
491
+ return de_CommandError(output, context);
670
492
  }
671
493
  const data = await parseBody(output.body, context);
672
494
  let contents = {};
@@ -677,34 +499,9 @@ var de_ListSchemasCommand = /* @__PURE__ */ __name(async (output, context) => {
677
499
  };
678
500
  return response;
679
501
  }, "de_ListSchemasCommand");
680
- var de_ListSchemasCommandError = /* @__PURE__ */ __name(async (output, context) => {
681
- const parsedOutput = {
682
- ...output,
683
- body: await parseErrorBody(output.body, context)
684
- };
685
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
686
- switch (errorCode) {
687
- case "DatabaseConnectionException":
688
- case "com.amazonaws.redshiftdata#DatabaseConnectionException":
689
- throw await de_DatabaseConnectionExceptionRes(parsedOutput, context);
690
- case "InternalServerException":
691
- case "com.amazonaws.redshiftdata#InternalServerException":
692
- throw await de_InternalServerExceptionRes(parsedOutput, context);
693
- case "ValidationException":
694
- case "com.amazonaws.redshiftdata#ValidationException":
695
- throw await de_ValidationExceptionRes(parsedOutput, context);
696
- default:
697
- const parsedBody = parsedOutput.body;
698
- return throwDefaultError({
699
- output,
700
- parsedBody,
701
- errorCode
702
- });
703
- }
704
- }, "de_ListSchemasCommandError");
705
502
  var de_ListStatementsCommand = /* @__PURE__ */ __name(async (output, context) => {
706
503
  if (output.statusCode >= 300) {
707
- return de_ListStatementsCommandError(output, context);
504
+ return de_CommandError(output, context);
708
505
  }
709
506
  const data = await parseBody(output.body, context);
710
507
  let contents = {};
@@ -715,31 +512,9 @@ var de_ListStatementsCommand = /* @__PURE__ */ __name(async (output, context) =>
715
512
  };
716
513
  return response;
717
514
  }, "de_ListStatementsCommand");
718
- var de_ListStatementsCommandError = /* @__PURE__ */ __name(async (output, context) => {
719
- const parsedOutput = {
720
- ...output,
721
- body: await parseErrorBody(output.body, context)
722
- };
723
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
724
- switch (errorCode) {
725
- case "InternalServerException":
726
- case "com.amazonaws.redshiftdata#InternalServerException":
727
- throw await de_InternalServerExceptionRes(parsedOutput, context);
728
- case "ValidationException":
729
- case "com.amazonaws.redshiftdata#ValidationException":
730
- throw await de_ValidationExceptionRes(parsedOutput, context);
731
- default:
732
- const parsedBody = parsedOutput.body;
733
- return throwDefaultError({
734
- output,
735
- parsedBody,
736
- errorCode
737
- });
738
- }
739
- }, "de_ListStatementsCommandError");
740
515
  var de_ListTablesCommand = /* @__PURE__ */ __name(async (output, context) => {
741
516
  if (output.statusCode >= 300) {
742
- return de_ListTablesCommandError(output, context);
517
+ return de_CommandError(output, context);
743
518
  }
744
519
  const data = await parseBody(output.body, context);
745
520
  let contents = {};
@@ -750,22 +525,34 @@ var de_ListTablesCommand = /* @__PURE__ */ __name(async (output, context) => {
750
525
  };
751
526
  return response;
752
527
  }, "de_ListTablesCommand");
753
- var de_ListTablesCommandError = /* @__PURE__ */ __name(async (output, context) => {
528
+ var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
754
529
  const parsedOutput = {
755
530
  ...output,
756
531
  body: await parseErrorBody(output.body, context)
757
532
  };
758
533
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
759
534
  switch (errorCode) {
535
+ case "ActiveStatementsExceededException":
536
+ case "com.amazonaws.redshiftdata#ActiveStatementsExceededException":
537
+ throw await de_ActiveStatementsExceededExceptionRes(parsedOutput, context);
538
+ case "BatchExecuteStatementException":
539
+ case "com.amazonaws.redshiftdata#BatchExecuteStatementException":
540
+ throw await de_BatchExecuteStatementExceptionRes(parsedOutput, context);
541
+ case "ValidationException":
542
+ case "com.amazonaws.redshiftdata#ValidationException":
543
+ throw await de_ValidationExceptionRes(parsedOutput, context);
760
544
  case "DatabaseConnectionException":
761
545
  case "com.amazonaws.redshiftdata#DatabaseConnectionException":
762
546
  throw await de_DatabaseConnectionExceptionRes(parsedOutput, context);
763
547
  case "InternalServerException":
764
548
  case "com.amazonaws.redshiftdata#InternalServerException":
765
549
  throw await de_InternalServerExceptionRes(parsedOutput, context);
766
- case "ValidationException":
767
- case "com.amazonaws.redshiftdata#ValidationException":
768
- throw await de_ValidationExceptionRes(parsedOutput, context);
550
+ case "ResourceNotFoundException":
551
+ case "com.amazonaws.redshiftdata#ResourceNotFoundException":
552
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
553
+ case "ExecuteStatementException":
554
+ case "com.amazonaws.redshiftdata#ExecuteStatementException":
555
+ throw await de_ExecuteStatementExceptionRes(parsedOutput, context);
769
556
  default:
770
557
  const parsedBody = parsedOutput.body;
771
558
  return throwDefaultError({
@@ -774,7 +561,7 @@ var de_ListTablesCommandError = /* @__PURE__ */ __name(async (output, context) =
774
561
  errorCode
775
562
  });
776
563
  }
777
- }, "de_ListTablesCommandError");
564
+ }, "de_CommandError");
778
565
  var de_ActiveStatementsExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
779
566
  const body = parsedOutput.body;
780
567
  const deserialized = (0, import_smithy_client._json)(body);
@@ -66,7 +66,7 @@ export const se_ListTablesCommand = async (input, context) => {
66
66
  };
67
67
  export const de_BatchExecuteStatementCommand = async (output, context) => {
68
68
  if (output.statusCode >= 300) {
69
- return de_BatchExecuteStatementCommandError(output, context);
69
+ return de_CommandError(output, context);
70
70
  }
71
71
  const data = await parseBody(output.body, context);
72
72
  let contents = {};
@@ -77,34 +77,9 @@ export const de_BatchExecuteStatementCommand = async (output, context) => {
77
77
  };
78
78
  return response;
79
79
  };
80
- const de_BatchExecuteStatementCommandError = async (output, context) => {
81
- const parsedOutput = {
82
- ...output,
83
- body: await parseErrorBody(output.body, context),
84
- };
85
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
86
- switch (errorCode) {
87
- case "ActiveStatementsExceededException":
88
- case "com.amazonaws.redshiftdata#ActiveStatementsExceededException":
89
- throw await de_ActiveStatementsExceededExceptionRes(parsedOutput, context);
90
- case "BatchExecuteStatementException":
91
- case "com.amazonaws.redshiftdata#BatchExecuteStatementException":
92
- throw await de_BatchExecuteStatementExceptionRes(parsedOutput, context);
93
- case "ValidationException":
94
- case "com.amazonaws.redshiftdata#ValidationException":
95
- throw await de_ValidationExceptionRes(parsedOutput, context);
96
- default:
97
- const parsedBody = parsedOutput.body;
98
- return throwDefaultError({
99
- output,
100
- parsedBody,
101
- errorCode,
102
- });
103
- }
104
- };
105
80
  export const de_CancelStatementCommand = async (output, context) => {
106
81
  if (output.statusCode >= 300) {
107
- return de_CancelStatementCommandError(output, context);
82
+ return de_CommandError(output, context);
108
83
  }
109
84
  const data = await parseBody(output.body, context);
110
85
  let contents = {};
@@ -115,37 +90,9 @@ export const de_CancelStatementCommand = async (output, context) => {
115
90
  };
116
91
  return response;
117
92
  };
118
- const de_CancelStatementCommandError = async (output, context) => {
119
- const parsedOutput = {
120
- ...output,
121
- body: await parseErrorBody(output.body, context),
122
- };
123
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
124
- switch (errorCode) {
125
- case "DatabaseConnectionException":
126
- case "com.amazonaws.redshiftdata#DatabaseConnectionException":
127
- throw await de_DatabaseConnectionExceptionRes(parsedOutput, context);
128
- case "InternalServerException":
129
- case "com.amazonaws.redshiftdata#InternalServerException":
130
- throw await de_InternalServerExceptionRes(parsedOutput, context);
131
- case "ResourceNotFoundException":
132
- case "com.amazonaws.redshiftdata#ResourceNotFoundException":
133
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
134
- case "ValidationException":
135
- case "com.amazonaws.redshiftdata#ValidationException":
136
- throw await de_ValidationExceptionRes(parsedOutput, context);
137
- default:
138
- const parsedBody = parsedOutput.body;
139
- return throwDefaultError({
140
- output,
141
- parsedBody,
142
- errorCode,
143
- });
144
- }
145
- };
146
93
  export const de_DescribeStatementCommand = async (output, context) => {
147
94
  if (output.statusCode >= 300) {
148
- return de_DescribeStatementCommandError(output, context);
95
+ return de_CommandError(output, context);
149
96
  }
150
97
  const data = await parseBody(output.body, context);
151
98
  let contents = {};
@@ -156,34 +103,9 @@ export const de_DescribeStatementCommand = async (output, context) => {
156
103
  };
157
104
  return response;
158
105
  };
159
- const de_DescribeStatementCommandError = async (output, context) => {
160
- const parsedOutput = {
161
- ...output,
162
- body: await parseErrorBody(output.body, context),
163
- };
164
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
165
- switch (errorCode) {
166
- case "InternalServerException":
167
- case "com.amazonaws.redshiftdata#InternalServerException":
168
- throw await de_InternalServerExceptionRes(parsedOutput, context);
169
- case "ResourceNotFoundException":
170
- case "com.amazonaws.redshiftdata#ResourceNotFoundException":
171
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
172
- case "ValidationException":
173
- case "com.amazonaws.redshiftdata#ValidationException":
174
- throw await de_ValidationExceptionRes(parsedOutput, context);
175
- default:
176
- const parsedBody = parsedOutput.body;
177
- return throwDefaultError({
178
- output,
179
- parsedBody,
180
- errorCode,
181
- });
182
- }
183
- };
184
106
  export const de_DescribeTableCommand = async (output, context) => {
185
107
  if (output.statusCode >= 300) {
186
- return de_DescribeTableCommandError(output, context);
108
+ return de_CommandError(output, context);
187
109
  }
188
110
  const data = await parseBody(output.body, context);
189
111
  let contents = {};
@@ -194,34 +116,9 @@ export const de_DescribeTableCommand = async (output, context) => {
194
116
  };
195
117
  return response;
196
118
  };
197
- const de_DescribeTableCommandError = async (output, context) => {
198
- const parsedOutput = {
199
- ...output,
200
- body: await parseErrorBody(output.body, context),
201
- };
202
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
203
- switch (errorCode) {
204
- case "DatabaseConnectionException":
205
- case "com.amazonaws.redshiftdata#DatabaseConnectionException":
206
- throw await de_DatabaseConnectionExceptionRes(parsedOutput, context);
207
- case "InternalServerException":
208
- case "com.amazonaws.redshiftdata#InternalServerException":
209
- throw await de_InternalServerExceptionRes(parsedOutput, context);
210
- case "ValidationException":
211
- case "com.amazonaws.redshiftdata#ValidationException":
212
- throw await de_ValidationExceptionRes(parsedOutput, context);
213
- default:
214
- const parsedBody = parsedOutput.body;
215
- return throwDefaultError({
216
- output,
217
- parsedBody,
218
- errorCode,
219
- });
220
- }
221
- };
222
119
  export const de_ExecuteStatementCommand = async (output, context) => {
223
120
  if (output.statusCode >= 300) {
224
- return de_ExecuteStatementCommandError(output, context);
121
+ return de_CommandError(output, context);
225
122
  }
226
123
  const data = await parseBody(output.body, context);
227
124
  let contents = {};
@@ -232,34 +129,9 @@ export const de_ExecuteStatementCommand = async (output, context) => {
232
129
  };
233
130
  return response;
234
131
  };
235
- const de_ExecuteStatementCommandError = async (output, context) => {
236
- const parsedOutput = {
237
- ...output,
238
- body: await parseErrorBody(output.body, context),
239
- };
240
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
241
- switch (errorCode) {
242
- case "ActiveStatementsExceededException":
243
- case "com.amazonaws.redshiftdata#ActiveStatementsExceededException":
244
- throw await de_ActiveStatementsExceededExceptionRes(parsedOutput, context);
245
- case "ExecuteStatementException":
246
- case "com.amazonaws.redshiftdata#ExecuteStatementException":
247
- throw await de_ExecuteStatementExceptionRes(parsedOutput, context);
248
- case "ValidationException":
249
- case "com.amazonaws.redshiftdata#ValidationException":
250
- throw await de_ValidationExceptionRes(parsedOutput, context);
251
- default:
252
- const parsedBody = parsedOutput.body;
253
- return throwDefaultError({
254
- output,
255
- parsedBody,
256
- errorCode,
257
- });
258
- }
259
- };
260
132
  export const de_GetStatementResultCommand = async (output, context) => {
261
133
  if (output.statusCode >= 300) {
262
- return de_GetStatementResultCommandError(output, context);
134
+ return de_CommandError(output, context);
263
135
  }
264
136
  const data = await parseBody(output.body, context);
265
137
  let contents = {};
@@ -270,34 +142,9 @@ export const de_GetStatementResultCommand = async (output, context) => {
270
142
  };
271
143
  return response;
272
144
  };
273
- const de_GetStatementResultCommandError = async (output, context) => {
274
- const parsedOutput = {
275
- ...output,
276
- body: await parseErrorBody(output.body, context),
277
- };
278
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
279
- switch (errorCode) {
280
- case "InternalServerException":
281
- case "com.amazonaws.redshiftdata#InternalServerException":
282
- throw await de_InternalServerExceptionRes(parsedOutput, context);
283
- case "ResourceNotFoundException":
284
- case "com.amazonaws.redshiftdata#ResourceNotFoundException":
285
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
286
- case "ValidationException":
287
- case "com.amazonaws.redshiftdata#ValidationException":
288
- throw await de_ValidationExceptionRes(parsedOutput, context);
289
- default:
290
- const parsedBody = parsedOutput.body;
291
- return throwDefaultError({
292
- output,
293
- parsedBody,
294
- errorCode,
295
- });
296
- }
297
- };
298
145
  export const de_ListDatabasesCommand = async (output, context) => {
299
146
  if (output.statusCode >= 300) {
300
- return de_ListDatabasesCommandError(output, context);
147
+ return de_CommandError(output, context);
301
148
  }
302
149
  const data = await parseBody(output.body, context);
303
150
  let contents = {};
@@ -308,34 +155,9 @@ export const de_ListDatabasesCommand = async (output, context) => {
308
155
  };
309
156
  return response;
310
157
  };
311
- const de_ListDatabasesCommandError = async (output, context) => {
312
- const parsedOutput = {
313
- ...output,
314
- body: await parseErrorBody(output.body, context),
315
- };
316
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
317
- switch (errorCode) {
318
- case "DatabaseConnectionException":
319
- case "com.amazonaws.redshiftdata#DatabaseConnectionException":
320
- throw await de_DatabaseConnectionExceptionRes(parsedOutput, context);
321
- case "InternalServerException":
322
- case "com.amazonaws.redshiftdata#InternalServerException":
323
- throw await de_InternalServerExceptionRes(parsedOutput, context);
324
- case "ValidationException":
325
- case "com.amazonaws.redshiftdata#ValidationException":
326
- throw await de_ValidationExceptionRes(parsedOutput, context);
327
- default:
328
- const parsedBody = parsedOutput.body;
329
- return throwDefaultError({
330
- output,
331
- parsedBody,
332
- errorCode,
333
- });
334
- }
335
- };
336
158
  export const de_ListSchemasCommand = async (output, context) => {
337
159
  if (output.statusCode >= 300) {
338
- return de_ListSchemasCommandError(output, context);
160
+ return de_CommandError(output, context);
339
161
  }
340
162
  const data = await parseBody(output.body, context);
341
163
  let contents = {};
@@ -346,34 +168,9 @@ export const de_ListSchemasCommand = async (output, context) => {
346
168
  };
347
169
  return response;
348
170
  };
349
- const de_ListSchemasCommandError = async (output, context) => {
350
- const parsedOutput = {
351
- ...output,
352
- body: await parseErrorBody(output.body, context),
353
- };
354
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
355
- switch (errorCode) {
356
- case "DatabaseConnectionException":
357
- case "com.amazonaws.redshiftdata#DatabaseConnectionException":
358
- throw await de_DatabaseConnectionExceptionRes(parsedOutput, context);
359
- case "InternalServerException":
360
- case "com.amazonaws.redshiftdata#InternalServerException":
361
- throw await de_InternalServerExceptionRes(parsedOutput, context);
362
- case "ValidationException":
363
- case "com.amazonaws.redshiftdata#ValidationException":
364
- throw await de_ValidationExceptionRes(parsedOutput, context);
365
- default:
366
- const parsedBody = parsedOutput.body;
367
- return throwDefaultError({
368
- output,
369
- parsedBody,
370
- errorCode,
371
- });
372
- }
373
- };
374
171
  export const de_ListStatementsCommand = async (output, context) => {
375
172
  if (output.statusCode >= 300) {
376
- return de_ListStatementsCommandError(output, context);
173
+ return de_CommandError(output, context);
377
174
  }
378
175
  const data = await parseBody(output.body, context);
379
176
  let contents = {};
@@ -384,31 +181,9 @@ export const de_ListStatementsCommand = async (output, context) => {
384
181
  };
385
182
  return response;
386
183
  };
387
- const de_ListStatementsCommandError = async (output, context) => {
388
- const parsedOutput = {
389
- ...output,
390
- body: await parseErrorBody(output.body, context),
391
- };
392
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
393
- switch (errorCode) {
394
- case "InternalServerException":
395
- case "com.amazonaws.redshiftdata#InternalServerException":
396
- throw await de_InternalServerExceptionRes(parsedOutput, context);
397
- case "ValidationException":
398
- case "com.amazonaws.redshiftdata#ValidationException":
399
- throw await de_ValidationExceptionRes(parsedOutput, context);
400
- default:
401
- const parsedBody = parsedOutput.body;
402
- return throwDefaultError({
403
- output,
404
- parsedBody,
405
- errorCode,
406
- });
407
- }
408
- };
409
184
  export const de_ListTablesCommand = async (output, context) => {
410
185
  if (output.statusCode >= 300) {
411
- return de_ListTablesCommandError(output, context);
186
+ return de_CommandError(output, context);
412
187
  }
413
188
  const data = await parseBody(output.body, context);
414
189
  let contents = {};
@@ -419,22 +194,34 @@ export const de_ListTablesCommand = async (output, context) => {
419
194
  };
420
195
  return response;
421
196
  };
422
- const de_ListTablesCommandError = async (output, context) => {
197
+ const de_CommandError = async (output, context) => {
423
198
  const parsedOutput = {
424
199
  ...output,
425
200
  body: await parseErrorBody(output.body, context),
426
201
  };
427
202
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
428
203
  switch (errorCode) {
204
+ case "ActiveStatementsExceededException":
205
+ case "com.amazonaws.redshiftdata#ActiveStatementsExceededException":
206
+ throw await de_ActiveStatementsExceededExceptionRes(parsedOutput, context);
207
+ case "BatchExecuteStatementException":
208
+ case "com.amazonaws.redshiftdata#BatchExecuteStatementException":
209
+ throw await de_BatchExecuteStatementExceptionRes(parsedOutput, context);
210
+ case "ValidationException":
211
+ case "com.amazonaws.redshiftdata#ValidationException":
212
+ throw await de_ValidationExceptionRes(parsedOutput, context);
429
213
  case "DatabaseConnectionException":
430
214
  case "com.amazonaws.redshiftdata#DatabaseConnectionException":
431
215
  throw await de_DatabaseConnectionExceptionRes(parsedOutput, context);
432
216
  case "InternalServerException":
433
217
  case "com.amazonaws.redshiftdata#InternalServerException":
434
218
  throw await de_InternalServerExceptionRes(parsedOutput, context);
435
- case "ValidationException":
436
- case "com.amazonaws.redshiftdata#ValidationException":
437
- throw await de_ValidationExceptionRes(parsedOutput, context);
219
+ case "ResourceNotFoundException":
220
+ case "com.amazonaws.redshiftdata#ResourceNotFoundException":
221
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
222
+ case "ExecuteStatementException":
223
+ case "com.amazonaws.redshiftdata#ExecuteStatementException":
224
+ throw await de_ExecuteStatementExceptionRes(parsedOutput, context);
438
225
  default:
439
226
  const parsedBody = parsedOutput.body;
440
227
  return throwDefaultError({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-redshift-data",
3
3
  "description": "AWS SDK for JavaScript Redshift Data Client for Node.js, Browser and React Native",
4
- "version": "3.504.0",
4
+ "version": "3.509.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-redshift-data",
@@ -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.509.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",