@aws-sdk/client-secrets-manager 3.43.0 → 3.47.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/CHANGELOG.md +47 -0
- package/README.md +1 -1
- package/dist-cjs/endpoints.js +1 -24
- package/dist-cjs/models/models_0.js +2 -74
- package/dist-cjs/runtimeConfig.browser.js +7 -2
- package/dist-cjs/runtimeConfig.js +9 -3
- package/dist-es/endpoints.js +1 -24
- package/dist-es/models/models_0.js +0 -48
- package/dist-es/runtimeConfig.browser.js +12 -3
- package/dist-es/runtimeConfig.js +13 -6
- package/dist-types/SecretsManager.d.ts +142 -727
- package/dist-types/SecretsManagerClient.d.ts +6 -2
- package/dist-types/commands/CancelRotateSecretCommand.d.ts +7 -49
- package/dist-types/commands/CreateSecretCommand.d.ts +19 -87
- package/dist-types/commands/DeleteResourcePolicyCommand.d.ts +2 -24
- package/dist-types/commands/DeleteSecretCommand.d.ts +9 -42
- package/dist-types/commands/DescribeSecretCommand.d.ts +2 -28
- package/dist-types/commands/GetRandomPasswordCommand.d.ts +1 -11
- package/dist-types/commands/GetResourcePolicyCommand.d.ts +4 -27
- package/dist-types/commands/GetSecretValueCommand.d.ts +4 -25
- package/dist-types/commands/ListSecretVersionIdsCommand.d.ts +6 -25
- package/dist-types/commands/ListSecretsCommand.d.ts +7 -26
- package/dist-types/commands/PutResourcePolicyCommand.d.ts +4 -31
- package/dist-types/commands/PutSecretValueCommand.d.ts +15 -83
- package/dist-types/commands/RemoveRegionsFromReplicationCommand.d.ts +1 -1
- package/dist-types/commands/ReplicateSecretToRegionsCommand.d.ts +1 -2
- package/dist-types/commands/RestoreSecretCommand.d.ts +1 -18
- package/dist-types/commands/RotateSecretCommand.d.ts +17 -60
- package/dist-types/commands/StopReplicationToReplicaCommand.d.ts +2 -1
- package/dist-types/commands/TagResourceCommand.d.ts +8 -29
- package/dist-types/commands/UntagResourceCommand.d.ts +1 -21
- package/dist-types/commands/UpdateSecretCommand.d.ts +19 -83
- package/dist-types/commands/UpdateSecretVersionStageCommand.d.ts +6 -28
- package/dist-types/commands/ValidateResourcePolicyCommand.d.ts +5 -25
- package/dist-types/models/models_0.d.ts +400 -551
- package/dist-types/runtimeConfig.browser.d.ts +3 -2
- package/dist-types/runtimeConfig.d.ts +4 -3
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/ts3.4/SecretsManagerClient.d.ts +3 -1
- package/dist-types/ts3.4/models/models_0.d.ts +0 -48
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +3 -2
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -3
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -0
- package/package.json +39 -46
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,53 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.47.1](https://github.com/aws/aws-sdk-js-v3/compare/v3.47.0-release-test-1...v3.47.1) (2022-01-20)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @aws-sdk/client-secrets-manager
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [3.47.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.46.0...v3.47.0) (2022-01-15)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **clients:** update clients to use default values inferred from defaults mode ([#3192](https://github.com/aws/aws-sdk-js-v3/issues/3192)) ([9152e21](https://github.com/aws/aws-sdk-js-v3/commit/9152e210c6ec29f34bb070eaf2874039022e6ab7))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# [3.46.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.45.0...v3.46.0) (2022-01-07)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* **clients:** update clean:dist script to delete dist-* folder ([#3155](https://github.com/aws/aws-sdk-js-v3/issues/3155)) ([cdb1709](https://github.com/aws/aws-sdk-js-v3/commit/cdb17090f82d1fc8755811c82cbed5976ec7e60b))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Features
|
|
34
|
+
|
|
35
|
+
* **clients:** extend typedoc.json from root ([#3136](https://github.com/aws/aws-sdk-js-v3/issues/3136)) ([f6a3ef5](https://github.com/aws/aws-sdk-js-v3/commit/f6a3ef541ae2d92872d09d8cab6727911287ebb2))
|
|
36
|
+
* end support for Node.js 10.x ([#3122](https://github.com/aws/aws-sdk-js-v3/issues/3122)) ([7acf18a](https://github.com/aws/aws-sdk-js-v3/commit/7acf18abd3fb1cc461f809110cdb0d7968c2070e))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
# [3.45.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.44.0...v3.45.0) (2021-12-23)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
### Features
|
|
46
|
+
|
|
47
|
+
* **clients:** update clients as of 2021/12/23 ([#3110](https://github.com/aws/aws-sdk-js-v3/issues/3110)) ([5d638e1](https://github.com/aws/aws-sdk-js-v3/commit/5d638e188ce64fa80fe36b8cba79ba63b80b50b7))
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
6
53
|
# [3.43.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.42.0...v3.43.0) (2021-11-29)
|
|
7
54
|
|
|
8
55
|
**Note:** Version bump only for package @aws-sdk/client-secrets-manager
|
package/README.md
CHANGED
|
@@ -61,7 +61,7 @@ You should always submit the input as a single JSON text string.</p>
|
|
|
61
61
|
account and delivers log files to an Amazon S3 bucket. By using information that's collected
|
|
62
62
|
by Amazon Web Services CloudTrail, you can determine the requests successfully made to Secrets Manager, who made the
|
|
63
63
|
request, when it was made, and so on. For more about Amazon Web Services Secrets Manager and support for Amazon Web Services
|
|
64
|
-
CloudTrail, see <a href="
|
|
64
|
+
CloudTrail, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/monitoring.html#monitoring_cloudtrail">Logging
|
|
65
65
|
Amazon Web Services Secrets Manager Events with Amazon Web Services CloudTrail</a> in the <i>Amazon Web Services Secrets Manager User Guide</i>.
|
|
66
66
|
To learn more about CloudTrail, including enabling it and find your log files, see the <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/what_is_cloud_trail_top_level.html">Amazon Web Services CloudTrail User Guide</a>.</p>
|
|
67
67
|
|
package/dist-cjs/endpoints.js
CHANGED
|
@@ -5,10 +5,6 @@ const config_resolver_1 = require("@aws-sdk/config-resolver");
|
|
|
5
5
|
const regionHash = {
|
|
6
6
|
"us-east-1": {
|
|
7
7
|
variants: [
|
|
8
|
-
{
|
|
9
|
-
hostname: "secretsmanager.us-east-1.amazonaws.com",
|
|
10
|
-
tags: [],
|
|
11
|
-
},
|
|
12
8
|
{
|
|
13
9
|
hostname: "secretsmanager-fips.us-east-1.amazonaws.com",
|
|
14
10
|
tags: ["fips"],
|
|
@@ -17,10 +13,6 @@ const regionHash = {
|
|
|
17
13
|
},
|
|
18
14
|
"us-east-2": {
|
|
19
15
|
variants: [
|
|
20
|
-
{
|
|
21
|
-
hostname: "secretsmanager.us-east-2.amazonaws.com",
|
|
22
|
-
tags: [],
|
|
23
|
-
},
|
|
24
16
|
{
|
|
25
17
|
hostname: "secretsmanager-fips.us-east-2.amazonaws.com",
|
|
26
18
|
tags: ["fips"],
|
|
@@ -29,10 +21,6 @@ const regionHash = {
|
|
|
29
21
|
},
|
|
30
22
|
"us-gov-east-1": {
|
|
31
23
|
variants: [
|
|
32
|
-
{
|
|
33
|
-
hostname: "secretsmanager.us-gov-east-1.amazonaws.com",
|
|
34
|
-
tags: [],
|
|
35
|
-
},
|
|
36
24
|
{
|
|
37
25
|
hostname: "secretsmanager-fips.us-gov-east-1.amazonaws.com",
|
|
38
26
|
tags: ["fips"],
|
|
@@ -41,10 +29,6 @@ const regionHash = {
|
|
|
41
29
|
},
|
|
42
30
|
"us-gov-west-1": {
|
|
43
31
|
variants: [
|
|
44
|
-
{
|
|
45
|
-
hostname: "secretsmanager.us-gov-west-1.amazonaws.com",
|
|
46
|
-
tags: [],
|
|
47
|
-
},
|
|
48
32
|
{
|
|
49
33
|
hostname: "secretsmanager-fips.us-gov-west-1.amazonaws.com",
|
|
50
34
|
tags: ["fips"],
|
|
@@ -53,10 +37,6 @@ const regionHash = {
|
|
|
53
37
|
},
|
|
54
38
|
"us-west-1": {
|
|
55
39
|
variants: [
|
|
56
|
-
{
|
|
57
|
-
hostname: "secretsmanager.us-west-1.amazonaws.com",
|
|
58
|
-
tags: [],
|
|
59
|
-
},
|
|
60
40
|
{
|
|
61
41
|
hostname: "secretsmanager-fips.us-west-1.amazonaws.com",
|
|
62
42
|
tags: ["fips"],
|
|
@@ -65,10 +45,6 @@ const regionHash = {
|
|
|
65
45
|
},
|
|
66
46
|
"us-west-2": {
|
|
67
47
|
variants: [
|
|
68
|
-
{
|
|
69
|
-
hostname: "secretsmanager.us-west-2.amazonaws.com",
|
|
70
|
-
tags: [],
|
|
71
|
-
},
|
|
72
48
|
{
|
|
73
49
|
hostname: "secretsmanager-fips.us-west-2.amazonaws.com",
|
|
74
50
|
tags: ["fips"],
|
|
@@ -87,6 +63,7 @@ const partitionHash = {
|
|
|
87
63
|
"ap-south-1",
|
|
88
64
|
"ap-southeast-1",
|
|
89
65
|
"ap-southeast-2",
|
|
66
|
+
"ap-southeast-3",
|
|
90
67
|
"ca-central-1",
|
|
91
68
|
"eu-central-1",
|
|
92
69
|
"eu-north-1",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.ValidateResourcePolicyResponse = exports.ValidationErrorsEntry =
|
|
3
|
+
exports.ValidateResourcePolicyRequest = exports.UpdateSecretVersionStageResponse = exports.UpdateSecretVersionStageRequest = exports.UpdateSecretResponse = exports.UpdateSecretRequest = exports.UntagResourceRequest = exports.TagResourceRequest = exports.StopReplicationToReplicaResponse = exports.StopReplicationToReplicaRequest = exports.RotateSecretResponse = exports.RotateSecretRequest = exports.RestoreSecretResponse = exports.RestoreSecretRequest = exports.ReplicateSecretToRegionsResponse = exports.ReplicateSecretToRegionsRequest = exports.RemoveRegionsFromReplicationResponse = exports.RemoveRegionsFromReplicationRequest = exports.PutSecretValueResponse = exports.PutSecretValueRequest = exports.PutResourcePolicyResponse = exports.PutResourcePolicyRequest = exports.ListSecretVersionIdsResponse = exports.SecretVersionsListEntry = exports.ListSecretVersionIdsRequest = exports.ListSecretsResponse = exports.SecretListEntry = exports.ListSecretsRequest = exports.SortOrderType = exports.GetSecretValueResponse = exports.GetSecretValueRequest = exports.GetResourcePolicyResponse = exports.GetResourcePolicyRequest = exports.GetRandomPasswordResponse = exports.GetRandomPasswordRequest = exports.Filter = exports.DescribeSecretResponse = exports.RotationRulesType = exports.DescribeSecretRequest = exports.DeleteSecretResponse = exports.DeleteSecretRequest = exports.DeleteResourcePolicyResponse = exports.DeleteResourcePolicyRequest = exports.CreateSecretResponse = exports.ReplicationStatusType = exports.StatusType = exports.CreateSecretRequest = exports.Tag = exports.CancelRotateSecretResponse = exports.CancelRotateSecretRequest = exports.ReplicaRegionType = void 0;
|
|
4
|
+
exports.ValidateResourcePolicyResponse = exports.ValidationErrorsEntry = void 0;
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
6
|
var ReplicaRegionType;
|
|
7
7
|
(function (ReplicaRegionType) {
|
|
@@ -21,30 +21,6 @@ var CancelRotateSecretResponse;
|
|
|
21
21
|
...obj,
|
|
22
22
|
});
|
|
23
23
|
})(CancelRotateSecretResponse = exports.CancelRotateSecretResponse || (exports.CancelRotateSecretResponse = {}));
|
|
24
|
-
var InternalServiceError;
|
|
25
|
-
(function (InternalServiceError) {
|
|
26
|
-
InternalServiceError.filterSensitiveLog = (obj) => ({
|
|
27
|
-
...obj,
|
|
28
|
-
});
|
|
29
|
-
})(InternalServiceError = exports.InternalServiceError || (exports.InternalServiceError = {}));
|
|
30
|
-
var InvalidParameterException;
|
|
31
|
-
(function (InvalidParameterException) {
|
|
32
|
-
InvalidParameterException.filterSensitiveLog = (obj) => ({
|
|
33
|
-
...obj,
|
|
34
|
-
});
|
|
35
|
-
})(InvalidParameterException = exports.InvalidParameterException || (exports.InvalidParameterException = {}));
|
|
36
|
-
var InvalidRequestException;
|
|
37
|
-
(function (InvalidRequestException) {
|
|
38
|
-
InvalidRequestException.filterSensitiveLog = (obj) => ({
|
|
39
|
-
...obj,
|
|
40
|
-
});
|
|
41
|
-
})(InvalidRequestException = exports.InvalidRequestException || (exports.InvalidRequestException = {}));
|
|
42
|
-
var ResourceNotFoundException;
|
|
43
|
-
(function (ResourceNotFoundException) {
|
|
44
|
-
ResourceNotFoundException.filterSensitiveLog = (obj) => ({
|
|
45
|
-
...obj,
|
|
46
|
-
});
|
|
47
|
-
})(ResourceNotFoundException = exports.ResourceNotFoundException || (exports.ResourceNotFoundException = {}));
|
|
48
24
|
var Tag;
|
|
49
25
|
(function (Tag) {
|
|
50
26
|
Tag.filterSensitiveLog = (obj) => ({
|
|
@@ -77,42 +53,6 @@ var CreateSecretResponse;
|
|
|
77
53
|
...obj,
|
|
78
54
|
});
|
|
79
55
|
})(CreateSecretResponse = exports.CreateSecretResponse || (exports.CreateSecretResponse = {}));
|
|
80
|
-
var EncryptionFailure;
|
|
81
|
-
(function (EncryptionFailure) {
|
|
82
|
-
EncryptionFailure.filterSensitiveLog = (obj) => ({
|
|
83
|
-
...obj,
|
|
84
|
-
});
|
|
85
|
-
})(EncryptionFailure = exports.EncryptionFailure || (exports.EncryptionFailure = {}));
|
|
86
|
-
var LimitExceededException;
|
|
87
|
-
(function (LimitExceededException) {
|
|
88
|
-
LimitExceededException.filterSensitiveLog = (obj) => ({
|
|
89
|
-
...obj,
|
|
90
|
-
});
|
|
91
|
-
})(LimitExceededException = exports.LimitExceededException || (exports.LimitExceededException = {}));
|
|
92
|
-
var MalformedPolicyDocumentException;
|
|
93
|
-
(function (MalformedPolicyDocumentException) {
|
|
94
|
-
MalformedPolicyDocumentException.filterSensitiveLog = (obj) => ({
|
|
95
|
-
...obj,
|
|
96
|
-
});
|
|
97
|
-
})(MalformedPolicyDocumentException = exports.MalformedPolicyDocumentException || (exports.MalformedPolicyDocumentException = {}));
|
|
98
|
-
var PreconditionNotMetException;
|
|
99
|
-
(function (PreconditionNotMetException) {
|
|
100
|
-
PreconditionNotMetException.filterSensitiveLog = (obj) => ({
|
|
101
|
-
...obj,
|
|
102
|
-
});
|
|
103
|
-
})(PreconditionNotMetException = exports.PreconditionNotMetException || (exports.PreconditionNotMetException = {}));
|
|
104
|
-
var ResourceExistsException;
|
|
105
|
-
(function (ResourceExistsException) {
|
|
106
|
-
ResourceExistsException.filterSensitiveLog = (obj) => ({
|
|
107
|
-
...obj,
|
|
108
|
-
});
|
|
109
|
-
})(ResourceExistsException = exports.ResourceExistsException || (exports.ResourceExistsException = {}));
|
|
110
|
-
var DecryptionFailure;
|
|
111
|
-
(function (DecryptionFailure) {
|
|
112
|
-
DecryptionFailure.filterSensitiveLog = (obj) => ({
|
|
113
|
-
...obj,
|
|
114
|
-
});
|
|
115
|
-
})(DecryptionFailure = exports.DecryptionFailure || (exports.DecryptionFailure = {}));
|
|
116
56
|
var DeleteResourcePolicyRequest;
|
|
117
57
|
(function (DeleteResourcePolicyRequest) {
|
|
118
58
|
DeleteResourcePolicyRequest.filterSensitiveLog = (obj) => ({
|
|
@@ -200,12 +140,6 @@ var GetSecretValueResponse;
|
|
|
200
140
|
...(obj.SecretString && { SecretString: smithy_client_1.SENSITIVE_STRING }),
|
|
201
141
|
});
|
|
202
142
|
})(GetSecretValueResponse = exports.GetSecretValueResponse || (exports.GetSecretValueResponse = {}));
|
|
203
|
-
var InvalidNextTokenException;
|
|
204
|
-
(function (InvalidNextTokenException) {
|
|
205
|
-
InvalidNextTokenException.filterSensitiveLog = (obj) => ({
|
|
206
|
-
...obj,
|
|
207
|
-
});
|
|
208
|
-
})(InvalidNextTokenException = exports.InvalidNextTokenException || (exports.InvalidNextTokenException = {}));
|
|
209
143
|
var SortOrderType;
|
|
210
144
|
(function (SortOrderType) {
|
|
211
145
|
SortOrderType["asc"] = "asc";
|
|
@@ -247,12 +181,6 @@ var ListSecretVersionIdsResponse;
|
|
|
247
181
|
...obj,
|
|
248
182
|
});
|
|
249
183
|
})(ListSecretVersionIdsResponse = exports.ListSecretVersionIdsResponse || (exports.ListSecretVersionIdsResponse = {}));
|
|
250
|
-
var PublicPolicyException;
|
|
251
|
-
(function (PublicPolicyException) {
|
|
252
|
-
PublicPolicyException.filterSensitiveLog = (obj) => ({
|
|
253
|
-
...obj,
|
|
254
|
-
});
|
|
255
|
-
})(PublicPolicyException = exports.PublicPolicyException || (exports.PublicPolicyException = {}));
|
|
256
184
|
var PutResourcePolicyRequest;
|
|
257
185
|
(function (PutResourcePolicyRequest) {
|
|
258
186
|
PutResourcePolicyRequest.filterSensitiveLog = (obj) => ({
|
|
@@ -13,13 +13,18 @@ const util_body_length_browser_1 = require("@aws-sdk/util-body-length-browser");
|
|
|
13
13
|
const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
|
|
14
14
|
const util_utf8_browser_1 = require("@aws-sdk/util-utf8-browser");
|
|
15
15
|
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
16
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
17
|
+
const util_defaults_mode_browser_1 = require("@aws-sdk/util-defaults-mode-browser");
|
|
16
18
|
const getRuntimeConfig = (config) => {
|
|
17
19
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
20
|
+
const defaultsMode = util_defaults_mode_browser_1.resolveDefaultsModeConfig(config);
|
|
21
|
+
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
|
|
18
22
|
const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config);
|
|
19
23
|
return {
|
|
20
24
|
...clientSharedValues,
|
|
21
25
|
...config,
|
|
22
26
|
runtime: "browser",
|
|
27
|
+
defaultsMode,
|
|
23
28
|
base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_browser_1.fromBase64,
|
|
24
29
|
base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_browser_1.toBase64,
|
|
25
30
|
bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_browser_1.calculateBodyLength,
|
|
@@ -27,8 +32,8 @@ const getRuntimeConfig = (config) => {
|
|
|
27
32
|
defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : util_user_agent_browser_1.defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
|
28
33
|
maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : middleware_retry_1.DEFAULT_MAX_ATTEMPTS,
|
|
29
34
|
region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalid_dependency_1.invalidProvider("Region is missing"),
|
|
30
|
-
requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new fetch_http_handler_1.FetchHttpHandler(),
|
|
31
|
-
retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (() =>
|
|
35
|
+
requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new fetch_http_handler_1.FetchHttpHandler(defaultConfigProvider),
|
|
36
|
+
retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE),
|
|
32
37
|
sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : sha256_browser_1.Sha256,
|
|
33
38
|
streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : fetch_http_handler_1.streamCollector,
|
|
34
39
|
useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
@@ -16,14 +16,17 @@ const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
|
|
|
16
16
|
const util_utf8_node_1 = require("@aws-sdk/util-utf8-node");
|
|
17
17
|
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
18
18
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
19
|
+
const util_defaults_mode_node_1 = require("@aws-sdk/util-defaults-mode-node");
|
|
19
20
|
const getRuntimeConfig = (config) => {
|
|
20
21
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
21
|
-
|
|
22
|
+
const defaultsMode = util_defaults_mode_node_1.resolveDefaultsModeConfig(config);
|
|
23
|
+
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
|
|
22
24
|
const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config);
|
|
23
25
|
return {
|
|
24
26
|
...clientSharedValues,
|
|
25
27
|
...config,
|
|
26
28
|
runtime: "node",
|
|
29
|
+
defaultsMode,
|
|
27
30
|
base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_node_1.fromBase64,
|
|
28
31
|
base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_node_1.toBase64,
|
|
29
32
|
bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_node_1.calculateBodyLength,
|
|
@@ -31,8 +34,11 @@ const getRuntimeConfig = (config) => {
|
|
|
31
34
|
defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : util_user_agent_node_1.defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
|
32
35
|
maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : node_config_provider_1.loadConfig(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
|
|
33
36
|
region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : node_config_provider_1.loadConfig(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
|
|
34
|
-
requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new node_http_handler_1.NodeHttpHandler(),
|
|
35
|
-
retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : node_config_provider_1.loadConfig(
|
|
37
|
+
requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new node_http_handler_1.NodeHttpHandler(defaultConfigProvider),
|
|
38
|
+
retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : node_config_provider_1.loadConfig({
|
|
39
|
+
...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
40
|
+
default: async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE,
|
|
41
|
+
}),
|
|
36
42
|
sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : hash_node_1.Hash.bind(null, "sha256"),
|
|
37
43
|
streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : node_http_handler_1.streamCollector,
|
|
38
44
|
useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : node_config_provider_1.loadConfig(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
|
package/dist-es/endpoints.js
CHANGED
|
@@ -3,10 +3,6 @@ import { getRegionInfo } from "@aws-sdk/config-resolver";
|
|
|
3
3
|
var regionHash = {
|
|
4
4
|
"us-east-1": {
|
|
5
5
|
variants: [
|
|
6
|
-
{
|
|
7
|
-
hostname: "secretsmanager.us-east-1.amazonaws.com",
|
|
8
|
-
tags: [],
|
|
9
|
-
},
|
|
10
6
|
{
|
|
11
7
|
hostname: "secretsmanager-fips.us-east-1.amazonaws.com",
|
|
12
8
|
tags: ["fips"],
|
|
@@ -15,10 +11,6 @@ var regionHash = {
|
|
|
15
11
|
},
|
|
16
12
|
"us-east-2": {
|
|
17
13
|
variants: [
|
|
18
|
-
{
|
|
19
|
-
hostname: "secretsmanager.us-east-2.amazonaws.com",
|
|
20
|
-
tags: [],
|
|
21
|
-
},
|
|
22
14
|
{
|
|
23
15
|
hostname: "secretsmanager-fips.us-east-2.amazonaws.com",
|
|
24
16
|
tags: ["fips"],
|
|
@@ -27,10 +19,6 @@ var regionHash = {
|
|
|
27
19
|
},
|
|
28
20
|
"us-gov-east-1": {
|
|
29
21
|
variants: [
|
|
30
|
-
{
|
|
31
|
-
hostname: "secretsmanager.us-gov-east-1.amazonaws.com",
|
|
32
|
-
tags: [],
|
|
33
|
-
},
|
|
34
22
|
{
|
|
35
23
|
hostname: "secretsmanager-fips.us-gov-east-1.amazonaws.com",
|
|
36
24
|
tags: ["fips"],
|
|
@@ -39,10 +27,6 @@ var regionHash = {
|
|
|
39
27
|
},
|
|
40
28
|
"us-gov-west-1": {
|
|
41
29
|
variants: [
|
|
42
|
-
{
|
|
43
|
-
hostname: "secretsmanager.us-gov-west-1.amazonaws.com",
|
|
44
|
-
tags: [],
|
|
45
|
-
},
|
|
46
30
|
{
|
|
47
31
|
hostname: "secretsmanager-fips.us-gov-west-1.amazonaws.com",
|
|
48
32
|
tags: ["fips"],
|
|
@@ -51,10 +35,6 @@ var regionHash = {
|
|
|
51
35
|
},
|
|
52
36
|
"us-west-1": {
|
|
53
37
|
variants: [
|
|
54
|
-
{
|
|
55
|
-
hostname: "secretsmanager.us-west-1.amazonaws.com",
|
|
56
|
-
tags: [],
|
|
57
|
-
},
|
|
58
38
|
{
|
|
59
39
|
hostname: "secretsmanager-fips.us-west-1.amazonaws.com",
|
|
60
40
|
tags: ["fips"],
|
|
@@ -63,10 +43,6 @@ var regionHash = {
|
|
|
63
43
|
},
|
|
64
44
|
"us-west-2": {
|
|
65
45
|
variants: [
|
|
66
|
-
{
|
|
67
|
-
hostname: "secretsmanager.us-west-2.amazonaws.com",
|
|
68
|
-
tags: [],
|
|
69
|
-
},
|
|
70
46
|
{
|
|
71
47
|
hostname: "secretsmanager-fips.us-west-2.amazonaws.com",
|
|
72
48
|
tags: ["fips"],
|
|
@@ -85,6 +61,7 @@ var partitionHash = {
|
|
|
85
61
|
"ap-south-1",
|
|
86
62
|
"ap-southeast-1",
|
|
87
63
|
"ap-southeast-2",
|
|
64
|
+
"ap-southeast-3",
|
|
88
65
|
"ca-central-1",
|
|
89
66
|
"eu-central-1",
|
|
90
67
|
"eu-north-1",
|
|
@@ -12,22 +12,6 @@ export var CancelRotateSecretResponse;
|
|
|
12
12
|
(function (CancelRotateSecretResponse) {
|
|
13
13
|
CancelRotateSecretResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
14
14
|
})(CancelRotateSecretResponse || (CancelRotateSecretResponse = {}));
|
|
15
|
-
export var InternalServiceError;
|
|
16
|
-
(function (InternalServiceError) {
|
|
17
|
-
InternalServiceError.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
18
|
-
})(InternalServiceError || (InternalServiceError = {}));
|
|
19
|
-
export var InvalidParameterException;
|
|
20
|
-
(function (InvalidParameterException) {
|
|
21
|
-
InvalidParameterException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
22
|
-
})(InvalidParameterException || (InvalidParameterException = {}));
|
|
23
|
-
export var InvalidRequestException;
|
|
24
|
-
(function (InvalidRequestException) {
|
|
25
|
-
InvalidRequestException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
26
|
-
})(InvalidRequestException || (InvalidRequestException = {}));
|
|
27
|
-
export var ResourceNotFoundException;
|
|
28
|
-
(function (ResourceNotFoundException) {
|
|
29
|
-
ResourceNotFoundException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
30
|
-
})(ResourceNotFoundException || (ResourceNotFoundException = {}));
|
|
31
15
|
export var Tag;
|
|
32
16
|
(function (Tag) {
|
|
33
17
|
Tag.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -50,30 +34,6 @@ export var CreateSecretResponse;
|
|
|
50
34
|
(function (CreateSecretResponse) {
|
|
51
35
|
CreateSecretResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
52
36
|
})(CreateSecretResponse || (CreateSecretResponse = {}));
|
|
53
|
-
export var EncryptionFailure;
|
|
54
|
-
(function (EncryptionFailure) {
|
|
55
|
-
EncryptionFailure.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
56
|
-
})(EncryptionFailure || (EncryptionFailure = {}));
|
|
57
|
-
export var LimitExceededException;
|
|
58
|
-
(function (LimitExceededException) {
|
|
59
|
-
LimitExceededException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
60
|
-
})(LimitExceededException || (LimitExceededException = {}));
|
|
61
|
-
export var MalformedPolicyDocumentException;
|
|
62
|
-
(function (MalformedPolicyDocumentException) {
|
|
63
|
-
MalformedPolicyDocumentException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
64
|
-
})(MalformedPolicyDocumentException || (MalformedPolicyDocumentException = {}));
|
|
65
|
-
export var PreconditionNotMetException;
|
|
66
|
-
(function (PreconditionNotMetException) {
|
|
67
|
-
PreconditionNotMetException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
68
|
-
})(PreconditionNotMetException || (PreconditionNotMetException = {}));
|
|
69
|
-
export var ResourceExistsException;
|
|
70
|
-
(function (ResourceExistsException) {
|
|
71
|
-
ResourceExistsException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
72
|
-
})(ResourceExistsException || (ResourceExistsException = {}));
|
|
73
|
-
export var DecryptionFailure;
|
|
74
|
-
(function (DecryptionFailure) {
|
|
75
|
-
DecryptionFailure.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
76
|
-
})(DecryptionFailure || (DecryptionFailure = {}));
|
|
77
37
|
export var DeleteResourcePolicyRequest;
|
|
78
38
|
(function (DeleteResourcePolicyRequest) {
|
|
79
39
|
DeleteResourcePolicyRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -130,10 +90,6 @@ export var GetSecretValueResponse;
|
|
|
130
90
|
(function (GetSecretValueResponse) {
|
|
131
91
|
GetSecretValueResponse.filterSensitiveLog = function (obj) { return (__assign(__assign(__assign({}, obj), (obj.SecretBinary && { SecretBinary: SENSITIVE_STRING })), (obj.SecretString && { SecretString: SENSITIVE_STRING }))); };
|
|
132
92
|
})(GetSecretValueResponse || (GetSecretValueResponse = {}));
|
|
133
|
-
export var InvalidNextTokenException;
|
|
134
|
-
(function (InvalidNextTokenException) {
|
|
135
|
-
InvalidNextTokenException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
136
|
-
})(InvalidNextTokenException || (InvalidNextTokenException = {}));
|
|
137
93
|
export var SortOrderType;
|
|
138
94
|
(function (SortOrderType) {
|
|
139
95
|
SortOrderType["asc"] = "asc";
|
|
@@ -163,10 +119,6 @@ export var ListSecretVersionIdsResponse;
|
|
|
163
119
|
(function (ListSecretVersionIdsResponse) {
|
|
164
120
|
ListSecretVersionIdsResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
165
121
|
})(ListSecretVersionIdsResponse || (ListSecretVersionIdsResponse = {}));
|
|
166
|
-
export var PublicPolicyException;
|
|
167
|
-
(function (PublicPolicyException) {
|
|
168
|
-
PublicPolicyException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
169
|
-
})(PublicPolicyException || (PublicPolicyException = {}));
|
|
170
122
|
export var PutResourcePolicyRequest;
|
|
171
123
|
(function (PutResourcePolicyRequest) {
|
|
172
124
|
PutResourcePolicyRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
1
|
+
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
2
|
import packageInfo from "../package.json";
|
|
3
3
|
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
4
4
|
import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver";
|
|
5
|
-
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
|
|
5
|
+
import { FetchHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
|
|
6
6
|
import { invalidProvider } from "@aws-sdk/invalid-dependency";
|
|
7
7
|
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry";
|
|
8
8
|
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
|
|
@@ -10,8 +10,17 @@ import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
|
|
|
10
10
|
import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
|
|
11
11
|
import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
|
|
12
12
|
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
13
|
+
import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
|
|
14
|
+
import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-browser";
|
|
13
15
|
export var getRuntimeConfig = function (config) {
|
|
14
16
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
17
|
+
var defaultsMode = resolveDefaultsModeConfig(config);
|
|
18
|
+
var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
|
|
15
19
|
var clientSharedValues = getSharedRuntimeConfig(config);
|
|
16
|
-
return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new
|
|
20
|
+
return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", defaultsMode: defaultsMode, base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new RequestHandler(defaultConfigProvider), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
21
|
+
switch (_a.label) {
|
|
22
|
+
case 0: return [4, defaultConfigProvider()];
|
|
23
|
+
case 1: return [2, (_a.sent()).retryMode || DEFAULT_RETRY_MODE];
|
|
24
|
+
}
|
|
25
|
+
}); }); }), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Sha256, streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (function () { return Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT); }), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (function () { return Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT); }), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
|
|
17
26
|
};
|
package/dist-es/runtimeConfig.js
CHANGED
|
@@ -1,21 +1,28 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
1
|
+
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
2
|
import packageInfo from "../package.json";
|
|
3
3
|
import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
|
|
4
4
|
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@aws-sdk/config-resolver";
|
|
5
5
|
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
|
|
6
6
|
import { Hash } from "@aws-sdk/hash-node";
|
|
7
|
-
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
|
|
7
|
+
import { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@aws-sdk/middleware-retry";
|
|
8
8
|
import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider";
|
|
9
|
-
import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler";
|
|
9
|
+
import { NodeHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/node-http-handler";
|
|
10
10
|
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
|
|
11
11
|
import { calculateBodyLength } from "@aws-sdk/util-body-length-node";
|
|
12
12
|
import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
|
|
13
13
|
import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node";
|
|
14
14
|
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
15
|
-
import {
|
|
15
|
+
import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
|
|
16
|
+
import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-node";
|
|
16
17
|
export var getRuntimeConfig = function (config) {
|
|
17
18
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
18
|
-
|
|
19
|
+
var defaultsMode = resolveDefaultsModeConfig(config);
|
|
20
|
+
var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
|
|
19
21
|
var clientSharedValues = getSharedRuntimeConfig(config);
|
|
20
|
-
return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : decorateDefaultCredentialProvider(credentialDefaultProvider), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new
|
|
22
|
+
return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", defaultsMode: defaultsMode, base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : decorateDefaultCredentialProvider(credentialDefaultProvider), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new RequestHandler(defaultConfigProvider), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : loadNodeConfig(__assign(__assign({}, NODE_RETRY_MODE_CONFIG_OPTIONS), { default: function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
23
|
+
switch (_a.label) {
|
|
24
|
+
case 0: return [4, defaultConfigProvider()];
|
|
25
|
+
case 1: return [2, (_a.sent()).retryMode || DEFAULT_RETRY_MODE];
|
|
26
|
+
}
|
|
27
|
+
}); }); } })), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Hash.bind(null, "sha256"), streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
|
|
21
28
|
};
|