@aws-sdk/client-budgets 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 +26 -66
- package/dist-es/protocols/Aws_json1_1.js +1 -40
- package/package.json +4 -4
package/dist-cjs/index.js
CHANGED
|
@@ -607,6 +607,7 @@ var UpdateSubscriberRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) =>
|
|
|
607
607
|
}), "UpdateSubscriberRequestFilterSensitiveLog");
|
|
608
608
|
|
|
609
609
|
// src/protocols/Aws_json1_1.ts
|
|
610
|
+
var import_core2 = require("@aws-sdk/core");
|
|
610
611
|
|
|
611
612
|
|
|
612
613
|
var se_CreateBudgetCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
@@ -751,7 +752,7 @@ var de_CreateBudgetCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
751
752
|
if (output.statusCode >= 300) {
|
|
752
753
|
return de_CommandError(output, context);
|
|
753
754
|
}
|
|
754
|
-
const data = await
|
|
755
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
755
756
|
let contents = {};
|
|
756
757
|
contents = (0, import_smithy_client._json)(data);
|
|
757
758
|
const response = {
|
|
@@ -764,7 +765,7 @@ var de_CreateBudgetActionCommand = /* @__PURE__ */ __name(async (output, context
|
|
|
764
765
|
if (output.statusCode >= 300) {
|
|
765
766
|
return de_CommandError(output, context);
|
|
766
767
|
}
|
|
767
|
-
const data = await
|
|
768
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
768
769
|
let contents = {};
|
|
769
770
|
contents = (0, import_smithy_client._json)(data);
|
|
770
771
|
const response = {
|
|
@@ -777,7 +778,7 @@ var de_CreateNotificationCommand = /* @__PURE__ */ __name(async (output, context
|
|
|
777
778
|
if (output.statusCode >= 300) {
|
|
778
779
|
return de_CommandError(output, context);
|
|
779
780
|
}
|
|
780
|
-
const data = await
|
|
781
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
781
782
|
let contents = {};
|
|
782
783
|
contents = (0, import_smithy_client._json)(data);
|
|
783
784
|
const response = {
|
|
@@ -790,7 +791,7 @@ var de_CreateSubscriberCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
790
791
|
if (output.statusCode >= 300) {
|
|
791
792
|
return de_CommandError(output, context);
|
|
792
793
|
}
|
|
793
|
-
const data = await
|
|
794
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
794
795
|
let contents = {};
|
|
795
796
|
contents = (0, import_smithy_client._json)(data);
|
|
796
797
|
const response = {
|
|
@@ -803,7 +804,7 @@ var de_DeleteBudgetCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
803
804
|
if (output.statusCode >= 300) {
|
|
804
805
|
return de_CommandError(output, context);
|
|
805
806
|
}
|
|
806
|
-
const data = await
|
|
807
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
807
808
|
let contents = {};
|
|
808
809
|
contents = (0, import_smithy_client._json)(data);
|
|
809
810
|
const response = {
|
|
@@ -816,7 +817,7 @@ var de_DeleteBudgetActionCommand = /* @__PURE__ */ __name(async (output, context
|
|
|
816
817
|
if (output.statusCode >= 300) {
|
|
817
818
|
return de_CommandError(output, context);
|
|
818
819
|
}
|
|
819
|
-
const data = await
|
|
820
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
820
821
|
let contents = {};
|
|
821
822
|
contents = de_DeleteBudgetActionResponse(data, context);
|
|
822
823
|
const response = {
|
|
@@ -829,7 +830,7 @@ var de_DeleteNotificationCommand = /* @__PURE__ */ __name(async (output, context
|
|
|
829
830
|
if (output.statusCode >= 300) {
|
|
830
831
|
return de_CommandError(output, context);
|
|
831
832
|
}
|
|
832
|
-
const data = await
|
|
833
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
833
834
|
let contents = {};
|
|
834
835
|
contents = (0, import_smithy_client._json)(data);
|
|
835
836
|
const response = {
|
|
@@ -842,7 +843,7 @@ var de_DeleteSubscriberCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
842
843
|
if (output.statusCode >= 300) {
|
|
843
844
|
return de_CommandError(output, context);
|
|
844
845
|
}
|
|
845
|
-
const data = await
|
|
846
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
846
847
|
let contents = {};
|
|
847
848
|
contents = (0, import_smithy_client._json)(data);
|
|
848
849
|
const response = {
|
|
@@ -855,7 +856,7 @@ var de_DescribeBudgetCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
855
856
|
if (output.statusCode >= 300) {
|
|
856
857
|
return de_CommandError(output, context);
|
|
857
858
|
}
|
|
858
|
-
const data = await
|
|
859
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
859
860
|
let contents = {};
|
|
860
861
|
contents = de_DescribeBudgetResponse(data, context);
|
|
861
862
|
const response = {
|
|
@@ -868,7 +869,7 @@ var de_DescribeBudgetActionCommand = /* @__PURE__ */ __name(async (output, conte
|
|
|
868
869
|
if (output.statusCode >= 300) {
|
|
869
870
|
return de_CommandError(output, context);
|
|
870
871
|
}
|
|
871
|
-
const data = await
|
|
872
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
872
873
|
let contents = {};
|
|
873
874
|
contents = de_DescribeBudgetActionResponse(data, context);
|
|
874
875
|
const response = {
|
|
@@ -881,7 +882,7 @@ var de_DescribeBudgetActionHistoriesCommand = /* @__PURE__ */ __name(async (outp
|
|
|
881
882
|
if (output.statusCode >= 300) {
|
|
882
883
|
return de_CommandError(output, context);
|
|
883
884
|
}
|
|
884
|
-
const data = await
|
|
885
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
885
886
|
let contents = {};
|
|
886
887
|
contents = de_DescribeBudgetActionHistoriesResponse(data, context);
|
|
887
888
|
const response = {
|
|
@@ -894,7 +895,7 @@ var de_DescribeBudgetActionsForAccountCommand = /* @__PURE__ */ __name(async (ou
|
|
|
894
895
|
if (output.statusCode >= 300) {
|
|
895
896
|
return de_CommandError(output, context);
|
|
896
897
|
}
|
|
897
|
-
const data = await
|
|
898
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
898
899
|
let contents = {};
|
|
899
900
|
contents = de_DescribeBudgetActionsForAccountResponse(data, context);
|
|
900
901
|
const response = {
|
|
@@ -907,7 +908,7 @@ var de_DescribeBudgetActionsForBudgetCommand = /* @__PURE__ */ __name(async (out
|
|
|
907
908
|
if (output.statusCode >= 300) {
|
|
908
909
|
return de_CommandError(output, context);
|
|
909
910
|
}
|
|
910
|
-
const data = await
|
|
911
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
911
912
|
let contents = {};
|
|
912
913
|
contents = de_DescribeBudgetActionsForBudgetResponse(data, context);
|
|
913
914
|
const response = {
|
|
@@ -920,7 +921,7 @@ var de_DescribeBudgetNotificationsForAccountCommand = /* @__PURE__ */ __name(asy
|
|
|
920
921
|
if (output.statusCode >= 300) {
|
|
921
922
|
return de_CommandError(output, context);
|
|
922
923
|
}
|
|
923
|
-
const data = await
|
|
924
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
924
925
|
let contents = {};
|
|
925
926
|
contents = de_DescribeBudgetNotificationsForAccountResponse(data, context);
|
|
926
927
|
const response = {
|
|
@@ -933,7 +934,7 @@ var de_DescribeBudgetPerformanceHistoryCommand = /* @__PURE__ */ __name(async (o
|
|
|
933
934
|
if (output.statusCode >= 300) {
|
|
934
935
|
return de_CommandError(output, context);
|
|
935
936
|
}
|
|
936
|
-
const data = await
|
|
937
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
937
938
|
let contents = {};
|
|
938
939
|
contents = de_DescribeBudgetPerformanceHistoryResponse(data, context);
|
|
939
940
|
const response = {
|
|
@@ -946,7 +947,7 @@ var de_DescribeBudgetsCommand = /* @__PURE__ */ __name(async (output, context) =
|
|
|
946
947
|
if (output.statusCode >= 300) {
|
|
947
948
|
return de_CommandError(output, context);
|
|
948
949
|
}
|
|
949
|
-
const data = await
|
|
950
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
950
951
|
let contents = {};
|
|
951
952
|
contents = de_DescribeBudgetsResponse(data, context);
|
|
952
953
|
const response = {
|
|
@@ -959,7 +960,7 @@ var de_DescribeNotificationsForBudgetCommand = /* @__PURE__ */ __name(async (out
|
|
|
959
960
|
if (output.statusCode >= 300) {
|
|
960
961
|
return de_CommandError(output, context);
|
|
961
962
|
}
|
|
962
|
-
const data = await
|
|
963
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
963
964
|
let contents = {};
|
|
964
965
|
contents = de_DescribeNotificationsForBudgetResponse(data, context);
|
|
965
966
|
const response = {
|
|
@@ -972,7 +973,7 @@ var de_DescribeSubscribersForNotificationCommand = /* @__PURE__ */ __name(async
|
|
|
972
973
|
if (output.statusCode >= 300) {
|
|
973
974
|
return de_CommandError(output, context);
|
|
974
975
|
}
|
|
975
|
-
const data = await
|
|
976
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
976
977
|
let contents = {};
|
|
977
978
|
contents = (0, import_smithy_client._json)(data);
|
|
978
979
|
const response = {
|
|
@@ -985,7 +986,7 @@ var de_ExecuteBudgetActionCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
985
986
|
if (output.statusCode >= 300) {
|
|
986
987
|
return de_CommandError(output, context);
|
|
987
988
|
}
|
|
988
|
-
const data = await
|
|
989
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
989
990
|
let contents = {};
|
|
990
991
|
contents = (0, import_smithy_client._json)(data);
|
|
991
992
|
const response = {
|
|
@@ -998,7 +999,7 @@ var de_UpdateBudgetCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
998
999
|
if (output.statusCode >= 300) {
|
|
999
1000
|
return de_CommandError(output, context);
|
|
1000
1001
|
}
|
|
1001
|
-
const data = await
|
|
1002
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1002
1003
|
let contents = {};
|
|
1003
1004
|
contents = (0, import_smithy_client._json)(data);
|
|
1004
1005
|
const response = {
|
|
@@ -1011,7 +1012,7 @@ var de_UpdateBudgetActionCommand = /* @__PURE__ */ __name(async (output, context
|
|
|
1011
1012
|
if (output.statusCode >= 300) {
|
|
1012
1013
|
return de_CommandError(output, context);
|
|
1013
1014
|
}
|
|
1014
|
-
const data = await
|
|
1015
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1015
1016
|
let contents = {};
|
|
1016
1017
|
contents = de_UpdateBudgetActionResponse(data, context);
|
|
1017
1018
|
const response = {
|
|
@@ -1024,7 +1025,7 @@ var de_UpdateNotificationCommand = /* @__PURE__ */ __name(async (output, context
|
|
|
1024
1025
|
if (output.statusCode >= 300) {
|
|
1025
1026
|
return de_CommandError(output, context);
|
|
1026
1027
|
}
|
|
1027
|
-
const data = await
|
|
1028
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1028
1029
|
let contents = {};
|
|
1029
1030
|
contents = (0, import_smithy_client._json)(data);
|
|
1030
1031
|
const response = {
|
|
@@ -1037,7 +1038,7 @@ var de_UpdateSubscriberCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
1037
1038
|
if (output.statusCode >= 300) {
|
|
1038
1039
|
return de_CommandError(output, context);
|
|
1039
1040
|
}
|
|
1040
|
-
const data = await
|
|
1041
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1041
1042
|
let contents = {};
|
|
1042
1043
|
contents = (0, import_smithy_client._json)(data);
|
|
1043
1044
|
const response = {
|
|
@@ -1049,9 +1050,9 @@ var de_UpdateSubscriberCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
1049
1050
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
1050
1051
|
const parsedOutput = {
|
|
1051
1052
|
...output,
|
|
1052
|
-
body: await
|
|
1053
|
+
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
1053
1054
|
};
|
|
1054
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1055
|
+
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
1055
1056
|
switch (errorCode) {
|
|
1056
1057
|
case "AccessDeniedException":
|
|
1057
1058
|
case "com.amazonaws.budgets#AccessDeniedException":
|
|
@@ -1556,7 +1557,6 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
|
1556
1557
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1557
1558
|
cfId: output.headers["x-amz-cf-id"]
|
|
1558
1559
|
}), "deserializeMetadata");
|
|
1559
|
-
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
1560
1560
|
var throwDefaultError = (0, import_smithy_client.withBaseException)(BudgetsServiceException);
|
|
1561
1561
|
var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
|
|
1562
1562
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
@@ -1583,46 +1583,6 @@ function sharedHeaders(operation) {
|
|
|
1583
1583
|
};
|
|
1584
1584
|
}
|
|
1585
1585
|
__name(sharedHeaders, "sharedHeaders");
|
|
1586
|
-
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1587
|
-
if (encoded.length) {
|
|
1588
|
-
return JSON.parse(encoded);
|
|
1589
|
-
}
|
|
1590
|
-
return {};
|
|
1591
|
-
}), "parseBody");
|
|
1592
|
-
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
1593
|
-
const value = await parseBody(errorBody, context);
|
|
1594
|
-
value.message = value.message ?? value.Message;
|
|
1595
|
-
return value;
|
|
1596
|
-
}, "parseErrorBody");
|
|
1597
|
-
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
1598
|
-
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
1599
|
-
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
1600
|
-
let cleanValue = rawValue;
|
|
1601
|
-
if (typeof cleanValue === "number") {
|
|
1602
|
-
cleanValue = cleanValue.toString();
|
|
1603
|
-
}
|
|
1604
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1605
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1606
|
-
}
|
|
1607
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1608
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1609
|
-
}
|
|
1610
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1611
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1612
|
-
}
|
|
1613
|
-
return cleanValue;
|
|
1614
|
-
}, "sanitizeErrorCode");
|
|
1615
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1616
|
-
if (headerKey !== void 0) {
|
|
1617
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1618
|
-
}
|
|
1619
|
-
if (data.code !== void 0) {
|
|
1620
|
-
return sanitizeErrorCode(data.code);
|
|
1621
|
-
}
|
|
1622
|
-
if (data["__type"] !== void 0) {
|
|
1623
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1624
|
-
}
|
|
1625
|
-
}, "loadRestJsonErrorCode");
|
|
1626
1586
|
|
|
1627
1587
|
// src/commands/CreateBudgetActionCommand.ts
|
|
1628
1588
|
var _CreateBudgetActionCommand = class _CreateBudgetActionCommand 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, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
4
|
import { BudgetsServiceException as __BaseException } from "../models/BudgetsServiceException";
|
|
@@ -989,43 +990,3 @@ function sharedHeaders(operation) {
|
|
|
989
990
|
"x-amz-target": `AWSBudgetServiceGateway.${operation}`,
|
|
990
991
|
};
|
|
991
992
|
}
|
|
992
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
993
|
-
if (encoded.length) {
|
|
994
|
-
return JSON.parse(encoded);
|
|
995
|
-
}
|
|
996
|
-
return {};
|
|
997
|
-
});
|
|
998
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
999
|
-
const value = await parseBody(errorBody, context);
|
|
1000
|
-
value.message = value.message ?? value.Message;
|
|
1001
|
-
return value;
|
|
1002
|
-
};
|
|
1003
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
1004
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1005
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
1006
|
-
let cleanValue = rawValue;
|
|
1007
|
-
if (typeof cleanValue === "number") {
|
|
1008
|
-
cleanValue = cleanValue.toString();
|
|
1009
|
-
}
|
|
1010
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1011
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1012
|
-
}
|
|
1013
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1014
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1015
|
-
}
|
|
1016
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1017
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1018
|
-
}
|
|
1019
|
-
return cleanValue;
|
|
1020
|
-
};
|
|
1021
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1022
|
-
if (headerKey !== undefined) {
|
|
1023
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1024
|
-
}
|
|
1025
|
-
if (data.code !== undefined) {
|
|
1026
|
-
return sanitizeErrorCode(data.code);
|
|
1027
|
-
}
|
|
1028
|
-
if (data["__type"] !== undefined) {
|
|
1029
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1030
|
-
}
|
|
1031
|
-
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-budgets",
|
|
3
3
|
"description": "AWS SDK for JavaScript Budgets 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-budgets",
|
|
@@ -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",
|