@aws-sdk/client-trustedadvisor 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 +11 -51
- package/dist-es/protocols/Aws_restJson1.js +1 -40
- package/package.json +4 -4
package/dist-cjs/index.js
CHANGED
|
@@ -454,6 +454,7 @@ var UpdateRecommendationLifecycleRequestFilterSensitiveLog = /* @__PURE__ */ __n
|
|
|
454
454
|
}), "UpdateRecommendationLifecycleRequestFilterSensitiveLog");
|
|
455
455
|
|
|
456
456
|
// src/protocols/Aws_restJson1.ts
|
|
457
|
+
var import_core2 = require("@aws-sdk/core");
|
|
457
458
|
|
|
458
459
|
|
|
459
460
|
var se_GetOrganizationRecommendationCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
@@ -650,7 +651,7 @@ var de_GetOrganizationRecommendationCommand = /* @__PURE__ */ __name(async (outp
|
|
|
650
651
|
const contents = (0, import_smithy_client.map)({
|
|
651
652
|
$metadata: deserializeMetadata(output)
|
|
652
653
|
});
|
|
653
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
654
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
654
655
|
const doc = (0, import_smithy_client.take)(data, {
|
|
655
656
|
organizationRecommendation: (_) => de_OrganizationRecommendation(_, context)
|
|
656
657
|
});
|
|
@@ -664,7 +665,7 @@ var de_GetRecommendationCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
664
665
|
const contents = (0, import_smithy_client.map)({
|
|
665
666
|
$metadata: deserializeMetadata(output)
|
|
666
667
|
});
|
|
667
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
668
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
668
669
|
const doc = (0, import_smithy_client.take)(data, {
|
|
669
670
|
recommendation: (_) => de_Recommendation(_, context)
|
|
670
671
|
});
|
|
@@ -678,7 +679,7 @@ var de_ListChecksCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
678
679
|
const contents = (0, import_smithy_client.map)({
|
|
679
680
|
$metadata: deserializeMetadata(output)
|
|
680
681
|
});
|
|
681
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
682
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
682
683
|
const doc = (0, import_smithy_client.take)(data, {
|
|
683
684
|
checkSummaries: import_smithy_client._json,
|
|
684
685
|
nextToken: import_smithy_client.expectString
|
|
@@ -693,7 +694,7 @@ var de_ListOrganizationRecommendationAccountsCommand = /* @__PURE__ */ __name(as
|
|
|
693
694
|
const contents = (0, import_smithy_client.map)({
|
|
694
695
|
$metadata: deserializeMetadata(output)
|
|
695
696
|
});
|
|
696
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
697
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
697
698
|
const doc = (0, import_smithy_client.take)(data, {
|
|
698
699
|
accountRecommendationLifecycleSummaries: (_) => de_AccountRecommendationLifecycleSummaryList(_, context),
|
|
699
700
|
nextToken: import_smithy_client.expectString
|
|
@@ -708,7 +709,7 @@ var de_ListOrganizationRecommendationResourcesCommand = /* @__PURE__ */ __name(a
|
|
|
708
709
|
const contents = (0, import_smithy_client.map)({
|
|
709
710
|
$metadata: deserializeMetadata(output)
|
|
710
711
|
});
|
|
711
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
712
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
712
713
|
const doc = (0, import_smithy_client.take)(data, {
|
|
713
714
|
nextToken: import_smithy_client.expectString,
|
|
714
715
|
organizationRecommendationResourceSummaries: (_) => de_OrganizationRecommendationResourceSummaryList(_, context)
|
|
@@ -723,7 +724,7 @@ var de_ListOrganizationRecommendationsCommand = /* @__PURE__ */ __name(async (ou
|
|
|
723
724
|
const contents = (0, import_smithy_client.map)({
|
|
724
725
|
$metadata: deserializeMetadata(output)
|
|
725
726
|
});
|
|
726
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
727
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
727
728
|
const doc = (0, import_smithy_client.take)(data, {
|
|
728
729
|
nextToken: import_smithy_client.expectString,
|
|
729
730
|
organizationRecommendationSummaries: (_) => de_OrganizationRecommendationSummaryList(_, context)
|
|
@@ -738,7 +739,7 @@ var de_ListRecommendationResourcesCommand = /* @__PURE__ */ __name(async (output
|
|
|
738
739
|
const contents = (0, import_smithy_client.map)({
|
|
739
740
|
$metadata: deserializeMetadata(output)
|
|
740
741
|
});
|
|
741
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
742
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
742
743
|
const doc = (0, import_smithy_client.take)(data, {
|
|
743
744
|
nextToken: import_smithy_client.expectString,
|
|
744
745
|
recommendationResourceSummaries: (_) => de_RecommendationResourceSummaryList(_, context)
|
|
@@ -753,7 +754,7 @@ var de_ListRecommendationsCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
753
754
|
const contents = (0, import_smithy_client.map)({
|
|
754
755
|
$metadata: deserializeMetadata(output)
|
|
755
756
|
});
|
|
756
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
757
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
757
758
|
const doc = (0, import_smithy_client.take)(data, {
|
|
758
759
|
nextToken: import_smithy_client.expectString,
|
|
759
760
|
recommendationSummaries: (_) => de_RecommendationSummaryList(_, context)
|
|
@@ -784,9 +785,9 @@ var de_UpdateRecommendationLifecycleCommand = /* @__PURE__ */ __name(async (outp
|
|
|
784
785
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
785
786
|
const parsedOutput = {
|
|
786
787
|
...output,
|
|
787
|
-
body: await
|
|
788
|
+
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
788
789
|
};
|
|
789
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
790
|
+
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
790
791
|
switch (errorCode) {
|
|
791
792
|
case "AccessDeniedException":
|
|
792
793
|
case "com.amazonaws.trustedadvisor#AccessDeniedException":
|
|
@@ -1064,7 +1065,6 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
|
1064
1065
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1065
1066
|
cfId: output.headers["x-amz-cf-id"]
|
|
1066
1067
|
}), "deserializeMetadata");
|
|
1067
|
-
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
1068
1068
|
var _aAI = "affectedAccountId";
|
|
1069
1069
|
var _aLUA = "afterLastUpdatedAt";
|
|
1070
1070
|
var _aS = "awsService";
|
|
@@ -1078,46 +1078,6 @@ var _rC = "regionCode";
|
|
|
1078
1078
|
var _s = "source";
|
|
1079
1079
|
var _st = "status";
|
|
1080
1080
|
var _t = "type";
|
|
1081
|
-
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1082
|
-
if (encoded.length) {
|
|
1083
|
-
return JSON.parse(encoded);
|
|
1084
|
-
}
|
|
1085
|
-
return {};
|
|
1086
|
-
}), "parseBody");
|
|
1087
|
-
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
1088
|
-
const value = await parseBody(errorBody, context);
|
|
1089
|
-
value.message = value.message ?? value.Message;
|
|
1090
|
-
return value;
|
|
1091
|
-
}, "parseErrorBody");
|
|
1092
|
-
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
1093
|
-
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
1094
|
-
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
1095
|
-
let cleanValue = rawValue;
|
|
1096
|
-
if (typeof cleanValue === "number") {
|
|
1097
|
-
cleanValue = cleanValue.toString();
|
|
1098
|
-
}
|
|
1099
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1100
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1101
|
-
}
|
|
1102
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1103
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1104
|
-
}
|
|
1105
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1106
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1107
|
-
}
|
|
1108
|
-
return cleanValue;
|
|
1109
|
-
}, "sanitizeErrorCode");
|
|
1110
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1111
|
-
if (headerKey !== void 0) {
|
|
1112
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1113
|
-
}
|
|
1114
|
-
if (data.code !== void 0) {
|
|
1115
|
-
return sanitizeErrorCode(data.code);
|
|
1116
|
-
}
|
|
1117
|
-
if (data["__type"] !== void 0) {
|
|
1118
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1119
|
-
}
|
|
1120
|
-
}, "loadRestJsonErrorCode");
|
|
1121
1081
|
|
|
1122
1082
|
// src/commands/GetOrganizationRecommendationCommand.ts
|
|
1123
1083
|
var _GetOrganizationRecommendationCommand = class _GetOrganizationRecommendationCommand 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 { requestBuilder as rb } from "@smithy/core";
|
|
2
3
|
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
4
|
import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
@@ -615,43 +616,3 @@ const _rC = "regionCode";
|
|
|
615
616
|
const _s = "source";
|
|
616
617
|
const _st = "status";
|
|
617
618
|
const _t = "type";
|
|
618
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
619
|
-
if (encoded.length) {
|
|
620
|
-
return JSON.parse(encoded);
|
|
621
|
-
}
|
|
622
|
-
return {};
|
|
623
|
-
});
|
|
624
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
625
|
-
const value = await parseBody(errorBody, context);
|
|
626
|
-
value.message = value.message ?? value.Message;
|
|
627
|
-
return value;
|
|
628
|
-
};
|
|
629
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
630
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
631
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
632
|
-
let cleanValue = rawValue;
|
|
633
|
-
if (typeof cleanValue === "number") {
|
|
634
|
-
cleanValue = cleanValue.toString();
|
|
635
|
-
}
|
|
636
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
637
|
-
cleanValue = cleanValue.split(",")[0];
|
|
638
|
-
}
|
|
639
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
640
|
-
cleanValue = cleanValue.split(":")[0];
|
|
641
|
-
}
|
|
642
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
643
|
-
cleanValue = cleanValue.split("#")[1];
|
|
644
|
-
}
|
|
645
|
-
return cleanValue;
|
|
646
|
-
};
|
|
647
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
648
|
-
if (headerKey !== undefined) {
|
|
649
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
650
|
-
}
|
|
651
|
-
if (data.code !== undefined) {
|
|
652
|
-
return sanitizeErrorCode(data.code);
|
|
653
|
-
}
|
|
654
|
-
if (data["__type"] !== undefined) {
|
|
655
|
-
return sanitizeErrorCode(data["__type"]);
|
|
656
|
-
}
|
|
657
|
-
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-trustedadvisor",
|
|
3
3
|
"description": "AWS SDK for JavaScript Trustedadvisor 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-trustedadvisor",
|
|
@@ -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",
|