@aws-sdk/client-ec2-instance-connect 3.46.0 → 3.48.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/CHANGELOG.md CHANGED
@@ -3,6 +3,44 @@
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.48.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.47.2...v3.48.0) (2022-01-22)
7
+
8
+
9
+ ### Features
10
+
11
+ * **clients:** update clients as of 2022/01/21 ([#3228](https://github.com/aws/aws-sdk-js-v3/issues/3228)) ([fa713ef](https://github.com/aws/aws-sdk-js-v3/commit/fa713efca6b2f424c27535d000359f08830960b1))
12
+
13
+
14
+
15
+
16
+
17
+ ## [3.47.2](https://github.com/aws/aws-sdk-js-v3/compare/v3.47.1...v3.47.2) (2022-01-21)
18
+
19
+ **Note:** Version bump only for package @aws-sdk/client-ec2-instance-connect
20
+
21
+
22
+
23
+
24
+
25
+ ## [3.47.1](https://github.com/aws/aws-sdk-js-v3/compare/v3.47.0-release-test-1...v3.47.1) (2022-01-20)
26
+
27
+ **Note:** Version bump only for package @aws-sdk/client-ec2-instance-connect
28
+
29
+
30
+
31
+
32
+
33
+ # [3.47.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.46.0...v3.47.0) (2022-01-15)
34
+
35
+
36
+ ### Features
37
+
38
+ * **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))
39
+
40
+
41
+
42
+
43
+
6
44
  # [3.46.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.45.0...v3.46.0) (2022-01-07)
7
45
 
8
46
 
@@ -1,30 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SendSSHPublicKeyResponse = exports.SendSSHPublicKeyRequest = exports.ThrottlingException = exports.ServiceException = exports.SerialConsoleSessionUnavailableException = exports.SerialConsoleSessionLimitExceededException = exports.SerialConsoleAccessDisabledException = exports.SendSerialConsoleSSHPublicKeyResponse = exports.SendSerialConsoleSSHPublicKeyRequest = exports.InvalidArgsException = exports.EC2InstanceTypeInvalidException = exports.EC2InstanceNotFoundException = exports.AuthException = void 0;
4
- var AuthException;
5
- (function (AuthException) {
6
- AuthException.filterSensitiveLog = (obj) => ({
7
- ...obj,
8
- });
9
- })(AuthException = exports.AuthException || (exports.AuthException = {}));
10
- var EC2InstanceNotFoundException;
11
- (function (EC2InstanceNotFoundException) {
12
- EC2InstanceNotFoundException.filterSensitiveLog = (obj) => ({
13
- ...obj,
14
- });
15
- })(EC2InstanceNotFoundException = exports.EC2InstanceNotFoundException || (exports.EC2InstanceNotFoundException = {}));
16
- var EC2InstanceTypeInvalidException;
17
- (function (EC2InstanceTypeInvalidException) {
18
- EC2InstanceTypeInvalidException.filterSensitiveLog = (obj) => ({
19
- ...obj,
20
- });
21
- })(EC2InstanceTypeInvalidException = exports.EC2InstanceTypeInvalidException || (exports.EC2InstanceTypeInvalidException = {}));
22
- var InvalidArgsException;
23
- (function (InvalidArgsException) {
24
- InvalidArgsException.filterSensitiveLog = (obj) => ({
25
- ...obj,
26
- });
27
- })(InvalidArgsException = exports.InvalidArgsException || (exports.InvalidArgsException = {}));
3
+ exports.SendSSHPublicKeyResponse = exports.SendSSHPublicKeyRequest = exports.SendSerialConsoleSSHPublicKeyResponse = exports.SendSerialConsoleSSHPublicKeyRequest = void 0;
28
4
  var SendSerialConsoleSSHPublicKeyRequest;
29
5
  (function (SendSerialConsoleSSHPublicKeyRequest) {
30
6
  SendSerialConsoleSSHPublicKeyRequest.filterSensitiveLog = (obj) => ({
@@ -37,36 +13,6 @@ var SendSerialConsoleSSHPublicKeyResponse;
37
13
  ...obj,
38
14
  });
39
15
  })(SendSerialConsoleSSHPublicKeyResponse = exports.SendSerialConsoleSSHPublicKeyResponse || (exports.SendSerialConsoleSSHPublicKeyResponse = {}));
40
- var SerialConsoleAccessDisabledException;
41
- (function (SerialConsoleAccessDisabledException) {
42
- SerialConsoleAccessDisabledException.filterSensitiveLog = (obj) => ({
43
- ...obj,
44
- });
45
- })(SerialConsoleAccessDisabledException = exports.SerialConsoleAccessDisabledException || (exports.SerialConsoleAccessDisabledException = {}));
46
- var SerialConsoleSessionLimitExceededException;
47
- (function (SerialConsoleSessionLimitExceededException) {
48
- SerialConsoleSessionLimitExceededException.filterSensitiveLog = (obj) => ({
49
- ...obj,
50
- });
51
- })(SerialConsoleSessionLimitExceededException = exports.SerialConsoleSessionLimitExceededException || (exports.SerialConsoleSessionLimitExceededException = {}));
52
- var SerialConsoleSessionUnavailableException;
53
- (function (SerialConsoleSessionUnavailableException) {
54
- SerialConsoleSessionUnavailableException.filterSensitiveLog = (obj) => ({
55
- ...obj,
56
- });
57
- })(SerialConsoleSessionUnavailableException = exports.SerialConsoleSessionUnavailableException || (exports.SerialConsoleSessionUnavailableException = {}));
58
- var ServiceException;
59
- (function (ServiceException) {
60
- ServiceException.filterSensitiveLog = (obj) => ({
61
- ...obj,
62
- });
63
- })(ServiceException = exports.ServiceException || (exports.ServiceException = {}));
64
- var ThrottlingException;
65
- (function (ThrottlingException) {
66
- ThrottlingException.filterSensitiveLog = (obj) => ({
67
- ...obj,
68
- });
69
- })(ThrottlingException = exports.ThrottlingException || (exports.ThrottlingException = {}));
70
16
  var SendSSHPublicKeyRequest;
