@aws-sdk/client-acm-pca 3.1045.0 → 3.1047.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/auth/httpAuthSchemeProvider.js +4 -4
- package/dist-cjs/endpoint/bdd.js +2 -2
- package/dist-cjs/endpoint/endpointResolver.js +4 -4
- package/dist-cjs/index.js +89 -91
- package/dist-cjs/models/ACMPCAServiceException.js +3 -3
- package/dist-cjs/runtimeConfig.browser.js +12 -14
- package/dist-cjs/runtimeConfig.js +18 -22
- package/dist-cjs/runtimeConfig.shared.js +9 -10
- package/dist-es/ACMPCA.js +1 -1
- package/dist-es/ACMPCAClient.js +5 -5
- package/dist-es/auth/httpAuthSchemeProvider.js +1 -1
- package/dist-es/commands/CreateCertificateAuthorityAuditReportCommand.js +2 -2
- package/dist-es/commands/CreateCertificateAuthorityCommand.js +2 -2
- package/dist-es/commands/CreatePermissionCommand.js +2 -2
- package/dist-es/commands/DeleteCertificateAuthorityCommand.js +2 -2
- package/dist-es/commands/DeletePermissionCommand.js +2 -2
- package/dist-es/commands/DeletePolicyCommand.js +2 -2
- package/dist-es/commands/DescribeCertificateAuthorityAuditReportCommand.js +2 -2
- package/dist-es/commands/DescribeCertificateAuthorityCommand.js +2 -2
- package/dist-es/commands/GetCertificateAuthorityCertificateCommand.js +2 -2
- package/dist-es/commands/GetCertificateAuthorityCsrCommand.js +2 -2
- package/dist-es/commands/GetCertificateCommand.js +2 -2
- package/dist-es/commands/GetPolicyCommand.js +2 -2
- package/dist-es/commands/ImportCertificateAuthorityCertificateCommand.js +2 -2
- package/dist-es/commands/IssueCertificateCommand.js +2 -2
- package/dist-es/commands/ListCertificateAuthoritiesCommand.js +2 -2
- package/dist-es/commands/ListPermissionsCommand.js +2 -2
- package/dist-es/commands/ListTagsCommand.js +2 -2
- package/dist-es/commands/PutPolicyCommand.js +2 -2
- package/dist-es/commands/RestoreCertificateAuthorityCommand.js +2 -2
- package/dist-es/commands/RevokeCertificateCommand.js +2 -2
- package/dist-es/commands/TagCertificateAuthorityCommand.js +2 -2
- package/dist-es/commands/UntagCertificateAuthorityCommand.js +2 -2
- package/dist-es/commands/UpdateCertificateAuthorityCommand.js +2 -2
- package/dist-es/endpoint/bdd.js +1 -1
- package/dist-es/endpoint/endpointResolver.js +1 -1
- package/dist-es/models/ACMPCAServiceException.js +1 -1
- package/dist-es/runtimeConfig.browser.js +4 -6
- package/dist-es/runtimeConfig.js +4 -8
- package/dist-es/runtimeConfig.shared.js +3 -4
- package/dist-es/runtimeExtensions.js +2 -2
- package/dist-es/waiters/waitForAuditReportCreated.js +1 -1
- package/dist-es/waiters/waitForCertificateAuthorityCSRCreated.js +1 -1
- package/dist-es/waiters/waitForCertificateIssued.js +1 -1
- package/dist-types/ACMPCA.d.ts +1 -1
- package/dist-types/ACMPCAClient.d.ts +5 -5
- package/dist-types/commands/CreateCertificateAuthorityAuditReportCommand.d.ts +6 -4
- package/dist-types/commands/CreateCertificateAuthorityCommand.d.ts +6 -4
- package/dist-types/commands/CreatePermissionCommand.d.ts +6 -4
- package/dist-types/commands/DeleteCertificateAuthorityCommand.d.ts +6 -4
- package/dist-types/commands/DeletePermissionCommand.d.ts +6 -4
- package/dist-types/commands/DeletePolicyCommand.d.ts +6 -4
- package/dist-types/commands/DescribeCertificateAuthorityAuditReportCommand.d.ts +6 -4
- package/dist-types/commands/DescribeCertificateAuthorityCommand.d.ts +6 -4
- package/dist-types/commands/GetCertificateAuthorityCertificateCommand.d.ts +6 -4
- package/dist-types/commands/GetCertificateAuthorityCsrCommand.d.ts +6 -4
- package/dist-types/commands/GetCertificateCommand.d.ts +6 -4
- package/dist-types/commands/GetPolicyCommand.d.ts +6 -4
- package/dist-types/commands/ImportCertificateAuthorityCertificateCommand.d.ts +6 -4
- package/dist-types/commands/IssueCertificateCommand.d.ts +6 -4
- package/dist-types/commands/ListCertificateAuthoritiesCommand.d.ts +6 -4
- package/dist-types/commands/ListPermissionsCommand.d.ts +6 -4
- package/dist-types/commands/ListTagsCommand.d.ts +6 -4
- package/dist-types/commands/PutPolicyCommand.d.ts +6 -4
- package/dist-types/commands/RestoreCertificateAuthorityCommand.d.ts +6 -4
- package/dist-types/commands/RevokeCertificateCommand.d.ts +6 -4
- package/dist-types/commands/TagCertificateAuthorityCommand.d.ts +6 -4
- package/dist-types/commands/UntagCertificateAuthorityCommand.d.ts +6 -4
- package/dist-types/commands/UpdateCertificateAuthorityCommand.d.ts +6 -4
- package/dist-types/endpoint/bdd.d.ts +1 -1
- package/dist-types/extensionConfiguration.d.ts +1 -1
- package/dist-types/models/ACMPCAServiceException.d.ts +1 -1
- package/dist-types/models/errors.d.ts +1 -1
- package/dist-types/runtimeConfig.browser.d.ts +2 -2
- package/dist-types/runtimeConfig.d.ts +2 -2
- package/dist-types/runtimeConfig.native.d.ts +2 -2
- package/dist-types/ts3.4/ACMPCA.d.ts +1 -1
- package/dist-types/ts3.4/ACMPCAClient.d.ts +8 -14
- package/dist-types/ts3.4/commands/CreateCertificateAuthorityAuditReportCommand.d.ts +6 -4
- package/dist-types/ts3.4/commands/CreateCertificateAuthorityCommand.d.ts +6 -4
- package/dist-types/ts3.4/commands/CreatePermissionCommand.d.ts +6 -4
- package/dist-types/ts3.4/commands/DeleteCertificateAuthorityCommand.d.ts +6 -4
- package/dist-types/ts3.4/commands/DeletePermissionCommand.d.ts +6 -4
- package/dist-types/ts3.4/commands/DeletePolicyCommand.d.ts +6 -4
- package/dist-types/ts3.4/commands/DescribeCertificateAuthorityAuditReportCommand.d.ts +6 -4
- package/dist-types/ts3.4/commands/DescribeCertificateAuthorityCommand.d.ts +6 -4
- package/dist-types/ts3.4/commands/GetCertificateAuthorityCertificateCommand.d.ts +6 -4
- package/dist-types/ts3.4/commands/GetCertificateAuthorityCsrCommand.d.ts +6 -4
- package/dist-types/ts3.4/commands/GetCertificateCommand.d.ts +6 -4
- package/dist-types/ts3.4/commands/GetPolicyCommand.d.ts +6 -8
- package/dist-types/ts3.4/commands/ImportCertificateAuthorityCertificateCommand.d.ts +6 -4
- package/dist-types/ts3.4/commands/IssueCertificateCommand.d.ts +6 -4
- package/dist-types/ts3.4/commands/ListCertificateAuthoritiesCommand.d.ts +6 -4
- package/dist-types/ts3.4/commands/ListPermissionsCommand.d.ts +6 -4
- package/dist-types/ts3.4/commands/ListTagsCommand.d.ts +6 -8
- package/dist-types/ts3.4/commands/PutPolicyCommand.d.ts +6 -8
- package/dist-types/ts3.4/commands/RestoreCertificateAuthorityCommand.d.ts +6 -4
- package/dist-types/ts3.4/commands/RevokeCertificateCommand.d.ts +6 -4
- package/dist-types/ts3.4/commands/TagCertificateAuthorityCommand.d.ts +6 -4
- package/dist-types/ts3.4/commands/UntagCertificateAuthorityCommand.d.ts +6 -4
- package/dist-types/ts3.4/commands/UpdateCertificateAuthorityCommand.d.ts +6 -4
- package/dist-types/ts3.4/endpoint/bdd.d.ts +1 -1
- package/dist-types/ts3.4/extensionConfiguration.d.ts +1 -1
- package/dist-types/ts3.4/models/ACMPCAServiceException.d.ts +1 -1
- package/dist-types/ts3.4/models/errors.d.ts +1 -1
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +2 -2
- package/dist-types/ts3.4/runtimeConfig.d.ts +2 -2
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +3 -3
- package/dist-types/ts3.4/waiters/waitForAuditReportCreated.d.ts +1 -1
- package/dist-types/ts3.4/waiters/waitForCertificateAuthorityCSRCreated.d.ts +1 -1
- package/dist-types/ts3.4/waiters/waitForCertificateIssued.d.ts +1 -1
- package/dist-types/waiters/waitForAuditReportCreated.d.ts +1 -1
- package/dist-types/waiters/waitForCertificateAuthorityCSRCreated.d.ts +1 -1
- package/dist-types/waiters/waitForCertificateIssued.d.ts +1 -1
- package/package.json +13 -35
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.resolveHttpAuthSchemeConfig = exports.defaultACMPCAHttpAuthSchemeProvider = exports.defaultACMPCAHttpAuthSchemeParametersProvider = void 0;
|
|
4
4
|
const httpAuthSchemes_1 = require("@aws-sdk/core/httpAuthSchemes");
|
|
5
|
-
const
|
|
5
|
+
const client_1 = require("@smithy/core/client");
|
|
6
6
|
const defaultACMPCAHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
7
7
|
return {
|
|
8
|
-
operation: (0,
|
|
9
|
-
region: await (0,
|
|
8
|
+
operation: (0, client_1.getSmithyContext)(context).operation,
|
|
9
|
+
region: await (0, client_1.normalizeProvider)(config.region)() || (() => {
|
|
10
10
|
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
11
11
|
})(),
|
|
12
12
|
};
|
|
@@ -40,7 +40,7 @@ exports.defaultACMPCAHttpAuthSchemeProvider = defaultACMPCAHttpAuthSchemeProvide
|
|
|
40
40
|
const resolveHttpAuthSchemeConfig = (config) => {
|
|
41
41
|
const config_0 = (0, httpAuthSchemes_1.resolveAwsSdkSigV4Config)(config);
|
|
42
42
|
return Object.assign(config_0, {
|
|
43
|
-
authSchemePreference: (0,
|
|
43
|
+
authSchemePreference: (0, client_1.normalizeProvider)(config.authSchemePreference ?? []),
|
|
44
44
|
});
|
|
45
45
|
};
|
|
46
46
|
exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
|
package/dist-cjs/endpoint/bdd.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.bdd = void 0;
|
|
4
|
-
const
|
|
4
|
+
const endpoints_1 = require("@smithy/core/endpoints");
|
|
5
5
|
const k = "ref";
|
|
6
6
|
const a = -1, b = true, c = "isSet", d = "PartitionResult", e = "booleanEquals", f = "getAttr", g = { [k]: "Endpoint" }, h = { [k]: d }, i = {}, j = [{ [k]: "Region" }];
|
|
7
7
|
const _data = {
|
|
@@ -49,4 +49,4 @@ const nodes = new Int32Array([
|
|
|
49
49
|
3, r + 1, 14,
|
|
50
50
|
4, r + 2, r + 3,
|
|
51
51
|
]);
|
|
52
|
-
exports.bdd =
|
|
52
|
+
exports.bdd = endpoints_1.BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defaultEndpointResolver = void 0;
|
|
4
4
|
const util_endpoints_1 = require("@aws-sdk/util-endpoints");
|
|
5
|
-
const
|
|
5
|
+
const endpoints_1 = require("@smithy/core/endpoints");
|
|
6
6
|
const bdd_1 = require("./bdd");
|
|
7
|
-
const cache = new
|
|
7
|
+
const cache = new endpoints_1.EndpointCache({
|
|
8
8
|
size: 50,
|
|
9
9
|
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
|
|
10
10
|
});
|
|
11
11
|
const defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
12
|
-
return cache.get(endpointParams, () => (0,
|
|
12
|
+
return cache.get(endpointParams, () => (0, endpoints_1.decideEndpoint)(bdd_1.bdd, {
|
|
13
13
|
endpointParams: endpointParams,
|
|
14
14
|
logger: context.logger,
|
|
15
15
|
}));
|
|
16
16
|
};
|
|
17
17
|
exports.defaultEndpointResolver = defaultEndpointResolver;
|
|
18
|
-
|
|
18
|
+
endpoints_1.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
|
package/dist-cjs/index.js
CHANGED
|
@@ -4,19 +4,17 @@ var middlewareHostHeader = require('@aws-sdk/middleware-host-header');
|
|
|
4
4
|
var middlewareLogger = require('@aws-sdk/middleware-logger');
|
|
5
5
|
var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detection');
|
|
6
6
|
var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
|
|
7
|
-
var configResolver = require('@smithy/config-resolver');
|
|
8
7
|
var core = require('@smithy/core');
|
|
8
|
+
var client = require('@smithy/core/client');
|
|
9
|
+
var config = require('@smithy/core/config');
|
|
10
|
+
var endpoints = require('@smithy/core/endpoints');
|
|
11
|
+
var protocols = require('@smithy/core/protocols');
|
|
12
|
+
var retry = require('@smithy/core/retry');
|
|
9
13
|
var schema = require('@smithy/core/schema');
|
|
10
|
-
var middlewareContentLength = require('@smithy/middleware-content-length');
|
|
11
|
-
var middlewareEndpoint = require('@smithy/middleware-endpoint');
|
|
12
|
-
var middlewareRetry = require('@smithy/middleware-retry');
|
|
13
|
-
var smithyClient = require('@smithy/smithy-client');
|
|
14
14
|
var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
|
|
15
15
|
var runtimeConfig = require('./runtimeConfig');
|
|
16
16
|
var regionConfigResolver = require('@aws-sdk/region-config-resolver');
|
|
17
|
-
var protocolHttp = require('@smithy/protocol-http');
|
|
18
17
|
var schemas_0 = require('./schemas/schemas_0');
|
|
19
|
-
var utilWaiter = require('@smithy/util-waiter');
|
|
20
18
|
var errors = require('./models/errors');
|
|
21
19
|
var ACMPCAServiceException = require('./models/ACMPCAServiceException');
|
|
22
20
|
|
|
@@ -74,12 +72,12 @@ const resolveHttpAuthRuntimeConfig = (config) => {
|
|
|
74
72
|
};
|
|
75
73
|
|
|
76
74
|
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
77
|
-
const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig),
|
|
75
|
+
const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), client.getDefaultExtensionConfiguration(runtimeConfig), protocols.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
78
76
|
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
79
|
-
return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration),
|
|
77
|
+
return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), client.resolveDefaultRuntimeConfig(extensionConfiguration), protocols.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
80
78
|
};
|
|
81
79
|
|
|
82
|
-
class ACMPCAClient extends
|
|
80
|
+
class ACMPCAClient extends client.Client {
|
|
83
81
|
config;
|
|
84
82
|
constructor(...[configuration]) {
|
|
85
83
|
const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
|
|
@@ -87,17 +85,17 @@ class ACMPCAClient extends smithyClient.Client {
|
|
|
87
85
|
this.initConfig = _config_0;
|
|
88
86
|
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
89
87
|
const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
|
|
90
|
-
const _config_3 =
|
|
91
|
-
const _config_4 =
|
|
88
|
+
const _config_3 = retry.resolveRetryConfig(_config_2);
|
|
89
|
+
const _config_4 = config.resolveRegionConfig(_config_3);
|
|
92
90
|
const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
|
|
93
|
-
const _config_6 =
|
|
91
|
+
const _config_6 = endpoints.resolveEndpointConfig(_config_5);
|
|
94
92
|
const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
|
|
95
93
|
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
96
94
|
this.config = _config_8;
|
|
97
95
|
this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));
|
|
98
96
|
this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
|
|
99
|
-
this.middlewareStack.use(
|
|
100
|
-
this.middlewareStack.use(
|
|
97
|
+
this.middlewareStack.use(retry.getRetryPlugin(this.config));
|
|
98
|
+
this.middlewareStack.use(protocols.getContentLengthPlugin(this.config));
|
|
101
99
|
this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
|
|
102
100
|
this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
|
|
103
101
|
this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
|
|
@@ -114,11 +112,11 @@ class ACMPCAClient extends smithyClient.Client {
|
|
|
114
112
|
}
|
|
115
113
|
}
|
|
116
114
|
|
|
117
|
-
class CreateCertificateAuthorityAuditReportCommand extends
|
|
115
|
+
class CreateCertificateAuthorityAuditReportCommand extends client.Command
|
|
118
116
|
.classBuilder()
|
|
119
117
|
.ep(commonParams)
|
|
120
118
|
.m(function (Command, cs, config, o) {
|
|
121
|
-
return [
|
|
119
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
122
120
|
})
|
|
123
121
|
.s("ACMPrivateCA", "CreateCertificateAuthorityAuditReport", {})
|
|
124
122
|
.n("ACMPCAClient", "CreateCertificateAuthorityAuditReportCommand")
|
|
@@ -126,11 +124,11 @@ class CreateCertificateAuthorityAuditReportCommand extends smithyClient.Command
|
|
|
126
124
|
.build() {
|
|
127
125
|
}
|
|
128
126
|
|
|
129
|
-
class CreateCertificateAuthorityCommand extends
|
|
127
|
+
class CreateCertificateAuthorityCommand extends client.Command
|
|
130
128
|
.classBuilder()
|
|
131
129
|
.ep(commonParams)
|
|
132
130
|
.m(function (Command, cs, config, o) {
|
|
133
|
-
return [
|
|
131
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
134
132
|
})
|
|
135
133
|
.s("ACMPrivateCA", "CreateCertificateAuthority", {})
|
|
136
134
|
.n("ACMPCAClient", "CreateCertificateAuthorityCommand")
|
|
@@ -138,11 +136,11 @@ class CreateCertificateAuthorityCommand extends smithyClient.Command
|
|
|
138
136
|
.build() {
|
|
139
137
|
}
|
|
140
138
|
|
|
141
|
-
class CreatePermissionCommand extends
|
|
139
|
+
class CreatePermissionCommand extends client.Command
|
|
142
140
|
.classBuilder()
|
|
143
141
|
.ep(commonParams)
|
|
144
142
|
.m(function (Command, cs, config, o) {
|
|
145
|
-
return [
|
|
143
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
146
144
|
})
|
|
147
145
|
.s("ACMPrivateCA", "CreatePermission", {})
|
|
148
146
|
.n("ACMPCAClient", "CreatePermissionCommand")
|
|
@@ -150,11 +148,11 @@ class CreatePermissionCommand extends smithyClient.Command
|
|
|
150
148
|
.build() {
|
|
151
149
|
}
|
|
152
150
|
|
|
153
|
-
class DeleteCertificateAuthorityCommand extends
|
|
151
|
+
class DeleteCertificateAuthorityCommand extends client.Command
|
|
154
152
|
.classBuilder()
|
|
155
153
|
.ep(commonParams)
|
|
156
154
|
.m(function (Command, cs, config, o) {
|
|
157
|
-
return [
|
|
155
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
158
156
|
})
|
|
159
157
|
.s("ACMPrivateCA", "DeleteCertificateAuthority", {})
|
|
160
158
|
.n("ACMPCAClient", "DeleteCertificateAuthorityCommand")
|
|
@@ -162,11 +160,11 @@ class DeleteCertificateAuthorityCommand extends smithyClient.Command
|
|
|
162
160
|
.build() {
|
|
163
161
|
}
|
|
164
162
|
|
|
165
|
-
class DeletePermissionCommand extends
|
|
163
|
+
class DeletePermissionCommand extends client.Command
|
|
166
164
|
.classBuilder()
|
|
167
165
|
.ep(commonParams)
|
|
168
166
|
.m(function (Command, cs, config, o) {
|
|
169
|
-
return [
|
|
167
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
170
168
|
})
|
|
171
169
|
.s("ACMPrivateCA", "DeletePermission", {})
|
|
172
170
|
.n("ACMPCAClient", "DeletePermissionCommand")
|
|
@@ -174,11 +172,11 @@ class DeletePermissionCommand extends smithyClient.Command
|
|
|
174
172
|
.build() {
|
|
175
173
|
}
|
|
176
174
|
|
|
177
|
-
class DeletePolicyCommand extends
|
|
175
|
+
class DeletePolicyCommand extends client.Command
|
|
178
176
|
.classBuilder()
|
|
179
177
|
.ep(commonParams)
|
|
180
178
|
.m(function (Command, cs, config, o) {
|
|
181
|
-
return [
|
|
179
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
182
180
|
})
|
|
183
181
|
.s("ACMPrivateCA", "DeletePolicy", {})
|
|
184
182
|
.n("ACMPCAClient", "DeletePolicyCommand")
|
|
@@ -186,11 +184,11 @@ class DeletePolicyCommand extends smithyClient.Command
|
|
|
186
184
|
.build() {
|
|
187
185
|
}
|
|
188
186
|
|
|
189
|
-
class DescribeCertificateAuthorityAuditReportCommand extends
|
|
187
|
+
class DescribeCertificateAuthorityAuditReportCommand extends client.Command
|
|
190
188
|
.classBuilder()
|
|
191
189
|
.ep(commonParams)
|
|
192
190
|
.m(function (Command, cs, config, o) {
|
|
193
|
-
return [
|
|
191
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
194
192
|
})
|
|
195
193
|
.s("ACMPrivateCA", "DescribeCertificateAuthorityAuditReport", {})
|
|
196
194
|
.n("ACMPCAClient", "DescribeCertificateAuthorityAuditReportCommand")
|
|
@@ -198,11 +196,11 @@ class DescribeCertificateAuthorityAuditReportCommand extends smithyClient.Comman
|
|
|
198
196
|
.build() {
|
|
199
197
|
}
|
|
200
198
|
|
|
201
|
-
class DescribeCertificateAuthorityCommand extends
|
|
199
|
+
class DescribeCertificateAuthorityCommand extends client.Command
|
|
202
200
|
.classBuilder()
|
|
203
201
|
.ep(commonParams)
|
|
204
202
|
.m(function (Command, cs, config, o) {
|
|
205
|
-
return [
|
|
203
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
206
204
|
})
|
|
207
205
|
.s("ACMPrivateCA", "DescribeCertificateAuthority", {})
|
|
208
206
|
.n("ACMPCAClient", "DescribeCertificateAuthorityCommand")
|
|
@@ -210,11 +208,11 @@ class DescribeCertificateAuthorityCommand extends smithyClient.Command
|
|
|
210
208
|
.build() {
|
|
211
209
|
}
|
|
212
210
|
|
|
213
|
-
class GetCertificateAuthorityCertificateCommand extends
|
|
211
|
+
class GetCertificateAuthorityCertificateCommand extends client.Command
|
|
214
212
|
.classBuilder()
|
|
215
213
|
.ep(commonParams)
|
|
216
214
|
.m(function (Command, cs, config, o) {
|
|
217
|
-
return [
|
|
215
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
218
216
|
})
|
|
219
217
|
.s("ACMPrivateCA", "GetCertificateAuthorityCertificate", {})
|
|
220
218
|
.n("ACMPCAClient", "GetCertificateAuthorityCertificateCommand")
|
|
@@ -222,11 +220,11 @@ class GetCertificateAuthorityCertificateCommand extends smithyClient.Command
|
|
|
222
220
|
.build() {
|
|
223
221
|
}
|
|
224
222
|
|
|
225
|
-
class GetCertificateAuthorityCsrCommand extends
|
|
223
|
+
class GetCertificateAuthorityCsrCommand extends client.Command
|
|
226
224
|
.classBuilder()
|
|
227
225
|
.ep(commonParams)
|
|
228
226
|
.m(function (Command, cs, config, o) {
|
|
229
|
-
return [
|
|
227
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
230
228
|
})
|
|
231
229
|
.s("ACMPrivateCA", "GetCertificateAuthorityCsr", {})
|
|
232
230
|
.n("ACMPCAClient", "GetCertificateAuthorityCsrCommand")
|
|
@@ -234,11 +232,11 @@ class GetCertificateAuthorityCsrCommand extends smithyClient.Command
|
|
|
234
232
|
.build() {
|
|
235
233
|
}
|
|
236
234
|
|
|
237
|
-
class GetCertificateCommand extends
|
|
235
|
+
class GetCertificateCommand extends client.Command
|
|
238
236
|
.classBuilder()
|
|
239
237
|
.ep(commonParams)
|
|
240
238
|
.m(function (Command, cs, config, o) {
|
|
241
|
-
return [
|
|
239
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
242
240
|
})
|
|
243
241
|
.s("ACMPrivateCA", "GetCertificate", {})
|
|
244
242
|
.n("ACMPCAClient", "GetCertificateCommand")
|
|
@@ -246,11 +244,11 @@ class GetCertificateCommand extends smithyClient.Command
|
|
|
246
244
|
.build() {
|
|
247
245
|
}
|
|
248
246
|
|
|
249
|
-
class GetPolicyCommand extends
|
|
247
|
+
class GetPolicyCommand extends client.Command
|
|
250
248
|
.classBuilder()
|
|
251
249
|
.ep(commonParams)
|
|
252
250
|
.m(function (Command, cs, config, o) {
|
|
253
|
-
return [
|
|
251
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
254
252
|
})
|
|
255
253
|
.s("ACMPrivateCA", "GetPolicy", {})
|
|
256
254
|
.n("ACMPCAClient", "GetPolicyCommand")
|
|
@@ -258,11 +256,11 @@ class GetPolicyCommand extends smithyClient.Command
|
|
|
258
256
|
.build() {
|
|
259
257
|
}
|
|
260
258
|
|
|
261
|
-
class ImportCertificateAuthorityCertificateCommand extends
|
|
259
|
+
class ImportCertificateAuthorityCertificateCommand extends client.Command
|
|
262
260
|
.classBuilder()
|
|
263
261
|
.ep(commonParams)
|
|
264
262
|
.m(function (Command, cs, config, o) {
|
|
265
|
-
return [
|
|
263
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
266
264
|
})
|
|
267
265
|
.s("ACMPrivateCA", "ImportCertificateAuthorityCertificate", {})
|
|
268
266
|
.n("ACMPCAClient", "ImportCertificateAuthorityCertificateCommand")
|
|
@@ -270,11 +268,11 @@ class ImportCertificateAuthorityCertificateCommand extends smithyClient.Command
|
|
|
270
268
|
.build() {
|
|
271
269
|
}
|
|
272
270
|
|
|
273
|
-
class IssueCertificateCommand extends
|
|
271
|
+
class IssueCertificateCommand extends client.Command
|
|
274
272
|
.classBuilder()
|
|
275
273
|
.ep(commonParams)
|
|
276
274
|
.m(function (Command, cs, config, o) {
|
|
277
|
-
return [
|
|
275
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
278
276
|
})
|
|
279
277
|
.s("ACMPrivateCA", "IssueCertificate", {})
|
|
280
278
|
.n("ACMPCAClient", "IssueCertificateCommand")
|
|
@@ -282,11 +280,11 @@ class IssueCertificateCommand extends smithyClient.Command
|
|
|
282
280
|
.build() {
|
|
283
281
|
}
|
|
284
282
|
|
|
285
|
-
class ListCertificateAuthoritiesCommand extends
|
|
283
|
+
class ListCertificateAuthoritiesCommand extends client.Command
|
|
286
284
|
.classBuilder()
|
|
287
285
|
.ep(commonParams)
|
|
288
286
|
.m(function (Command, cs, config, o) {
|
|
289
|
-
return [
|
|
287
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
290
288
|
})
|
|
291
289
|
.s("ACMPrivateCA", "ListCertificateAuthorities", {})
|
|
292
290
|
.n("ACMPCAClient", "ListCertificateAuthoritiesCommand")
|
|
@@ -294,11 +292,11 @@ class ListCertificateAuthoritiesCommand extends smithyClient.Command
|
|
|
294
292
|
.build() {
|
|
295
293
|
}
|
|
296
294
|
|
|
297
|
-
class ListPermissionsCommand extends
|
|
295
|
+
class ListPermissionsCommand extends client.Command
|
|
298
296
|
.classBuilder()
|
|
299
297
|
.ep(commonParams)
|
|
300
298
|
.m(function (Command, cs, config, o) {
|
|
301
|
-
return [
|
|
299
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
302
300
|
})
|
|
303
301
|
.s("ACMPrivateCA", "ListPermissions", {})
|
|
304
302
|
.n("ACMPCAClient", "ListPermissionsCommand")
|
|
@@ -306,11 +304,11 @@ class ListPermissionsCommand extends smithyClient.Command
|
|
|
306
304
|
.build() {
|
|
307
305
|
}
|
|
308
306
|
|
|
309
|
-
class ListTagsCommand extends
|
|
307
|
+
class ListTagsCommand extends client.Command
|
|
310
308
|
.classBuilder()
|
|
311
309
|
.ep(commonParams)
|
|
312
310
|
.m(function (Command, cs, config, o) {
|
|
313
|
-
return [
|
|
311
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
314
312
|
})
|
|
315
313
|
.s("ACMPrivateCA", "ListTags", {})
|
|
316
314
|
.n("ACMPCAClient", "ListTagsCommand")
|
|
@@ -318,11 +316,11 @@ class ListTagsCommand extends smithyClient.Command
|
|
|
318
316
|
.build() {
|
|
319
317
|
}
|
|
320
318
|
|
|
321
|
-
class PutPolicyCommand extends
|
|
319
|
+
class PutPolicyCommand extends client.Command
|
|
322
320
|
.classBuilder()
|
|
323
321
|
.ep(commonParams)
|
|
324
322
|
.m(function (Command, cs, config, o) {
|
|
325
|
-
return [
|
|
323
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
326
324
|
})
|
|
327
325
|
.s("ACMPrivateCA", "PutPolicy", {})
|
|
328
326
|
.n("ACMPCAClient", "PutPolicyCommand")
|
|
@@ -330,11 +328,11 @@ class PutPolicyCommand extends smithyClient.Command
|
|
|
330
328
|
.build() {
|
|
331
329
|
}
|
|
332
330
|
|
|
333
|
-
class RestoreCertificateAuthorityCommand extends
|
|
331
|
+
class RestoreCertificateAuthorityCommand extends client.Command
|
|
334
332
|
.classBuilder()
|
|
335
333
|
.ep(commonParams)
|
|
336
334
|
.m(function (Command, cs, config, o) {
|
|
337
|
-
return [
|
|
335
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
338
336
|
})
|
|
339
337
|
.s("ACMPrivateCA", "RestoreCertificateAuthority", {})
|
|
340
338
|
.n("ACMPCAClient", "RestoreCertificateAuthorityCommand")
|
|
@@ -342,11 +340,11 @@ class RestoreCertificateAuthorityCommand extends smithyClient.Command
|
|
|
342
340
|
.build() {
|
|
343
341
|
}
|
|
344
342
|
|
|
345
|
-
class RevokeCertificateCommand extends
|
|
343
|
+
class RevokeCertificateCommand extends client.Command
|
|
346
344
|
.classBuilder()
|
|
347
345
|
.ep(commonParams)
|
|
348
346
|
.m(function (Command, cs, config, o) {
|
|
349
|
-
return [
|
|
347
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
350
348
|
})
|
|
351
349
|
.s("ACMPrivateCA", "RevokeCertificate", {})
|
|
352
350
|
.n("ACMPCAClient", "RevokeCertificateCommand")
|
|
@@ -354,11 +352,11 @@ class RevokeCertificateCommand extends smithyClient.Command
|
|
|
354
352
|
.build() {
|
|
355
353
|
}
|
|
356
354
|
|
|
357
|
-
class TagCertificateAuthorityCommand extends
|
|
355
|
+
class TagCertificateAuthorityCommand extends client.Command
|
|
358
356
|
.classBuilder()
|
|
359
357
|
.ep(commonParams)
|
|
360
358
|
.m(function (Command, cs, config, o) {
|
|
361
|
-
return [
|
|
359
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
362
360
|
})
|
|
363
361
|
.s("ACMPrivateCA", "TagCertificateAuthority", {})
|
|
364
362
|
.n("ACMPCAClient", "TagCertificateAuthorityCommand")
|
|
@@ -366,11 +364,11 @@ class TagCertificateAuthorityCommand extends smithyClient.Command
|
|
|
366
364
|
.build() {
|
|
367
365
|
}
|
|
368
366
|
|
|
369
|
-
class UntagCertificateAuthorityCommand extends
|
|
367
|
+
class UntagCertificateAuthorityCommand extends client.Command
|
|
370
368
|
.classBuilder()
|
|
371
369
|
.ep(commonParams)
|
|
372
370
|
.m(function (Command, cs, config, o) {
|
|
373
|
-
return [
|
|
371
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
374
372
|
})
|
|
375
373
|
.s("ACMPrivateCA", "UntagCertificateAuthority", {})
|
|
376
374
|
.n("ACMPCAClient", "UntagCertificateAuthorityCommand")
|
|
@@ -378,11 +376,11 @@ class UntagCertificateAuthorityCommand extends smithyClient.Command
|
|
|
378
376
|
.build() {
|
|
379
377
|
}
|
|
380
378
|
|
|
381
|
-
class UpdateCertificateAuthorityCommand extends
|
|
379
|
+
class UpdateCertificateAuthorityCommand extends client.Command
|
|
382
380
|
.classBuilder()
|
|
383
381
|
.ep(commonParams)
|
|
384
382
|
.m(function (Command, cs, config, o) {
|
|
385
|
-
return [
|
|
383
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
386
384
|
})
|
|
387
385
|
.s("ACMPrivateCA", "UpdateCertificateAuthority", {})
|
|
388
386
|
.n("ACMPCAClient", "UpdateCertificateAuthorityCommand")
|
|
@@ -396,17 +394,17 @@ const paginateListPermissions = core.createPaginator(ACMPCAClient, ListPermissio
|
|
|
396
394
|
|
|
397
395
|
const paginateListTags = core.createPaginator(ACMPCAClient, ListTagsCommand, "NextToken", "NextToken", "MaxResults");
|
|
398
396
|
|
|
399
|
-
const checkState$2 = async (client, input) => {
|
|
397
|
+
const checkState$2 = async (client$1, input) => {
|
|
400
398
|
let reason;
|
|
401
399
|
try {
|
|
402
|
-
let result = await client.send(new DescribeCertificateAuthorityAuditReportCommand(input));
|
|
400
|
+
let result = await client$1.send(new DescribeCertificateAuthorityAuditReportCommand(input));
|
|
403
401
|
reason = result;
|
|
404
402
|
try {
|
|
405
403
|
const returnComparator = () => {
|
|
406
404
|
return result.AuditReportStatus;
|
|
407
405
|
};
|
|
408
406
|
if (returnComparator() === "SUCCESS") {
|
|
409
|
-
return { state:
|
|
407
|
+
return { state: client.WaiterState.SUCCESS, reason };
|
|
410
408
|
}
|
|
411
409
|
}
|
|
412
410
|
catch (e) { }
|
|
@@ -415,7 +413,7 @@ const checkState$2 = async (client, input) => {
|
|
|
415
413
|
return result.AuditReportStatus;
|
|
416
414
|
};
|
|
417
415
|
if (returnComparator() === "FAILED") {
|
|
418
|
-
return { state:
|
|
416
|
+
return { state: client.WaiterState.FAILURE, reason };
|
|
419
417
|
}
|
|
420
418
|
}
|
|
421
419
|
catch (e) { }
|
|
@@ -423,75 +421,75 @@ const checkState$2 = async (client, input) => {
|
|
|
423
421
|
catch (exception) {
|
|
424
422
|
reason = exception;
|
|
425
423
|
if (exception.name === "AccessDeniedException") {
|
|
426
|
-
return { state:
|
|
424
|
+
return { state: client.WaiterState.FAILURE, reason };
|
|
427
425
|
}
|
|
428
426
|
}
|
|
429
|
-
return { state:
|
|
427
|
+
return { state: client.WaiterState.RETRY, reason };
|
|
430
428
|
};
|
|
431
429
|
const waitForAuditReportCreated = async (params, input) => {
|
|
432
430
|
const serviceDefaults = { minDelay: 3, maxDelay: 180 };
|
|
433
|
-
return
|
|
431
|
+
return client.createWaiter({ ...serviceDefaults, ...params }, input, checkState$2);
|
|
434
432
|
};
|
|
435
433
|
const waitUntilAuditReportCreated = async (params, input) => {
|
|
436
434
|
const serviceDefaults = { minDelay: 3, maxDelay: 180 };
|
|
437
|
-
const result = await
|
|
438
|
-
return
|
|
435
|
+
const result = await client.createWaiter({ ...serviceDefaults, ...params }, input, checkState$2);
|
|
436
|
+
return client.checkExceptions(result);
|
|
439
437
|
};
|
|
440
438
|
|
|
441
|
-
const checkState$1 = async (client, input) => {
|
|
439
|
+
const checkState$1 = async (client$1, input) => {
|
|
442
440
|
let reason;
|
|
443
441
|
try {
|
|
444
|
-
let result = await client.send(new GetCertificateAuthorityCsrCommand(input));
|
|
442
|
+
let result = await client$1.send(new GetCertificateAuthorityCsrCommand(input));
|
|
445
443
|
reason = result;
|
|
446
|
-
return { state:
|
|
444
|
+
return { state: client.WaiterState.SUCCESS, reason };
|
|
447
445
|
}
|
|
448
446
|
catch (exception) {
|
|
449
447
|
reason = exception;
|
|
450
448
|
if (exception.name === "RequestInProgressException") {
|
|
451
|
-
return { state:
|
|
449
|
+
return { state: client.WaiterState.RETRY, reason };
|
|
452
450
|
}
|
|
453
451
|
if (exception.name === "AccessDeniedException") {
|
|
454
|
-
return { state:
|
|
452
|
+
return { state: client.WaiterState.FAILURE, reason };
|
|
455
453
|
}
|
|
456
454
|
}
|
|
457
|
-
return { state:
|
|
455
|
+
return { state: client.WaiterState.RETRY, reason };
|
|
458
456
|
};
|
|
459
457
|
const waitForCertificateAuthorityCSRCreated = async (params, input) => {
|
|
460
458
|
const serviceDefaults = { minDelay: 3, maxDelay: 180 };
|
|
461
|
-
return
|
|
459
|
+
return client.createWaiter({ ...serviceDefaults, ...params }, input, checkState$1);
|
|
462
460
|
};
|
|
463
461
|
const waitUntilCertificateAuthorityCSRCreated = async (params, input) => {
|
|
464
462
|
const serviceDefaults = { minDelay: 3, maxDelay: 180 };
|
|
465
|
-
const result = await
|
|
466
|
-
return
|
|
463
|
+
const result = await client.createWaiter({ ...serviceDefaults, ...params }, input, checkState$1);
|
|
464
|
+
return client.checkExceptions(result);
|
|
467
465
|
};
|
|
468
466
|
|
|
469
|
-
const checkState = async (client, input) => {
|
|
467
|
+
const checkState = async (client$1, input) => {
|
|
470
468
|
let reason;
|
|
471
469
|
try {
|
|
472
|
-
let result = await client.send(new GetCertificateCommand(input));
|
|
470
|
+
let result = await client$1.send(new GetCertificateCommand(input));
|
|
473
471
|
reason = result;
|
|
474
|
-
return { state:
|
|
472
|
+
return { state: client.WaiterState.SUCCESS, reason };
|
|
475
473
|
}
|
|
476
474
|
catch (exception) {
|
|
477
475
|
reason = exception;
|
|
478
476
|
if (exception.name === "RequestInProgressException") {
|
|
479
|
-
return { state:
|
|
477
|
+
return { state: client.WaiterState.RETRY, reason };
|
|
480
478
|
}
|
|
481
479
|
if (exception.name === "AccessDeniedException") {
|
|
482
|
-
return { state:
|
|
480
|
+
return { state: client.WaiterState.FAILURE, reason };
|
|
483
481
|
}
|
|
484
482
|
}
|
|
485
|
-
return { state:
|
|
483
|
+
return { state: client.WaiterState.RETRY, reason };
|
|
486
484
|
};
|
|
487
485
|
const waitForCertificateIssued = async (params, input) => {
|
|
488
486
|
const serviceDefaults = { minDelay: 1, maxDelay: 60 };
|
|
489
|
-
return
|
|
487
|
+
return client.createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
490
488
|
};
|
|
491
489
|
const waitUntilCertificateIssued = async (params, input) => {
|
|
492
490
|
const serviceDefaults = { minDelay: 1, maxDelay: 60 };
|
|
493
|
-
const result = await
|
|
494
|
-
return
|
|
491
|
+
const result = await client.createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
492
|
+
return client.checkExceptions(result);
|
|
495
493
|
};
|
|
496
494
|
|
|
497
495
|
const commands = {
|
|
@@ -531,7 +529,7 @@ const waiters = {
|
|
|
531
529
|
};
|
|
532
530
|
class ACMPCA extends ACMPCAClient {
|
|
533
531
|
}
|
|
534
|
-
|
|
532
|
+
client.createAggregatedClient(commands, ACMPCA, { paginators, waiters });
|
|
535
533
|
|
|
536
534
|
const AccessMethodType = {
|
|
537
535
|
CA_REPOSITORY: "CA_REPOSITORY",
|
|
@@ -647,8 +645,8 @@ const RevocationReason = {
|
|
|
647
645
|
UNSPECIFIED: "UNSPECIFIED",
|
|
648
646
|
};
|
|
649
647
|
|
|
650
|
-
exports.$Command =
|
|
651
|
-
exports.__Client =
|
|
648
|
+
exports.$Command = client.Command;
|
|
649
|
+
exports.__Client = client.Client;
|
|
652
650
|
exports.ACMPCAServiceException = ACMPCAServiceException.ACMPCAServiceException;
|
|
653
651
|
exports.ACMPCA = ACMPCA;
|
|
654
652
|
exports.ACMPCAClient = ACMPCAClient;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ACMPCAServiceException = exports.__ServiceException = void 0;
|
|
4
|
-
const
|
|
5
|
-
Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return
|
|
6
|
-
class ACMPCAServiceException extends
|
|
4
|
+
const client_1 = require("@smithy/core/client");
|
|
5
|
+
Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return client_1.ServiceException; } });
|
|
6
|
+
class ACMPCAServiceException extends client_1.ServiceException {
|
|
7
7
|
constructor(options) {
|
|
8
8
|
super(options);
|
|
9
9
|
Object.setPrototypeOf(this, ACMPCAServiceException.prototype);
|
|
@@ -5,34 +5,32 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const package_json_1 = tslib_1.__importDefault(require("../package.json"));
|
|
6
6
|
const sha256_browser_1 = require("@aws-crypto/sha256-browser");
|
|
7
7
|
const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
|
|
8
|
-
const
|
|
8
|
+
const client_1 = require("@smithy/core/client");
|
|
9
|
+
const config_1 = require("@smithy/core/config");
|
|
10
|
+
const retry_1 = require("@smithy/core/retry");
|
|
11
|
+
const serde_1 = require("@smithy/core/serde");
|
|
9
12
|
const fetch_http_handler_1 = require("@smithy/fetch-http-handler");
|
|
10
|
-
const invalid_dependency_1 = require("@smithy/invalid-dependency");
|
|
11
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
12
|
-
const util_body_length_browser_1 = require("@smithy/util-body-length-browser");
|
|
13
|
-
const util_defaults_mode_browser_1 = require("@smithy/util-defaults-mode-browser");
|
|
14
|
-
const util_retry_1 = require("@smithy/util-retry");
|
|
15
13
|
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
16
14
|
const getRuntimeConfig = (config) => {
|
|
17
|
-
const defaultsMode = (0,
|
|
18
|
-
const defaultConfigProvider = () => defaultsMode().then(
|
|
15
|
+
const defaultsMode = (0, config_1.resolveDefaultsModeConfig)(config);
|
|
16
|
+
const defaultConfigProvider = () => defaultsMode().then(client_1.loadConfigsForDefaultMode);
|
|
19
17
|
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
|
|
20
18
|
return {
|
|
21
19
|
...clientSharedValues,
|
|
22
20
|
...config,
|
|
23
21
|
runtime: "browser",
|
|
24
22
|
defaultsMode,
|
|
25
|
-
bodyLengthChecker: config?.bodyLengthChecker ??
|
|
23
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? serde_1.calculateBodyLength,
|
|
26
24
|
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
27
25
|
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_browser_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
|
28
|
-
maxAttempts: config?.maxAttempts ??
|
|
29
|
-
region: config?.region ?? (0,
|
|
26
|
+
maxAttempts: config?.maxAttempts ?? retry_1.DEFAULT_MAX_ATTEMPTS,
|
|
27
|
+
region: config?.region ?? (0, client_1.invalidProvider)("Region is missing"),
|
|
30
28
|
requestHandler: fetch_http_handler_1.FetchHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
31
|
-
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode ||
|
|
29
|
+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || retry_1.DEFAULT_RETRY_MODE),
|
|
32
30
|
sha256: config?.sha256 ?? sha256_browser_1.Sha256,
|
|
33
31
|
streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
|
|
34
|
-
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(
|
|
35
|
-
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(
|
|
32
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(config_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
33
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(config_1.DEFAULT_USE_FIPS_ENDPOINT)),
|
|
36
34
|
};
|
|
37
35
|
};
|
|
38
36
|
exports.getRuntimeConfig = getRuntimeConfig;
|