@aws-sdk/client-application-insights 3.525.0 → 3.529.1
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 +36 -76
- package/dist-es/protocols/Aws_json1_1.js +1 -40
- package/package.json +4 -4
package/dist-cjs/index.js
CHANGED
|
@@ -245,6 +245,7 @@ var import_middleware_serde = require("@smithy/middleware-serde");
|
|
|
245
245
|
var import_types = require("@smithy/types");
|
|
246
246
|
|
|
247
247
|
// src/protocols/Aws_json1_1.ts
|
|
248
|
+
var import_core2 = require("@aws-sdk/core");
|
|
248
249
|
|
|
249
250
|
|
|
250
251
|
|
|
@@ -706,7 +707,7 @@ var de_AddWorkloadCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
706
707
|
if (output.statusCode >= 300) {
|
|
707
708
|
return de_CommandError(output, context);
|
|
708
709
|
}
|
|
709
|
-
const data = await
|
|
710
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
710
711
|
let contents = {};
|
|
711
712
|
contents = (0, import_smithy_client._json)(data);
|
|
712
713
|
const response = {
|
|
@@ -719,7 +720,7 @@ var de_CreateApplicationCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
719
720
|
if (output.statusCode >= 300) {
|
|
720
721
|
return de_CommandError(output, context);
|
|
721
722
|
}
|
|
722
|
-
const data = await
|
|
723
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
723
724
|
let contents = {};
|
|
724
725
|
contents = (0, import_smithy_client._json)(data);
|
|
725
726
|
const response = {
|
|
@@ -732,7 +733,7 @@ var de_CreateComponentCommand = /* @__PURE__ */ __name(async (output, context) =
|
|
|
732
733
|
if (output.statusCode >= 300) {
|
|
733
734
|
return de_CommandError(output, context);
|
|
734
735
|
}
|
|
735
|
-
const data = await
|
|
736
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
736
737
|
let contents = {};
|
|
737
738
|
contents = (0, import_smithy_client._json)(data);
|
|
738
739
|
const response = {
|
|
@@ -745,7 +746,7 @@ var de_CreateLogPatternCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
745
746
|
if (output.statusCode >= 300) {
|
|
746
747
|
return de_CommandError(output, context);
|
|
747
748
|
}
|
|
748
|
-
const data = await
|
|
749
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
749
750
|
let contents = {};
|
|
750
751
|
contents = (0, import_smithy_client._json)(data);
|
|
751
752
|
const response = {
|
|
@@ -758,7 +759,7 @@ var de_DeleteApplicationCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
758
759
|
if (output.statusCode >= 300) {
|
|
759
760
|
return de_CommandError(output, context);
|
|
760
761
|
}
|
|
761
|
-
const data = await
|
|
762
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
762
763
|
let contents = {};
|
|
763
764
|
contents = (0, import_smithy_client._json)(data);
|
|
764
765
|
const response = {
|
|
@@ -771,7 +772,7 @@ var de_DeleteComponentCommand = /* @__PURE__ */ __name(async (output, context) =
|
|
|
771
772
|
if (output.statusCode >= 300) {
|
|
772
773
|
return de_CommandError(output, context);
|
|
773
774
|
}
|
|
774
|
-
const data = await
|
|
775
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
775
776
|
let contents = {};
|
|
776
777
|
contents = (0, import_smithy_client._json)(data);
|
|
777
778
|
const response = {
|
|
@@ -784,7 +785,7 @@ var de_DeleteLogPatternCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
784
785
|
if (output.statusCode >= 300) {
|
|
785
786
|
return de_CommandError(output, context);
|
|
786
787
|
}
|
|
787
|
-
const data = await
|
|
788
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
788
789
|
let contents = {};
|
|
789
790
|
contents = (0, import_smithy_client._json)(data);
|
|
790
791
|
const response = {
|
|
@@ -797,7 +798,7 @@ var de_DescribeApplicationCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
797
798
|
if (output.statusCode >= 300) {
|
|
798
799
|
return de_CommandError(output, context);
|
|
799
800
|
}
|
|
800
|
-
const data = await
|
|
801
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
801
802
|
let contents = {};
|
|
802
803
|
contents = (0, import_smithy_client._json)(data);
|
|
803
804
|
const response = {
|
|
@@ -810,7 +811,7 @@ var de_DescribeComponentCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
810
811
|
if (output.statusCode >= 300) {
|
|
811
812
|
return de_CommandError(output, context);
|
|
812
813
|
}
|
|
813
|
-
const data = await
|
|
814
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
814
815
|
let contents = {};
|
|
815
816
|
contents = (0, import_smithy_client._json)(data);
|
|
816
817
|
const response = {
|
|
@@ -823,7 +824,7 @@ var de_DescribeComponentConfigurationCommand = /* @__PURE__ */ __name(async (out
|
|
|
823
824
|
if (output.statusCode >= 300) {
|
|
824
825
|
return de_CommandError(output, context);
|
|
825
826
|
}
|
|
826
|
-
const data = await
|
|
827
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
827
828
|
let contents = {};
|
|
828
829
|
contents = (0, import_smithy_client._json)(data);
|
|
829
830
|
const response = {
|
|
@@ -836,7 +837,7 @@ var de_DescribeComponentConfigurationRecommendationCommand = /* @__PURE__ */ __n
|
|
|
836
837
|
if (output.statusCode >= 300) {
|
|
837
838
|
return de_CommandError(output, context);
|
|
838
839
|
}
|
|
839
|
-
const data = await
|
|
840
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
840
841
|
let contents = {};
|
|
841
842
|
contents = (0, import_smithy_client._json)(data);
|
|
842
843
|
const response = {
|
|
@@ -849,7 +850,7 @@ var de_DescribeLogPatternCommand = /* @__PURE__ */ __name(async (output, context
|
|
|
849
850
|
if (output.statusCode >= 300) {
|
|
850
851
|
return de_CommandError(output, context);
|
|
851
852
|
}
|
|
852
|
-
const data = await
|
|
853
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
853
854
|
let contents = {};
|
|
854
855
|
contents = (0, import_smithy_client._json)(data);
|
|
855
856
|
const response = {
|
|
@@ -862,7 +863,7 @@ var de_DescribeObservationCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
862
863
|
if (output.statusCode >= 300) {
|
|
863
864
|
return de_CommandError(output, context);
|
|
864
865
|
}
|
|
865
|
-
const data = await
|
|
866
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
866
867
|
let contents = {};
|
|
867
868
|
contents = de_DescribeObservationResponse(data, context);
|
|
868
869
|
const response = {
|
|
@@ -875,7 +876,7 @@ var de_DescribeProblemCommand = /* @__PURE__ */ __name(async (output, context) =
|
|
|
875
876
|
if (output.statusCode >= 300) {
|
|
876
877
|
return de_CommandError(output, context);
|
|
877
878
|
}
|
|
878
|
-
const data = await
|
|
879
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
879
880
|
let contents = {};
|
|
880
881
|
contents = de_DescribeProblemResponse(data, context);
|
|
881
882
|
const response = {
|
|
@@ -888,7 +889,7 @@ var de_DescribeProblemObservationsCommand = /* @__PURE__ */ __name(async (output
|
|
|
888
889
|
if (output.statusCode >= 300) {
|
|
889
890
|
return de_CommandError(output, context);
|
|
890
891
|
}
|
|
891
|
-
const data = await
|
|
892
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
892
893
|
let contents = {};
|
|
893
894
|
contents = de_DescribeProblemObservationsResponse(data, context);
|
|
894
895
|
const response = {
|
|
@@ -901,7 +902,7 @@ var de_DescribeWorkloadCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
901
902
|
if (output.statusCode >= 300) {
|
|
902
903
|
return de_CommandError(output, context);
|
|
903
904
|
}
|
|
904
|
-
const data = await
|
|
905
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
905
906
|
let contents = {};
|
|
906
907
|
contents = (0, import_smithy_client._json)(data);
|
|
907
908
|
const response = {
|
|
@@ -914,7 +915,7 @@ var de_ListApplicationsCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
914
915
|
if (output.statusCode >= 300) {
|
|
915
916
|
return de_CommandError(output, context);
|
|
916
917
|
}
|
|
917
|
-
const data = await
|
|
918
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
918
919
|
let contents = {};
|
|
919
920
|
contents = (0, import_smithy_client._json)(data);
|
|
920
921
|
const response = {
|
|
@@ -927,7 +928,7 @@ var de_ListComponentsCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
927
928
|
if (output.statusCode >= 300) {
|
|
928
929
|
return de_CommandError(output, context);
|
|
929
930
|
}
|
|
930
|
-
const data = await
|
|
931
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
931
932
|
let contents = {};
|
|
932
933
|
contents = (0, import_smithy_client._json)(data);
|
|
933
934
|
const response = {
|
|
@@ -940,7 +941,7 @@ var de_ListConfigurationHistoryCommand = /* @__PURE__ */ __name(async (output, c
|
|
|
940
941
|
if (output.statusCode >= 300) {
|
|
941
942
|
return de_CommandError(output, context);
|
|
942
943
|
}
|
|
943
|
-
const data = await
|
|
944
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
944
945
|
let contents = {};
|
|
945
946
|
contents = de_ListConfigurationHistoryResponse(data, context);
|
|
946
947
|
const response = {
|
|
@@ -953,7 +954,7 @@ var de_ListLogPatternsCommand = /* @__PURE__ */ __name(async (output, context) =
|
|
|
953
954
|
if (output.statusCode >= 300) {
|
|
954
955
|
return de_CommandError(output, context);
|
|
955
956
|
}
|
|
956
|
-
const data = await
|
|
957
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
957
958
|
let contents = {};
|
|
958
959
|
contents = (0, import_smithy_client._json)(data);
|
|
959
960
|
const response = {
|
|
@@ -966,7 +967,7 @@ var de_ListLogPatternSetsCommand = /* @__PURE__ */ __name(async (output, context
|
|
|
966
967
|
if (output.statusCode >= 300) {
|
|
967
968
|
return de_CommandError(output, context);
|
|
968
969
|
}
|
|
969
|
-
const data = await
|
|
970
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
970
971
|
let contents = {};
|
|
971
972
|
contents = (0, import_smithy_client._json)(data);
|
|
972
973
|
const response = {
|
|
@@ -979,7 +980,7 @@ var de_ListProblemsCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
979
980
|
if (output.statusCode >= 300) {
|
|
980
981
|
return de_CommandError(output, context);
|
|
981
982
|
}
|
|
982
|
-
const data = await
|
|
983
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
983
984
|
let contents = {};
|
|
984
985
|
contents = de_ListProblemsResponse(data, context);
|
|
985
986
|
const response = {
|
|
@@ -992,7 +993,7 @@ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
992
993
|
if (output.statusCode >= 300) {
|
|
993
994
|
return de_CommandError(output, context);
|
|
994
995
|
}
|
|
995
|
-
const data = await
|
|
996
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
996
997
|
let contents = {};
|
|
997
998
|
contents = (0, import_smithy_client._json)(data);
|
|
998
999
|
const response = {
|
|
@@ -1005,7 +1006,7 @@ var de_ListWorkloadsCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
1005
1006
|
if (output.statusCode >= 300) {
|
|
1006
1007
|
return de_CommandError(output, context);
|
|
1007
1008
|
}
|
|
1008
|
-
const data = await
|
|
1009
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1009
1010
|
let contents = {};
|
|
1010
1011
|
contents = (0, import_smithy_client._json)(data);
|
|
1011
1012
|
const response = {
|
|
@@ -1018,7 +1019,7 @@ var de_RemoveWorkloadCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
1018
1019
|
if (output.statusCode >= 300) {
|
|
1019
1020
|
return de_CommandError(output, context);
|
|
1020
1021
|
}
|
|
1021
|
-
const data = await
|
|
1022
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1022
1023
|
let contents = {};
|
|
1023
1024
|
contents = (0, import_smithy_client._json)(data);
|
|
1024
1025
|
const response = {
|
|
@@ -1031,7 +1032,7 @@ var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1031
1032
|
if (output.statusCode >= 300) {
|
|
1032
1033
|
return de_CommandError(output, context);
|
|
1033
1034
|
}
|
|
1034
|
-
const data = await
|
|
1035
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1035
1036
|
let contents = {};
|
|
1036
1037
|
contents = (0, import_smithy_client._json)(data);
|
|
1037
1038
|
const response = {
|
|
@@ -1044,7 +1045,7 @@ var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
1044
1045
|
if (output.statusCode >= 300) {
|
|
1045
1046
|
return de_CommandError(output, context);
|
|
1046
1047
|
}
|
|
1047
|
-
const data = await
|
|
1048
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1048
1049
|
let contents = {};
|
|
1049
1050
|
contents = (0, import_smithy_client._json)(data);
|
|
1050
1051
|
const response = {
|
|
@@ -1057,7 +1058,7 @@ var de_UpdateApplicationCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
1057
1058
|
if (output.statusCode >= 300) {
|
|
1058
1059
|
return de_CommandError(output, context);
|
|
1059
1060
|
}
|
|
1060
|
-
const data = await
|
|
1061
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1061
1062
|
let contents = {};
|
|
1062
1063
|
contents = (0, import_smithy_client._json)(data);
|
|
1063
1064
|
const response = {
|
|
@@ -1070,7 +1071,7 @@ var de_UpdateComponentCommand = /* @__PURE__ */ __name(async (output, context) =
|
|
|
1070
1071
|
if (output.statusCode >= 300) {
|
|
1071
1072
|
return de_CommandError(output, context);
|
|
1072
1073
|
}
|
|
1073
|
-
const data = await
|
|
1074
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1074
1075
|
let contents = {};
|
|
1075
1076
|
contents = (0, import_smithy_client._json)(data);
|
|
1076
1077
|
const response = {
|
|
@@ -1083,7 +1084,7 @@ var de_UpdateComponentConfigurationCommand = /* @__PURE__ */ __name(async (outpu
|
|
|
1083
1084
|
if (output.statusCode >= 300) {
|
|
1084
1085
|
return de_CommandError(output, context);
|
|
1085
1086
|
}
|
|
1086
|
-
const data = await
|
|
1087
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1087
1088
|
let contents = {};
|
|
1088
1089
|
contents = (0, import_smithy_client._json)(data);
|
|
1089
1090
|
const response = {
|
|
@@ -1096,7 +1097,7 @@ var de_UpdateLogPatternCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
1096
1097
|
if (output.statusCode >= 300) {
|
|
1097
1098
|
return de_CommandError(output, context);
|
|
1098
1099
|
}
|
|
1099
|
-
const data = await
|
|
1100
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1100
1101
|
let contents = {};
|
|
1101
1102
|
contents = (0, import_smithy_client._json)(data);
|
|
1102
1103
|
const response = {
|
|
@@ -1109,7 +1110,7 @@ var de_UpdateProblemCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
1109
1110
|
if (output.statusCode >= 300) {
|
|
1110
1111
|
return de_CommandError(output, context);
|
|
1111
1112
|
}
|
|
1112
|
-
const data = await
|
|
1113
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1113
1114
|
let contents = {};
|
|
1114
1115
|
contents = (0, import_smithy_client._json)(data);
|
|
1115
1116
|
const response = {
|
|
@@ -1122,7 +1123,7 @@ var de_UpdateWorkloadCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
1122
1123
|
if (output.statusCode >= 300) {
|
|
1123
1124
|
return de_CommandError(output, context);
|
|
1124
1125
|
}
|
|
1125
|
-
const data = await
|
|
1126
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1126
1127
|
let contents = {};
|
|
1127
1128
|
contents = (0, import_smithy_client._json)(data);
|
|
1128
1129
|
const response = {
|
|
@@ -1134,9 +1135,9 @@ var de_UpdateWorkloadCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
1134
1135
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
1135
1136
|
const parsedOutput = {
|
|
1136
1137
|
...output,
|
|
1137
|
-
body: await
|
|
1138
|
+
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
1138
1139
|
};
|
|
1139
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1140
|
+
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
1140
1141
|
switch (errorCode) {
|
|
1141
1142
|
case "InternalServerException":
|
|
1142
1143
|
case "com.amazonaws.applicationinsights#InternalServerException":
|
|
@@ -1404,7 +1405,6 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
|
1404
1405
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1405
1406
|
cfId: output.headers["x-amz-cf-id"]
|
|
1406
1407
|
}), "deserializeMetadata");
|
|
1407
|
-
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
1408
1408
|
var throwDefaultError = (0, import_smithy_client.withBaseException)(ApplicationInsightsServiceException);
|
|
1409
1409
|
var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
|
|
1410
1410
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
@@ -1431,46 +1431,6 @@ function sharedHeaders(operation) {
|
|
|
1431
1431
|
};
|
|
1432
1432
|
}
|
|
1433
1433
|
__name(sharedHeaders, "sharedHeaders");
|
|
1434
|
-
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1435
|
-
if (encoded.length) {
|
|
1436
|
-
return JSON.parse(encoded);
|
|
1437
|
-
}
|
|
1438
|
-
return {};
|
|
1439
|
-
}), "parseBody");
|
|
1440
|
-
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
1441
|
-
const value = await parseBody(errorBody, context);
|
|
1442
|
-
value.message = value.message ?? value.Message;
|
|
1443
|
-
return value;
|
|
1444
|
-
}, "parseErrorBody");
|
|
1445
|
-
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
1446
|
-
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
1447
|
-
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
1448
|
-
let cleanValue = rawValue;
|
|
1449
|
-
if (typeof cleanValue === "number") {
|
|
1450
|
-
cleanValue = cleanValue.toString();
|
|
1451
|
-
}
|
|
1452
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1453
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1454
|
-
}
|
|
1455
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1456
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1457
|
-
}
|
|
1458
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1459
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1460
|
-
}
|
|
1461
|
-
return cleanValue;
|
|
1462
|
-
}, "sanitizeErrorCode");
|
|
1463
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1464
|
-
if (headerKey !== void 0) {
|
|
1465
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1466
|
-
}
|
|
1467
|
-
if (data.code !== void 0) {
|
|
1468
|
-
return sanitizeErrorCode(data.code);
|
|
1469
|
-
}
|
|
1470
|
-
if (data["__type"] !== void 0) {
|
|
1471
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1472
|
-
}
|
|
1473
|
-
}, "loadRestJsonErrorCode");
|
|
1474
1434
|
|
|
1475
1435
|
// src/commands/AddWorkloadCommand.ts
|
|
1476
1436
|
var _AddWorkloadCommand = class _AddWorkloadCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
|
|
1
2
|
import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
|
|
2
3
|
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
4
|
import { ApplicationInsightsServiceException as __BaseException } from "../models/ApplicationInsightsServiceException";
|
|
@@ -934,43 +935,3 @@ function sharedHeaders(operation) {
|
|
|
934
935
|
"x-amz-target": `EC2WindowsBarleyService.${operation}`,
|
|
935
936
|
};
|
|
936
937
|
}
|
|
937
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
938
|
-
if (encoded.length) {
|
|
939
|
-
return JSON.parse(encoded);
|
|
940
|
-
}
|
|
941
|
-
return {};
|
|
942
|
-
});
|
|
943
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
944
|
-
const value = await parseBody(errorBody, context);
|
|
945
|
-
value.message = value.message ?? value.Message;
|
|
946
|
-
return value;
|
|
947
|
-
};
|
|
948
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
949
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
950
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
951
|
-
let cleanValue = rawValue;
|
|
952
|
-
if (typeof cleanValue === "number") {
|
|
953
|
-
cleanValue = cleanValue.toString();
|
|
954
|
-
}
|
|
955
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
956
|
-
cleanValue = cleanValue.split(",")[0];
|
|
957
|
-
}
|
|
958
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
959
|
-
cleanValue = cleanValue.split(":")[0];
|
|
960
|
-
}
|
|
961
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
962
|
-
cleanValue = cleanValue.split("#")[1];
|
|
963
|
-
}
|
|
964
|
-
return cleanValue;
|
|
965
|
-
};
|
|
966
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
967
|
-
if (headerKey !== undefined) {
|
|
968
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
969
|
-
}
|
|
970
|
-
if (data.code !== undefined) {
|
|
971
|
-
return sanitizeErrorCode(data.code);
|
|
972
|
-
}
|
|
973
|
-
if (data["__type"] !== undefined) {
|
|
974
|
-
return sanitizeErrorCode(data["__type"]);
|
|
975
|
-
}
|
|
976
|
-
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-application-insights",
|
|
3
3
|
"description": "AWS SDK for JavaScript Application Insights Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.529.1",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-application-insights",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
23
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
-
"@aws-sdk/core": "3.
|
|
25
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
23
|
+
"@aws-sdk/client-sts": "3.529.1",
|
|
24
|
+
"@aws-sdk/core": "3.529.1",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.529.1",
|
|
26
26
|
"@aws-sdk/middleware-host-header": "3.523.0",
|
|
27
27
|
"@aws-sdk/middleware-logger": "3.523.0",
|
|
28
28
|
"@aws-sdk/middleware-recursion-detection": "3.523.0",
|