@aws-sdk/client-redshift-data 3.43.0 → 3.47.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.
@@ -202,52 +202,60 @@ export var deserializeAws_json1_1CancelStatementCommand = function (output, cont
202
202
  });
203
203
  }); };
204
204
  var deserializeAws_json1_1CancelStatementCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
205
- var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
206
- var _f;
207
- return __generator(this, function (_g) {
208
- switch (_g.label) {
205
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
206
+ var _g;
207
+ return __generator(this, function (_h) {
208
+ switch (_h.label) {
209
209
  case 0:
210
210
  _a = [__assign({}, output)];
211
- _f = {};
211
+ _g = {};
212
212
  return [4, parseBody(output.body, context)];
213
213
  case 1:
214
- parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
214
+ parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
215
215
  errorCode = "UnknownError";
216
216
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
217
217
  _b = errorCode;
218
218
  switch (_b) {
219
- case "InternalServerException": return [3, 2];
220
- case "com.amazonaws.redshiftdata#InternalServerException": return [3, 2];
221
- case "ResourceNotFoundException": return [3, 4];
222
- case "com.amazonaws.redshiftdata#ResourceNotFoundException": return [3, 4];
223
- case "ValidationException": return [3, 6];
224
- case "com.amazonaws.redshiftdata#ValidationException": return [3, 6];
219
+ case "DatabaseConnectionException": return [3, 2];
220
+ case "com.amazonaws.redshiftdata#DatabaseConnectionException": return [3, 2];
221
+ case "InternalServerException": return [3, 4];
222
+ case "com.amazonaws.redshiftdata#InternalServerException": return [3, 4];
223
+ case "ResourceNotFoundException": return [3, 6];
224
+ case "com.amazonaws.redshiftdata#ResourceNotFoundException": return [3, 6];
225
+ case "ValidationException": return [3, 8];
226
+ case "com.amazonaws.redshiftdata#ValidationException": return [3, 8];
225
227
  }
226
- return [3, 8];
228
+ return [3, 10];
227
229
  case 2:
228
230
  _c = [{}];
229
- return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
231
+ return [4, deserializeAws_json1_1DatabaseConnectionExceptionResponse(parsedOutput, context)];
230
232
  case 3:
231
- response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
232
- return [3, 9];
233
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
234
+ return [3, 11];
233
235
  case 4:
234
236
  _d = [{}];
235
- return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
237
+ return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
236
238
  case 5:
237
- response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
238
- return [3, 9];
239
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
240
+ return [3, 11];
239
241
  case 6:
240
242
  _e = [{}];
241
- return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
243
+ return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
242
244
  case 7:
243
- response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
244
- return [3, 9];
245
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
246
+ return [3, 11];
245
247
  case 8:
248
+ _f = [{}];
249
+ return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
250
+ case 9:
251
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
252
+ return [3, 11];
253
+ case 10:
246
254
  parsedBody = parsedOutput.body;
247
255
  errorCode = parsedBody.code || parsedBody.Code || errorCode;
248
256
  response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
249
- _g.label = 9;
250
- case 9:
257
+ _h.label = 11;
258
+ case 11:
251
259
  message = response.message || response.Message || errorCode;
252
260
  response.message = message;
253
261
  delete response.Message;
@@ -346,44 +354,52 @@ export var deserializeAws_json1_1DescribeTableCommand = function (output, contex
346
354
  });
347
355
  }); };
348
356
  var deserializeAws_json1_1DescribeTableCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
349
- var parsedOutput, _a, response, errorCode, _b, _c, _d, parsedBody, message;
350
- var _e;
351
- return __generator(this, function (_f) {
352
- switch (_f.label) {
357
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
358
+ var _f;
359
+ return __generator(this, function (_g) {
360
+ switch (_g.label) {
353
361
  case 0:
354
362
  _a = [__assign({}, output)];
355
- _e = {};
363
+ _f = {};
356
364
  return [4, parseBody(output.body, context)];
357
365
  case 1:
358
- parsedOutput = __assign.apply(void 0, _a.concat([(_e.body = _f.sent(), _e)]));
366
+ parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
359
367
  errorCode = "UnknownError";
360
368
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
361
369
  _b = errorCode;
362
370
  switch (_b) {
363
- case "InternalServerException": return [3, 2];
364
- case "com.amazonaws.redshiftdata#InternalServerException": return [3, 2];
365
- case "ValidationException": return [3, 4];
366
- case "com.amazonaws.redshiftdata#ValidationException": return [3, 4];
371
+ case "DatabaseConnectionException": return [3, 2];
372
+ case "com.amazonaws.redshiftdata#DatabaseConnectionException": return [3, 2];
373
+ case "InternalServerException": return [3, 4];
374
+ case "com.amazonaws.redshiftdata#InternalServerException": return [3, 4];
375
+ case "ValidationException": return [3, 6];
376
+ case "com.amazonaws.redshiftdata#ValidationException": return [3, 6];
367
377
  }
368
- return [3, 6];
378
+ return [3, 8];
369
379
  case 2:
370
380
  _c = [{}];
371
- return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
381
+ return [4, deserializeAws_json1_1DatabaseConnectionExceptionResponse(parsedOutput, context)];
372
382
  case 3:
373
- response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
374
- return [3, 7];
383
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
384
+ return [3, 9];
375
385
  case 4:
376
386
  _d = [{}];
377
- return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
387
+ return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
378
388
  case 5:
379
- response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
380
- return [3, 7];
389
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
390
+ return [3, 9];
381
391
  case 6:
392
+ _e = [{}];
393
+ return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
394
+ case 7:
395
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
396
+ return [3, 9];
397
+ case 8:
382
398
  parsedBody = parsedOutput.body;
383
399
  errorCode = parsedBody.code || parsedBody.Code || errorCode;
384
400
  response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
385
- _f.label = 7;
386
- case 7:
401
+ _g.label = 9;
402
+ case 9:
387
403
  message = response.message || response.Message || errorCode;
388
404
  response.message = message;
389
405
  delete response.Message;
@@ -554,44 +570,52 @@ export var deserializeAws_json1_1ListDatabasesCommand = function (output, contex
554
570
  });
555
571
  }); };
556
572
  var deserializeAws_json1_1ListDatabasesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
557
- var parsedOutput, _a, response, errorCode, _b, _c, _d, parsedBody, message;
558
- var _e;
559
- return __generator(this, function (_f) {
560
- switch (_f.label) {
573
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
574
+ var _f;
575
+ return __generator(this, function (_g) {
576
+ switch (_g.label) {
561
577
  case 0:
562
578
  _a = [__assign({}, output)];
563
- _e = {};
579
+ _f = {};
564
580
  return [4, parseBody(output.body, context)];
565
581
  case 1:
566
- parsedOutput = __assign.apply(void 0, _a.concat([(_e.body = _f.sent(), _e)]));
582
+ parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
567
583
  errorCode = "UnknownError";
568
584
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
569
585
  _b = errorCode;
570
586
  switch (_b) {
571
- case "InternalServerException": return [3, 2];
572
- case "com.amazonaws.redshiftdata#InternalServerException": return [3, 2];
573
- case "ValidationException": return [3, 4];
574
- case "com.amazonaws.redshiftdata#ValidationException": return [3, 4];
587
+ case "DatabaseConnectionException": return [3, 2];
588
+ case "com.amazonaws.redshiftdata#DatabaseConnectionException": return [3, 2];
589
+ case "InternalServerException": return [3, 4];
590
+ case "com.amazonaws.redshiftdata#InternalServerException": return [3, 4];
591
+ case "ValidationException": return [3, 6];
592
+ case "com.amazonaws.redshiftdata#ValidationException": return [3, 6];
575
593
  }
576
- return [3, 6];
594
+ return [3, 8];
577
595
  case 2:
578
596
  _c = [{}];
579
- return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
597
+ return [4, deserializeAws_json1_1DatabaseConnectionExceptionResponse(parsedOutput, context)];
580
598
  case 3:
581
- response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
582
- return [3, 7];
599
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
600
+ return [3, 9];
583
601
  case 4:
584
602
  _d = [{}];
585
- return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
603
+ return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
586
604
  case 5:
587
- response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
588
- return [3, 7];
605
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
606
+ return [3, 9];
589
607
  case 6:
608
+ _e = [{}];
609
+ return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
610
+ case 7:
611
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
612
+ return [3, 9];
613
+ case 8:
590
614
  parsedBody = parsedOutput.body;
591
615
  errorCode = parsedBody.code || parsedBody.Code || errorCode;
592
616
  response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
593
- _f.label = 7;
594
- case 7:
617
+ _g.label = 9;
618
+ case 9:
595
619
  message = response.message || response.Message || errorCode;
596
620
  response.message = message;
597
621
  delete response.Message;
@@ -618,44 +642,52 @@ export var deserializeAws_json1_1ListSchemasCommand = function (output, context)
618
642
  });
619
643
  }); };
620
644
  var deserializeAws_json1_1ListSchemasCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
621
- var parsedOutput, _a, response, errorCode, _b, _c, _d, parsedBody, message;
622
- var _e;
623
- return __generator(this, function (_f) {
624
- switch (_f.label) {
645
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
646
+ var _f;
647
+ return __generator(this, function (_g) {
648
+ switch (_g.label) {
625
649
  case 0:
626
650
  _a = [__assign({}, output)];
627
- _e = {};
651
+ _f = {};
628
652
  return [4, parseBody(output.body, context)];
629
653
  case 1:
630
- parsedOutput = __assign.apply(void 0, _a.concat([(_e.body = _f.sent(), _e)]));
654
+ parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
631
655
  errorCode = "UnknownError";
632
656
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
633
657
  _b = errorCode;
634
658
  switch (_b) {
635
- case "InternalServerException": return [3, 2];
636
- case "com.amazonaws.redshiftdata#InternalServerException": return [3, 2];
637
- case "ValidationException": return [3, 4];
638
- case "com.amazonaws.redshiftdata#ValidationException": return [3, 4];
659
+ case "DatabaseConnectionException": return [3, 2];
660
+ case "com.amazonaws.redshiftdata#DatabaseConnectionException": return [3, 2];
661
+ case "InternalServerException": return [3, 4];
662
+ case "com.amazonaws.redshiftdata#InternalServerException": return [3, 4];
663
+ case "ValidationException": return [3, 6];
664
+ case "com.amazonaws.redshiftdata#ValidationException": return [3, 6];
639
665
  }
640
- return [3, 6];
666
+ return [3, 8];
641
667
  case 2:
642
668
  _c = [{}];
643
- return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
669
+ return [4, deserializeAws_json1_1DatabaseConnectionExceptionResponse(parsedOutput, context)];
644
670
  case 3:
645
- response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
646
- return [3, 7];
671
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
672
+ return [3, 9];
647
673
  case 4:
648
674
  _d = [{}];
649
- return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
675
+ return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
650
676
  case 5:
651
- response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
652
- return [3, 7];
677
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
678
+ return [3, 9];
653
679
  case 6:
680
+ _e = [{}];
681
+ return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
682
+ case 7:
683
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
684
+ return [3, 9];
685
+ case 8:
654
686
  parsedBody = parsedOutput.body;
655
687
  errorCode = parsedBody.code || parsedBody.Code || errorCode;
656
688
  response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
657
- _f.label = 7;
658
- case 7:
689
+ _g.label = 9;
690
+ case 9:
659
691
  message = response.message || response.Message || errorCode;
660
692
  response.message = message;
661
693
  delete response.Message;
@@ -746,44 +778,52 @@ export var deserializeAws_json1_1ListTablesCommand = function (output, context)
746
778
  });
747
779
  }); };
748
780
  var deserializeAws_json1_1ListTablesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
749
- var parsedOutput, _a, response, errorCode, _b, _c, _d, parsedBody, message;
750
- var _e;
751
- return __generator(this, function (_f) {
752
- switch (_f.label) {
781
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
782
+ var _f;
783
+ return __generator(this, function (_g) {
784
+ switch (_g.label) {
753
785
  case 0:
754
786
  _a = [__assign({}, output)];
755
- _e = {};
787
+ _f = {};
756
788
  return [4, parseBody(output.body, context)];
757
789
  case 1:
758
- parsedOutput = __assign.apply(void 0, _a.concat([(_e.body = _f.sent(), _e)]));
790
+ parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
759
791
  errorCode = "UnknownError";
760
792
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
761
793
  _b = errorCode;
762
794
  switch (_b) {
763
- case "InternalServerException": return [3, 2];
764
- case "com.amazonaws.redshiftdata#InternalServerException": return [3, 2];
765
- case "ValidationException": return [3, 4];
766
- case "com.amazonaws.redshiftdata#ValidationException": return [3, 4];
795
+ case "DatabaseConnectionException": return [3, 2];
796
+ case "com.amazonaws.redshiftdata#DatabaseConnectionException": return [3, 2];
797
+ case "InternalServerException": return [3, 4];
798
+ case "com.amazonaws.redshiftdata#InternalServerException": return [3, 4];
799
+ case "ValidationException": return [3, 6];
800
+ case "com.amazonaws.redshiftdata#ValidationException": return [3, 6];
767
801
  }
768
- return [3, 6];
802
+ return [3, 8];
769
803
  case 2:
770
804
  _c = [{}];
771
- return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
805
+ return [4, deserializeAws_json1_1DatabaseConnectionExceptionResponse(parsedOutput, context)];
772
806
  case 3:
773
- response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
774
- return [3, 7];
807
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
808
+ return [3, 9];
775
809
  case 4:
776
810
  _d = [{}];
777
- return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
811
+ return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
778
812
  case 5:
779
- response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
780
- return [3, 7];
813
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
814
+ return [3, 9];
781
815
  case 6:
816
+ _e = [{}];
817
+ return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
818
+ case 7:
819
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
820
+ return [3, 9];
821
+ case 8:
782
822
  parsedBody = parsedOutput.body;
783
823
  errorCode = parsedBody.code || parsedBody.Code || errorCode;
784
824
  response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
785
- _f.label = 7;
786
- case 7:
825
+ _g.label = 9;
826
+ case 9:
787
827
  message = response.message || response.Message || errorCode;
788
828
  response.message = message;
789
829
  delete response.Message;
@@ -809,6 +849,15 @@ var deserializeAws_json1_1BatchExecuteStatementExceptionResponse = function (par
809
849
  return [2, contents];
810
850
  });
811
851
  }); };
852
+ var deserializeAws_json1_1DatabaseConnectionExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
853
+ var body, deserialized, contents;
854
+ return __generator(this, function (_a) {
855
+ body = parsedOutput.body;
856
+ deserialized = deserializeAws_json1_1DatabaseConnectionException(body, context);
857
+ contents = __assign({ name: "DatabaseConnectionException", $fault: "server", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
858
+ return [2, contents];
859
+ });
860
+ }); };
812
861
  var deserializeAws_json1_1ExecuteStatementExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
813
862
  var body, deserialized, contents;
814
863
  return __generator(this, function (_a) {
@@ -973,6 +1022,11 @@ var deserializeAws_json1_1ColumnMetadataList = function (output, context) {
973
1022
  return deserializeAws_json1_1ColumnMetadata(entry, context);
974
1023
  });
975
1024
  };
1025
+ var deserializeAws_json1_1DatabaseConnectionException = function (output, context) {
1026
+ return {
1027
+ Message: __expectString(output.Message),
1028
+ };
1029
+ };
976
1030
  var deserializeAws_json1_1DatabaseList = function (output, context) {
977
1031
  return (output || [])
978
1032
  .filter(function (e) { return e != null; })
@@ -1,8 +1,8 @@
1
- import { __assign } from "tslib";
1
+ import { __assign, __awaiter, __generator } from "tslib";
2
2
  import packageInfo from "../package.json";
3
3
  import { Sha256 } from "@aws-crypto/sha256-browser";
4
4
  import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver";
5
- import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
5
+ import { FetchHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
6
6
  import { invalidProvider } from "@aws-sdk/invalid-dependency";
7
7
  import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry";
8
8
  import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
@@ -10,8 +10,17 @@ import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
10
10
  import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
11
11
  import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
12
12
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
13
+ import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
14
+ import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-browser";
13
15
  export var getRuntimeConfig = function (config) {
14
16
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
17
+ var defaultsMode = resolveDefaultsModeConfig(config);
18
+ var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
15
19
  var clientSharedValues = getSharedRuntimeConfig(config);
16
- return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new FetchHttpHandler(), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (function () { return Promise.resolve(DEFAULT_RETRY_MODE); }), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Sha256, streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (function () { return Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT); }), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (function () { return Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT); }), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
20
+ return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", defaultsMode: defaultsMode, base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new RequestHandler(defaultConfigProvider), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
21
+ switch (_a.label) {
22
+ case 0: return [4, defaultConfigProvider()];
23
+ case 1: return [2, (_a.sent()).retryMode || DEFAULT_RETRY_MODE];
24
+ }
25
+ }); }); }), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Sha256, streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (function () { return Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT); }), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (function () { return Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT); }), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
17
26
  };
