@aws-sdk/client-secrets-manager 3.525.0 → 3.529.0
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 +24 -64
- package/dist-es/protocols/Aws_json1_1.js +1 -40
- package/package.json +4 -4
package/dist-cjs/index.js
CHANGED
|
@@ -515,6 +515,7 @@ var UpdateSecretRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
|
515
515
|
}), "UpdateSecretRequestFilterSensitiveLog");
|
|
516
516
|
|
|
517
517
|
// src/protocols/Aws_json1_1.ts
|
|
518
|
+
var import_core2 = require("@aws-sdk/core");
|
|
518
519
|
|
|
519
520
|
|
|
520
521
|
var import_uuid = require("uuid");
|
|
@@ -660,7 +661,7 @@ var de_BatchGetSecretValueCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
660
661
|
if (output.statusCode >= 300) {
|
|
661
662
|
return de_CommandError(output, context);
|
|
662
663
|
}
|
|
663
|
-
const data = await
|
|
664
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
664
665
|
let contents = {};
|
|
665
666
|
contents = de_BatchGetSecretValueResponse(data, context);
|
|
666
667
|
const response = {
|
|
@@ -673,7 +674,7 @@ var de_CancelRotateSecretCommand = /* @__PURE__ */ __name(async (output, context
|
|
|
673
674
|
if (output.statusCode >= 300) {
|
|
674
675
|
return de_CommandError(output, context);
|
|
675
676
|
}
|
|
676
|
-
const data = await
|
|
677
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
677
678
|
let contents = {};
|
|
678
679
|
contents = (0, import_smithy_client._json)(data);
|
|
679
680
|
const response = {
|
|
@@ -686,7 +687,7 @@ var de_CreateSecretCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
686
687
|
if (output.statusCode >= 300) {
|
|
687
688
|
return de_CommandError(output, context);
|
|
688
689
|
}
|
|
689
|
-
const data = await
|
|
690
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
690
691
|
let contents = {};
|
|
691
692
|
contents = de_CreateSecretResponse(data, context);
|
|
692
693
|
const response = {
|
|
@@ -699,7 +700,7 @@ var de_DeleteResourcePolicyCommand = /* @__PURE__ */ __name(async (output, conte
|
|
|
699
700
|
if (output.statusCode >= 300) {
|
|
700
701
|
return de_CommandError(output, context);
|
|
701
702
|
}
|
|
702
|
-
const data = await
|
|
703
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
703
704
|
let contents = {};
|
|
704
705
|
contents = (0, import_smithy_client._json)(data);
|
|
705
706
|
const response = {
|
|
@@ -712,7 +713,7 @@ var de_DeleteSecretCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
712
713
|
if (output.statusCode >= 300) {
|
|
713
714
|
return de_CommandError(output, context);
|
|
714
715
|
}
|
|
715
|
-
const data = await
|
|
716
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
716
717
|
let contents = {};
|
|
717
718
|
contents = de_DeleteSecretResponse(data, context);
|
|
718
719
|
const response = {
|
|
@@ -725,7 +726,7 @@ var de_DescribeSecretCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
725
726
|
if (output.statusCode >= 300) {
|
|
726
727
|
return de_CommandError(output, context);
|
|
727
728
|
}
|
|
728
|
-
const data = await
|
|
729
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
729
730
|
let contents = {};
|
|
730
731
|
contents = de_DescribeSecretResponse(data, context);
|
|
731
732
|
const response = {
|
|
@@ -738,7 +739,7 @@ var de_GetRandomPasswordCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
738
739
|
if (output.statusCode >= 300) {
|
|
739
740
|
return de_CommandError(output, context);
|
|
740
741
|
}
|
|
741
|
-
const data = await
|
|
742
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
742
743
|
let contents = {};
|
|
743
744
|
contents = (0, import_smithy_client._json)(data);
|
|
744
745
|
const response = {
|
|
@@ -751,7 +752,7 @@ var de_GetResourcePolicyCommand = /* @__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_GetSecretValueCommand = /* @__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 = de_GetSecretValueResponse(data, context);
|
|
770
771
|
const response = {
|
|
@@ -777,7 +778,7 @@ var de_ListSecretsCommand = /* @__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 = de_ListSecretsResponse(data, context);
|
|
783
784
|
const response = {
|
|
@@ -790,7 +791,7 @@ var de_ListSecretVersionIdsCommand = /* @__PURE__ */ __name(async (output, conte
|
|
|
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 = de_ListSecretVersionIdsResponse(data, context);
|
|
796
797
|
const response = {
|
|
@@ -803,7 +804,7 @@ var de_PutResourcePolicyCommand = /* @__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_PutSecretValueCommand = /* @__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 = (0, import_smithy_client._json)(data);
|
|
822
823
|
const response = {
|
|
@@ -829,7 +830,7 @@ var de_RemoveRegionsFromReplicationCommand = /* @__PURE__ */ __name(async (outpu
|
|
|
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 = de_RemoveRegionsFromReplicationResponse(data, context);
|
|
835
836
|
const response = {
|
|
@@ -842,7 +843,7 @@ var de_ReplicateSecretToRegionsCommand = /* @__PURE__ */ __name(async (output, c
|
|
|
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 = de_ReplicateSecretToRegionsResponse(data, context);
|
|
848
849
|
const response = {
|
|
@@ -855,7 +856,7 @@ var de_RestoreSecretCommand = /* @__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 = (0, import_smithy_client._json)(data);
|
|
861
862
|
const response = {
|
|
@@ -868,7 +869,7 @@ var de_RotateSecretCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
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 = (0, import_smithy_client._json)(data);
|
|
874
875
|
const response = {
|
|
@@ -881,7 +882,7 @@ var de_StopReplicationToReplicaCommand = /* @__PURE__ */ __name(async (output, c
|
|
|
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 = (0, import_smithy_client._json)(data);
|
|
887
888
|
const response = {
|
|
@@ -914,7 +915,7 @@ var de_UpdateSecretCommand = /* @__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_UpdateSecretVersionStageCommand = /* @__PURE__ */ __name(async (output, c
|
|
|
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_ValidateResourcePolicyCommand = /* @__PURE__ */ __name(async (output, con
|
|
|
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 = (0, import_smithy_client._json)(data);
|
|
946
947
|
const response = {
|
|
@@ -952,9 +953,9 @@ var de_ValidateResourcePolicyCommand = /* @__PURE__ */ __name(async (output, con
|
|
|
952
953
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
953
954
|
const parsedOutput = {
|
|
954
955
|
...output,
|
|
955
|
-
body: await
|
|
956
|
+
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
956
957
|
};
|
|
957
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
958
|
+
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
958
959
|
switch (errorCode) {
|
|
959
960
|
case "DecryptionFailure":
|
|
960
961
|
case "com.amazonaws.secretsmanager#DecryptionFailure":
|
|
@@ -1311,7 +1312,6 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
|
1311
1312
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1312
1313
|
cfId: output.headers["x-amz-cf-id"]
|
|
1313
1314
|
}), "deserializeMetadata");
|
|
1314
|
-
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
1315
1315
|
var throwDefaultError = (0, import_smithy_client.withBaseException)(SecretsManagerServiceException);
|
|
1316
1316
|
var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
|
|
1317
1317
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
@@ -1338,46 +1338,6 @@ function sharedHeaders(operation) {
|
|
|
1338
1338
|
};
|
|
1339
1339
|
}
|
|
1340
1340
|
__name(sharedHeaders, "sharedHeaders");
|
|
1341
|
-
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1342
|
-
if (encoded.length) {
|
|
1343
|
-
return JSON.parse(encoded);
|
|
1344
|
-
}
|
|
1345
|
-
return {};
|
|
1346
|
-
}), "parseBody");
|
|
1347
|
-
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
1348
|
-
const value = await parseBody(errorBody, context);
|
|
1349
|
-
value.message = value.message ?? value.Message;
|
|
1350
|
-
return value;
|
|
1351
|
-
}, "parseErrorBody");
|
|
1352
|
-
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
1353
|
-
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
1354
|
-
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
1355
|
-
let cleanValue = rawValue;
|
|
1356
|
-
if (typeof cleanValue === "number") {
|
|
1357
|
-
cleanValue = cleanValue.toString();
|
|
1358
|
-
}
|
|
1359
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1360
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1361
|
-
}
|
|
1362
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1363
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1364
|
-
}
|
|
1365
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1366
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1367
|
-
}
|
|
1368
|
-
return cleanValue;
|
|
1369
|
-
}, "sanitizeErrorCode");
|
|
1370
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1371
|
-
if (headerKey !== void 0) {
|
|
1372
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1373
|
-
}
|
|
1374
|
-
if (data.code !== void 0) {
|
|
1375
|
-
return sanitizeErrorCode(data.code);
|
|
1376
|
-
}
|
|
1377
|
-
if (data["__type"] !== void 0) {
|
|
1378
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1379
|
-
}
|
|
1380
|
-
}, "loadRestJsonErrorCode");
|
|
1381
1341
|
|
|
1382
1342
|
// src/commands/BatchGetSecretValueCommand.ts
|
|
1383
1343
|
var _BatchGetSecretValueCommand = class _BatchGetSecretValueCommand 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, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
4
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
@@ -830,43 +831,3 @@ function sharedHeaders(operation) {
|
|
|
830
831
|
"x-amz-target": `secretsmanager.${operation}`,
|
|
831
832
|
};
|
|
832
833
|
}
|
|
833
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
834
|
-
if (encoded.length) {
|
|
835
|
-
return JSON.parse(encoded);
|
|
836
|
-
}
|
|
837
|
-
return {};
|
|
838
|
-
});
|
|
839
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
840
|
-
const value = await parseBody(errorBody, context);
|
|
841
|
-
value.message = value.message ?? value.Message;
|
|
842
|
-
return value;
|
|
843
|
-
};
|
|
844
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
845
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
846
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
847
|
-
let cleanValue = rawValue;
|
|
848
|
-
if (typeof cleanValue === "number") {
|
|
849
|
-
cleanValue = cleanValue.toString();
|
|
850
|
-
}
|
|
851
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
852
|
-
cleanValue = cleanValue.split(",")[0];
|
|
853
|
-
}
|
|
854
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
855
|
-
cleanValue = cleanValue.split(":")[0];
|
|
856
|
-
}
|
|
857
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
858
|
-
cleanValue = cleanValue.split("#")[1];
|
|
859
|
-
}
|
|
860
|
-
return cleanValue;
|
|
861
|
-
};
|
|
862
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
863
|
-
if (headerKey !== undefined) {
|
|
864
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
865
|
-
}
|
|
866
|
-
if (data.code !== undefined) {
|
|
867
|
-
return sanitizeErrorCode(data.code);
|
|
868
|
-
}
|
|
869
|
-
if (data["__type"] !== undefined) {
|
|
870
|
-
return sanitizeErrorCode(data["__type"]);
|
|
871
|
-
}
|
|
872
|
-
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-secrets-manager",
|
|
3
3
|
"description": "AWS SDK for JavaScript Secrets Manager Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.529.0",
|
|
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-secrets-manager",
|
|
@@ -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.0",
|
|
24
|
+
"@aws-sdk/core": "3.529.0",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.529.0",
|
|
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",
|