@aws-sdk/client-bedrock-agent 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 +68 -1355
- package/dist-es/protocols/Aws_restJson1.js +60 -1347
- package/package.json +3 -3
|
@@ -581,7 +581,7 @@ export const se_UpdateKnowledgeBaseCommand = async (input, context) => {
|
|
|
581
581
|
};
|
|
582
582
|
export const de_AssociateAgentKnowledgeBaseCommand = async (output, context) => {
|
|
583
583
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
584
|
-
return
|
|
584
|
+
return de_CommandError(output, context);
|
|
585
585
|
}
|
|
586
586
|
const contents = map({
|
|
587
587
|
$metadata: deserializeMetadata(output),
|
|
@@ -593,46 +593,9 @@ export const de_AssociateAgentKnowledgeBaseCommand = async (output, context) =>
|
|
|
593
593
|
Object.assign(contents, doc);
|
|
594
594
|
return contents;
|
|
595
595
|
};
|
|
596
|
-
const de_AssociateAgentKnowledgeBaseCommandError = async (output, context) => {
|
|
597
|
-
const parsedOutput = {
|
|
598
|
-
...output,
|
|
599
|
-
body: await parseErrorBody(output.body, context),
|
|
600
|
-
};
|
|
601
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
602
|
-
switch (errorCode) {
|
|
603
|
-
case "AccessDeniedException":
|
|
604
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
605
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
606
|
-
case "ConflictException":
|
|
607
|
-
case "com.amazonaws.bedrockagent#ConflictException":
|
|
608
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
609
|
-
case "InternalServerException":
|
|
610
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
611
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
612
|
-
case "ResourceNotFoundException":
|
|
613
|
-
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
614
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
615
|
-
case "ServiceQuotaExceededException":
|
|
616
|
-
case "com.amazonaws.bedrockagent#ServiceQuotaExceededException":
|
|
617
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
618
|
-
case "ThrottlingException":
|
|
619
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
620
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
621
|
-
case "ValidationException":
|
|
622
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
623
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
624
|
-
default:
|
|
625
|
-
const parsedBody = parsedOutput.body;
|
|
626
|
-
return throwDefaultError({
|
|
627
|
-
output,
|
|
628
|
-
parsedBody,
|
|
629
|
-
errorCode,
|
|
630
|
-
});
|
|
631
|
-
}
|
|
632
|
-
};
|
|
633
596
|
export const de_CreateAgentCommand = async (output, context) => {
|
|
634
597
|
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
635
|
-
return
|
|
598
|
+
return de_CommandError(output, context);
|
|
636
599
|
}
|
|
637
600
|
const contents = map({
|
|
638
601
|
$metadata: deserializeMetadata(output),
|
|
@@ -644,43 +607,9 @@ export const de_CreateAgentCommand = async (output, context) => {
|
|
|
644
607
|
Object.assign(contents, doc);
|
|
645
608
|
return contents;
|
|
646
609
|
};
|
|
647
|
-
const de_CreateAgentCommandError = async (output, context) => {
|
|
648
|
-
const parsedOutput = {
|
|
649
|
-
...output,
|
|
650
|
-
body: await parseErrorBody(output.body, context),
|
|
651
|
-
};
|
|
652
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
653
|
-
switch (errorCode) {
|
|
654
|
-
case "AccessDeniedException":
|
|
655
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
656
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
657
|
-
case "ConflictException":
|
|
658
|
-
case "com.amazonaws.bedrockagent#ConflictException":
|
|
659
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
660
|
-
case "InternalServerException":
|
|
661
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
662
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
663
|
-
case "ServiceQuotaExceededException":
|
|
664
|
-
case "com.amazonaws.bedrockagent#ServiceQuotaExceededException":
|
|
665
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
666
|
-
case "ThrottlingException":
|
|
667
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
668
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
669
|
-
case "ValidationException":
|
|
670
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
671
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
672
|
-
default:
|
|
673
|
-
const parsedBody = parsedOutput.body;
|
|
674
|
-
return throwDefaultError({
|
|
675
|
-
output,
|
|
676
|
-
parsedBody,
|
|
677
|
-
errorCode,
|
|
678
|
-
});
|
|
679
|
-
}
|
|
680
|
-
};
|
|
681
610
|
export const de_CreateAgentActionGroupCommand = async (output, context) => {
|
|
682
611
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
683
|
-
return
|
|
612
|
+
return de_CommandError(output, context);
|
|
684
613
|
}
|
|
685
614
|
const contents = map({
|
|
686
615
|
$metadata: deserializeMetadata(output),
|
|
@@ -692,46 +621,9 @@ export const de_CreateAgentActionGroupCommand = async (output, context) => {
|
|
|
692
621
|
Object.assign(contents, doc);
|
|
693
622
|
return contents;
|
|
694
623
|
};
|
|
695
|
-
const de_CreateAgentActionGroupCommandError = async (output, context) => {
|
|
696
|
-
const parsedOutput = {
|
|
697
|
-
...output,
|
|
698
|
-
body: await parseErrorBody(output.body, context),
|
|
699
|
-
};
|
|
700
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
701
|
-
switch (errorCode) {
|
|
702
|
-
case "AccessDeniedException":
|
|
703
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
704
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
705
|
-
case "ConflictException":
|
|
706
|
-
case "com.amazonaws.bedrockagent#ConflictException":
|
|
707
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
708
|
-
case "InternalServerException":
|
|
709
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
710
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
711
|
-
case "ResourceNotFoundException":
|
|
712
|
-
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
713
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
714
|
-
case "ServiceQuotaExceededException":
|
|
715
|
-
case "com.amazonaws.bedrockagent#ServiceQuotaExceededException":
|
|
716
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
717
|
-
case "ThrottlingException":
|
|
718
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
719
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
720
|
-
case "ValidationException":
|
|
721
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
722
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
723
|
-
default:
|
|
724
|
-
const parsedBody = parsedOutput.body;
|
|
725
|
-
return throwDefaultError({
|
|
726
|
-
output,
|
|
727
|
-
parsedBody,
|
|
728
|
-
errorCode,
|
|
729
|
-
});
|
|
730
|
-
}
|
|
731
|
-
};
|
|
732
624
|
export const de_CreateAgentAliasCommand = async (output, context) => {
|
|
733
625
|
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
734
|
-
return
|
|
626
|
+
return de_CommandError(output, context);
|
|
735
627
|
}
|
|
736
628
|
const contents = map({
|
|
737
629
|
$metadata: deserializeMetadata(output),
|
|
@@ -743,46 +635,9 @@ export const de_CreateAgentAliasCommand = async (output, context) => {
|
|
|
743
635
|
Object.assign(contents, doc);
|
|
744
636
|
return contents;
|
|
745
637
|
};
|
|
746
|
-
const de_CreateAgentAliasCommandError = async (output, context) => {
|
|
747
|
-
const parsedOutput = {
|
|
748
|
-
...output,
|
|
749
|
-
body: await parseErrorBody(output.body, context),
|
|
750
|
-
};
|
|
751
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
752
|
-
switch (errorCode) {
|
|
753
|
-
case "AccessDeniedException":
|
|
754
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
755
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
756
|
-
case "ConflictException":
|
|
757
|
-
case "com.amazonaws.bedrockagent#ConflictException":
|
|
758
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
759
|
-
case "InternalServerException":
|
|
760
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
761
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
762
|
-
case "ResourceNotFoundException":
|
|
763
|
-
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
764
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
765
|
-
case "ServiceQuotaExceededException":
|
|
766
|
-
case "com.amazonaws.bedrockagent#ServiceQuotaExceededException":
|
|
767
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
768
|
-
case "ThrottlingException":
|
|
769
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
770
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
771
|
-
case "ValidationException":
|
|
772
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
773
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
774
|
-
default:
|
|
775
|
-
const parsedBody = parsedOutput.body;
|
|
776
|
-
return throwDefaultError({
|
|
777
|
-
output,
|
|
778
|
-
parsedBody,
|
|
779
|
-
errorCode,
|
|
780
|
-
});
|
|
781
|
-
}
|
|
782
|
-
};
|
|
783
638
|
export const de_CreateDataSourceCommand = async (output, context) => {
|
|
784
639
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
785
|
-
return
|
|
640
|
+
return de_CommandError(output, context);
|
|
786
641
|
}
|
|
787
642
|
const contents = map({
|
|
788
643
|
$metadata: deserializeMetadata(output),
|
|
@@ -794,46 +649,9 @@ export const de_CreateDataSourceCommand = async (output, context) => {
|
|
|
794
649
|
Object.assign(contents, doc);
|
|
795
650
|
return contents;
|
|
796
651
|
};
|
|
797
|
-
const de_CreateDataSourceCommandError = async (output, context) => {
|
|
798
|
-
const parsedOutput = {
|
|
799
|
-
...output,
|
|
800
|
-
body: await parseErrorBody(output.body, context),
|
|
801
|
-
};
|
|
802
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
803
|
-
switch (errorCode) {
|
|
804
|
-
case "AccessDeniedException":
|
|
805
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
806
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
807
|
-
case "ConflictException":
|
|
808
|
-
case "com.amazonaws.bedrockagent#ConflictException":
|
|
809
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
810
|
-
case "InternalServerException":
|
|
811
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
812
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
813
|
-
case "ResourceNotFoundException":
|
|
814
|
-
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
815
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
816
|
-
case "ServiceQuotaExceededException":
|
|
817
|
-
case "com.amazonaws.bedrockagent#ServiceQuotaExceededException":
|
|
818
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
819
|
-
case "ThrottlingException":
|
|
820
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
821
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
822
|
-
case "ValidationException":
|
|
823
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
824
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
825
|
-
default:
|
|
826
|
-
const parsedBody = parsedOutput.body;
|
|
827
|
-
return throwDefaultError({
|
|
828
|
-
output,
|
|
829
|
-
parsedBody,
|
|
830
|
-
errorCode,
|
|
831
|
-
});
|
|
832
|
-
}
|
|
833
|
-
};
|
|
834
652
|
export const de_CreateKnowledgeBaseCommand = async (output, context) => {
|
|
835
653
|
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
836
|
-
return
|
|
654
|
+
return de_CommandError(output, context);
|
|
837
655
|
}
|
|
838
656
|
const contents = map({
|
|
839
657
|
$metadata: deserializeMetadata(output),
|
|
@@ -845,43 +663,9 @@ export const de_CreateKnowledgeBaseCommand = async (output, context) => {
|
|
|
845
663
|
Object.assign(contents, doc);
|
|
846
664
|
return contents;
|
|
847
665
|
};
|
|
848
|
-
const de_CreateKnowledgeBaseCommandError = async (output, context) => {
|
|
849
|
-
const parsedOutput = {
|
|
850
|
-
...output,
|
|
851
|
-
body: await parseErrorBody(output.body, context),
|
|
852
|
-
};
|
|
853
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
854
|
-
switch (errorCode) {
|
|
855
|
-
case "AccessDeniedException":
|
|
856
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
857
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
858
|
-
case "ConflictException":
|
|
859
|
-
case "com.amazonaws.bedrockagent#ConflictException":
|
|
860
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
861
|
-
case "InternalServerException":
|
|
862
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
863
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
864
|
-
case "ServiceQuotaExceededException":
|
|
865
|
-
case "com.amazonaws.bedrockagent#ServiceQuotaExceededException":
|
|
866
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
867
|
-
case "ThrottlingException":
|
|
868
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
869
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
870
|
-
case "ValidationException":
|
|
871
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
872
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
873
|
-
default:
|
|
874
|
-
const parsedBody = parsedOutput.body;
|
|
875
|
-
return throwDefaultError({
|
|
876
|
-
output,
|
|
877
|
-
parsedBody,
|
|
878
|
-
errorCode,
|
|
879
|
-
});
|
|
880
|
-
}
|
|
881
|
-
};
|
|
882
666
|
export const de_DeleteAgentCommand = async (output, context) => {
|
|
883
667
|
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
884
|
-
return
|
|
668
|
+
return de_CommandError(output, context);
|
|
885
669
|
}
|
|
886
670
|
const contents = map({
|
|
887
671
|
$metadata: deserializeMetadata(output),
|
|
@@ -894,43 +678,9 @@ export const de_DeleteAgentCommand = async (output, context) => {
|
|
|
894
678
|
Object.assign(contents, doc);
|
|
895
679
|
return contents;
|
|
896
680
|
};
|
|
897
|
-
const de_DeleteAgentCommandError = async (output, context) => {
|
|
898
|
-
const parsedOutput = {
|
|
899
|
-
...output,
|
|
900
|
-
body: await parseErrorBody(output.body, context),
|
|
901
|
-
};
|
|
902
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
903
|
-
switch (errorCode) {
|
|
904
|
-
case "AccessDeniedException":
|
|
905
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
906
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
907
|
-
case "ConflictException":
|
|
908
|
-
case "com.amazonaws.bedrockagent#ConflictException":
|
|
909
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
910
|
-
case "InternalServerException":
|
|
911
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
912
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
913
|
-
case "ResourceNotFoundException":
|
|
914
|
-
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
915
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
916
|
-
case "ThrottlingException":
|
|
917
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
918
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
919
|
-
case "ValidationException":
|
|
920
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
921
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
922
|
-
default:
|
|
923
|
-
const parsedBody = parsedOutput.body;
|
|
924
|
-
return throwDefaultError({
|
|
925
|
-
output,
|
|
926
|
-
parsedBody,
|
|
927
|
-
errorCode,
|
|
928
|
-
});
|
|
929
|
-
}
|
|
930
|
-
};
|
|
931
681
|
export const de_DeleteAgentActionGroupCommand = async (output, context) => {
|
|
932
682
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
933
|
-
return
|
|
683
|
+
return de_CommandError(output, context);
|
|
934
684
|
}
|
|
935
685
|
const contents = map({
|
|
936
686
|
$metadata: deserializeMetadata(output),
|
|
@@ -938,43 +688,9 @@ export const de_DeleteAgentActionGroupCommand = async (output, context) => {
|
|
|
938
688
|
await collectBody(output.body, context);
|
|
939
689
|
return contents;
|
|
940
690
|
};
|
|
941
|
-
const de_DeleteAgentActionGroupCommandError = async (output, context) => {
|
|
942
|
-
const parsedOutput = {
|
|
943
|
-
...output,
|
|
944
|
-
body: await parseErrorBody(output.body, context),
|
|
945
|
-
};
|
|
946
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
947
|
-
switch (errorCode) {
|
|
948
|
-
case "AccessDeniedException":
|
|
949
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
950
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
951
|
-
case "ConflictException":
|
|
952
|
-
case "com.amazonaws.bedrockagent#ConflictException":
|
|
953
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
954
|
-
case "InternalServerException":
|
|
955
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
956
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
957
|
-
case "ResourceNotFoundException":
|
|
958
|
-
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
959
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
960
|
-
case "ThrottlingException":
|
|
961
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
962
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
963
|
-
case "ValidationException":
|
|
964
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
965
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
966
|
-
default:
|
|
967
|
-
const parsedBody = parsedOutput.body;
|
|
968
|
-
return throwDefaultError({
|
|
969
|
-
output,
|
|
970
|
-
parsedBody,
|
|
971
|
-
errorCode,
|
|
972
|
-
});
|
|
973
|
-
}
|
|
974
|
-
};
|
|
975
691
|
export const de_DeleteAgentAliasCommand = async (output, context) => {
|
|
976
692
|
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
977
|
-
return
|
|
693
|
+
return de_CommandError(output, context);
|
|
978
694
|
}
|
|
979
695
|
const contents = map({
|
|
980
696
|
$metadata: deserializeMetadata(output),
|
|
@@ -988,40 +704,9 @@ export const de_DeleteAgentAliasCommand = async (output, context) => {
|
|
|
988
704
|
Object.assign(contents, doc);
|
|
989
705
|
return contents;
|
|
990
706
|
};
|
|
991
|
-
const de_DeleteAgentAliasCommandError = async (output, context) => {
|
|
992
|
-
const parsedOutput = {
|
|
993
|
-
...output,
|
|
994
|
-
body: await parseErrorBody(output.body, context),
|
|
995
|
-
};
|
|
996
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
997
|
-
switch (errorCode) {
|
|
998
|
-
case "AccessDeniedException":
|
|
999
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1000
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1001
|
-
case "InternalServerException":
|
|
1002
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1003
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1004
|
-
case "ResourceNotFoundException":
|
|
1005
|
-
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1006
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1007
|
-
case "ThrottlingException":
|
|
1008
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1009
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1010
|
-
case "ValidationException":
|
|
1011
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1012
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1013
|
-
default:
|
|
1014
|
-
const parsedBody = parsedOutput.body;
|
|
1015
|
-
return throwDefaultError({
|
|
1016
|
-
output,
|
|
1017
|
-
parsedBody,
|
|
1018
|
-
errorCode,
|
|
1019
|
-
});
|
|
1020
|
-
}
|
|
1021
|
-
};
|
|
1022
707
|
export const de_DeleteAgentVersionCommand = async (output, context) => {
|
|
1023
708
|
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
1024
|
-
return
|
|
709
|
+
return de_CommandError(output, context);
|
|
1025
710
|
}
|
|
1026
711
|
const contents = map({
|
|
1027
712
|
$metadata: deserializeMetadata(output),
|
|
@@ -1035,43 +720,9 @@ export const de_DeleteAgentVersionCommand = async (output, context) => {
|
|
|
1035
720
|
Object.assign(contents, doc);
|
|
1036
721
|
return contents;
|
|
1037
722
|
};
|
|
1038
|
-
const de_DeleteAgentVersionCommandError = async (output, context) => {
|
|
1039
|
-
const parsedOutput = {
|
|
1040
|
-
...output,
|
|
1041
|
-
body: await parseErrorBody(output.body, context),
|
|
1042
|
-
};
|
|
1043
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1044
|
-
switch (errorCode) {
|
|
1045
|
-
case "AccessDeniedException":
|
|
1046
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1047
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1048
|
-
case "ConflictException":
|
|
1049
|
-
case "com.amazonaws.bedrockagent#ConflictException":
|
|
1050
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1051
|
-
case "InternalServerException":
|
|
1052
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1053
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1054
|
-
case "ResourceNotFoundException":
|
|
1055
|
-
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1056
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1057
|
-
case "ThrottlingException":
|
|
1058
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1059
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1060
|
-
case "ValidationException":
|
|
1061
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1062
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1063
|
-
default:
|
|
1064
|
-
const parsedBody = parsedOutput.body;
|
|
1065
|
-
return throwDefaultError({
|
|
1066
|
-
output,
|
|
1067
|
-
parsedBody,
|
|
1068
|
-
errorCode,
|
|
1069
|
-
});
|
|
1070
|
-
}
|
|
1071
|
-
};
|
|
1072
723
|
export const de_DeleteDataSourceCommand = async (output, context) => {
|
|
1073
724
|
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
1074
|
-
return
|
|
725
|
+
return de_CommandError(output, context);
|
|
1075
726
|
}
|
|
1076
727
|
const contents = map({
|
|
1077
728
|
$metadata: deserializeMetadata(output),
|
|
@@ -1085,43 +736,9 @@ export const de_DeleteDataSourceCommand = async (output, context) => {
|
|
|
1085
736
|
Object.assign(contents, doc);
|
|
1086
737
|
return contents;
|
|
1087
738
|
};
|
|
1088
|
-
const de_DeleteDataSourceCommandError = async (output, context) => {
|
|
1089
|
-
const parsedOutput = {
|
|
1090
|
-
...output,
|
|
1091
|
-
body: await parseErrorBody(output.body, context),
|
|
1092
|
-
};
|
|
1093
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1094
|
-
switch (errorCode) {
|
|
1095
|
-
case "AccessDeniedException":
|
|
1096
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1097
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1098
|
-
case "ConflictException":
|
|
1099
|
-
case "com.amazonaws.bedrockagent#ConflictException":
|
|
1100
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1101
|
-
case "InternalServerException":
|
|
1102
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1103
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1104
|
-
case "ResourceNotFoundException":
|
|
1105
|
-
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1106
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1107
|
-
case "ThrottlingException":
|
|
1108
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1109
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1110
|
-
case "ValidationException":
|
|
1111
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1112
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1113
|
-
default:
|
|
1114
|
-
const parsedBody = parsedOutput.body;
|
|
1115
|
-
return throwDefaultError({
|
|
1116
|
-
output,
|
|
1117
|
-
parsedBody,
|
|
1118
|
-
errorCode,
|
|
1119
|
-
});
|
|
1120
|
-
}
|
|
1121
|
-
};
|
|
1122
739
|
export const de_DeleteKnowledgeBaseCommand = async (output, context) => {
|
|
1123
740
|
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
1124
|
-
return
|
|
741
|
+
return de_CommandError(output, context);
|
|
1125
742
|
}
|
|
1126
743
|
const contents = map({
|
|
1127
744
|
$metadata: deserializeMetadata(output),
|
|
@@ -1134,43 +751,9 @@ export const de_DeleteKnowledgeBaseCommand = async (output, context) => {
|
|
|
1134
751
|
Object.assign(contents, doc);
|
|
1135
752
|
return contents;
|
|
1136
753
|
};
|
|
1137
|
-
const de_DeleteKnowledgeBaseCommandError = async (output, context) => {
|
|
1138
|
-
const parsedOutput = {
|
|
1139
|
-
...output,
|
|
1140
|
-
body: await parseErrorBody(output.body, context),
|
|
1141
|
-
};
|
|
1142
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1143
|
-
switch (errorCode) {
|
|
1144
|
-
case "AccessDeniedException":
|
|
1145
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1146
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1147
|
-
case "ConflictException":
|
|
1148
|
-
case "com.amazonaws.bedrockagent#ConflictException":
|
|
1149
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1150
|
-
case "InternalServerException":
|
|
1151
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1152
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1153
|
-
case "ResourceNotFoundException":
|
|
1154
|
-
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1155
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1156
|
-
case "ThrottlingException":
|
|
1157
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1158
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1159
|
-
case "ValidationException":
|
|
1160
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1161
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1162
|
-
default:
|
|
1163
|
-
const parsedBody = parsedOutput.body;
|
|
1164
|
-
return throwDefaultError({
|
|
1165
|
-
output,
|
|
1166
|
-
parsedBody,
|
|
1167
|
-
errorCode,
|
|
1168
|
-
});
|
|
1169
|
-
}
|
|
1170
|
-
};
|
|
1171
754
|
export const de_DisassociateAgentKnowledgeBaseCommand = async (output, context) => {
|
|
1172
755
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1173
|
-
return
|
|
756
|
+
return de_CommandError(output, context);
|
|
1174
757
|
}
|
|
1175
758
|
const contents = map({
|
|
1176
759
|
$metadata: deserializeMetadata(output),
|
|
@@ -1178,43 +761,9 @@ export const de_DisassociateAgentKnowledgeBaseCommand = async (output, context)
|
|
|
1178
761
|
await collectBody(output.body, context);
|
|
1179
762
|
return contents;
|
|
1180
763
|
};
|
|
1181
|
-
const de_DisassociateAgentKnowledgeBaseCommandError = async (output, context) => {
|
|
1182
|
-
const parsedOutput = {
|
|
1183
|
-
...output,
|
|
1184
|
-
body: await parseErrorBody(output.body, context),
|
|
1185
|
-
};
|
|
1186
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1187
|
-
switch (errorCode) {
|
|
1188
|
-
case "AccessDeniedException":
|
|
1189
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1190
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1191
|
-
case "ConflictException":
|
|
1192
|
-
case "com.amazonaws.bedrockagent#ConflictException":
|
|
1193
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1194
|
-
case "InternalServerException":
|
|
1195
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1196
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1197
|
-
case "ResourceNotFoundException":
|
|
1198
|
-
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1199
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1200
|
-
case "ThrottlingException":
|
|
1201
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1202
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1203
|
-
case "ValidationException":
|
|
1204
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1205
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1206
|
-
default:
|
|
1207
|
-
const parsedBody = parsedOutput.body;
|
|
1208
|
-
return throwDefaultError({
|
|
1209
|
-
output,
|
|
1210
|
-
parsedBody,
|
|
1211
|
-
errorCode,
|
|
1212
|
-
});
|
|
1213
|
-
}
|
|
1214
|
-
};
|
|
1215
764
|
export const de_GetAgentCommand = async (output, context) => {
|
|
1216
765
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1217
|
-
return
|
|
766
|
+
return de_CommandError(output, context);
|
|
1218
767
|
}
|
|
1219
768
|
const contents = map({
|
|
1220
769
|
$metadata: deserializeMetadata(output),
|
|
@@ -1226,40 +775,9 @@ export const de_GetAgentCommand = async (output, context) => {
|
|
|
1226
775
|
Object.assign(contents, doc);
|
|
1227
776
|
return contents;
|
|
1228
777
|
};
|
|
1229
|
-
const de_GetAgentCommandError = async (output, context) => {
|
|
1230
|
-
const parsedOutput = {
|
|
1231
|
-
...output,
|
|
1232
|
-
body: await parseErrorBody(output.body, context),
|
|
1233
|
-
};
|
|
1234
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1235
|
-
switch (errorCode) {
|
|
1236
|
-
case "AccessDeniedException":
|
|
1237
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1238
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1239
|
-
case "InternalServerException":
|
|
1240
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1241
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1242
|
-
case "ResourceNotFoundException":
|
|
1243
|
-
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1244
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1245
|
-
case "ThrottlingException":
|
|
1246
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1247
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1248
|
-
case "ValidationException":
|
|
1249
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1250
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1251
|
-
default:
|
|
1252
|
-
const parsedBody = parsedOutput.body;
|
|
1253
|
-
return throwDefaultError({
|
|
1254
|
-
output,
|
|
1255
|
-
parsedBody,
|
|
1256
|
-
errorCode,
|
|
1257
|
-
});
|
|
1258
|
-
}
|
|
1259
|
-
};
|
|
1260
778
|
export const de_GetAgentActionGroupCommand = async (output, context) => {
|
|
1261
779
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1262
|
-
return
|
|
780
|
+
return de_CommandError(output, context);
|
|
1263
781
|
}
|
|
1264
782
|
const contents = map({
|
|
1265
783
|
$metadata: deserializeMetadata(output),
|
|
@@ -1271,40 +789,9 @@ export const de_GetAgentActionGroupCommand = async (output, context) => {
|
|
|
1271
789
|
Object.assign(contents, doc);
|
|
1272
790
|
return contents;
|
|
1273
791
|
};
|
|
1274
|
-
const de_GetAgentActionGroupCommandError = async (output, context) => {
|
|
1275
|
-
const parsedOutput = {
|
|
1276
|
-
...output,
|
|
1277
|
-
body: await parseErrorBody(output.body, context),
|
|
1278
|
-
};
|
|
1279
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1280
|
-
switch (errorCode) {
|
|
1281
|
-
case "AccessDeniedException":
|
|
1282
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1283
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1284
|
-
case "InternalServerException":
|
|
1285
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1286
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1287
|
-
case "ResourceNotFoundException":
|
|
1288
|
-
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1289
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1290
|
-
case "ThrottlingException":
|
|
1291
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1292
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1293
|
-
case "ValidationException":
|
|
1294
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1295
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1296
|
-
default:
|
|
1297
|
-
const parsedBody = parsedOutput.body;
|
|
1298
|
-
return throwDefaultError({
|
|
1299
|
-
output,
|
|
1300
|
-
parsedBody,
|
|
1301
|
-
errorCode,
|
|
1302
|
-
});
|
|
1303
|
-
}
|
|
1304
|
-
};
|
|
1305
792
|
export const de_GetAgentAliasCommand = async (output, context) => {
|
|
1306
793
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1307
|
-
return
|
|
794
|
+
return de_CommandError(output, context);
|
|
1308
795
|
}
|
|
1309
796
|
const contents = map({
|
|
1310
797
|
$metadata: deserializeMetadata(output),
|
|
@@ -1316,40 +803,9 @@ export const de_GetAgentAliasCommand = async (output, context) => {
|
|
|
1316
803
|
Object.assign(contents, doc);
|
|
1317
804
|
return contents;
|
|
1318
805
|
};
|
|
1319
|
-
const de_GetAgentAliasCommandError = async (output, context) => {
|
|
1320
|
-
const parsedOutput = {
|
|
1321
|
-
...output,
|
|
1322
|
-
body: await parseErrorBody(output.body, context),
|
|
1323
|
-
};
|
|
1324
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1325
|
-
switch (errorCode) {
|
|
1326
|
-
case "AccessDeniedException":
|
|
1327
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1328
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1329
|
-
case "InternalServerException":
|
|
1330
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1331
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1332
|
-
case "ResourceNotFoundException":
|
|
1333
|
-
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1334
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1335
|
-
case "ThrottlingException":
|
|
1336
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1337
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1338
|
-
case "ValidationException":
|
|
1339
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1340
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1341
|
-
default:
|
|
1342
|
-
const parsedBody = parsedOutput.body;
|
|
1343
|
-
return throwDefaultError({
|
|
1344
|
-
output,
|
|
1345
|
-
parsedBody,
|
|
1346
|
-
errorCode,
|
|
1347
|
-
});
|
|
1348
|
-
}
|
|
1349
|
-
};
|
|
1350
806
|
export const de_GetAgentKnowledgeBaseCommand = async (output, context) => {
|
|
1351
807
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1352
|
-
return
|
|
808
|
+
return de_CommandError(output, context);
|
|
1353
809
|
}
|
|
1354
810
|
const contents = map({
|
|
1355
811
|
$metadata: deserializeMetadata(output),
|
|
@@ -1361,40 +817,9 @@ export const de_GetAgentKnowledgeBaseCommand = async (output, context) => {
|
|
|
1361
817
|
Object.assign(contents, doc);
|
|
1362
818
|
return contents;
|
|
1363
819
|
};
|
|
1364
|
-
const de_GetAgentKnowledgeBaseCommandError = async (output, context) => {
|
|
1365
|
-
const parsedOutput = {
|
|
1366
|
-
...output,
|
|
1367
|
-
body: await parseErrorBody(output.body, context),
|
|
1368
|
-
};
|
|
1369
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1370
|
-
switch (errorCode) {
|
|
1371
|
-
case "AccessDeniedException":
|
|
1372
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1373
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1374
|
-
case "InternalServerException":
|
|
1375
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1376
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1377
|
-
case "ResourceNotFoundException":
|
|
1378
|
-
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1379
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1380
|
-
case "ThrottlingException":
|
|
1381
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1382
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1383
|
-
case "ValidationException":
|
|
1384
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1385
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1386
|
-
default:
|
|
1387
|
-
const parsedBody = parsedOutput.body;
|
|
1388
|
-
return throwDefaultError({
|
|
1389
|
-
output,
|
|
1390
|
-
parsedBody,
|
|
1391
|
-
errorCode,
|
|
1392
|
-
});
|
|
1393
|
-
}
|
|
1394
|
-
};
|
|
1395
820
|
export const de_GetAgentVersionCommand = async (output, context) => {
|
|
1396
821
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1397
|
-
return
|
|
822
|
+
return de_CommandError(output, context);
|
|
1398
823
|
}
|
|
1399
824
|
const contents = map({
|
|
1400
825
|
$metadata: deserializeMetadata(output),
|
|
@@ -1406,40 +831,9 @@ export const de_GetAgentVersionCommand = async (output, context) => {
|
|
|
1406
831
|
Object.assign(contents, doc);
|
|
1407
832
|
return contents;
|
|
1408
833
|
};
|
|
1409
|
-
const de_GetAgentVersionCommandError = async (output, context) => {
|
|
1410
|
-
const parsedOutput = {
|
|
1411
|
-
...output,
|
|
1412
|
-
body: await parseErrorBody(output.body, context),
|
|
1413
|
-
};
|
|
1414
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1415
|
-
switch (errorCode) {
|
|
1416
|
-
case "AccessDeniedException":
|
|
1417
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1418
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1419
|
-
case "InternalServerException":
|
|
1420
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1421
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1422
|
-
case "ResourceNotFoundException":
|
|
1423
|
-
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1424
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1425
|
-
case "ThrottlingException":
|
|
1426
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1427
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1428
|
-
case "ValidationException":
|
|
1429
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1430
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1431
|
-
default:
|
|
1432
|
-
const parsedBody = parsedOutput.body;
|
|
1433
|
-
return throwDefaultError({
|
|
1434
|
-
output,
|
|
1435
|
-
parsedBody,
|
|
1436
|
-
errorCode,
|
|
1437
|
-
});
|
|
1438
|
-
}
|
|
1439
|
-
};
|
|
1440
834
|
export const de_GetDataSourceCommand = async (output, context) => {
|
|
1441
835
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1442
|
-
return
|
|
836
|
+
return de_CommandError(output, context);
|
|
1443
837
|
}
|
|
1444
838
|
const contents = map({
|
|
1445
839
|
$metadata: deserializeMetadata(output),
|
|
@@ -1451,40 +845,9 @@ export const de_GetDataSourceCommand = async (output, context) => {
|
|
|
1451
845
|
Object.assign(contents, doc);
|
|
1452
846
|
return contents;
|
|
1453
847
|
};
|
|
1454
|
-
const de_GetDataSourceCommandError = async (output, context) => {
|
|
1455
|
-
const parsedOutput = {
|
|
1456
|
-
...output,
|
|
1457
|
-
body: await parseErrorBody(output.body, context),
|
|
1458
|
-
};
|
|
1459
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1460
|
-
switch (errorCode) {
|
|
1461
|
-
case "AccessDeniedException":
|
|
1462
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1463
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1464
|
-
case "InternalServerException":
|
|
1465
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1466
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1467
|
-
case "ResourceNotFoundException":
|
|
1468
|
-
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1469
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1470
|
-
case "ThrottlingException":
|
|
1471
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1472
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1473
|
-
case "ValidationException":
|
|
1474
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1475
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1476
|
-
default:
|
|
1477
|
-
const parsedBody = parsedOutput.body;
|
|
1478
|
-
return throwDefaultError({
|
|
1479
|
-
output,
|
|
1480
|
-
parsedBody,
|
|
1481
|
-
errorCode,
|
|
1482
|
-
});
|
|
1483
|
-
}
|
|
1484
|
-
};
|
|
1485
848
|
export const de_GetIngestionJobCommand = async (output, context) => {
|
|
1486
849
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1487
|
-
return
|
|
850
|
+
return de_CommandError(output, context);
|
|
1488
851
|
}
|
|
1489
852
|
const contents = map({
|
|
1490
853
|
$metadata: deserializeMetadata(output),
|
|
@@ -1496,40 +859,9 @@ export const de_GetIngestionJobCommand = async (output, context) => {
|
|
|
1496
859
|
Object.assign(contents, doc);
|
|
1497
860
|
return contents;
|
|
1498
861
|
};
|
|
1499
|
-
const de_GetIngestionJobCommandError = async (output, context) => {
|
|
1500
|
-
const parsedOutput = {
|
|
1501
|
-
...output,
|
|
1502
|
-
body: await parseErrorBody(output.body, context),
|
|
1503
|
-
};
|
|
1504
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1505
|
-
switch (errorCode) {
|
|
1506
|
-
case "AccessDeniedException":
|
|
1507
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1508
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1509
|
-
case "InternalServerException":
|
|
1510
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1511
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1512
|
-
case "ResourceNotFoundException":
|
|
1513
|
-
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1514
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1515
|
-
case "ThrottlingException":
|
|
1516
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1517
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1518
|
-
case "ValidationException":
|
|
1519
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1520
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1521
|
-
default:
|
|
1522
|
-
const parsedBody = parsedOutput.body;
|
|
1523
|
-
return throwDefaultError({
|
|
1524
|
-
output,
|
|
1525
|
-
parsedBody,
|
|
1526
|
-
errorCode,
|
|
1527
|
-
});
|
|
1528
|
-
}
|
|
1529
|
-
};
|
|
1530
862
|
export const de_GetKnowledgeBaseCommand = async (output, context) => {
|
|
1531
863
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1532
|
-
return
|
|
864
|
+
return de_CommandError(output, context);
|
|
1533
865
|
}
|
|
1534
866
|
const contents = map({
|
|
1535
867
|
$metadata: deserializeMetadata(output),
|
|
@@ -1541,40 +873,9 @@ export const de_GetKnowledgeBaseCommand = async (output, context) => {
|
|
|
1541
873
|
Object.assign(contents, doc);
|
|
1542
874
|
return contents;
|
|
1543
875
|
};
|
|
1544
|
-
const de_GetKnowledgeBaseCommandError = async (output, context) => {
|
|
1545
|
-
const parsedOutput = {
|
|
1546
|
-
...output,
|
|
1547
|
-
body: await parseErrorBody(output.body, context),
|
|
1548
|
-
};
|
|
1549
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1550
|
-
switch (errorCode) {
|
|
1551
|
-
case "AccessDeniedException":
|
|
1552
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1553
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1554
|
-
case "InternalServerException":
|
|
1555
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1556
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1557
|
-
case "ResourceNotFoundException":
|
|
1558
|
-
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1559
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1560
|
-
case "ThrottlingException":
|
|
1561
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1562
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1563
|
-
case "ValidationException":
|
|
1564
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1565
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1566
|
-
default:
|
|
1567
|
-
const parsedBody = parsedOutput.body;
|
|
1568
|
-
return throwDefaultError({
|
|
1569
|
-
output,
|
|
1570
|
-
parsedBody,
|
|
1571
|
-
errorCode,
|
|
1572
|
-
});
|
|
1573
|
-
}
|
|
1574
|
-
};
|
|
1575
876
|
export const de_ListAgentActionGroupsCommand = async (output, context) => {
|
|
1576
877
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1577
|
-
return
|
|
878
|
+
return de_CommandError(output, context);
|
|
1578
879
|
}
|
|
1579
880
|
const contents = map({
|
|
1580
881
|
$metadata: deserializeMetadata(output),
|
|
@@ -1587,40 +888,9 @@ export const de_ListAgentActionGroupsCommand = async (output, context) => {
|
|
|
1587
888
|
Object.assign(contents, doc);
|
|
1588
889
|
return contents;
|
|
1589
890
|
};
|
|
1590
|
-
const de_ListAgentActionGroupsCommandError = async (output, context) => {
|
|
1591
|
-
const parsedOutput = {
|
|
1592
|
-
...output,
|
|
1593
|
-
body: await parseErrorBody(output.body, context),
|
|
1594
|
-
};
|
|
1595
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1596
|
-
switch (errorCode) {
|
|
1597
|
-
case "AccessDeniedException":
|
|
1598
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1599
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1600
|
-
case "InternalServerException":
|
|
1601
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1602
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1603
|
-
case "ResourceNotFoundException":
|
|
1604
|
-
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1605
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1606
|
-
case "ThrottlingException":
|
|
1607
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1608
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1609
|
-
case "ValidationException":
|
|
1610
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1611
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1612
|
-
default:
|
|
1613
|
-
const parsedBody = parsedOutput.body;
|
|
1614
|
-
return throwDefaultError({
|
|
1615
|
-
output,
|
|
1616
|
-
parsedBody,
|
|
1617
|
-
errorCode,
|
|
1618
|
-
});
|
|
1619
|
-
}
|
|
1620
|
-
};
|
|
1621
891
|
export const de_ListAgentAliasesCommand = async (output, context) => {
|
|
1622
892
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1623
|
-
return
|
|
893
|
+
return de_CommandError(output, context);
|
|
1624
894
|
}
|
|
1625
895
|
const contents = map({
|
|
1626
896
|
$metadata: deserializeMetadata(output),
|
|
@@ -1633,40 +903,9 @@ export const de_ListAgentAliasesCommand = async (output, context) => {
|
|
|
1633
903
|
Object.assign(contents, doc);
|
|
1634
904
|
return contents;
|
|
1635
905
|
};
|
|
1636
|
-
const de_ListAgentAliasesCommandError = async (output, context) => {
|
|
1637
|
-
const parsedOutput = {
|
|
1638
|
-
...output,
|
|
1639
|
-
body: await parseErrorBody(output.body, context),
|
|
1640
|
-
};
|
|
1641
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1642
|
-
switch (errorCode) {
|
|
1643
|
-
case "AccessDeniedException":
|
|
1644
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1645
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1646
|
-
case "InternalServerException":
|
|
1647
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1648
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1649
|
-
case "ResourceNotFoundException":
|
|
1650
|
-
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1651
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1652
|
-
case "ThrottlingException":
|
|
1653
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1654
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1655
|
-
case "ValidationException":
|
|
1656
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1657
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1658
|
-
default:
|
|
1659
|
-
const parsedBody = parsedOutput.body;
|
|
1660
|
-
return throwDefaultError({
|
|
1661
|
-
output,
|
|
1662
|
-
parsedBody,
|
|
1663
|
-
errorCode,
|
|
1664
|
-
});
|
|
1665
|
-
}
|
|
1666
|
-
};
|
|
1667
906
|
export const de_ListAgentKnowledgeBasesCommand = async (output, context) => {
|
|
1668
907
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1669
|
-
return
|
|
908
|
+
return de_CommandError(output, context);
|
|
1670
909
|
}
|
|
1671
910
|
const contents = map({
|
|
1672
911
|
$metadata: deserializeMetadata(output),
|
|
@@ -1679,40 +918,9 @@ export const de_ListAgentKnowledgeBasesCommand = async (output, context) => {
|
|
|
1679
918
|
Object.assign(contents, doc);
|
|
1680
919
|
return contents;
|
|
1681
920
|
};
|
|
1682
|
-
const de_ListAgentKnowledgeBasesCommandError = async (output, context) => {
|
|
1683
|
-
const parsedOutput = {
|
|
1684
|
-
...output,
|
|
1685
|
-
body: await parseErrorBody(output.body, context),
|
|
1686
|
-
};
|
|
1687
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1688
|
-
switch (errorCode) {
|
|
1689
|
-
case "AccessDeniedException":
|
|
1690
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1691
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1692
|
-
case "InternalServerException":
|
|
1693
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1694
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1695
|
-
case "ResourceNotFoundException":
|
|
1696
|
-
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1697
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1698
|
-
case "ThrottlingException":
|
|
1699
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1700
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1701
|
-
case "ValidationException":
|
|
1702
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1703
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1704
|
-
default:
|
|
1705
|
-
const parsedBody = parsedOutput.body;
|
|
1706
|
-
return throwDefaultError({
|
|
1707
|
-
output,
|
|
1708
|
-
parsedBody,
|
|
1709
|
-
errorCode,
|
|
1710
|
-
});
|
|
1711
|
-
}
|
|
1712
|
-
};
|
|
1713
921
|
export const de_ListAgentsCommand = async (output, context) => {
|
|
1714
922
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1715
|
-
return
|
|
923
|
+
return de_CommandError(output, context);
|
|
1716
924
|
}
|
|
1717
925
|
const contents = map({
|
|
1718
926
|
$metadata: deserializeMetadata(output),
|
|
@@ -1725,37 +933,9 @@ export const de_ListAgentsCommand = async (output, context) => {
|
|
|
1725
933
|
Object.assign(contents, doc);
|
|
1726
934
|
return contents;
|
|
1727
935
|
};
|
|
1728
|
-
const de_ListAgentsCommandError = async (output, context) => {
|
|
1729
|
-
const parsedOutput = {
|
|
1730
|
-
...output,
|
|
1731
|
-
body: await parseErrorBody(output.body, context),
|
|
1732
|
-
};
|
|
1733
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1734
|
-
switch (errorCode) {
|
|
1735
|
-
case "AccessDeniedException":
|
|
1736
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1737
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1738
|
-
case "InternalServerException":
|
|
1739
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1740
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1741
|
-
case "ThrottlingException":
|
|
1742
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1743
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1744
|
-
case "ValidationException":
|
|
1745
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1746
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1747
|
-
default:
|
|
1748
|
-
const parsedBody = parsedOutput.body;
|
|
1749
|
-
return throwDefaultError({
|
|
1750
|
-
output,
|
|
1751
|
-
parsedBody,
|
|
1752
|
-
errorCode,
|
|
1753
|
-
});
|
|
1754
|
-
}
|
|
1755
|
-
};
|
|
1756
936
|
export const de_ListAgentVersionsCommand = async (output, context) => {
|
|
1757
937
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1758
|
-
return
|
|
938
|
+
return de_CommandError(output, context);
|
|
1759
939
|
}
|
|
1760
940
|
const contents = map({
|
|
1761
941
|
$metadata: deserializeMetadata(output),
|
|
@@ -1768,40 +948,9 @@ export const de_ListAgentVersionsCommand = async (output, context) => {
|
|
|
1768
948
|
Object.assign(contents, doc);
|
|
1769
949
|
return contents;
|
|
1770
950
|
};
|
|
1771
|
-
const de_ListAgentVersionsCommandError = async (output, context) => {
|
|
1772
|
-
const parsedOutput = {
|
|
1773
|
-
...output,
|
|
1774
|
-
body: await parseErrorBody(output.body, context),
|
|
1775
|
-
};
|
|
1776
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1777
|
-
switch (errorCode) {
|
|
1778
|
-
case "AccessDeniedException":
|
|
1779
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1780
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1781
|
-
case "InternalServerException":
|
|
1782
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1783
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1784
|
-
case "ResourceNotFoundException":
|
|
1785
|
-
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1786
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1787
|
-
case "ThrottlingException":
|
|
1788
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1789
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1790
|
-
case "ValidationException":
|
|
1791
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1792
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1793
|
-
default:
|
|
1794
|
-
const parsedBody = parsedOutput.body;
|
|
1795
|
-
return throwDefaultError({
|
|
1796
|
-
output,
|
|
1797
|
-
parsedBody,
|
|
1798
|
-
errorCode,
|
|
1799
|
-
});
|
|
1800
|
-
}
|
|
1801
|
-
};
|
|
1802
951
|
export const de_ListDataSourcesCommand = async (output, context) => {
|
|
1803
952
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1804
|
-
return
|
|
953
|
+
return de_CommandError(output, context);
|
|
1805
954
|
}
|
|
1806
955
|
const contents = map({
|
|
1807
956
|
$metadata: deserializeMetadata(output),
|
|
@@ -1814,40 +963,9 @@ export const de_ListDataSourcesCommand = async (output, context) => {
|
|
|
1814
963
|
Object.assign(contents, doc);
|
|
1815
964
|
return contents;
|
|
1816
965
|
};
|
|
1817
|
-
const de_ListDataSourcesCommandError = async (output, context) => {
|
|
1818
|
-
const parsedOutput = {
|
|
1819
|
-
...output,
|
|
1820
|
-
body: await parseErrorBody(output.body, context),
|
|
1821
|
-
};
|
|
1822
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1823
|
-
switch (errorCode) {
|
|
1824
|
-
case "AccessDeniedException":
|
|
1825
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1826
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1827
|
-
case "InternalServerException":
|
|
1828
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1829
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1830
|
-
case "ResourceNotFoundException":
|
|
1831
|
-
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1832
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1833
|
-
case "ThrottlingException":
|
|
1834
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1835
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1836
|
-
case "ValidationException":
|
|
1837
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1838
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1839
|
-
default:
|
|
1840
|
-
const parsedBody = parsedOutput.body;
|
|
1841
|
-
return throwDefaultError({
|
|
1842
|
-
output,
|
|
1843
|
-
parsedBody,
|
|
1844
|
-
errorCode,
|
|
1845
|
-
});
|
|
1846
|
-
}
|
|
1847
|
-
};
|
|
1848
966
|
export const de_ListIngestionJobsCommand = async (output, context) => {
|
|
1849
967
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1850
|
-
return
|
|
968
|
+
return de_CommandError(output, context);
|
|
1851
969
|
}
|
|
1852
970
|
const contents = map({
|
|
1853
971
|
$metadata: deserializeMetadata(output),
|
|
@@ -1860,40 +978,9 @@ export const de_ListIngestionJobsCommand = async (output, context) => {
|
|
|
1860
978
|
Object.assign(contents, doc);
|
|
1861
979
|
return contents;
|
|
1862
980
|
};
|
|
1863
|
-
const de_ListIngestionJobsCommandError = async (output, context) => {
|
|
1864
|
-
const parsedOutput = {
|
|
1865
|
-
...output,
|
|
1866
|
-
body: await parseErrorBody(output.body, context),
|
|
1867
|
-
};
|
|
1868
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1869
|
-
switch (errorCode) {
|
|
1870
|
-
case "AccessDeniedException":
|
|
1871
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1872
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1873
|
-
case "InternalServerException":
|
|
1874
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1875
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1876
|
-
case "ResourceNotFoundException":
|
|
1877
|
-
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1878
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1879
|
-
case "ThrottlingException":
|
|
1880
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1881
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1882
|
-
case "ValidationException":
|
|
1883
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1884
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1885
|
-
default:
|
|
1886
|
-
const parsedBody = parsedOutput.body;
|
|
1887
|
-
return throwDefaultError({
|
|
1888
|
-
output,
|
|
1889
|
-
parsedBody,
|
|
1890
|
-
errorCode,
|
|
1891
|
-
});
|
|
1892
|
-
}
|
|
1893
|
-
};
|
|
1894
981
|
export const de_ListKnowledgeBasesCommand = async (output, context) => {
|
|
1895
982
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1896
|
-
return
|
|
983
|
+
return de_CommandError(output, context);
|
|
1897
984
|
}
|
|
1898
985
|
const contents = map({
|
|
1899
986
|
$metadata: deserializeMetadata(output),
|
|
@@ -1906,37 +993,9 @@ export const de_ListKnowledgeBasesCommand = async (output, context) => {
|
|
|
1906
993
|
Object.assign(contents, doc);
|
|
1907
994
|
return contents;
|
|
1908
995
|
};
|
|
1909
|
-
const de_ListKnowledgeBasesCommandError = async (output, context) => {
|
|
1910
|
-
const parsedOutput = {
|
|
1911
|
-
...output,
|
|
1912
|
-
body: await parseErrorBody(output.body, context),
|
|
1913
|
-
};
|
|
1914
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1915
|
-
switch (errorCode) {
|
|
1916
|
-
case "AccessDeniedException":
|
|
1917
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1918
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1919
|
-
case "InternalServerException":
|
|
1920
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1921
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1922
|
-
case "ThrottlingException":
|
|
1923
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1924
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1925
|
-
case "ValidationException":
|
|
1926
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1927
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1928
|
-
default:
|
|
1929
|
-
const parsedBody = parsedOutput.body;
|
|
1930
|
-
return throwDefaultError({
|
|
1931
|
-
output,
|
|
1932
|
-
parsedBody,
|
|
1933
|
-
errorCode,
|
|
1934
|
-
});
|
|
1935
|
-
}
|
|
1936
|
-
};
|
|
1937
996
|
export const de_ListTagsForResourceCommand = async (output, context) => {
|
|
1938
997
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1939
|
-
return
|
|
998
|
+
return de_CommandError(output, context);
|
|
1940
999
|
}
|
|
1941
1000
|
const contents = map({
|
|
1942
1001
|
$metadata: deserializeMetadata(output),
|
|
@@ -1948,40 +1007,9 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
|
|
|
1948
1007
|
Object.assign(contents, doc);
|
|
1949
1008
|
return contents;
|
|
1950
1009
|
};
|
|
1951
|
-
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
1952
|
-
const parsedOutput = {
|
|
1953
|
-
...output,
|
|
1954
|
-
body: await parseErrorBody(output.body, context),
|
|
1955
|
-
};
|
|
1956
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1957
|
-
switch (errorCode) {
|
|
1958
|
-
case "AccessDeniedException":
|
|
1959
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
1960
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1961
|
-
case "InternalServerException":
|
|
1962
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
1963
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1964
|
-
case "ResourceNotFoundException":
|
|
1965
|
-
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
1966
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1967
|
-
case "ThrottlingException":
|
|
1968
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
1969
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1970
|
-
case "ValidationException":
|
|
1971
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
1972
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1973
|
-
default:
|
|
1974
|
-
const parsedBody = parsedOutput.body;
|
|
1975
|
-
return throwDefaultError({
|
|
1976
|
-
output,
|
|
1977
|
-
parsedBody,
|
|
1978
|
-
errorCode,
|
|
1979
|
-
});
|
|
1980
|
-
}
|
|
1981
|
-
};
|
|
1982
1010
|
export const de_PrepareAgentCommand = async (output, context) => {
|
|
1983
1011
|
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
1984
|
-
return
|
|
1012
|
+
return de_CommandError(output, context);
|
|
1985
1013
|
}
|
|
1986
1014
|
const contents = map({
|
|
1987
1015
|
$metadata: deserializeMetadata(output),
|
|
@@ -1991,102 +1019,28 @@ export const de_PrepareAgentCommand = async (output, context) => {
|
|
|
1991
1019
|
agentId: __expectString,
|
|
1992
1020
|
agentStatus: __expectString,
|
|
1993
1021
|
agentVersion: __expectString,
|
|
1994
|
-
preparedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
1995
|
-
});
|
|
1996
|
-
Object.assign(contents, doc);
|
|
1997
|
-
return contents;
|
|
1998
|
-
};
|
|
1999
|
-
const
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
body: await parseErrorBody(output.body, context),
|
|
2003
|
-
};
|
|
2004
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2005
|
-
switch (errorCode) {
|
|
2006
|
-
case "AccessDeniedException":
|
|
2007
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
2008
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2009
|
-
case "ConflictException":
|
|
2010
|
-
case "com.amazonaws.bedrockagent#ConflictException":
|
|
2011
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
2012
|
-
case "InternalServerException":
|
|
2013
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
2014
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
2015
|
-
case "ResourceNotFoundException":
|
|
2016
|
-
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
2017
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2018
|
-
case "ServiceQuotaExceededException":
|
|
2019
|
-
case "com.amazonaws.bedrockagent#ServiceQuotaExceededException":
|
|
2020
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
2021
|
-
case "ThrottlingException":
|
|
2022
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
2023
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
2024
|
-
case "ValidationException":
|
|
2025
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
2026
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2027
|
-
default:
|
|
2028
|
-
const parsedBody = parsedOutput.body;
|
|
2029
|
-
return throwDefaultError({
|
|
2030
|
-
output,
|
|
2031
|
-
parsedBody,
|
|
2032
|
-
errorCode,
|
|
2033
|
-
});
|
|
2034
|
-
}
|
|
2035
|
-
};
|
|
2036
|
-
export const de_StartIngestionJobCommand = async (output, context) => {
|
|
2037
|
-
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
2038
|
-
return de_StartIngestionJobCommandError(output, context);
|
|
2039
|
-
}
|
|
2040
|
-
const contents = map({
|
|
2041
|
-
$metadata: deserializeMetadata(output),
|
|
2042
|
-
});
|
|
2043
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2044
|
-
const doc = take(data, {
|
|
2045
|
-
ingestionJob: (_) => de_IngestionJob(_, context),
|
|
2046
|
-
});
|
|
2047
|
-
Object.assign(contents, doc);
|
|
2048
|
-
return contents;
|
|
2049
|
-
};
|
|
2050
|
-
const de_StartIngestionJobCommandError = async (output, context) => {
|
|
2051
|
-
const parsedOutput = {
|
|
2052
|
-
...output,
|
|
2053
|
-
body: await parseErrorBody(output.body, context),
|
|
2054
|
-
};
|
|
2055
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2056
|
-
switch (errorCode) {
|
|
2057
|
-
case "AccessDeniedException":
|
|
2058
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
2059
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2060
|
-
case "ConflictException":
|
|
2061
|
-
case "com.amazonaws.bedrockagent#ConflictException":
|
|
2062
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
2063
|
-
case "InternalServerException":
|
|
2064
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
2065
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
2066
|
-
case "ResourceNotFoundException":
|
|
2067
|
-
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
2068
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2069
|
-
case "ServiceQuotaExceededException":
|
|
2070
|
-
case "com.amazonaws.bedrockagent#ServiceQuotaExceededException":
|
|
2071
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
2072
|
-
case "ThrottlingException":
|
|
2073
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
2074
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
2075
|
-
case "ValidationException":
|
|
2076
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
2077
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2078
|
-
default:
|
|
2079
|
-
const parsedBody = parsedOutput.body;
|
|
2080
|
-
return throwDefaultError({
|
|
2081
|
-
output,
|
|
2082
|
-
parsedBody,
|
|
2083
|
-
errorCode,
|
|
2084
|
-
});
|
|
1022
|
+
preparedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
1023
|
+
});
|
|
1024
|
+
Object.assign(contents, doc);
|
|
1025
|
+
return contents;
|
|
1026
|
+
};
|
|
1027
|
+
export const de_StartIngestionJobCommand = async (output, context) => {
|
|
1028
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
1029
|
+
return de_CommandError(output, context);
|
|
2085
1030
|
}
|
|
1031
|
+
const contents = map({
|
|
1032
|
+
$metadata: deserializeMetadata(output),
|
|
1033
|
+
});
|
|
1034
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1035
|
+
const doc = take(data, {
|
|
1036
|
+
ingestionJob: (_) => de_IngestionJob(_, context),
|
|
1037
|
+
});
|
|
1038
|
+
Object.assign(contents, doc);
|
|
1039
|
+
return contents;
|
|
2086
1040
|
};
|
|
2087
1041
|
export const de_TagResourceCommand = async (output, context) => {
|
|
2088
1042
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2089
|
-
return
|
|
1043
|
+
return de_CommandError(output, context);
|
|
2090
1044
|
}
|
|
2091
1045
|
const contents = map({
|
|
2092
1046
|
$metadata: deserializeMetadata(output),
|
|
@@ -2094,43 +1048,9 @@ export const de_TagResourceCommand = async (output, context) => {
|
|
|
2094
1048
|
await collectBody(output.body, context);
|
|
2095
1049
|
return contents;
|
|
2096
1050
|
};
|
|
2097
|
-
const de_TagResourceCommandError = async (output, context) => {
|
|
2098
|
-
const parsedOutput = {
|
|
2099
|
-
...output,
|
|
2100
|
-
body: await parseErrorBody(output.body, context),
|
|
2101
|
-
};
|
|
2102
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2103
|
-
switch (errorCode) {
|
|
2104
|
-
case "AccessDeniedException":
|
|
2105
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
2106
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2107
|
-
case "InternalServerException":
|
|
2108
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
2109
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
2110
|
-
case "ResourceNotFoundException":
|
|
2111
|
-
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
2112
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2113
|
-
case "ServiceQuotaExceededException":
|
|
2114
|
-
case "com.amazonaws.bedrockagent#ServiceQuotaExceededException":
|
|
2115
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
2116
|
-
case "ThrottlingException":
|
|
2117
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
2118
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
2119
|
-
case "ValidationException":
|
|
2120
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
2121
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2122
|
-
default:
|
|
2123
|
-
const parsedBody = parsedOutput.body;
|
|
2124
|
-
return throwDefaultError({
|
|
2125
|
-
output,
|
|
2126
|
-
parsedBody,
|
|
2127
|
-
errorCode,
|
|
2128
|
-
});
|
|
2129
|
-
}
|
|
2130
|
-
};
|
|
2131
1051
|
export const de_UntagResourceCommand = async (output, context) => {
|
|
2132
1052
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2133
|
-
return
|
|
1053
|
+
return de_CommandError(output, context);
|
|
2134
1054
|
}
|
|
2135
1055
|
const contents = map({
|
|
2136
1056
|
$metadata: deserializeMetadata(output),
|
|
@@ -2138,40 +1058,9 @@ export const de_UntagResourceCommand = async (output, context) => {
|
|
|
2138
1058
|
await collectBody(output.body, context);
|
|
2139
1059
|
return contents;
|
|
2140
1060
|
};
|
|
2141
|
-
const de_UntagResourceCommandError = async (output, context) => {
|
|
2142
|
-
const parsedOutput = {
|
|
2143
|
-
...output,
|
|
2144
|
-
body: await parseErrorBody(output.body, context),
|
|
2145
|
-
};
|
|
2146
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2147
|
-
switch (errorCode) {
|
|
2148
|
-
case "AccessDeniedException":
|
|
2149
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
2150
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2151
|
-
case "InternalServerException":
|
|
2152
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
2153
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
2154
|
-
case "ResourceNotFoundException":
|
|
2155
|
-
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
2156
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2157
|
-
case "ThrottlingException":
|
|
2158
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
2159
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
2160
|
-
case "ValidationException":
|
|
2161
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
2162
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2163
|
-
default:
|
|
2164
|
-
const parsedBody = parsedOutput.body;
|
|
2165
|
-
return throwDefaultError({
|
|
2166
|
-
output,
|
|
2167
|
-
parsedBody,
|
|
2168
|
-
errorCode,
|
|
2169
|
-
});
|
|
2170
|
-
}
|
|
2171
|
-
};
|
|
2172
1061
|
export const de_UpdateAgentCommand = async (output, context) => {
|
|
2173
1062
|
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
2174
|
-
return
|
|
1063
|
+
return de_CommandError(output, context);
|
|
2175
1064
|
}
|
|
2176
1065
|
const contents = map({
|
|
2177
1066
|
$metadata: deserializeMetadata(output),
|
|
@@ -2183,46 +1072,9 @@ export const de_UpdateAgentCommand = async (output, context) => {
|
|
|
2183
1072
|
Object.assign(contents, doc);
|
|
2184
1073
|
return contents;
|
|
2185
1074
|
};
|
|
2186
|
-
const de_UpdateAgentCommandError = async (output, context) => {
|
|
2187
|
-
const parsedOutput = {
|
|
2188
|
-
...output,
|
|
2189
|
-
body: await parseErrorBody(output.body, context),
|
|
2190
|
-
};
|
|
2191
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2192
|
-
switch (errorCode) {
|
|
2193
|
-
case "AccessDeniedException":
|
|
2194
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
2195
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2196
|
-
case "ConflictException":
|
|
2197
|
-
case "com.amazonaws.bedrockagent#ConflictException":
|
|
2198
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
2199
|
-
case "InternalServerException":
|
|
2200
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
2201
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
2202
|
-
case "ResourceNotFoundException":
|
|
2203
|
-
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
2204
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2205
|
-
case "ServiceQuotaExceededException":
|
|
2206
|
-
case "com.amazonaws.bedrockagent#ServiceQuotaExceededException":
|
|
2207
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
2208
|
-
case "ThrottlingException":
|
|
2209
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
2210
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
2211
|
-
case "ValidationException":
|
|
2212
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
2213
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2214
|
-
default:
|
|
2215
|
-
const parsedBody = parsedOutput.body;
|
|
2216
|
-
return throwDefaultError({
|
|
2217
|
-
output,
|
|
2218
|
-
parsedBody,
|
|
2219
|
-
errorCode,
|
|
2220
|
-
});
|
|
2221
|
-
}
|
|
2222
|
-
};
|
|
2223
1075
|
export const de_UpdateAgentActionGroupCommand = async (output, context) => {
|
|
2224
1076
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2225
|
-
return
|
|
1077
|
+
return de_CommandError(output, context);
|
|
2226
1078
|
}
|
|
2227
1079
|
const contents = map({
|
|
2228
1080
|
$metadata: deserializeMetadata(output),
|
|
@@ -2234,46 +1086,9 @@ export const de_UpdateAgentActionGroupCommand = async (output, context) => {
|
|
|
2234
1086
|
Object.assign(contents, doc);
|
|
2235
1087
|
return contents;
|
|
2236
1088
|
};
|
|
2237
|
-
const de_UpdateAgentActionGroupCommandError = async (output, context) => {
|
|
2238
|
-
const parsedOutput = {
|
|
2239
|
-
...output,
|
|
2240
|
-
body: await parseErrorBody(output.body, context),
|
|
2241
|
-
};
|
|
2242
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2243
|
-
switch (errorCode) {
|
|
2244
|
-
case "AccessDeniedException":
|
|
2245
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
2246
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2247
|
-
case "ConflictException":
|
|
2248
|
-
case "com.amazonaws.bedrockagent#ConflictException":
|
|
2249
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
2250
|
-
case "InternalServerException":
|
|
2251
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
2252
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
2253
|
-
case "ResourceNotFoundException":
|
|
2254
|
-
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
2255
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2256
|
-
case "ServiceQuotaExceededException":
|
|
2257
|
-
case "com.amazonaws.bedrockagent#ServiceQuotaExceededException":
|
|
2258
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
2259
|
-
case "ThrottlingException":
|
|
2260
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
2261
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
2262
|
-
case "ValidationException":
|
|
2263
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
2264
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2265
|
-
default:
|
|
2266
|
-
const parsedBody = parsedOutput.body;
|
|
2267
|
-
return throwDefaultError({
|
|
2268
|
-
output,
|
|
2269
|
-
parsedBody,
|
|
2270
|
-
errorCode,
|
|
2271
|
-
});
|
|
2272
|
-
}
|
|
2273
|
-
};
|
|
2274
1089
|
export const de_UpdateAgentAliasCommand = async (output, context) => {
|
|
2275
1090
|
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
2276
|
-
return
|
|
1091
|
+
return de_CommandError(output, context);
|
|
2277
1092
|
}
|
|
2278
1093
|
const contents = map({
|
|
2279
1094
|
$metadata: deserializeMetadata(output),
|
|
@@ -2285,46 +1100,9 @@ export const de_UpdateAgentAliasCommand = async (output, context) => {
|
|
|
2285
1100
|
Object.assign(contents, doc);
|
|
2286
1101
|
return contents;
|
|
2287
1102
|
};
|
|
2288
|
-
const de_UpdateAgentAliasCommandError = async (output, context) => {
|
|
2289
|
-
const parsedOutput = {
|
|
2290
|
-
...output,
|
|
2291
|
-
body: await parseErrorBody(output.body, context),
|
|
2292
|
-
};
|
|
2293
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2294
|
-
switch (errorCode) {
|
|
2295
|
-
case "AccessDeniedException":
|
|
2296
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
2297
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2298
|
-
case "ConflictException":
|
|
2299
|
-
case "com.amazonaws.bedrockagent#ConflictException":
|
|
2300
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
2301
|
-
case "InternalServerException":
|
|
2302
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
2303
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
2304
|
-
case "ResourceNotFoundException":
|
|
2305
|
-
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
2306
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2307
|
-
case "ServiceQuotaExceededException":
|
|
2308
|
-
case "com.amazonaws.bedrockagent#ServiceQuotaExceededException":
|
|
2309
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
2310
|
-
case "ThrottlingException":
|
|
2311
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
2312
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
2313
|
-
case "ValidationException":
|
|
2314
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
2315
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2316
|
-
default:
|
|
2317
|
-
const parsedBody = parsedOutput.body;
|
|
2318
|
-
return throwDefaultError({
|
|
2319
|
-
output,
|
|
2320
|
-
parsedBody,
|
|
2321
|
-
errorCode,
|
|
2322
|
-
});
|
|
2323
|
-
}
|
|
2324
|
-
};
|
|
2325
1103
|
export const de_UpdateAgentKnowledgeBaseCommand = async (output, context) => {
|
|
2326
1104
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2327
|
-
return
|
|
1105
|
+
return de_CommandError(output, context);
|
|
2328
1106
|
}
|
|
2329
1107
|
const contents = map({
|
|
2330
1108
|
$metadata: deserializeMetadata(output),
|
|
@@ -2336,43 +1114,9 @@ export const de_UpdateAgentKnowledgeBaseCommand = async (output, context) => {
|
|
|
2336
1114
|
Object.assign(contents, doc);
|
|
2337
1115
|
return contents;
|
|
2338
1116
|
};
|
|
2339
|
-
const de_UpdateAgentKnowledgeBaseCommandError = async (output, context) => {
|
|
2340
|
-
const parsedOutput = {
|
|
2341
|
-
...output,
|
|
2342
|
-
body: await parseErrorBody(output.body, context),
|
|
2343
|
-
};
|
|
2344
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2345
|
-
switch (errorCode) {
|
|
2346
|
-
case "AccessDeniedException":
|
|
2347
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
2348
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2349
|
-
case "ConflictException":
|
|
2350
|
-
case "com.amazonaws.bedrockagent#ConflictException":
|
|
2351
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
2352
|
-
case "InternalServerException":
|
|
2353
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
2354
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
2355
|
-
case "ResourceNotFoundException":
|
|
2356
|
-
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
2357
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2358
|
-
case "ThrottlingException":
|
|
2359
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
2360
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
2361
|
-
case "ValidationException":
|
|
2362
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
2363
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2364
|
-
default:
|
|
2365
|
-
const parsedBody = parsedOutput.body;
|
|
2366
|
-
return throwDefaultError({
|
|
2367
|
-
output,
|
|
2368
|
-
parsedBody,
|
|
2369
|
-
errorCode,
|
|
2370
|
-
});
|
|
2371
|
-
}
|
|
2372
|
-
};
|
|
2373
1117
|
export const de_UpdateDataSourceCommand = async (output, context) => {
|
|
2374
1118
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2375
|
-
return
|
|
1119
|
+
return de_CommandError(output, context);
|
|
2376
1120
|
}
|
|
2377
1121
|
const contents = map({
|
|
2378
1122
|
$metadata: deserializeMetadata(output),
|
|
@@ -2384,43 +1128,9 @@ export const de_UpdateDataSourceCommand = async (output, context) => {
|
|
|
2384
1128
|
Object.assign(contents, doc);
|
|
2385
1129
|
return contents;
|
|
2386
1130
|
};
|
|
2387
|
-
const de_UpdateDataSourceCommandError = async (output, context) => {
|
|
2388
|
-
const parsedOutput = {
|
|
2389
|
-
...output,
|
|
2390
|
-
body: await parseErrorBody(output.body, context),
|
|
2391
|
-
};
|
|
2392
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2393
|
-
switch (errorCode) {
|
|
2394
|
-
case "AccessDeniedException":
|
|
2395
|
-
case "com.amazonaws.bedrockagent#AccessDeniedException":
|
|
2396
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2397
|
-
case "ConflictException":
|
|
2398
|
-
case "com.amazonaws.bedrockagent#ConflictException":
|
|
2399
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
2400
|
-
case "InternalServerException":
|
|
2401
|
-
case "com.amazonaws.bedrockagent#InternalServerException":
|
|
2402
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
2403
|
-
case "ResourceNotFoundException":
|
|
2404
|
-
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
2405
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2406
|
-
case "ThrottlingException":
|
|
2407
|
-
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
2408
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
2409
|
-
case "ValidationException":
|
|
2410
|
-
case "com.amazonaws.bedrockagent#ValidationException":
|
|
2411
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2412
|
-
default:
|
|
2413
|
-
const parsedBody = parsedOutput.body;
|
|
2414
|
-
return throwDefaultError({
|
|
2415
|
-
output,
|
|
2416
|
-
parsedBody,
|
|
2417
|
-
errorCode,
|
|
2418
|
-
});
|
|
2419
|
-
}
|
|
2420
|
-
};
|
|
2421
1131
|
export const de_UpdateKnowledgeBaseCommand = async (output, context) => {
|
|
2422
1132
|
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
2423
|
-
return
|
|
1133
|
+
return de_CommandError(output, context);
|
|
2424
1134
|
}
|
|
2425
1135
|
const contents = map({
|
|
2426
1136
|
$metadata: deserializeMetadata(output),
|
|
@@ -2432,7 +1142,7 @@ export const de_UpdateKnowledgeBaseCommand = async (output, context) => {
|
|
|
2432
1142
|
Object.assign(contents, doc);
|
|
2433
1143
|
return contents;
|
|
2434
1144
|
};
|
|
2435
|
-
const
|
|
1145
|
+
const de_CommandError = async (output, context) => {
|
|
2436
1146
|
const parsedOutput = {
|
|
2437
1147
|
...output,
|
|
2438
1148
|
body: await parseErrorBody(output.body, context),
|
|
@@ -2451,6 +1161,9 @@ const de_UpdateKnowledgeBaseCommandError = async (output, context) => {
|
|
|
2451
1161
|
case "ResourceNotFoundException":
|
|
2452
1162
|
case "com.amazonaws.bedrockagent#ResourceNotFoundException":
|
|
2453
1163
|
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1164
|
+
case "ServiceQuotaExceededException":
|
|
1165
|
+
case "com.amazonaws.bedrockagent#ServiceQuotaExceededException":
|
|
1166
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
2454
1167
|
case "ThrottlingException":
|
|
2455
1168
|
case "com.amazonaws.bedrockagent#ThrottlingException":
|
|
2456
1169
|
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|