@@ -1,21 +1,28 @@
1
- import { __assign } from "tslib";
1
+ import { __assign, __awaiter, __generator } from "tslib";
2
2
  import packageInfo from "../package.json";
3
3
  import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
4
4
  import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@aws-sdk/config-resolver";
5
5
  import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
6
6
  import { Hash } from "@aws-sdk/hash-node";
7
- import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
7
+ import { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@aws-sdk/middleware-retry";
8
8
  import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider";
9
- import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler";
9
+ import { NodeHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/node-http-handler";
10
10
  import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
11
11
  import { calculateBodyLength } from "@aws-sdk/util-body-length-node";
12
12
  import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
13
13
  import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node";
14
14
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
15
- import { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client";
15
+ import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
16
+ import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-node";
16
17
  export var getRuntimeConfig = function (config) {
17
18
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
18
- emitWarningIfUnsupportedVersion(process.version);
19
+ var defaultsMode = resolveDefaultsModeConfig(config);
20
+ var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
19
21
  var clientSharedValues = getSharedRuntimeConfig(config);
20
- return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : decorateDefaultCredentialProvider(credentialDefaultProvider), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new NodeHttpHandler(), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Hash.bind(null, "sha256"), streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
22
+ return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", defaultsMode: defaultsMode, base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : decorateDefaultCredentialProvider(credentialDefaultProvider), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new RequestHandler(defaultConfigProvider), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : loadNodeConfig(__assign(__assign({}, NODE_RETRY_MODE_CONFIG_OPTIONS), { default: function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
23
+ switch (_a.label) {
24
+ case 0: return [4, defaultConfigProvider()];
25
+ case 1: return [2, (_a.sent()).retryMode || DEFAULT_RETRY_MODE];
26
+ }
27
+ }); }); } })), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Hash.bind(null, "sha256"), streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
21
28
  };
