@aws-sdk/client-ssm-guiconnect 3.799.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/LICENSE +201 -0
- package/README.md +253 -0
- package/dist-cjs/SSMGuiConnect.js +17 -0
- package/dist-cjs/SSMGuiConnectClient.js +52 -0
- package/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
- package/dist-cjs/auth/httpAuthSchemeProvider.js +47 -0
- package/dist-cjs/commands/DeleteConnectionRecordingPreferencesCommand.js +26 -0
- package/dist-cjs/commands/GetConnectionRecordingPreferencesCommand.js +26 -0
- package/dist-cjs/commands/UpdateConnectionRecordingPreferencesCommand.js +26 -0
- package/dist-cjs/commands/index.js +6 -0
- package/dist-cjs/endpoint/EndpointParameters.js +17 -0
- package/dist-cjs/endpoint/endpointResolver.js +18 -0
- package/dist-cjs/endpoint/ruleset.js +7 -0
- package/dist-cjs/extensionConfiguration.js +2 -0
- package/dist-cjs/index.js +10 -0
- package/dist-cjs/models/SSMGuiConnectServiceException.js +12 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +95 -0
- package/dist-cjs/protocols/Aws_restJson1.js +230 -0
- package/dist-cjs/runtimeConfig.browser.js +39 -0
- package/dist-cjs/runtimeConfig.js +53 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +34 -0
- package/dist-cjs/runtimeExtensions.js +13 -0
- package/dist-es/SSMGuiConnect.js +13 -0
- package/dist-es/SSMGuiConnectClient.js +48 -0
- package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +41 -0
- package/dist-es/commands/DeleteConnectionRecordingPreferencesCommand.js +22 -0
- package/dist-es/commands/GetConnectionRecordingPreferencesCommand.js +22 -0
- package/dist-es/commands/UpdateConnectionRecordingPreferencesCommand.js +22 -0
- package/dist-es/commands/index.js +3 -0
- package/dist-es/endpoint/EndpointParameters.js +13 -0
- package/dist-es/endpoint/endpointResolver.js +14 -0
- package/dist-es/endpoint/ruleset.js +4 -0
- package/dist-es/extensionConfiguration.js +1 -0
- package/dist-es/index.js +5 -0
- package/dist-es/models/SSMGuiConnectServiceException.js +8 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +85 -0
- package/dist-es/protocols/Aws_restJson1.js +221 -0
- package/dist-es/runtimeConfig.browser.js +34 -0
- package/dist-es/runtimeConfig.js +48 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +30 -0
- package/dist-es/runtimeExtensions.js +9 -0
- package/dist-types/SSMGuiConnect.d.ts +56 -0
- package/dist-types/SSMGuiConnectClient.d.ts +213 -0
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +75 -0
- package/dist-types/commands/DeleteConnectionRecordingPreferencesCommand.d.ts +106 -0
- package/dist-types/commands/GetConnectionRecordingPreferencesCommand.d.ts +126 -0
- package/dist-types/commands/UpdateConnectionRecordingPreferencesCommand.d.ts +151 -0
- package/dist-types/commands/index.d.ts +3 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +40 -0
- package/dist-types/endpoint/endpointResolver.d.ts +5 -0
- package/dist-types/endpoint/ruleset.d.ts +2 -0
- package/dist-types/extensionConfiguration.d.ts +9 -0
- package/dist-types/index.d.ts +36 -0
- package/dist-types/models/SSMGuiConnectServiceException.d.ts +14 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +194 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +29 -0
- package/dist-types/runtimeConfig.browser.d.ts +50 -0
- package/dist-types/runtimeConfig.d.ts +50 -0
- package/dist-types/runtimeConfig.native.d.ts +49 -0
- package/dist-types/runtimeConfig.shared.d.ts +21 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/dist-types/ts3.4/SSMGuiConnect.d.ts +78 -0
- package/dist-types/ts3.4/SSMGuiConnectClient.d.ts +138 -0
- package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
- package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +47 -0
- package/dist-types/ts3.4/commands/DeleteConnectionRecordingPreferencesCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/GetConnectionRecordingPreferencesCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/UpdateConnectionRecordingPreferencesCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/index.d.ts +3 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +51 -0
- package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
- package/dist-types/ts3.4/extensionConfiguration.d.ts +9 -0
- package/dist-types/ts3.4/index.d.ts +8 -0
- package/dist-types/ts3.4/models/SSMGuiConnectServiceException.d.ts +9 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +78 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +41 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +100 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +98 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +104 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +21 -0
- package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
- package/package.json +101 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
|
|
2
|
+
import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
|
|
3
|
+
import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection";
|
|
4
|
+
import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
|
|
5
|
+
import { resolveRegionConfig } from "@smithy/config-resolver";
|
|
6
|
+
import { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from "@smithy/core";
|
|
7
|
+
import { getContentLengthPlugin } from "@smithy/middleware-content-length";
|
|
8
|
+
import { resolveEndpointConfig } from "@smithy/middleware-endpoint";
|
|
9
|
+
import { getRetryPlugin, resolveRetryConfig } from "@smithy/middleware-retry";
|
|
10
|
+
import { Client as __Client, } from "@smithy/smithy-client";
|
|
11
|
+
import { defaultSSMGuiConnectHttpAuthSchemeParametersProvider, resolveHttpAuthSchemeConfig, } from "./auth/httpAuthSchemeProvider";
|
|
12
|
+
import { resolveClientEndpointParameters, } from "./endpoint/EndpointParameters";
|
|
13
|
+
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
|
|
14
|
+
import { resolveRuntimeExtensions } from "./runtimeExtensions";
|
|
15
|
+
export { __Client };
|
|
16
|
+
export class SSMGuiConnectClient extends __Client {
|
|
17
|
+
config;
|
|
18
|
+
constructor(...[configuration]) {
|
|
19
|
+
const _config_0 = __getRuntimeConfig(configuration || {});
|
|
20
|
+
super(_config_0);
|
|
21
|
+
this.initConfig = _config_0;
|
|
22
|
+
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
23
|
+
const _config_2 = resolveUserAgentConfig(_config_1);
|
|
24
|
+
const _config_3 = resolveRetryConfig(_config_2);
|
|
25
|
+
const _config_4 = resolveRegionConfig(_config_3);
|
|
26
|
+
const _config_5 = resolveHostHeaderConfig(_config_4);
|
|
27
|
+
const _config_6 = resolveEndpointConfig(_config_5);
|
|
28
|
+
const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
|
|
29
|
+
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
30
|
+
this.config = _config_8;
|
|
31
|
+
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
32
|
+
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
33
|
+
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
34
|
+
this.middlewareStack.use(getHostHeaderPlugin(this.config));
|
|
35
|
+
this.middlewareStack.use(getLoggerPlugin(this.config));
|
|
36
|
+
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
|
|
37
|
+
this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
|
38
|
+
httpAuthSchemeParametersProvider: defaultSSMGuiConnectHttpAuthSchemeParametersProvider,
|
|
39
|
+
identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
|
|
40
|
+
"aws.auth#sigv4": config.credentials,
|
|
41
|
+
}),
|
|
42
|
+
}));
|
|
43
|
+
this.middlewareStack.use(getHttpSigningPlugin(this.config));
|
|
44
|
+
}
|
|
45
|
+
destroy() {
|
|
46
|
+
super.destroy();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
|
|
2
|
+
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
|
3
|
+
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
|
4
|
+
let _credentials = runtimeConfig.credentials;
|
|
5
|
+
return {
|
|
6
|
+
setHttpAuthScheme(httpAuthScheme) {
|
|
7
|
+
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
|
8
|
+
if (index === -1) {
|
|
9
|
+
_httpAuthSchemes.push(httpAuthScheme);
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
httpAuthSchemes() {
|
|
16
|
+
return _httpAuthSchemes;
|
|
17
|
+
},
|
|
18
|
+
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
|
|
19
|
+
_httpAuthSchemeProvider = httpAuthSchemeProvider;
|
|
20
|
+
},
|
|
21
|
+
httpAuthSchemeProvider() {
|
|
22
|
+
return _httpAuthSchemeProvider;
|
|
23
|
+
},
|
|
24
|
+
setCredentials(credentials) {
|
|
25
|
+
_credentials = credentials;
|
|
26
|
+
},
|
|
27
|
+
credentials() {
|
|
28
|
+
return _credentials;
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export const resolveHttpAuthRuntimeConfig = (config) => {
|
|
33
|
+
return {
|
|
34
|
+
httpAuthSchemes: config.httpAuthSchemes(),
|
|
35
|
+
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
36
|
+
credentials: config.credentials(),
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { resolveAwsSdkSigV4Config, } from "@aws-sdk/core";
|
|
2
|
+
import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware";
|
|
3
|
+
export const defaultSSMGuiConnectHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
4
|
+
return {
|
|
5
|
+
operation: getSmithyContext(context).operation,
|
|
6
|
+
region: (await normalizeProvider(config.region)()) ||
|
|
7
|
+
(() => {
|
|
8
|
+
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
9
|
+
})(),
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
|
13
|
+
return {
|
|
14
|
+
schemeId: "aws.auth#sigv4",
|
|
15
|
+
signingProperties: {
|
|
16
|
+
name: "ssm-guiconnect",
|
|
17
|
+
region: authParameters.region,
|
|
18
|
+
},
|
|
19
|
+
propertiesExtractor: (config, context) => ({
|
|
20
|
+
signingProperties: {
|
|
21
|
+
config,
|
|
22
|
+
context,
|
|
23
|
+
},
|
|
24
|
+
}),
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export const defaultSSMGuiConnectHttpAuthSchemeProvider = (authParameters) => {
|
|
28
|
+
const options = [];
|
|
29
|
+
switch (authParameters.operation) {
|
|
30
|
+
default: {
|
|
31
|
+
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return options;
|
|
35
|
+
};
|
|
36
|
+
export const resolveHttpAuthSchemeConfig = (config) => {
|
|
37
|
+
const config_0 = resolveAwsSdkSigV4Config(config);
|
|
38
|
+
return Object.assign(config_0, {
|
|
39
|
+
authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
|
|
40
|
+
});
|
|
41
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
|
+
import { de_DeleteConnectionRecordingPreferencesCommand, se_DeleteConnectionRecordingPreferencesCommand, } from "../protocols/Aws_restJson1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class DeleteConnectionRecordingPreferencesCommand extends $Command
|
|
8
|
+
.classBuilder()
|
|
9
|
+
.ep(commonParams)
|
|
10
|
+
.m(function (Command, cs, config, o) {
|
|
11
|
+
return [
|
|
12
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
13
|
+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
14
|
+
];
|
|
15
|
+
})
|
|
16
|
+
.s("SSMGuiConnect", "DeleteConnectionRecordingPreferences", {})
|
|
17
|
+
.n("SSMGuiConnectClient", "DeleteConnectionRecordingPreferencesCommand")
|
|
18
|
+
.f(void 0, void 0)
|
|
19
|
+
.ser(se_DeleteConnectionRecordingPreferencesCommand)
|
|
20
|
+
.de(de_DeleteConnectionRecordingPreferencesCommand)
|
|
21
|
+
.build() {
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
|
+
import { de_GetConnectionRecordingPreferencesCommand, se_GetConnectionRecordingPreferencesCommand, } from "../protocols/Aws_restJson1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class GetConnectionRecordingPreferencesCommand extends $Command
|
|
8
|
+
.classBuilder()
|
|
9
|
+
.ep(commonParams)
|
|
10
|
+
.m(function (Command, cs, config, o) {
|
|
11
|
+
return [
|
|
12
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
13
|
+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
14
|
+
];
|
|
15
|
+
})
|
|
16
|
+
.s("SSMGuiConnect", "GetConnectionRecordingPreferences", {})
|
|
17
|
+
.n("SSMGuiConnectClient", "GetConnectionRecordingPreferencesCommand")
|
|
18
|
+
.f(void 0, void 0)
|
|
19
|
+
.ser(se_GetConnectionRecordingPreferencesCommand)
|
|
20
|
+
.de(de_GetConnectionRecordingPreferencesCommand)
|
|
21
|
+
.build() {
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
|
+
import { de_UpdateConnectionRecordingPreferencesCommand, se_UpdateConnectionRecordingPreferencesCommand, } from "../protocols/Aws_restJson1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class UpdateConnectionRecordingPreferencesCommand extends $Command
|
|
8
|
+
.classBuilder()
|
|
9
|
+
.ep(commonParams)
|
|
10
|
+
.m(function (Command, cs, config, o) {
|
|
11
|
+
return [
|
|
12
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
13
|
+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
14
|
+
];
|
|
15
|
+
})
|
|
16
|
+
.s("SSMGuiConnect", "UpdateConnectionRecordingPreferences", {})
|
|
17
|
+
.n("SSMGuiConnectClient", "UpdateConnectionRecordingPreferencesCommand")
|
|
18
|
+
.f(void 0, void 0)
|
|
19
|
+
.ser(se_UpdateConnectionRecordingPreferencesCommand)
|
|
20
|
+
.de(de_UpdateConnectionRecordingPreferencesCommand)
|
|
21
|
+
.build() {
|
|
22
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const resolveClientEndpointParameters = (options) => {
|
|
2
|
+
return Object.assign(options, {
|
|
3
|
+
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
4
|
+
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
5
|
+
defaultSigningName: "ssm-guiconnect",
|
|
6
|
+
});
|
|
7
|
+
};
|
|
8
|
+
export const commonParams = {
|
|
9
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
10
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
11
|
+
Region: { type: "builtInParams", name: "region" },
|
|
12
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
13
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { awsEndpointFunctions } from "@aws-sdk/util-endpoints";
|
|
2
|
+
import { customEndpointFunctions, EndpointCache, resolveEndpoint } from "@smithy/util-endpoints";
|
|
3
|
+
import { ruleSet } from "./ruleset";
|
|
4
|
+
const cache = new EndpointCache({
|
|
5
|
+
size: 50,
|
|
6
|
+
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
|
|
7
|
+
});
|
|
8
|
+
export const defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
9
|
+
return cache.get(endpointParams, () => resolveEndpoint(ruleSet, {
|
|
10
|
+
endpointParams: endpointParams,
|
|
11
|
+
logger: context.logger,
|
|
12
|
+
}));
|
|
13
|
+
};
|
|
14
|
+
customEndpointFunctions.aws = awsEndpointFunctions;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const s = "required", t = "fn", u = "argv", v = "ref";
|
|
2
|
+
const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = { [s]: false, "type": "String" }, i = { [s]: true, "default": false, "type": "Boolean" }, j = { [v]: "Endpoint" }, k = { [t]: c, [u]: [{ [v]: "UseFIPS" }, true] }, l = { [t]: c, [u]: [{ [v]: "UseDualStack" }, true] }, m = {}, n = { [t]: "getAttr", [u]: [{ [v]: g }, "supportsFIPS"] }, o = { [t]: c, [u]: [true, { [t]: "getAttr", [u]: [{ [v]: g }, "supportsDualStack"] }] }, p = [k], q = [l], r = [{ [v]: "Region" }];
|
|
3
|
+
const _data = { version: "1.0", parameters: { Region: h, UseDualStack: i, UseFIPS: i, Endpoint: h }, rules: [{ conditions: [{ [t]: b, [u]: [j] }], rules: [{ conditions: p, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { rules: [{ conditions: q, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: j, properties: m, headers: m }, type: e }], type: f }], type: f }, { rules: [{ conditions: [{ [t]: b, [u]: r }], rules: [{ conditions: [{ [t]: "aws.partition", [u]: r, assign: g }], rules: [{ conditions: [k, l], rules: [{ conditions: [{ [t]: c, [u]: [a, n] }, o], rules: [{ rules: [{ endpoint: { url: "https://ssm-guiconnect-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: p, rules: [{ conditions: [{ [t]: c, [u]: [n, a] }], rules: [{ rules: [{ endpoint: { url: "https://ssm-guiconnect-fips.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: q, rules: [{ conditions: [o], rules: [{ rules: [{ endpoint: { url: "https://ssm-guiconnect.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { rules: [{ endpoint: { url: "https://ssm-guiconnect.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }], type: f }] };
|
|
4
|
+
export const ruleSet = _data;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist-es/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ServiceException as __ServiceException, } from "@smithy/smithy-client";
|
|
2
|
+
export { __ServiceException };
|
|
3
|
+
export class SSMGuiConnectServiceException extends __ServiceException {
|
|
4
|
+
constructor(options) {
|
|
5
|
+
super(options);
|
|
6
|
+
Object.setPrototypeOf(this, SSMGuiConnectServiceException.prototype);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./models_0";
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { SSMGuiConnectServiceException as __BaseException } from "./SSMGuiConnectServiceException";
|
|
2
|
+
export class AccessDeniedException extends __BaseException {
|
|
3
|
+
name = "AccessDeniedException";
|
|
4
|
+
$fault = "client";
|
|
5
|
+
constructor(opts) {
|
|
6
|
+
super({
|
|
7
|
+
name: "AccessDeniedException",
|
|
8
|
+
$fault: "client",
|
|
9
|
+
...opts,
|
|
10
|
+
});
|
|
11
|
+
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export class ConflictException extends __BaseException {
|
|
15
|
+
name = "ConflictException";
|
|
16
|
+
$fault = "client";
|
|
17
|
+
constructor(opts) {
|
|
18
|
+
super({
|
|
19
|
+
name: "ConflictException",
|
|
20
|
+
$fault: "client",
|
|
21
|
+
...opts,
|
|
22
|
+
});
|
|
23
|
+
Object.setPrototypeOf(this, ConflictException.prototype);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export class InternalServerException extends __BaseException {
|
|
27
|
+
name = "InternalServerException";
|
|
28
|
+
$fault = "server";
|
|
29
|
+
constructor(opts) {
|
|
30
|
+
super({
|
|
31
|
+
name: "InternalServerException",
|
|
32
|
+
$fault: "server",
|
|
33
|
+
...opts,
|
|
34
|
+
});
|
|
35
|
+
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
export class ResourceNotFoundException extends __BaseException {
|
|
39
|
+
name = "ResourceNotFoundException";
|
|
40
|
+
$fault = "client";
|
|
41
|
+
constructor(opts) {
|
|
42
|
+
super({
|
|
43
|
+
name: "ResourceNotFoundException",
|
|
44
|
+
$fault: "client",
|
|
45
|
+
...opts,
|
|
46
|
+
});
|
|
47
|
+
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
export class ServiceQuotaExceededException extends __BaseException {
|
|
51
|
+
name = "ServiceQuotaExceededException";
|
|
52
|
+
$fault = "client";
|
|
53
|
+
constructor(opts) {
|
|
54
|
+
super({
|
|
55
|
+
name: "ServiceQuotaExceededException",
|
|
56
|
+
$fault: "client",
|
|
57
|
+
...opts,
|
|
58
|
+
});
|
|
59
|
+
Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
export class ThrottlingException extends __BaseException {
|
|
63
|
+
name = "ThrottlingException";
|
|
64
|
+
$fault = "client";
|
|
65
|
+
constructor(opts) {
|
|
66
|
+
super({
|
|
67
|
+
name: "ThrottlingException",
|
|
68
|
+
$fault: "client",
|
|
69
|
+
...opts,
|
|
70
|
+
});
|
|
71
|
+
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
export class ValidationException extends __BaseException {
|
|
75
|
+
name = "ValidationException";
|
|
76
|
+
$fault = "client";
|
|
77
|
+
constructor(opts) {
|
|
78
|
+
super({
|
|
79
|
+
name: "ValidationException",
|
|
80
|
+
$fault: "client",
|
|
81
|
+
...opts,
|
|
82
|
+
});
|
|
83
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
|
|
2
|
+
import { requestBuilder as rb } from "@smithy/core";
|
|
3
|
+
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
|
+
import { v4 as generateIdempotencyToken } from "uuid";
|
|
5
|
+
import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
6
|
+
import { SSMGuiConnectServiceException as __BaseException } from "../models/SSMGuiConnectServiceException";
|
|
7
|
+
export const se_DeleteConnectionRecordingPreferencesCommand = async (input, context) => {
|
|
8
|
+
const b = rb(input, context);
|
|
9
|
+
const headers = {
|
|
10
|
+
"content-type": "application/json",
|
|
11
|
+
};
|
|
12
|
+
b.bp("/DeleteConnectionRecordingPreferences");
|
|
13
|
+
let body;
|
|
14
|
+
body = JSON.stringify(take(input, {
|
|
15
|
+
ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
16
|
+
}));
|
|
17
|
+
b.m("POST").h(headers).b(body);
|
|
18
|
+
return b.build();
|
|
19
|
+
};
|
|
20
|
+
export const se_GetConnectionRecordingPreferencesCommand = async (input, context) => {
|
|
21
|
+
const b = rb(input, context);
|
|
22
|
+
const headers = {};
|
|
23
|
+
b.bp("/GetConnectionRecordingPreferences");
|
|
24
|
+
let body;
|
|
25
|
+
b.m("POST").h(headers).b(body);
|
|
26
|
+
return b.build();
|
|
27
|
+
};
|
|
28
|
+
export const se_UpdateConnectionRecordingPreferencesCommand = async (input, context) => {
|
|
29
|
+
const b = rb(input, context);
|
|
30
|
+
const headers = {
|
|
31
|
+
"content-type": "application/json",
|
|
32
|
+
};
|
|
33
|
+
b.bp("/UpdateConnectionRecordingPreferences");
|
|
34
|
+
let body;
|
|
35
|
+
body = JSON.stringify(take(input, {
|
|
36
|
+
ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
37
|
+
ConnectionRecordingPreferences: (_) => _json(_),
|
|
38
|
+
}));
|
|
39
|
+
b.m("POST").h(headers).b(body);
|
|
40
|
+
return b.build();
|
|
41
|
+
};
|
|
42
|
+
export const de_DeleteConnectionRecordingPreferencesCommand = async (output, context) => {
|
|
43
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
44
|
+
return de_CommandError(output, context);
|
|
45
|
+
}
|
|
46
|
+
const contents = map({
|
|
47
|
+
$metadata: deserializeMetadata(output),
|
|
48
|
+
});
|
|
49
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
50
|
+
const doc = take(data, {
|
|
51
|
+
ClientToken: __expectString,
|
|
52
|
+
});
|
|
53
|
+
Object.assign(contents, doc);
|
|
54
|
+
return contents;
|
|
55
|
+
};
|
|
56
|
+
export const de_GetConnectionRecordingPreferencesCommand = async (output, context) => {
|
|
57
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
58
|
+
return de_CommandError(output, context);
|
|
59
|
+
}
|
|
60
|
+
const contents = map({
|
|
61
|
+
$metadata: deserializeMetadata(output),
|
|
62
|
+
});
|
|
63
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
64
|
+
const doc = take(data, {
|
|
65
|
+
ClientToken: __expectString,
|
|
66
|
+
ConnectionRecordingPreferences: _json,
|
|
67
|
+
});
|
|
68
|
+
Object.assign(contents, doc);
|
|
69
|
+
return contents;
|
|
70
|
+
};
|
|
71
|
+
export const de_UpdateConnectionRecordingPreferencesCommand = async (output, context) => {
|
|
72
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
73
|
+
return de_CommandError(output, context);
|
|
74
|
+
}
|
|
75
|
+
const contents = map({
|
|
76
|
+
$metadata: deserializeMetadata(output),
|
|
77
|
+
});
|
|
78
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
79
|
+
const doc = take(data, {
|
|
80
|
+
ClientToken: __expectString,
|
|
81
|
+
ConnectionRecordingPreferences: _json,
|
|
82
|
+
});
|
|
83
|
+
Object.assign(contents, doc);
|
|
84
|
+
return contents;
|
|
85
|
+
};
|
|
86
|
+
const de_CommandError = async (output, context) => {
|
|
87
|
+
const parsedOutput = {
|
|
88
|
+
...output,
|
|
89
|
+
body: await parseErrorBody(output.body, context),
|
|
90
|
+
};
|
|
91
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
92
|
+
switch (errorCode) {
|
|
93
|
+
case "AccessDeniedException":
|
|
94
|
+
case "com.amazonaws.ssmguiconnect#AccessDeniedException":
|
|
95
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
96
|
+
case "ConflictException":
|
|
97
|
+
case "com.amazonaws.ssmguiconnect#ConflictException":
|
|
98
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
99
|
+
case "InternalServerException":
|
|
100
|
+
case "com.amazonaws.ssmguiconnect#InternalServerException":
|
|
101
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
102
|
+
case "ResourceNotFoundException":
|
|
103
|
+
case "com.amazonaws.ssmguiconnect#ResourceNotFoundException":
|
|
104
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
105
|
+
case "ServiceQuotaExceededException":
|
|
106
|
+
case "com.amazonaws.ssmguiconnect#ServiceQuotaExceededException":
|
|
107
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
108
|
+
case "ThrottlingException":
|
|
109
|
+
case "com.amazonaws.ssmguiconnect#ThrottlingException":
|
|
110
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
111
|
+
case "ValidationException":
|
|
112
|
+
case "com.amazonaws.ssmguiconnect#ValidationException":
|
|
113
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
114
|
+
default:
|
|
115
|
+
const parsedBody = parsedOutput.body;
|
|
116
|
+
return throwDefaultError({
|
|
117
|
+
output,
|
|
118
|
+
parsedBody,
|
|
119
|
+
errorCode,
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
const throwDefaultError = withBaseException(__BaseException);
|
|
124
|
+
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
125
|
+
const contents = map({});
|
|
126
|
+
const data = parsedOutput.body;
|
|
127
|
+
const doc = take(data, {
|
|
128
|
+
message: __expectString,
|
|
129
|
+
});
|
|
130
|
+
Object.assign(contents, doc);
|
|
131
|
+
const exception = new AccessDeniedException({
|
|
132
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
133
|
+
...contents,
|
|
134
|
+
});
|
|
135
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
136
|
+
};
|
|
137
|
+
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
138
|
+
const contents = map({});
|
|
139
|
+
const data = parsedOutput.body;
|
|
140
|
+
const doc = take(data, {
|
|
141
|
+
message: __expectString,
|
|
142
|
+
});
|
|
143
|
+
Object.assign(contents, doc);
|
|
144
|
+
const exception = new ConflictException({
|
|
145
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
146
|
+
...contents,
|
|
147
|
+
});
|
|
148
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
149
|
+
};
|
|
150
|
+
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
151
|
+
const contents = map({});
|
|
152
|
+
const data = parsedOutput.body;
|
|
153
|
+
const doc = take(data, {
|
|
154
|
+
message: __expectString,
|
|
155
|
+
});
|
|
156
|
+
Object.assign(contents, doc);
|
|
157
|
+
const exception = new InternalServerException({
|
|
158
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
159
|
+
...contents,
|
|
160
|
+
});
|
|
161
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
162
|
+
};
|
|
163
|
+
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
164
|
+
const contents = map({});
|
|
165
|
+
const data = parsedOutput.body;
|
|
166
|
+
const doc = take(data, {
|
|
167
|
+
message: __expectString,
|
|
168
|
+
});
|
|
169
|
+
Object.assign(contents, doc);
|
|
170
|
+
const exception = new ResourceNotFoundException({
|
|
171
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
172
|
+
...contents,
|
|
173
|
+
});
|
|
174
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
175
|
+
};
|
|
176
|
+
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
177
|
+
const contents = map({});
|
|
178
|
+
const data = parsedOutput.body;
|
|
179
|
+
const doc = take(data, {
|
|
180
|
+
message: __expectString,
|
|
181
|
+
});
|
|
182
|
+
Object.assign(contents, doc);
|
|
183
|
+
const exception = new ServiceQuotaExceededException({
|
|
184
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
185
|
+
...contents,
|
|
186
|
+
});
|
|
187
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
188
|
+
};
|
|
189
|
+
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
190
|
+
const contents = map({});
|
|
191
|
+
const data = parsedOutput.body;
|
|
192
|
+
const doc = take(data, {
|
|
193
|
+
message: __expectString,
|
|
194
|
+
});
|
|
195
|
+
Object.assign(contents, doc);
|
|
196
|
+
const exception = new ThrottlingException({
|
|
197
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
198
|
+
...contents,
|
|
199
|
+
});
|
|
200
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
201
|
+
};
|
|
202
|
+
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
203
|
+
const contents = map({});
|
|
204
|
+
const data = parsedOutput.body;
|
|
205
|
+
const doc = take(data, {
|
|
206
|
+
message: __expectString,
|
|
207
|
+
});
|
|
208
|
+
Object.assign(contents, doc);
|
|
209
|
+
const exception = new ValidationException({
|
|
210
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
211
|
+
...contents,
|
|
212
|
+
});
|
|
213
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
214
|
+
};
|
|
215
|
+
const deserializeMetadata = (output) => ({
|
|
216
|
+
httpStatusCode: output.statusCode,
|
|
217
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
218
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
219
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
220
|
+
});
|
|
221
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import packageInfo from "../package.json";
|
|
2
|
+
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
3
|
+
import { createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-browser";
|
|
4
|
+
import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@smithy/config-resolver";
|
|
5
|
+
import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler";
|
|
6
|
+
import { invalidProvider } from "@smithy/invalid-dependency";
|
|
7
|
+
import { calculateBodyLength } from "@smithy/util-body-length-browser";
|
|
8
|
+
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/util-retry";
|
|
9
|
+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
10
|
+
import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
|
|
11
|
+
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser";
|
|
12
|
+
export const getRuntimeConfig = (config) => {
|
|
13
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
14
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
15
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
16
|
+
return {
|
|
17
|
+
...clientSharedValues,
|
|
18
|
+
...config,
|
|
19
|
+
runtime: "browser",
|
|
20
|
+
defaultsMode,
|
|
21
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
22
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
23
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
24
|
+
createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
25
|
+
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
26
|
+
region: config?.region ?? invalidProvider("Region is missing"),
|
|
27
|
+
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
28
|
+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
|
|
29
|
+
sha256: config?.sha256 ?? Sha256,
|
|
30
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
31
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
32
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import packageInfo from "../package.json";
|
|
2
|
+
import { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/core";
|
|
3
|
+
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
|
|
4
|
+
import { NODE_APP_ID_CONFIG_OPTIONS, createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-node";
|
|
5
|
+
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@smithy/config-resolver";
|
|
6
|
+
import { Hash } from "@smithy/hash-node";
|
|
7
|
+
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@smithy/middleware-retry";
|
|
8
|
+
import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider";
|
|
9
|
+
import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler";
|
|
10
|
+
import { calculateBodyLength } from "@smithy/util-body-length-node";
|
|
11
|
+
import { DEFAULT_RETRY_MODE } from "@smithy/util-retry";
|
|
12
|
+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
13
|
+
import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
|
|
14
|
+
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-node";
|
|
15
|
+
import { emitWarningIfUnsupportedVersion } from "@smithy/smithy-client";
|
|
16
|
+
export const getRuntimeConfig = (config) => {
|
|
17
|
+
emitWarningIfUnsupportedVersion(process.version);
|
|
18
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
19
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
20
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
21
|
+
awsCheckVersion(process.version);
|
|
22
|
+
const profileConfig = { profile: config?.profile };
|
|
23
|
+
return {
|
|
24
|
+
...clientSharedValues,
|
|
25
|
+
...config,
|
|
26
|
+
runtime: "node",
|
|
27
|
+
defaultsMode,
|
|
28
|
+
authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, profileConfig),
|
|
29
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
30
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
|
|
31
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
32
|
+
createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
33
|
+
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
34
|
+
region: config?.region ??
|
|
35
|
+
loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...profileConfig }),
|
|
36
|
+
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
37
|
+
retryMode: config?.retryMode ??
|
|
38
|
+
loadNodeConfig({
|
|
39
|
+
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
40
|
+
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
41
|
+
}, config),
|
|
42
|
+
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
43
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
44
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, profileConfig),
|
|
45
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, profileConfig),
|
|
46
|
+
userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, profileConfig),
|
|
47
|
+
};
|
|
48
|
+
};
|