71
17
  (function (SendSSHPublicKeyRequest) {
72
18
  SendSSHPublicKeyRequest.filterSensitiveLog = (obj) => ({
@@ -62,6 +62,14 @@ const deserializeAws_json1_1SendSerialConsoleSSHPublicKeyCommandError = async (o
62
62
  $metadata: deserializeMetadata(output),
63
63
  };
64
64
  break;
65
+ case "EC2InstanceStateInvalidException":
66
+ case "com.amazonaws.ec2instanceconnect#EC2InstanceStateInvalidException":
67
+ response = {
68
+ ...(await deserializeAws_json1_1EC2InstanceStateInvalidExceptionResponse(parsedOutput, context)),
69
+ name: errorCode,
70
+ $metadata: deserializeMetadata(output),
71
+ };
72
+ break;
65
73
  case "EC2InstanceTypeInvalidException":
66
74
  case "com.amazonaws.ec2instanceconnect#EC2InstanceTypeInvalidException":
67
75
  response = {
@@ -173,6 +181,14 @@ const deserializeAws_json1_1SendSSHPublicKeyCommandError = async (output, contex
173
181
  $metadata: deserializeMetadata(output),
174
182
  };
175
183
  break;
184
+ case "EC2InstanceStateInvalidException":
185
+ case "com.amazonaws.ec2instanceconnect#EC2InstanceStateInvalidException":
186
+ response = {
187
+ ...(await deserializeAws_json1_1EC2InstanceStateInvalidExceptionResponse(parsedOutput, context)),
188
+ name: errorCode,
189
+ $metadata: deserializeMetadata(output),
190
+ };
191
+ break;
176
192
  case "InvalidArgsException":
177
193
  case "com.amazonaws.ec2instanceconnect#InvalidArgsException":
178
194
  response = {
@@ -235,6 +251,17 @@ const deserializeAws_json1_1EC2InstanceNotFoundExceptionResponse = async (parsed
235
251
  };
236
252
  return contents;
237
253
  };
254
+ const deserializeAws_json1_1EC2InstanceStateInvalidExceptionResponse = async (parsedOutput, context) => {
255
+ const body = parsedOutput.body;
256
+ const deserialized = deserializeAws_json1_1EC2InstanceStateInvalidException(body, context);
257
+ const contents = {
258
+ name: "EC2InstanceStateInvalidException",
259
+ $fault: "client",
260
+ $metadata: deserializeMetadata(parsedOutput),
261
+ ...deserialized,
262
+ };
263
+ return contents;
264
+ };
238
265
  const deserializeAws_json1_1EC2InstanceTypeInvalidExceptionResponse = async (parsedOutput, context) => {
239
266
  const body = parsedOutput.body;
240
267
  const deserialized = deserializeAws_json1_1EC2InstanceTypeInvalidException(body, context);
@@ -339,6 +366,11 @@ const deserializeAws_json1_1EC2InstanceNotFoundException = (output, context) =>
339
366
  Message: smithy_client_1.expectString(output.Message),
340
367
  };
341
368
  };
369
+ const deserializeAws_json1_1EC2InstanceStateInvalidException = (output, context) => {
370
+ return {
371
+ Message: smithy_client_1.expectString(output.Message),
372
+ };
373
+ };
342
374
  const deserializeAws_json1_1EC2InstanceTypeInvalidException = (output, context) => {
343
375
  return {
344
376
  Message: smithy_client_1.expectString(output.Message),
@@ -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 : (() => Promise.resolve(middleware_retry_1.DEFAULT_RETRY_MODE)),
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)),
@@ -15,13 +15,18 @@ const util_body_length_node_1 = require("@aws-sdk/util-body-length-node");
15
15
  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
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
19
+ const util_defaults_mode_node_1 = require("@aws-sdk/util-defaults-mode-node");
18
20
  const getRuntimeConfig = (config) => {
19
21
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
22
+ const defaultsMode = util_defaults_mode_node_1.resolveDefaultsModeConfig(config);
23
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
20
24
  const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config);
21
25
  return {
22
26
  ...clientSharedValues,
23
27
  ...config,
24
28
  runtime: "node",
29
+ defaultsMode,
25
30
  base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_node_1.fromBase64,
26
31
  base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_node_1.toBase64,
27
32
  bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_node_1.calculateBodyLength,
@@ -29,8 +34,11 @@ const getRuntimeConfig = (config) => {
29
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 }),
30
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),
31
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),
32
- requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new node_http_handler_1.NodeHttpHandler(),
33
- retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : node_config_provider_1.loadConfig(middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS),
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
+ }),
34
42
  sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : hash_node_1.Hash.bind(null, "sha256"),
35
43
  streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : node_http_handler_1.streamCollector,
36
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),
@@ -1,20 +1,4 @@
1
1
  import { __assign } from "tslib";
2
- export var AuthException;
3
- (function (AuthException) {
4
- AuthException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
5
- })(AuthException || (AuthException = {}));
6
- export var EC2InstanceNotFoundException;
7
- (function (EC2InstanceNotFoundException) {
8
- EC2InstanceNotFoundException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
9
- })(EC2InstanceNotFoundException || (EC2InstanceNotFoundException = {}));
10
- export var EC2InstanceTypeInvalidException;
11
- (function (EC2InstanceTypeInvalidException) {
12
- EC2InstanceTypeInvalidException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
13
- })(EC2InstanceTypeInvalidException || (EC2InstanceTypeInvalidException = {}));
14
- export var InvalidArgsException;
15
- (function (InvalidArgsException) {
16
- InvalidArgsException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
17
- })(InvalidArgsException || (InvalidArgsException = {}));
18
2
  export var SendSerialConsoleSSHPublicKeyRequest;
19
3
  (function (SendSerialConsoleSSHPublicKeyRequest) {
20
4
  SendSerialConsoleSSHPublicKeyRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -23,26 +7,6 @@ export var SendSerialConsoleSSHPublicKeyResponse;
23
7
  (function (SendSerialConsoleSSHPublicKeyResponse) {
24
8
  SendSerialConsoleSSHPublicKeyResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
25
9
  })(SendSerialConsoleSSHPublicKeyResponse || (SendSerialConsoleSSHPublicKeyResponse = {}));
26
- export var SerialConsoleAccessDisabledException;
27
- (function (SerialConsoleAccessDisabledException) {
28
- SerialConsoleAccessDisabledException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
29
- })(SerialConsoleAccessDisabledException || (SerialConsoleAccessDisabledException = {}));
30
- export var SerialConsoleSessionLimitExceededException;
31
- (function (SerialConsoleSessionLimitExceededException) {
32
- SerialConsoleSessionLimitExceededException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
33
- })(SerialConsoleSessionLimitExceededException || (SerialConsoleSessionLimitExceededException = {}));
34
- export var SerialConsoleSessionUnavailableException;
35
- (function (SerialConsoleSessionUnavailableException) {
36
- SerialConsoleSessionUnavailableException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
37
- })(SerialConsoleSessionUnavailableException || (SerialConsoleSessionUnavailableException = {}));
38
- export var ServiceException;
39
- (function (ServiceException) {
40
- ServiceException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
41
- })(ServiceException || (ServiceException = {}));
42
- export var ThrottlingException;
43
- (function (ThrottlingException) {
44
- ThrottlingException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
45
- })(ThrottlingException || (ThrottlingException = {}));
46
10
  export var SendSSHPublicKeyRequest;
47
11
  (function (SendSSHPublicKeyRequest) {
48
12
  SendSSHPublicKeyRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -42,16 +42,16 @@ export var deserializeAws_json1_1SendSerialConsoleSSHPublicKeyCommand = function
42
42
  });
43
43
  }); };
44
44
  var deserializeAws_json1_1SendSerialConsoleSSHPublicKeyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