@@ -25,13 +25,13 @@ export declare class RedshiftData extends RedshiftDataClient {
25
25
  * method, use one of the following combinations of request parameters: </p>
26
26
  * <ul>
27
27
  * <li>
28
- * <p>Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the
29
- * cluster identifier that matches the cluster in the secret. </p>
28
+ * <p>Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret.
29
+ * When connecting to a serverless endpoint, specify the Amazon Resource Name (ARN) of the secret and the database name. </p>
30
30
  * </li>
31
31
  * <li>
32
- * <p>Temporary credentials - specify the cluster identifier, the database name, and the
33
- * database user name. Permission to call the <code>redshift:GetClusterCredentials</code>
34
- * operation is required to use this method. </p>
32
+ * <p>Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the database user name.
33
+ * Also, permission to call the <code>redshift:GetClusterCredentials</code> operation is required.
34
+ * When connecting to a serverless endpoint, specify the database name. </p>
35
35
  * </li>
36
36
  * </ul>
37
37
  */
@@ -60,13 +60,13 @@ export declare class RedshiftData extends RedshiftDataClient {
60
60
  * following combinations of request parameters: </p>
61
61
  * <ul>
62
62
  * <li>
63
- * <p>Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the
64
- * cluster identifier that matches the cluster in the secret. </p>
63
+ * <p>Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret.
64
+ * When connecting to a serverless endpoint, specify the Amazon Resource Name (ARN) of the secret and the database name. </p>
65
65
  * </li>
66
66
  * <li>
67
- * <p>Temporary credentials - specify the cluster identifier, the database name, and the database
68
- * user name. Permission to call the <code>redshift:GetClusterCredentials</code> operation is
69
- * required to use this method. </p>
67
+ * <p>Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the database user name.
68
+ * Also, permission to call the <code>redshift:GetClusterCredentials</code> operation is required.
69
+ * When connecting to a serverless endpoint, specify the database name. </p>
70
70
  * </li>
71
71
  * </ul>
72
72
  */
@@ -80,13 +80,13 @@ export declare class RedshiftData extends RedshiftDataClient {
80
80
  * method, use one of the following combinations of request parameters: </p>
81
81
  * <ul>
82
82
  * <li>
83
- * <p>Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the
84
- * cluster identifier that matches the cluster in the secret. </p>
83
+ * <p>Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret.
84
+ * When connecting to a serverless endpoint, specify the Amazon Resource Name (ARN) of the secret and the database name. </p>
85
85
  * </li>
86
86
  * <li>
87
- * <p>Temporary credentials - specify the cluster identifier, the database name, and the
88
- * database user name. Permission to call the <code>redshift:GetClusterCredentials</code>
89
- * operation is required to use this method. </p>
87
+ * <p>Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the database user name.
88
+ * Also, permission to call the <code>redshift:GetClusterCredentials</code> operation is required.
89
+ * When connecting to a serverless endpoint, specify the database name. </p>
90
90
  * </li>
91
91
  * </ul>
92
92
  */
@@ -107,13 +107,13 @@ export declare class RedshiftData extends RedshiftDataClient {
107
107
  * following combinations of request parameters: </p>
108
108
  * <ul>
109
109
  * <li>
110
- * <p>Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the
111
- * cluster identifier that matches the cluster in the secret. </p>
110
+ * <p>Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret.
111
+ * When connecting to a serverless endpoint, specify the Amazon Resource Name (ARN) of the secret and the database name. </p>
112
112
  * </li>
113
113
  * <li>
114
- * <p>Temporary credentials - specify the cluster identifier, the database name, and the
115
- * database user name. Permission to call the <code>redshift:GetClusterCredentials</code>
116
- * operation is required to use this method. </p>
114
+ * <p>Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the database user name.
115
+ * Also, permission to call the <code>redshift:GetClusterCredentials</code> operation is required.
116
+ * When connecting to a serverless endpoint, specify the database name. </p>
117
117
  * </li>
118
118
  * </ul>
119
119
  */
@@ -127,13 +127,13 @@ export declare class RedshiftData extends RedshiftDataClient {
127
127
  * following combinations of request parameters: </p>
128
128
  * <ul>
129
129
  * <li>
130
- * <p>Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the
131
- * cluster identifier that matches the cluster in the secret. </p>
130
+ * <p>Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret.
131
+ * When connecting to a serverless endpoint, specify the Amazon Resource Name (ARN) of the secret and the database name. </p>
132
132
  * </li>
133
133
  * <li>
134
- * <p>Temporary credentials - specify the cluster identifier, the database name, and the
135
- * database user name. Permission to call the <code>redshift:GetClusterCredentials</code>
136
- * operation is required to use this method. </p>
134
+ * <p>Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the database user name.
135
+ * Also, permission to call the <code>redshift:GetClusterCredentials</code> operation is required.
136
+ * When connecting to a serverless endpoint, specify the database name. </p>
137
137
  * </li>
138
138
  * </ul>
139
139
  */
@@ -155,13 +155,13 @@ export declare class RedshiftData extends RedshiftDataClient {
155
155
  * following combinations of request parameters: </p>
156
156
  * <ul>
157
157
  * <li>
158
- * <p>Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the
159
- * cluster identifier that matches the cluster in the secret. </p>
158
+ * <p>Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret.
159
+ * When connecting to a serverless endpoint, specify the Amazon Resource Name (ARN) of the secret and the database name. </p>
160
160
  * </li>
161
161
  * <li>
162
- * <p>Temporary credentials - specify the cluster identifier, the database name, and the
163
- * database user name. Permission to call the <code>redshift:GetClusterCredentials</code>
164
- * operation is required to use this method. </p>
162
+ * <p>Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the database user name.
163
+ * Also, permission to call the <code>redshift:GetClusterCredentials</code> operation is required.
164
+ * When connecting to a serverless endpoint, specify the database name. </p>
165
165
  * </li>
166
166
  * </ul>
167
167
  */