@aws-sdk/client-arc-zonal-shift 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 +14 -54
- package/dist-es/protocols/Aws_restJson1.js +1 -40
- package/package.json +4 -4
package/dist-cjs/index.js
CHANGED
|
@@ -210,6 +210,7 @@ var import_middleware_serde = require("@smithy/middleware-serde");
|
|
|
210
210
|
var import_types = require("@smithy/types");
|
|
211
211
|
|
|
212
212
|
// src/protocols/Aws_restJson1.ts
|
|
213
|
+
var import_core2 = require("@aws-sdk/core");
|
|
213
214
|
|
|
214
215
|
|
|
215
216
|
|
|
@@ -547,7 +548,7 @@ var de_CancelZonalShiftCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
547
548
|
const contents = (0, import_smithy_client.map)({
|
|
548
549
|
$metadata: deserializeMetadata(output)
|
|
549
550
|
});
|
|
550
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
551
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
551
552
|
const doc = (0, import_smithy_client.take)(data, {
|
|
552
553
|
awayFrom: import_smithy_client.expectString,
|
|
553
554
|
comment: import_smithy_client.expectString,
|
|
@@ -567,7 +568,7 @@ var de_CreatePracticeRunConfigurationCommand = /* @__PURE__ */ __name(async (out
|
|
|
567
568
|
const contents = (0, import_smithy_client.map)({
|
|
568
569
|
$metadata: deserializeMetadata(output)
|
|
569
570
|
});
|
|
570
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
571
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
571
572
|
const doc = (0, import_smithy_client.take)(data, {
|
|
572
573
|
arn: import_smithy_client.expectString,
|
|
573
574
|
name: import_smithy_client.expectString,
|
|
@@ -584,7 +585,7 @@ var de_DeletePracticeRunConfigurationCommand = /* @__PURE__ */ __name(async (out
|
|
|
584
585
|
const contents = (0, import_smithy_client.map)({
|
|
585
586
|
$metadata: deserializeMetadata(output)
|
|
586
587
|
});
|
|
587
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
588
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
588
589
|
const doc = (0, import_smithy_client.take)(data, {
|
|
589
590
|
arn: import_smithy_client.expectString,
|
|
590
591
|
name: import_smithy_client.expectString,
|
|
@@ -600,7 +601,7 @@ var de_GetManagedResourceCommand = /* @__PURE__ */ __name(async (output, context
|
|
|
600
601
|
const contents = (0, import_smithy_client.map)({
|
|
601
602
|
$metadata: deserializeMetadata(output)
|
|
602
603
|
});
|
|
603
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
604
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
604
605
|
const doc = (0, import_smithy_client.take)(data, {
|
|
605
606
|
appliedWeights: (_) => de_AppliedWeights(_, context),
|
|
606
607
|
arn: import_smithy_client.expectString,
|
|
@@ -620,7 +621,7 @@ var de_ListAutoshiftsCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
620
621
|
const contents = (0, import_smithy_client.map)({
|
|
621
622
|
$metadata: deserializeMetadata(output)
|
|
622
623
|
});
|
|
623
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
624
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
624
625
|
const doc = (0, import_smithy_client.take)(data, {
|
|
625
626
|
items: (_) => de_AutoshiftSummaries(_, context),
|
|
626
627
|
nextToken: import_smithy_client.expectString
|
|
@@ -635,7 +636,7 @@ var de_ListManagedResourcesCommand = /* @__PURE__ */ __name(async (output, conte
|
|
|
635
636
|
const contents = (0, import_smithy_client.map)({
|
|
636
637
|
$metadata: deserializeMetadata(output)
|
|
637
638
|
});
|
|
638
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
639
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
639
640
|
const doc = (0, import_smithy_client.take)(data, {
|
|
640
641
|
items: (_) => de_ManagedResourceSummaries(_, context),
|
|
641
642
|
nextToken: import_smithy_client.expectString
|
|
@@ -650,7 +651,7 @@ var de_ListZonalShiftsCommand = /* @__PURE__ */ __name(async (output, context) =
|
|
|
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
|
items: (_) => de_ZonalShiftSummaries(_, context),
|
|
656
657
|
nextToken: import_smithy_client.expectString
|
|
@@ -665,7 +666,7 @@ var de_StartZonalShiftCommand = /* @__PURE__ */ __name(async (output, context) =
|
|
|
665
666
|
const contents = (0, import_smithy_client.map)({
|
|
666
667
|
$metadata: deserializeMetadata(output)
|
|
667
668
|
});
|
|
668
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
669
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
669
670
|
const doc = (0, import_smithy_client.take)(data, {
|
|
670
671
|
awayFrom: import_smithy_client.expectString,
|
|
671
672
|
comment: import_smithy_client.expectString,
|
|
@@ -685,7 +686,7 @@ var de_UpdatePracticeRunConfigurationCommand = /* @__PURE__ */ __name(async (out
|
|
|
685
686
|
const contents = (0, import_smithy_client.map)({
|
|
686
687
|
$metadata: deserializeMetadata(output)
|
|
687
688
|
});
|
|
688
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
689
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
689
690
|
const doc = (0, import_smithy_client.take)(data, {
|
|
690
691
|
arn: import_smithy_client.expectString,
|
|
691
692
|
name: import_smithy_client.expectString,
|
|
@@ -702,7 +703,7 @@ var de_UpdateZonalAutoshiftConfigurationCommand = /* @__PURE__ */ __name(async (
|
|
|
702
703
|
const contents = (0, import_smithy_client.map)({
|
|
703
704
|
$metadata: deserializeMetadata(output)
|
|
704
705
|
});
|
|
705
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
706
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
706
707
|
const doc = (0, import_smithy_client.take)(data, {
|
|
707
708
|
resourceIdentifier: import_smithy_client.expectString,
|
|
708
709
|
zonalAutoshiftStatus: import_smithy_client.expectString
|
|
@@ -717,7 +718,7 @@ var de_UpdateZonalShiftCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
717
718
|
const contents = (0, import_smithy_client.map)({
|
|
718
719
|
$metadata: deserializeMetadata(output)
|
|
719
720
|
});
|
|
720
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
721
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
721
722
|
const doc = (0, import_smithy_client.take)(data, {
|
|
722
723
|
awayFrom: import_smithy_client.expectString,
|
|
723
724
|
comment: import_smithy_client.expectString,
|
|
@@ -733,9 +734,9 @@ var de_UpdateZonalShiftCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
733
734
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
734
735
|
const parsedOutput = {
|
|
735
736
|
...output,
|
|
736
|
-
body: await
|
|
737
|
+
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
737
738
|
};
|
|
738
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
739
|
+
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
739
740
|
switch (errorCode) {
|
|
740
741
|
case "AccessDeniedException":
|
|
741
742
|
case "com.amazonaws.arczonalshift#AccessDeniedException":
|
|
@@ -942,51 +943,10 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
|
942
943
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
943
944
|
cfId: output.headers["x-amz-cf-id"]
|
|
944
945
|
}), "deserializeMetadata");
|
|
945
|
-
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
946
946
|
var _mR = "maxResults";
|
|
947
947
|
var _nT = "nextToken";
|
|
948
948
|
var _rI = "resourceIdentifier";
|
|
949
949
|
var _s = "status";
|
|
950
|
-
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
951
|
-
if (encoded.length) {
|
|
952
|
-
return JSON.parse(encoded);
|
|
953
|
-
}
|
|
954
|
-
return {};
|
|
955
|
-
}), "parseBody");
|
|
956
|
-
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
957
|
-
const value = await parseBody(errorBody, context);
|
|
958
|
-
value.message = value.message ?? value.Message;
|
|
959
|
-
return value;
|
|
960
|
-
}, "parseErrorBody");
|
|
961
|
-
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
962
|
-
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
963
|
-
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
964
|
-
let cleanValue = rawValue;
|
|
965
|
-
if (typeof cleanValue === "number") {
|
|
966
|
-
cleanValue = cleanValue.toString();
|
|
967
|
-
}
|
|
968
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
969
|
-
cleanValue = cleanValue.split(",")[0];
|
|
970
|
-
}
|
|
971
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
972
|
-
cleanValue = cleanValue.split(":")[0];
|
|
973
|
-
}
|
|
974
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
975
|
-
cleanValue = cleanValue.split("#")[1];
|
|
976
|
-
}
|
|
977
|
-
return cleanValue;
|
|
978
|
-
}, "sanitizeErrorCode");
|
|
979
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
980
|
-
if (headerKey !== void 0) {
|
|
981
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
982
|
-
}
|
|
983
|
-
if (data.code !== void 0) {
|
|
984
|
-
return sanitizeErrorCode(data.code);
|
|
985
|
-
}
|
|
986
|
-
if (data["__type"] !== void 0) {
|
|
987
|
-
return sanitizeErrorCode(data["__type"]);
|
|
988
|
-
}
|
|
989
|
-
}, "loadRestJsonErrorCode");
|
|
990
950
|
|
|
991
951
|
// src/commands/CancelZonalShiftCommand.ts
|
|
992
952
|
var _CancelZonalShiftCommand = class _CancelZonalShiftCommand 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, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, limitedParseFloat32 as __limitedParseFloat32, map, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
4
|
import { ARCZonalShiftServiceException as __BaseException } from "../models/ARCZonalShiftServiceException";
|
|
@@ -569,43 +570,3 @@ const _mR = "maxResults";
|
|
|
569
570
|
const _nT = "nextToken";
|
|
570
571
|
const _rI = "resourceIdentifier";
|
|
571
572
|
const _s = "status";
|
|
572
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
573
|
-
if (encoded.length) {
|
|
574
|
-
return JSON.parse(encoded);
|
|
575
|
-
}
|
|
576
|
-
return {};
|
|
577
|
-
});
|
|
578
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
579
|
-
const value = await parseBody(errorBody, context);
|
|
580
|
-
value.message = value.message ?? value.Message;
|
|
581
|
-
return value;
|
|
582
|
-
};
|
|
583
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
584
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
585
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
586
|
-
let cleanValue = rawValue;
|
|
587
|
-
if (typeof cleanValue === "number") {
|
|
588
|
-
cleanValue = cleanValue.toString();
|
|
589
|
-
}
|
|
590
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
591
|
-
cleanValue = cleanValue.split(",")[0];
|
|
592
|
-
}
|
|
593
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
594
|
-
cleanValue = cleanValue.split(":")[0];
|
|
595
|
-
}
|
|
596
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
597
|
-
cleanValue = cleanValue.split("#")[1];
|
|
598
|
-
}
|
|
599
|
-
return cleanValue;
|
|
600
|
-
};
|
|
601
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
602
|
-
if (headerKey !== undefined) {
|
|
603
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
604
|
-
}
|
|
605
|
-
if (data.code !== undefined) {
|
|
606
|
-
return sanitizeErrorCode(data.code);
|
|
607
|
-
}
|
|
608
|
-
if (data["__type"] !== undefined) {
|
|
609
|
-
return sanitizeErrorCode(data["__type"]);
|
|
610
|
-
}
|
|
611
|
-
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-arc-zonal-shift",
|
|
3
3
|
"description": "AWS SDK for JavaScript Arc Zonal Shift 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-arc-zonal-shift",
|
|
@@ -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",
|