45
- var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, parsedBody, message;
46
- var _m;
47
- return __generator(this, function (_o) {
48
- switch (_o.label) {
45
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, parsedBody, message;
46
+ var _o;
47
+ return __generator(this, function (_p) {
48
+ switch (_p.label) {
49
49
  case 0:
50
50
  _a = [__assign({}, output)];
51
- _m = {};
51
+ _o = {};
52
52
  return [4, parseBody(output.body, context)];
53
53
  case 1:
54
- parsedOutput = __assign.apply(void 0, _a.concat([(_m.body = _o.sent(), _m)]));
54
+ parsedOutput = __assign.apply(void 0, _a.concat([(_o.body = _p.sent(), _o)]));
55
55
  errorCode = "UnknownError";
56
56
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
57
57
  _b = errorCode;
@@ -60,82 +60,90 @@ var deserializeAws_json1_1SendSerialConsoleSSHPublicKeyCommandError = function (
60
60
  case "com.amazonaws.ec2instanceconnect#AuthException": return [3, 2];
61
61
  case "EC2InstanceNotFoundException": return [3, 4];
62
62
  case "com.amazonaws.ec2instanceconnect#EC2InstanceNotFoundException": return [3, 4];
63
- case "EC2InstanceTypeInvalidException": return [3, 6];
64
- case "com.amazonaws.ec2instanceconnect#EC2InstanceTypeInvalidException": return [3, 6];
65
- case "InvalidArgsException": return [3, 8];
66
- case "com.amazonaws.ec2instanceconnect#InvalidArgsException": return [3, 8];
67
- case "SerialConsoleAccessDisabledException": return [3, 10];
68
- case "com.amazonaws.ec2instanceconnect#SerialConsoleAccessDisabledException": return [3, 10];
69
- case "SerialConsoleSessionLimitExceededException": return [3, 12];
70
- case "com.amazonaws.ec2instanceconnect#SerialConsoleSessionLimitExceededException": return [3, 12];
71
- case "SerialConsoleSessionUnavailableException": return [3, 14];
72
- case "com.amazonaws.ec2instanceconnect#SerialConsoleSessionUnavailableException": return [3, 14];
73
- case "ServiceException": return [3, 16];
74
- case "com.amazonaws.ec2instanceconnect#ServiceException": return [3, 16];
75
- case "ThrottlingException": return [3, 18];
76
- case "com.amazonaws.ec2instanceconnect#ThrottlingException": return [3, 18];
63
+ case "EC2InstanceStateInvalidException": return [3, 6];
64
+ case "com.amazonaws.ec2instanceconnect#EC2InstanceStateInvalidException": return [3, 6];
65
+ case "EC2InstanceTypeInvalidException": return [3, 8];
66
+ case "com.amazonaws.ec2instanceconnect#EC2InstanceTypeInvalidException": return [3, 8];
67
+ case "InvalidArgsException": return [3, 10];
68
+ case "com.amazonaws.ec2instanceconnect#InvalidArgsException": return [3, 10];
69
+ case "SerialConsoleAccessDisabledException": return [3, 12];
70
+ case "com.amazonaws.ec2instanceconnect#SerialConsoleAccessDisabledException": return [3, 12];
71
+ case "SerialConsoleSessionLimitExceededException": return [3, 14];
72
+ case "com.amazonaws.ec2instanceconnect#SerialConsoleSessionLimitExceededException": return [3, 14];
73
+ case "SerialConsoleSessionUnavailableException": return [3, 16];
74
+ case "com.amazonaws.ec2instanceconnect#SerialConsoleSessionUnavailableException": return [3, 16];
75
+ case "ServiceException": return [3, 18];
76
+ case "com.amazonaws.ec2instanceconnect#ServiceException": return [3, 18];
77
+ case "ThrottlingException": return [3, 20];
78
+ case "com.amazonaws.ec2instanceconnect#ThrottlingException": return [3, 20];
77
79
  }
78
- return [3, 20];
80
+ return [3, 22];
79
81
  case 2:
80
82
  _c = [{}];
81
83
  return [4, deserializeAws_json1_1AuthExceptionResponse(parsedOutput, context)];
82
84
  case 3:
83
- response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
84
- return [3, 21];
85
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
86
+ return [3, 23];
85
87
  case 4:
86
88
  _d = [{}];
87
89
  return [4, deserializeAws_json1_1EC2InstanceNotFoundExceptionResponse(parsedOutput, context)];
88
90
  case 5:
89
- response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
90
- return [3, 21];
91
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
92
+ return [3, 23];
91
93
  case 6:
92
94
  _e = [{}];
93
- return [4, deserializeAws_json1_1EC2InstanceTypeInvalidExceptionResponse(parsedOutput, context)];
95
+ return [4, deserializeAws_json1_1EC2InstanceStateInvalidExceptionResponse(parsedOutput, context)];
94
96
  case 7:
95
- response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
96
- return [3, 21];
97
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
98
+ return [3, 23];
97
99
  case 8:
98
100
  _f = [{}];
99
- return [4, deserializeAws_json1_1InvalidArgsExceptionResponse(parsedOutput, context)];
101
+ return [4, deserializeAws_json1_1EC2InstanceTypeInvalidExceptionResponse(parsedOutput, context)];
100
102
  case 9:
101
- response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
102
- return [3, 21];
103
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
104
+ return [3, 23];
103
105
  case 10:
104
106
  _g = [{}];
105
- return [4, deserializeAws_json1_1SerialConsoleAccessDisabledExceptionResponse(parsedOutput, context)];
107
+ return [4, deserializeAws_json1_1InvalidArgsExceptionResponse(parsedOutput, context)];
106
108
  case 11:
107
- response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
108
- return [3, 21];
109
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
110
+ return [3, 23];
109
111
  case 12:
110
112
  _h = [{}];
111
- return [4, deserializeAws_json1_1SerialConsoleSessionLimitExceededExceptionResponse(parsedOutput, context)];
113
+ return [4, deserializeAws_json1_1SerialConsoleAccessDisabledExceptionResponse(parsedOutput, context)];
112
114
  case 13:
113
- response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
114
- return [3, 21];
115
+ response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
116
+ return [3, 23];
115
117
  case 14:
116
118
  _j = [{}];
117
- return [4, deserializeAws_json1_1SerialConsoleSessionUnavailableExceptionResponse(parsedOutput, context)];
119
+ return [4, deserializeAws_json1_1SerialConsoleSessionLimitExceededExceptionResponse(parsedOutput, context)];
118
120
  case 15:
119
- response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
120
- return [3, 21];
121
+ response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
122
+ return [3, 23];
121
123
  case 16:
122
124
  _k = [{}];
123
- return [4, deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context)];
125
+ return [4, deserializeAws_json1_1SerialConsoleSessionUnavailableExceptionResponse(parsedOutput, context)];
124
126
  case 17:
125
- response = __assign.apply(void 0, [__assign.apply(void 0, _k.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
126
- return [3, 21];
127
+ response = __assign.apply(void 0, [__assign.apply(void 0, _k.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
128
+ return [3, 23];
127
129
  case 18:
128
130
  _l = [{}];
129
- return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
131
+ return [4, deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context)];
130
132
  case 19:
131
- response = __assign.apply(void 0, [__assign.apply(void 0, _l.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
132
- return [3, 21];
133
+ response = __assign.apply(void 0, [__assign.apply(void 0, _l.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
134
+ return [3, 23];
133
135
  case 20:
136
+ _m = [{}];
137
+ return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
138
+ case 21:
139
+ response = __assign.apply(void 0, [__assign.apply(void 0, _m.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
140
+ return [3, 23];
141
+ case 22:
134
142
  parsedBody = parsedOutput.body;
135
143
  errorCode = parsedBody.code || parsedBody.Code || errorCode;
136
144
  response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
137
- _o.label = 21;
138
- case 21:
145
+ _p.label = 23;
146
+ case 23:
139
147
  message = response.message || response.Message || errorCode;
140
148
  response.message = message;
141
149
  delete response.Message;
@@ -162,16 +170,16 @@ export var deserializeAws_json1_1SendSSHPublicKeyCommand = function (output, con
162
170
  });
163
171
  }); };
164
172
  var deserializeAws_json1_1SendSSHPublicKeyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
165
- var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
166
- var _h;
167
- return __generator(this, function (_j) {
168
- switch (_j.label) {
173
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
174
+ var _j;
175
+ return __generator(this, function (_k) {
176
+ switch (_k.label) {
169
177
  case 0:
170
178
  _a = [__assign({}, output)];
171
- _h = {};
179
+ _j = {};
172
180
  return [4, parseBody(output.body, context)];
173
181
  case 1:
174
- parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
182
+ parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
175
183
  errorCode = "UnknownError";
176
184
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
177
185
  _b = errorCode;
@@ -180,50 +188,58 @@ var deserializeAws_json1_1SendSSHPublicKeyCommandError = function (output, conte
180
188
  case "com.amazonaws.ec2instanceconnect#AuthException": return [3, 2];
181
189
  case "EC2InstanceNotFoundException": return [3, 4];
182
190
  case "com.amazonaws.ec2instanceconnect#EC2InstanceNotFoundException": return [3, 4];
183
- case "InvalidArgsException": return [3, 6];
184
- case "com.amazonaws.ec2instanceconnect#InvalidArgsException": return [3, 6];
185
- case "ServiceException": return [3, 8];
186
- case "com.amazonaws.ec2instanceconnect#ServiceException": return [3, 8];
187
- case "ThrottlingException": return [3, 10];
188
- case "com.amazonaws.ec2instanceconnect#ThrottlingException": return [3, 10];
191
+ case "EC2InstanceStateInvalidException": return [3, 6];
192
+ case "com.amazonaws.ec2instanceconnect#EC2InstanceStateInvalidException": return [3, 6];
193
+ case "InvalidArgsException": return [3, 8];
194
+ case "com.amazonaws.ec2instanceconnect#InvalidArgsException": return [3, 8];
195
+ case "ServiceException": return [3, 10];
196
+ case "com.amazonaws.ec2instanceconnect#ServiceException": return [3, 10];
197
+ case "ThrottlingException": return [3, 12];
198
+ case "com.amazonaws.ec2instanceconnect#ThrottlingException": return [3, 12];
189
199
  }
190
- return [3, 12];
200
+ return [3, 14];
191
201
  case 2:
192
202
  _c = [{}];
193
203
  return [4, deserializeAws_json1_1AuthExceptionResponse(parsedOutput, context)];
194
204
  case 3:
195
- response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
196
- return [3, 13];
205
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
206
+ return [3, 15];
197
207
  case 4:
198
208
  _d = [{}];
199
209
  return [4, deserializeAws_json1_1EC2InstanceNotFoundExceptionResponse(parsedOutput, context)];
200
210
  case 5:
201
- response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
202
- return [3, 13];
211
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
212
+ return [3, 15];
203
213
  case 6:
204
214
  _e = [{}];
205
- return [4, deserializeAws_json1_1InvalidArgsExceptionResponse(parsedOutput, context)];
215
+ return [4, deserializeAws_json1_1EC2InstanceStateInvalidExceptionResponse(parsedOutput, context)];
206
216
  case 7:
207
- response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
208
- return [3, 13];
217
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
218
+ return [3, 15];
209
219
  case 8:
210
220
  _f = [{}];
211
- return [4, deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context)];
221
+ return [4, deserializeAws_json1_1InvalidArgsExceptionResponse(parsedOutput, context)];
212
222
  case 9:
213
- response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
214
- return [3, 13];
223
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
224
+ return [3, 15];
215
225
  case 10:
216
226
  _g = [{}];
217
- return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
227
+ return [4, deserializeAws_json1_1ServiceExceptionResponse(parsedOutput, context)];
218
228
  case 11:
219
- response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
220
- return [3, 13];
229
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
230
+ return [3, 15];
221
231
  case 12:
232
+ _h = [{}];
233
+ return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
234
+ case 13:
235
+ response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
236
+ return [3, 15];
237
+ case 14:
222
238
  parsedBody = parsedOutput.body;
223
239
  errorCode = parsedBody.code || parsedBody.Code || errorCode;
224
240
  response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
225
- _j.label = 13;
226
- case 13:
241
+ _k.label = 15;
242
+ case 15:
227
243
  message = response.message || response.Message || errorCode;
228
244
  response.message = message;
229
245
  delete response.Message;
@@ -249,6 +265,15 @@ var deserializeAws_json1_1EC2InstanceNotFoundExceptionResponse = function (parse
249
265
  return [2, contents];
250
266
  });
251
267
  }); };
268
+ var deserializeAws_json1_1EC2InstanceStateInvalidExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
269
+ var body, deserialized, contents;
270
+ return __generator(this, function (_a) {
271
+ body = parsedOutput.body;
272
+ deserialized = deserializeAws_json1_1EC2InstanceStateInvalidException(body, context);
273
+ contents = __assign({ name: "EC2InstanceStateInvalidException", $fault: "client", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
274
+ return [2, contents];
275
+ });
276
+ }); };
252
277
  var deserializeAws_json1_1EC2InstanceTypeInvalidExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
253
278
  var body, deserialized, contents;
254
279
  return __generator(this, function (_a) {
@@ -330,6 +355,11 @@ var deserializeAws_json1_1EC2InstanceNotFoundException = function (output, conte
330
355
  Message: __expectString(output.Message),
331
356
  };
332
357
  };
358
+ var deserializeAws_json1_1EC2InstanceStateInvalidException = function (output, context) {
359
+ return {
360
+ Message: __expectString(output.Message),
361
+ };
362
+ };
333
363
  var deserializeAws_json1_1EC2InstanceTypeInvalidException = function (output, context) {
334
364
  return {
335
365
  Message: __expectString(output.Message),
@@ -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 FetchHttpHandler(), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (function () { return Promise.resolve(DEFAULT_RETRY_MODE); }), 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 });
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
  };
@@ -1,19 +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 { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
16
+ import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-node";
15
17
  export var getRuntimeConfig = function (config) {
16
18
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
19
+ var defaultsMode = resolveDefaultsModeConfig(config);
20
+ var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
17
21
  var clientSharedValues = getSharedRuntimeConfig(config);
18
- 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 NodeHttpHandler(), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), 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 });
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 });
19
28
  };
@@ -4,7 +4,7 @@ import { RetryInputConfig, RetryResolvedConfig } from "@aws-sdk/middleware-retry
4
4
  import { AwsAuthInputConfig, AwsAuthResolvedConfig } from "@aws-sdk/middleware-signing";
5
5
  import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
6
6
  import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http";
7
- import { Client as __Client, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
7
+ import { Client as __Client, DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
8
8
  import { Credentials as __Credentials, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, RegionInfoProvider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
9
9
  import { SendSerialConsoleSSHPublicKeyCommandInput, SendSerialConsoleSSHPublicKeyCommandOutput } from "./commands/SendSerialConsoleSSHPublicKeyCommand";
10
10
  import { SendSSHPublicKeyCommandInput, SendSSHPublicKeyCommandOutput } from "./commands/SendSSHPublicKeyCommand";
@@ -110,6 +110,10 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
110
110
  * @internal
111
111
  */
112
112
  defaultUserAgentProvider?: Provider<__UserAgent>;
113
+ /**
114
+ * The {@link DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
115
+ */
116
+ defaultsMode?: DefaultsMode | Provider<DefaultsMode>;
113
117
  }
114
118
  declare type EC2InstanceConnectClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointsInputConfig & RetryInputConfig & HostHeaderInputConfig & AwsAuthInputConfig & UserAgentInputConfig;
115
119
  /**
@@ -7,12 +7,6 @@ export interface AuthException extends __SmithyException, $MetadataBearer {
7
7
  $fault: "client";
8
8
  Message?: string;
9
9
  }
10
- export declare namespace AuthException {
11
- /**
12
- * @internal
13
- */
14
- const filterSensitiveLog: (obj: AuthException) => any;
15
- }
16
10
  /**
17
11
  * <p>The specified instance was not found.</p>
18
12
  */
@@ -21,11 +15,15 @@ export interface EC2InstanceNotFoundException extends __SmithyException, $Metada
21
15
  $fault: "client";
22
16
  Message?: string;
23
17
  }
24
- export declare namespace EC2InstanceNotFoundException {
25
- /**
26
- * @internal
27
- */
28
- const filterSensitiveLog: (obj: EC2InstanceNotFoundException) => any;
18
+ /**
19
+ * <p>Unable to connect because the instance is not in a valid state.
20
+ * Connecting to a stopped or terminated instance is not supported. If the instance is stopped,
21
+ * start your instance, and try to connect again.</p>
22
+ */
23
+ export interface EC2InstanceStateInvalidException extends __SmithyException, $MetadataBearer {
24
+ name: "EC2InstanceStateInvalidException";
25
+ $fault: "client";
26
+ Message?: string;
29
27
  }
30
28
  /**
31
29
  * <p>The instance type is not supported for connecting via the serial console. Only Nitro
@@ -36,12 +34,6 @@ export interface EC2InstanceTypeInvalidException extends __SmithyException, $Met
36
34
  $fault: "client";
37
35
  Message?: string;
38
36
  }
39
- export declare namespace EC2InstanceTypeInvalidException {
40
- /**
41
- * @internal
42
- */
43
- const filterSensitiveLog: (obj: EC2InstanceTypeInvalidException) => any;
44
- }
45
37
  /**
46
38
  * <p>One of the parameters is not valid.</p>
47
39
  */
@@ -50,12 +42,6 @@ export interface InvalidArgsException extends __SmithyException, $MetadataBearer
50
42
  $fault: "client";
51
43
  Message?: string;
52
44
  }
53
- export declare namespace InvalidArgsException {
54
- /**
55
- * @internal
56
- */
57
- const filterSensitiveLog: (obj: InvalidArgsException) => any;
58
- }
59
45
  export interface SendSerialConsoleSSHPublicKeyRequest {
60
46
  /**
61
47
  * <p>The ID of the EC2 instance.</p>
@@ -105,12 +91,6 @@ export interface SerialConsoleAccessDisabledException extends __SmithyException,
105
91
  $fault: "client";
106
92
  Message?: string;
107
93
  }
108
- export declare namespace SerialConsoleAccessDisabledException {
109
- /**
110
- * @internal
111
- */
112
- const filterSensitiveLog: (obj: SerialConsoleAccessDisabledException) => any;
113
- }
114
94
  /**
115
95
  * <p>The instance currently has 1 active serial console session. Only 1 session is supported at a time.</p>
116
96
  */
@@ -119,12 +99,6 @@ export interface SerialConsoleSessionLimitExceededException extends __SmithyExce
119
99
  $fault: "client";
120
100
  Message?: string;
121
101
  }
122
- export declare namespace SerialConsoleSessionLimitExceededException {
123
- /**
124
- * @internal
125
- */
126
- const filterSensitiveLog: (obj: SerialConsoleSessionLimitExceededException) => any;
127
- }
128
102
  /**
129
103
  * <p>Unable to start a serial console session. Please try again.</p>
130
104
  */
@@ -133,12 +107,6 @@ export interface SerialConsoleSessionUnavailableException extends __SmithyExcept
133
107
  $fault: "server";
134
108
  Message?: string;
135
109
  }
136
- export declare namespace SerialConsoleSessionUnavailableException {
137
- /**
138
- * @internal
139
- */
140
- const filterSensitiveLog: (obj: SerialConsoleSessionUnavailableException) => any;
141
- }
142
110
  /**
143
111
  * <p>The service encountered an error. Follow the instructions in the error message and try again.</p>
144
112
  */
@@ -147,12 +115,6 @@ export interface ServiceException extends __SmithyException, $MetadataBearer {
147
115
  $fault: "server";
148
116
  Message?: string;
149
117
  }
150
- export declare namespace ServiceException {
151
- /**
152
- * @internal
153
- */
154
- const filterSensitiveLog: (obj: ServiceException) => any;
155
- }
156
118
  /**
157
119
  * <p>The requests were made too frequently and have been throttled. Wait a while and try again.
158
120
  * To increase the limit on your request frequency, contact AWS Support.</p>
@@ -162,12 +124,6 @@ export interface ThrottlingException extends __SmithyException, $MetadataBearer
162
124
  $fault: "client";
163
125
  Message?: string;
164
126
  }
165
- export declare namespace ThrottlingException {
166
- /**
167
- * @internal
168
- */
169
- const filterSensitiveLog: (obj: ThrottlingException) => any;
170
- }
171
127
  export interface SendSSHPublicKeyRequest {
172
128
  /**
173
129
  * <p>The ID of the EC2 instance.</p>
@@ -184,7 +140,7 @@ export interface SendSSHPublicKeyRequest {
184
140
  /**
185
141
  * <p>The Availability Zone in which the EC2 instance was launched.</p>
186
142
  */
187
- AvailabilityZone: string | undefined;
143
+ AvailabilityZone?: string;
188
144
  }
189
145
  export declare namespace SendSSHPublicKeyRequest {
190
146
  /**
@@ -1,10 +1,11 @@
1
- import { FetchHttpHandler } from "@aws-sdk/fetch-http-handler";
1
+ import { FetchHttpHandler as RequestHandler } from "@aws-sdk/fetch-http-handler";
2
2
  import { EC2InstanceConnectClientConfig } from "./EC2InstanceConnectClient";
3
3
  /**
4
4
  * @internal
5
5
  */
6
6
  export declare const getRuntimeConfig: (config: EC2InstanceConnectClientConfig) => {
7
7
  runtime: string;
8
+ defaultsMode: import("@aws-sdk/types").Provider<import("@aws-sdk/smithy-client").ResolvedDefaultsMode>;
8
9
  base64Decoder: import("@aws-sdk/types").Decoder;
9
10
  base64Encoder: import("@aws-sdk/types").Encoder;
10
11
  bodyLengthChecker: (body: any) => number | undefined;
@@ -12,7 +13,7 @@ export declare const getRuntimeConfig: (config: EC2InstanceConnectClientConfig)
12
13
  defaultUserAgentProvider: import("@aws-sdk/types").Provider<import("@aws-sdk/types").UserAgent>;
13
14
  maxAttempts: number | import("@aws-sdk/types").Provider<number>;
14
15
  region: string | import("@aws-sdk/types").Provider<any>;
15
- requestHandler: (import("@aws-sdk/types").RequestHandler<any, any, import("@aws-sdk/types").HttpHandlerOptions> & import("@aws-sdk/protocol-http").HttpHandler) | FetchHttpHandler;
16
+ requestHandler: (import("@aws-sdk/types").RequestHandler<any, any, import("@aws-sdk/types").HttpHandlerOptions> & import("@aws-sdk/protocol-http").HttpHandler) | RequestHandler;
16
17
  retryMode: string | import("@aws-sdk/types").Provider<string>;
17
18
  sha256: import("@aws-sdk/types").HashConstructor;
18
19
  streamCollector: import("@aws-sdk/types").StreamCollector;
@@ -1,18 +1,19 @@
1
- import { NodeHttpHandler } from "@aws-sdk/node-http-handler";
1
+ import { NodeHttpHandler as RequestHandler } from "@aws-sdk/node-http-handler";
2
2
  import { EC2InstanceConnectClientConfig } from "./EC2InstanceConnectClient";
3
3
  /**
4
4
  * @internal
5
5
  */
6
6
  export declare const getRuntimeConfig: (config: EC2InstanceConnectClientConfig) => {
7
7
  runtime: string;
8
+ defaultsMode: import("@aws-sdk/types").Provider<import("@aws-sdk/smithy-client").ResolvedDefaultsMode>;
8
9
  base64Decoder: import("@aws-sdk/types").Decoder;
9
10
  base64Encoder: import("@aws-sdk/types").Encoder;
10
11
  bodyLengthChecker: (body: any) => number | undefined;
11
- credentialDefaultProvider: import("@aws-sdk/client-sts/dist-types/defaultStsRoleAssumers").DefaultCredentialProvider;
12
+ credentialDefaultProvider: (input: any) => import("@aws-sdk/types").Provider<import("@aws-sdk/types").Credentials>;
12
13
  defaultUserAgentProvider: import("@aws-sdk/types").Provider<import("@aws-sdk/types").UserAgent>;
13
14
  maxAttempts: number | import("@aws-sdk/types").Provider<number>;
14
15
  region: string | import("@aws-sdk/types").Provider<string>;
15
- requestHandler: (import("@aws-sdk/types").RequestHandler<any, any, import("@aws-sdk/types").HttpHandlerOptions> & import("@aws-sdk/protocol-http").HttpHandler) | NodeHttpHandler;
16
+ requestHandler: (import("@aws-sdk/types").RequestHandler<any, any, import("@aws-sdk/types").HttpHandlerOptions> & import("@aws-sdk/protocol-http").HttpHandler) | RequestHandler;
16
17
  retryMode: string | import("@aws-sdk/types").Provider<string>;
17
18
  sha256: import("@aws-sdk/types").HashConstructor;
18
19
  streamCollector: import("@aws-sdk/types").StreamCollector;
@@ -25,6 +25,7 @@ export declare const getRuntimeConfig: (config: EC2InstanceConnectClientConfig)
25
25
  credentialDefaultProvider: (input: any) => import("@aws-sdk/types").Provider<import("@aws-sdk/types").Credentials>;
26
26
  regionInfoProvider: import("@aws-sdk/types").RegionInfoProvider;
27
27
  defaultUserAgentProvider: import("@aws-sdk/types").Provider<import("@aws-sdk/types").UserAgent>;
28
+ defaultsMode: import("@aws-sdk/smithy-client").DefaultsMode | import("@aws-sdk/types").Provider<import("@aws-sdk/smithy-client").DefaultsMode> | import("@aws-sdk/types").Provider<import("@aws-sdk/smithy-client").ResolvedDefaultsMode>;
28
29
  endpoint?: string | import("@aws-sdk/types").Endpoint | import("@aws-sdk/types").Provider<import("@aws-sdk/types").Endpoint> | undefined;
29
30
  tls?: boolean | undefined;
30
31
  retryStrategy?: import("@aws-sdk/types").RetryStrategy | undefined;
@@ -4,7 +4,7 @@ import { RetryInputConfig, RetryResolvedConfig } from "@aws-sdk/middleware-retry
4
4
  import { AwsAuthInputConfig, AwsAuthResolvedConfig } from "@aws-sdk/middleware-signing";
5
5
  import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
6
6
  import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http";
7
- import { Client as __Client, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
7
+ import { Client as __Client, DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
8
8
  import { Credentials as __Credentials, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, RegionInfoProvider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
9
9
  import { SendSerialConsoleSSHPublicKeyCommandInput, SendSerialConsoleSSHPublicKeyCommandOutput } from "./commands/SendSerialConsoleSSHPublicKeyCommand";
10
10
  import { SendSSHPublicKeyCommandInput, SendSSHPublicKeyCommandOutput } from "./commands/SendSSHPublicKeyCommand";
@@ -53,6 +53,8 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
53
53
  regionInfoProvider?: RegionInfoProvider;
54
54
 
55
55
  defaultUserAgentProvider?: Provider<__UserAgent>;
56
+
57
+ defaultsMode?: DefaultsMode | Provider<DefaultsMode>;
56
58
  }
57
59
  declare type EC2InstanceConnectClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointsInputConfig & RetryInputConfig & HostHeaderInputConfig & AwsAuthInputConfig & UserAgentInputConfig;
58
60
 
@@ -5,19 +5,17 @@ export interface AuthException extends __SmithyException, $MetadataBearer {
5
5
  $fault: "client";
6
6
  Message?: string;
7
7
  }
8
- export declare namespace AuthException {
9
-
10
- const filterSensitiveLog: (obj: AuthException) => any;
11
- }
12
8
 
13
9
  export interface EC2InstanceNotFoundException extends __SmithyException, $MetadataBearer {
14
10
  name: "EC2InstanceNotFoundException";
15
11
  $fault: "client";
16
12
  Message?: string;
17
13
  }
18
- export declare namespace EC2InstanceNotFoundException {
19
-
20
- const filterSensitiveLog: (obj: EC2InstanceNotFoundException) => any;
14
+
15
+ export interface EC2InstanceStateInvalidException extends __SmithyException, $MetadataBearer {
16
+ name: "EC2InstanceStateInvalidException";
17
+ $fault: "client";
18
+ Message?: string;
21
19
  }
22
20
 
23
21
  export interface EC2InstanceTypeInvalidException extends __SmithyException, $MetadataBearer {
@@ -25,20 +23,12 @@ export interface EC2InstanceTypeInvalidException extends __SmithyException, $Met
25
23
  $fault: "client";
26
24
  Message?: string;
27
25
  }
28
- export declare namespace EC2InstanceTypeInvalidException {
29
-
30
- const filterSensitiveLog: (obj: EC2InstanceTypeInvalidException) => any;
31
- }
32
26
 
33
27
  export interface InvalidArgsException extends __SmithyException, $MetadataBearer {
34
28
  name: "InvalidArgsException";
35
29
  $fault: "client";
36
30
  Message?: string;
37
31
  }
38
- export declare namespace InvalidArgsException {
39
-
40
- const filterSensitiveLog: (obj: InvalidArgsException) => any;
41
- }
42
32
  export interface SendSerialConsoleSSHPublicKeyRequest {
43
33
 
44
34
  InstanceId: string | undefined;
@@ -67,50 +57,30 @@ export interface SerialConsoleAccessDisabledException extends __SmithyException,
67
57
  $fault: "client";
68
58
  Message?: string;
69
59
  }
70
- export declare namespace SerialConsoleAccessDisabledException {
71
-
72
- const filterSensitiveLog: (obj: SerialConsoleAccessDisabledException) => any;
73
- }
74
60
 
75
61
  export interface SerialConsoleSessionLimitExceededException extends __SmithyException, $MetadataBearer {
76
62
  name: "SerialConsoleSessionLimitExceededException";
77
63
  $fault: "client";
78
64
  Message?: string;
79
65
  }
80
- export declare namespace SerialConsoleSessionLimitExceededException {
81
-
82
- const filterSensitiveLog: (obj: SerialConsoleSessionLimitExceededException) => any;
83
- }
84
66
 
85
67
  export interface SerialConsoleSessionUnavailableException extends __SmithyException, $MetadataBearer {
86
68
  name: "SerialConsoleSessionUnavailableException";
87
69
  $fault: "server";
88
70
  Message?: string;
89
71
  }
90
- export declare namespace SerialConsoleSessionUnavailableException {
91
-
92
- const filterSensitiveLog: (obj: SerialConsoleSessionUnavailableException) => any;
93
- }
94
72
 
95
73
  export interface ServiceException extends __SmithyException, $MetadataBearer {
96
74
  name: "ServiceException";
97
75
  $fault: "server";
98
76
  Message?: string;
99
77
  }
100
- export declare namespace ServiceException {
101
-
102
- const filterSensitiveLog: (obj: ServiceException) => any;
103
- }
104
78
 
105
79
  export interface ThrottlingException extends __SmithyException, $MetadataBearer {
106
80
  name: "ThrottlingException";
107
81
  $fault: "client";
108
82
  Message?: string;
109
83
  }
110
- export declare namespace ThrottlingException {
111
-
112
- const filterSensitiveLog: (obj: ThrottlingException) => any;
113
- }
114
84
  export interface SendSSHPublicKeyRequest {
115
85
 
116
86
  InstanceId: string | undefined;
@@ -119,7 +89,7 @@ export interface SendSSHPublicKeyRequest {
119
89
 
120
90
  SSHPublicKey: string | undefined;
121
91
 
122
- AvailabilityZone: string | undefined;
92
+ AvailabilityZone?: string;
123
93
  }
124
94
  export declare namespace SendSSHPublicKeyRequest {
125
95
 
@@ -1,8 +1,9 @@
1
- import { FetchHttpHandler } from "@aws-sdk/fetch-http-handler";
1
+ import { FetchHttpHandler as RequestHandler } from "@aws-sdk/fetch-http-handler";
2
2
  import { EC2InstanceConnectClientConfig } from "./EC2InstanceConnectClient";
3
3
 
4
4
  export declare const getRuntimeConfig: (config: EC2InstanceConnectClientConfig) => {
5
5
  runtime: string;
6
+ defaultsMode: import("@aws-sdk/types").Provider<import("@aws-sdk/smithy-client").ResolvedDefaultsMode>;
6
7
  base64Decoder: import("@aws-sdk/types").Decoder;
7
8
  base64Encoder: import("@aws-sdk/types").Encoder;
8
9
  bodyLengthChecker: (body: any) => number | undefined;
@@ -10,7 +11,7 @@ export declare const getRuntimeConfig: (config: EC2InstanceConnectClientConfig)
10
11
  defaultUserAgentProvider: import("@aws-sdk/types").Provider<import("@aws-sdk/types").UserAgent>;
11
12
  maxAttempts: number | import("@aws-sdk/types").Provider<number>;
12
13
  region: string | import("@aws-sdk/types").Provider<any>;
13
- requestHandler: (import("@aws-sdk/types").RequestHandler<any, any, import("@aws-sdk/types").HttpHandlerOptions> & import("@aws-sdk/protocol-http").HttpHandler) | FetchHttpHandler;
14
+ requestHandler: (import("@aws-sdk/types").RequestHandler<any, any, import("@aws-sdk/types").HttpHandlerOptions> & import("@aws-sdk/protocol-http").HttpHandler) | RequestHandler;
14
15
  retryMode: string | import("@aws-sdk/types").Provider<string>;
15
16
  sha256: import("@aws-sdk/types").HashConstructor;
16
17
  streamCollector: import("@aws-sdk/types").StreamCollector;
@@ -1,16 +1,17 @@
1
- import { NodeHttpHandler } from "@aws-sdk/node-http-handler";
1
+ import { NodeHttpHandler as RequestHandler } from "@aws-sdk/node-http-handler";
2
2
  import { EC2InstanceConnectClientConfig } from "./EC2InstanceConnectClient";
3
3
 
4
4
  export declare const getRuntimeConfig: (config: EC2InstanceConnectClientConfig) => {
5
5
  runtime: string;
6
+ defaultsMode: import("@aws-sdk/types").Provider<import("@aws-sdk/smithy-client").ResolvedDefaultsMode>;
6
7
  base64Decoder: import("@aws-sdk/types").Decoder;
7
8
  base64Encoder: import("@aws-sdk/types").Encoder;
8
9
  bodyLengthChecker: (body: any) => number | undefined;
9
- credentialDefaultProvider: import("@aws-sdk/client-sts/dist-types/defaultStsRoleAssumers").DefaultCredentialProvider;
10
+ credentialDefaultProvider: (input: any) => import("@aws-sdk/types").Provider<import("@aws-sdk/types").Credentials>;
10
11
  defaultUserAgentProvider: import("@aws-sdk/types").Provider<import("@aws-sdk/types").UserAgent>;
11
12
  maxAttempts: number | import("@aws-sdk/types").Provider<number>;
12
13
  region: string | import("@aws-sdk/types").Provider<string>;
13
- requestHandler: (import("@aws-sdk/types").RequestHandler<any, any, import("@aws-sdk/types").HttpHandlerOptions> & import("@aws-sdk/protocol-http").HttpHandler) | NodeHttpHandler;
14
+ requestHandler: (import("@aws-sdk/types").RequestHandler<any, any, import("@aws-sdk/types").HttpHandlerOptions> & import("@aws-sdk/protocol-http").HttpHandler) | RequestHandler;
14
15
  retryMode: string | import("@aws-sdk/types").Provider<string>;
15
16
  sha256: import("@aws-sdk/types").HashConstructor;
16
17
  streamCollector: import("@aws-sdk/types").StreamCollector;
@@ -23,6 +23,7 @@ export declare const getRuntimeConfig: (config: EC2InstanceConnectClientConfig)
23
23
  credentialDefaultProvider: (input: any) => import("@aws-sdk/types").Provider<import("@aws-sdk/types").Credentials>;
24
24
  regionInfoProvider: import("@aws-sdk/types").RegionInfoProvider;
25
25
  defaultUserAgentProvider: import("@aws-sdk/types").Provider<import("@aws-sdk/types").UserAgent>;
26
+ defaultsMode: import("@aws-sdk/smithy-client").DefaultsMode | import("@aws-sdk/types").Provider<import("@aws-sdk/smithy-client").DefaultsMode> | import("@aws-sdk/types").Provider<import("@aws-sdk/smithy-client").ResolvedDefaultsMode>;
26
27
  endpoint?: string | import("@aws-sdk/types").Endpoint | import("@aws-sdk/types").Provider<import("@aws-sdk/types").Endpoint> | undefined;
27
28
  tls?: boolean | undefined;
28
29
  retryStrategy?: import("@aws-sdk/types").RetryStrategy | undefined;
package/package.json CHANGED
@@ -1,17 +1,15 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-ec2-instance-connect",
3
3
  "description": "AWS SDK for JavaScript Ec2 Instance Connect Client for Node.js, Browser and React Native",
4
- "version": "3.46.0",
4
+ "version": "3.48.0",
5
5
  "scripts": {
6
- "build": "yarn build:cjs && yarn build:es && yarn build:types",
7
- "build:cjs": "tsc -p tsconfig.json",
6
+ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
+ "build:cjs": "tsc -p tsconfig.cjs.json",
8
8
  "build:docs": "typedoc",
9
9
  "build:es": "tsc -p tsconfig.es.json",
10
10
  "build:types": "tsc -p tsconfig.types.json",
11
11
  "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
12
- "clean": "yarn clean:dist && yarn clean:docs",
13
- "clean:dist": "rimraf ./dist-*",
14
- "clean:docs": "rimraf ./docs"
12
+ "clean": "rimraf ./dist-*"
15
13
  },
16
14
  "main": "./dist-cjs/index.js",
17
15
  "types": "./dist-types/index.d.ts",
@@ -20,38 +18,40 @@
20
18
  "dependencies": {
21
19
  "@aws-crypto/sha256-browser": "2.0.0",
22
20
  "@aws-crypto/sha256-js": "2.0.0",
23
- "@aws-sdk/client-sts": "3.46.0",
24
- "@aws-sdk/config-resolver": "3.46.0",
25
- "@aws-sdk/credential-provider-node": "3.46.0",
26
- "@aws-sdk/fetch-http-handler": "3.46.0",
27
- "@aws-sdk/hash-node": "3.46.0",
28
- "@aws-sdk/invalid-dependency": "3.46.0",
29
- "@aws-sdk/middleware-content-length": "3.46.0",
30
- "@aws-sdk/middleware-host-header": "3.46.0",
31
- "@aws-sdk/middleware-logger": "3.46.0",
32
- "@aws-sdk/middleware-retry": "3.46.0",
33
- "@aws-sdk/middleware-serde": "3.46.0",
34
- "@aws-sdk/middleware-signing": "3.46.0",
35
- "@aws-sdk/middleware-stack": "3.46.0",
36
- "@aws-sdk/middleware-user-agent": "3.46.0",
37
- "@aws-sdk/node-config-provider": "3.46.0",
38
- "@aws-sdk/node-http-handler": "3.46.0",
39
- "@aws-sdk/protocol-http": "3.46.0",
40
- "@aws-sdk/smithy-client": "3.46.0",
41
- "@aws-sdk/types": "3.46.0",
42
- "@aws-sdk/url-parser": "3.46.0",
43
- "@aws-sdk/util-base64-browser": "3.46.0",
44
- "@aws-sdk/util-base64-node": "3.46.0",
45
- "@aws-sdk/util-body-length-browser": "3.46.0",
46
- "@aws-sdk/util-body-length-node": "3.46.0",
47
- "@aws-sdk/util-user-agent-browser": "3.46.0",
48
- "@aws-sdk/util-user-agent-node": "3.46.0",
49
- "@aws-sdk/util-utf8-browser": "3.46.0",
50
- "@aws-sdk/util-utf8-node": "3.46.0",
21
+ "@aws-sdk/client-sts": "3.48.0",
22
+ "@aws-sdk/config-resolver": "3.47.2",
23
+ "@aws-sdk/credential-provider-node": "3.48.0",
24
+ "@aws-sdk/fetch-http-handler": "3.47.2",
25
+ "@aws-sdk/hash-node": "3.47.2",
26
+ "@aws-sdk/invalid-dependency": "3.47.2",
27
+ "@aws-sdk/middleware-content-length": "3.47.2",
28
+ "@aws-sdk/middleware-host-header": "3.47.2",
29
+ "@aws-sdk/middleware-logger": "3.47.2",
30
+ "@aws-sdk/middleware-retry": "3.47.2",
31
+ "@aws-sdk/middleware-serde": "3.47.2",
32
+ "@aws-sdk/middleware-signing": "3.47.2",
33
+ "@aws-sdk/middleware-stack": "3.47.2",
34
+ "@aws-sdk/middleware-user-agent": "3.47.2",
35
+ "@aws-sdk/node-config-provider": "3.47.2",
36
+ "@aws-sdk/node-http-handler": "3.47.2",
37
+ "@aws-sdk/protocol-http": "3.47.2",
38
+ "@aws-sdk/smithy-client": "3.47.2",
39
+ "@aws-sdk/types": "3.47.1",
40
+ "@aws-sdk/url-parser": "3.47.2",
41
+ "@aws-sdk/util-base64-browser": "3.47.1",
42
+ "@aws-sdk/util-base64-node": "3.47.2",
43
+ "@aws-sdk/util-body-length-browser": "3.47.1",
44
+ "@aws-sdk/util-body-length-node": "3.47.1",
45
+ "@aws-sdk/util-defaults-mode-browser": "3.47.2",
46
+ "@aws-sdk/util-defaults-mode-node": "3.47.2",
47
+ "@aws-sdk/util-user-agent-browser": "3.47.2",
48
+ "@aws-sdk/util-user-agent-node": "3.47.2",
49
+ "@aws-sdk/util-utf8-browser": "3.47.1",
50
+ "@aws-sdk/util-utf8-node": "3.47.2",
51
51
  "tslib": "^2.3.0"
52
52
  },
53
53
  "devDependencies": {
54
- "@aws-sdk/service-client-documentation-generator": "3.46.0",
54
+ "@aws-sdk/service-client-documentation-generator": "3.47.1",
55
55
  "@types/node": "^12.7.5"
56
56
  },
57
57
  "engines": {