@aws-sdk/client-synthetics 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 +15 -55
- package/dist-es/protocols/Aws_restJson1.js +1 -40
- package/package.json +4 -4
package/dist-cjs/index.js
CHANGED
|
@@ -224,6 +224,7 @@ var import_middleware_serde = require("@smithy/middleware-serde");
|
|
|
224
224
|
var import_types = require("@smithy/types");
|
|
225
225
|
|
|
226
226
|
// src/protocols/Aws_restJson1.ts
|
|
227
|
+
var import_core2 = require("@aws-sdk/core");
|
|
227
228
|
|
|
228
229
|
|
|
229
230
|
|
|
@@ -793,7 +794,7 @@ var de_CreateCanaryCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
793
794
|
const contents = (0, import_smithy_client.map)({
|
|
794
795
|
$metadata: deserializeMetadata(output)
|
|
795
796
|
});
|
|
796
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
797
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
797
798
|
const doc = (0, import_smithy_client.take)(data, {
|
|
798
799
|
Canary: (_) => de_Canary(_, context)
|
|
799
800
|
});
|
|
@@ -807,7 +808,7 @@ var de_CreateGroupCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
807
808
|
const contents = (0, import_smithy_client.map)({
|
|
808
809
|
$metadata: deserializeMetadata(output)
|
|
809
810
|
});
|
|
810
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
811
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
811
812
|
const doc = (0, import_smithy_client.take)(data, {
|
|
812
813
|
Group: (_) => de_Group(_, context)
|
|
813
814
|
});
|
|
@@ -841,7 +842,7 @@ var de_DescribeCanariesCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
841
842
|
const contents = (0, import_smithy_client.map)({
|
|
842
843
|
$metadata: deserializeMetadata(output)
|
|
843
844
|
});
|
|
844
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
845
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
845
846
|
const doc = (0, import_smithy_client.take)(data, {
|
|
846
847
|
Canaries: (_) => de_Canaries(_, context),
|
|
847
848
|
NextToken: import_smithy_client.expectString
|
|
@@ -856,7 +857,7 @@ var de_DescribeCanariesLastRunCommand = /* @__PURE__ */ __name(async (output, co
|
|
|
856
857
|
const contents = (0, import_smithy_client.map)({
|
|
857
858
|
$metadata: deserializeMetadata(output)
|
|
858
859
|
});
|
|
859
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
860
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
860
861
|
const doc = (0, import_smithy_client.take)(data, {
|
|
861
862
|
CanariesLastRun: (_) => de_CanariesLastRun(_, context),
|
|
862
863
|
NextToken: import_smithy_client.expectString
|
|
@@ -871,7 +872,7 @@ var de_DescribeRuntimeVersionsCommand = /* @__PURE__ */ __name(async (output, co
|
|
|
871
872
|
const contents = (0, import_smithy_client.map)({
|
|
872
873
|
$metadata: deserializeMetadata(output)
|
|
873
874
|
});
|
|
874
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
875
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
875
876
|
const doc = (0, import_smithy_client.take)(data, {
|
|
876
877
|
NextToken: import_smithy_client.expectString,
|
|
877
878
|
RuntimeVersions: (_) => de_RuntimeVersionList(_, context)
|
|
@@ -896,7 +897,7 @@ var de_GetCanaryCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
896
897
|
const contents = (0, import_smithy_client.map)({
|
|
897
898
|
$metadata: deserializeMetadata(output)
|
|
898
899
|
});
|
|
899
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
900
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
900
901
|
const doc = (0, import_smithy_client.take)(data, {
|
|
901
902
|
Canary: (_) => de_Canary(_, context)
|
|
902
903
|
});
|
|
@@ -910,7 +911,7 @@ var de_GetCanaryRunsCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
910
911
|
const contents = (0, import_smithy_client.map)({
|
|
911
912
|
$metadata: deserializeMetadata(output)
|
|
912
913
|
});
|
|
913
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
914
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
914
915
|
const doc = (0, import_smithy_client.take)(data, {
|
|
915
916
|
CanaryRuns: (_) => de_CanaryRuns(_, context),
|
|
916
917
|
NextToken: import_smithy_client.expectString
|
|
@@ -925,7 +926,7 @@ var de_GetGroupCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
925
926
|
const contents = (0, import_smithy_client.map)({
|
|
926
927
|
$metadata: deserializeMetadata(output)
|
|
927
928
|
});
|
|
928
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
929
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
929
930
|
const doc = (0, import_smithy_client.take)(data, {
|
|
930
931
|
Group: (_) => de_Group(_, context)
|
|
931
932
|
});
|
|
@@ -939,7 +940,7 @@ var de_ListAssociatedGroupsCommand = /* @__PURE__ */ __name(async (output, conte
|
|
|
939
940
|
const contents = (0, import_smithy_client.map)({
|
|
940
941
|
$metadata: deserializeMetadata(output)
|
|
941
942
|
});
|
|
942
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
943
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
943
944
|
const doc = (0, import_smithy_client.take)(data, {
|
|
944
945
|
Groups: import_smithy_client._json,
|
|
945
946
|
NextToken: import_smithy_client.expectString
|
|
@@ -954,7 +955,7 @@ var de_ListGroupResourcesCommand = /* @__PURE__ */ __name(async (output, context
|
|
|
954
955
|
const contents = (0, import_smithy_client.map)({
|
|
955
956
|
$metadata: deserializeMetadata(output)
|
|
956
957
|
});
|
|
957
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
958
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
958
959
|
const doc = (0, import_smithy_client.take)(data, {
|
|
959
960
|
NextToken: import_smithy_client.expectString,
|
|
960
961
|
Resources: import_smithy_client._json
|
|
@@ -969,7 +970,7 @@ var de_ListGroupsCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
969
970
|
const contents = (0, import_smithy_client.map)({
|
|
970
971
|
$metadata: deserializeMetadata(output)
|
|
971
972
|
});
|
|
972
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
973
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
973
974
|
const doc = (0, import_smithy_client.take)(data, {
|
|
974
975
|
Groups: import_smithy_client._json,
|
|
975
976
|
NextToken: import_smithy_client.expectString
|
|
@@ -984,7 +985,7 @@ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
984
985
|
const contents = (0, import_smithy_client.map)({
|
|
985
986
|
$metadata: deserializeMetadata(output)
|
|
986
987
|
});
|
|
987
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
988
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
988
989
|
const doc = (0, import_smithy_client.take)(data, {
|
|
989
990
|
Tags: import_smithy_client._json
|
|
990
991
|
});
|
|
@@ -1044,9 +1045,9 @@ var de_UpdateCanaryCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1044
1045
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
1045
1046
|
const parsedOutput = {
|
|
1046
1047
|
...output,
|
|
1047
|
-
body: await
|
|
1048
|
+
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
1048
1049
|
};
|
|
1049
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1050
|
+
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
1050
1051
|
switch (errorCode) {
|
|
1051
1052
|
case "ConflictException":
|
|
1052
1053
|
case "com.amazonaws.synthetics#ConflictException":
|
|
@@ -1325,51 +1326,10 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
|
1325
1326
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1326
1327
|
cfId: output.headers["x-amz-cf-id"]
|
|
1327
1328
|
}), "deserializeMetadata");
|
|
1328
|
-
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
1329
1329
|
var _DL = "DeleteLambda";
|
|
1330
1330
|
var _TK = "TagKeys";
|
|
1331
1331
|
var _dL = "deleteLambda";
|
|
1332
1332
|
var _tK = "tagKeys";
|
|
1333
|
-
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1334
|
-
if (encoded.length) {
|
|
1335
|
-
return JSON.parse(encoded);
|
|
1336
|
-
}
|
|
1337
|
-
return {};
|
|
1338
|
-
}), "parseBody");
|
|
1339
|
-
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
1340
|
-
const value = await parseBody(errorBody, context);
|
|
1341
|
-
value.message = value.message ?? value.Message;
|
|
1342
|
-
return value;
|
|
1343
|
-
}, "parseErrorBody");
|
|
1344
|
-
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
1345
|
-
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
1346
|
-
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
1347
|
-
let cleanValue = rawValue;
|
|
1348
|
-
if (typeof cleanValue === "number") {
|
|
1349
|
-
cleanValue = cleanValue.toString();
|
|
1350
|
-
}
|
|
1351
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1352
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1353
|
-
}
|
|
1354
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1355
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1356
|
-
}
|
|
1357
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1358
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1359
|
-
}
|
|
1360
|
-
return cleanValue;
|
|
1361
|
-
}, "sanitizeErrorCode");
|
|
1362
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1363
|
-
if (headerKey !== void 0) {
|
|
1364
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1365
|
-
}
|
|
1366
|
-
if (data.code !== void 0) {
|
|
1367
|
-
return sanitizeErrorCode(data.code);
|
|
1368
|
-
}
|
|
1369
|
-
if (data["__type"] !== void 0) {
|
|
1370
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1371
|
-
}
|
|
1372
|
-
}, "loadRestJsonErrorCode");
|
|
1373
1333
|
|
|
1374
1334
|
// src/commands/AssociateResourceCommand.ts
|
|
1375
1335
|
var _AssociateResourceCommand = class _AssociateResourceCommand 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, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
4
|
import { BadRequestException, ConflictException, InternalFailureException, InternalServerException, NotFoundException, RequestEntityTooLargeException, ResourceNotFoundException, ServiceQuotaExceededException, TooManyRequestsException, ValidationException, } from "../models/models_0";
|
|
@@ -857,43 +858,3 @@ const _DL = "DeleteLambda";
|
|
|
857
858
|
const _TK = "TagKeys";
|
|
858
859
|
const _dL = "deleteLambda";
|
|
859
860
|
const _tK = "tagKeys";
|
|
860
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
861
|
-
if (encoded.length) {
|
|
862
|
-
return JSON.parse(encoded);
|
|
863
|
-
}
|
|
864
|
-
return {};
|
|
865
|
-
});
|
|
866
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
867
|
-
const value = await parseBody(errorBody, context);
|
|
868
|
-
value.message = value.message ?? value.Message;
|
|
869
|
-
return value;
|
|
870
|
-
};
|
|
871
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
872
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
873
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
874
|
-
let cleanValue = rawValue;
|
|
875
|
-
if (typeof cleanValue === "number") {
|
|
876
|
-
cleanValue = cleanValue.toString();
|
|
877
|
-
}
|
|
878
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
879
|
-
cleanValue = cleanValue.split(",")[0];
|
|
880
|
-
}
|
|
881
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
882
|
-
cleanValue = cleanValue.split(":")[0];
|
|
883
|
-
}
|
|
884
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
885
|
-
cleanValue = cleanValue.split("#")[1];
|
|
886
|
-
}
|
|
887
|
-
return cleanValue;
|
|
888
|
-
};
|
|
889
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
890
|
-
if (headerKey !== undefined) {
|
|
891
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
892
|
-
}
|
|
893
|
-
if (data.code !== undefined) {
|
|
894
|
-
return sanitizeErrorCode(data.code);
|
|
895
|
-
}
|
|
896
|
-
if (data["__type"] !== undefined) {
|
|
897
|
-
return sanitizeErrorCode(data["__type"]);
|
|
898
|
-
}
|
|
899
|
-
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-synthetics",
|
|
3
3
|
"description": "AWS SDK for JavaScript Synthetics 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-synthetics",
|
|
@@ -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",
|