@aws-sdk/client-ec2-instance-connect 3.926.0 → 3.928.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/index.js +277 -281
- package/dist-cjs/runtimeConfig.shared.js +7 -0
- package/dist-es/EC2InstanceConnectClient.js +2 -0
- package/dist-es/commands/SendSSHPublicKeyCommand.js +3 -9
- package/dist-es/commands/SendSerialConsoleSSHPublicKeyCommand.js +3 -9
- package/dist-es/runtimeConfig.shared.js +7 -0
- package/dist-es/schemas/schemas_0.js +235 -0
- package/dist-types/EC2InstanceConnectClient.d.ts +10 -1
- package/dist-types/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/runtimeConfig.d.ts +1 -0
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/runtimeConfig.shared.d.ts +1 -0
- package/dist-types/schemas/schemas_0.d.ts +20 -0
- package/dist-types/ts3.4/EC2InstanceConnectClient.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +24 -0
- package/package.json +5 -5
- package/dist-es/protocols/Aws_json1_1.js +0 -235
- package/dist-types/protocols/Aws_json1_1.d.ts +0 -20
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +0 -29
package/dist-cjs/index.js
CHANGED
|
@@ -6,6 +6,7 @@ var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detect
|
|
|
6
6
|
var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
|
|
7
7
|
var configResolver = require('@smithy/config-resolver');
|
|
8
8
|
var core = require('@smithy/core');
|
|
9
|
+
var schema = require('@smithy/core/schema');
|
|
9
10
|
var middlewareContentLength = require('@smithy/middleware-content-length');
|
|
10
11
|
var middlewareEndpoint = require('@smithy/middleware-endpoint');
|
|
11
12
|
var middlewareRetry = require('@smithy/middleware-retry');
|
|
@@ -14,8 +15,6 @@ var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
|
|
|
14
15
|
var runtimeConfig = require('./runtimeConfig');
|
|
15
16
|
var regionConfigResolver = require('@aws-sdk/region-config-resolver');
|
|
16
17
|
var protocolHttp = require('@smithy/protocol-http');
|
|
17
|
-
var middlewareSerde = require('@smithy/middleware-serde');
|
|
18
|
-
var core$1 = require('@aws-sdk/core');
|
|
19
18
|
|
|
20
19
|
const resolveClientEndpointParameters = (options) => {
|
|
21
20
|
return Object.assign(options, {
|
|
@@ -91,6 +90,7 @@ class EC2InstanceConnectClient extends smithyClient.Client {
|
|
|
91
90
|
const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
|
|
92
91
|
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
93
92
|
this.config = _config_8;
|
|
93
|
+
this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));
|
|
94
94
|
this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
|
|
95
95
|
this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
|
|
96
96
|
this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
|
|
@@ -110,14 +110,14 @@ class EC2InstanceConnectClient extends smithyClient.Client {
|
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
class EC2InstanceConnectServiceException extends smithyClient.ServiceException {
|
|
113
|
+
let EC2InstanceConnectServiceException$1 = class EC2InstanceConnectServiceException extends smithyClient.ServiceException {
|
|
114
114
|
constructor(options) {
|
|
115
115
|
super(options);
|
|
116
116
|
Object.setPrototypeOf(this, EC2InstanceConnectServiceException.prototype);
|
|
117
117
|
}
|
|
118
|
-
}
|
|
118
|
+
};
|
|
119
119
|
|
|
120
|
-
class AuthException extends EC2InstanceConnectServiceException {
|
|
120
|
+
let AuthException$1 = class AuthException extends EC2InstanceConnectServiceException$1 {
|
|
121
121
|
name = "AuthException";
|
|
122
122
|
$fault = "client";
|
|
123
123
|
Message;
|
|
@@ -130,8 +130,8 @@ class AuthException extends EC2InstanceConnectServiceException {
|
|
|
130
130
|
Object.setPrototypeOf(this, AuthException.prototype);
|
|
131
131
|
this.Message = opts.Message;
|
|
132
132
|
}
|
|
133
|
-
}
|
|
134
|
-
class EC2InstanceNotFoundException extends EC2InstanceConnectServiceException {
|
|
133
|
+
};
|
|
134
|
+
let EC2InstanceNotFoundException$1 = class EC2InstanceNotFoundException extends EC2InstanceConnectServiceException$1 {
|
|
135
135
|
name = "EC2InstanceNotFoundException";
|
|
136
136
|
$fault = "client";
|
|
137
137
|
Message;
|
|
@@ -144,8 +144,8 @@ class EC2InstanceNotFoundException extends EC2InstanceConnectServiceException {
|
|
|
144
144
|
Object.setPrototypeOf(this, EC2InstanceNotFoundException.prototype);
|
|
145
145
|
this.Message = opts.Message;
|
|
146
146
|
}
|
|
147
|
-
}
|
|
148
|
-
class EC2InstanceStateInvalidException extends EC2InstanceConnectServiceException {
|
|
147
|
+
};
|
|
148
|
+
let EC2InstanceStateInvalidException$1 = class EC2InstanceStateInvalidException extends EC2InstanceConnectServiceException$1 {
|
|
149
149
|
name = "EC2InstanceStateInvalidException";
|
|
150
150
|
$fault = "client";
|
|
151
151
|
Message;
|
|
@@ -158,8 +158,8 @@ class EC2InstanceStateInvalidException extends EC2InstanceConnectServiceExceptio
|
|
|
158
158
|
Object.setPrototypeOf(this, EC2InstanceStateInvalidException.prototype);
|
|
159
159
|
this.Message = opts.Message;
|
|
160
160
|
}
|
|
161
|
-
}
|
|
162
|
-
class EC2InstanceTypeInvalidException extends EC2InstanceConnectServiceException {
|
|
161
|
+
};
|
|
162
|
+
let EC2InstanceTypeInvalidException$1 = class EC2InstanceTypeInvalidException extends EC2InstanceConnectServiceException$1 {
|
|
163
163
|
name = "EC2InstanceTypeInvalidException";
|
|
164
164
|
$fault = "client";
|
|
165
165
|
Message;
|
|
@@ -172,8 +172,8 @@ class EC2InstanceTypeInvalidException extends EC2InstanceConnectServiceException
|
|
|
172
172
|
Object.setPrototypeOf(this, EC2InstanceTypeInvalidException.prototype);
|
|
173
173
|
this.Message = opts.Message;
|
|
174
174
|
}
|
|
175
|
-
}
|
|
176
|
-
class EC2InstanceUnavailableException extends EC2InstanceConnectServiceException {
|
|
175
|
+
};
|
|
176
|
+
let EC2InstanceUnavailableException$1 = class EC2InstanceUnavailableException extends EC2InstanceConnectServiceException$1 {
|
|
177
177
|
name = "EC2InstanceUnavailableException";
|
|
178
178
|
$fault = "server";
|
|
179
179
|
Message;
|
|
@@ -186,8 +186,8 @@ class EC2InstanceUnavailableException extends EC2InstanceConnectServiceException
|
|
|
186
186
|
Object.setPrototypeOf(this, EC2InstanceUnavailableException.prototype);
|
|
187
187
|
this.Message = opts.Message;
|
|
188
188
|
}
|
|
189
|
-
}
|
|
190
|
-
class InvalidArgsException extends EC2InstanceConnectServiceException {
|
|
189
|
+
};
|
|
190
|
+
let InvalidArgsException$1 = class InvalidArgsException extends EC2InstanceConnectServiceException$1 {
|
|
191
191
|
name = "InvalidArgsException";
|
|
192
192
|
$fault = "client";
|
|
193
193
|
Message;
|
|
@@ -200,8 +200,8 @@ class InvalidArgsException extends EC2InstanceConnectServiceException {
|
|
|
200
200
|
Object.setPrototypeOf(this, InvalidArgsException.prototype);
|
|
201
201
|
this.Message = opts.Message;
|
|
202
202
|
}
|
|
203
|
-
}
|
|
204
|
-
class SerialConsoleAccessDisabledException extends EC2InstanceConnectServiceException {
|
|
203
|
+
};
|
|
204
|
+
let SerialConsoleAccessDisabledException$1 = class SerialConsoleAccessDisabledException extends EC2InstanceConnectServiceException$1 {
|
|
205
205
|
name = "SerialConsoleAccessDisabledException";
|
|
206
206
|
$fault = "client";
|
|
207
207
|
Message;
|
|
@@ -214,8 +214,8 @@ class SerialConsoleAccessDisabledException extends EC2InstanceConnectServiceExce
|
|
|
214
214
|
Object.setPrototypeOf(this, SerialConsoleAccessDisabledException.prototype);
|
|
215
215
|
this.Message = opts.Message;
|
|
216
216
|
}
|
|
217
|
-
}
|
|
218
|
-
class SerialConsoleSessionLimitExceededException extends EC2InstanceConnectServiceException {
|
|
217
|
+
};
|
|
218
|
+
let SerialConsoleSessionLimitExceededException$1 = class SerialConsoleSessionLimitExceededException extends EC2InstanceConnectServiceException$1 {
|
|
219
219
|
name = "SerialConsoleSessionLimitExceededException";
|
|
220
220
|
$fault = "client";
|
|
221
221
|
Message;
|
|
@@ -228,8 +228,8 @@ class SerialConsoleSessionLimitExceededException extends EC2InstanceConnectServi
|
|
|
228
228
|
Object.setPrototypeOf(this, SerialConsoleSessionLimitExceededException.prototype);
|
|
229
229
|
this.Message = opts.Message;
|
|
230
230
|
}
|
|
231
|
-
}
|
|
232
|
-
class SerialConsoleSessionUnavailableException extends EC2InstanceConnectServiceException {
|
|
231
|
+
};
|
|
232
|
+
let SerialConsoleSessionUnavailableException$1 = class SerialConsoleSessionUnavailableException extends EC2InstanceConnectServiceException$1 {
|
|
233
233
|
name = "SerialConsoleSessionUnavailableException";
|
|
234
234
|
$fault = "server";
|
|
235
235
|
Message;
|
|
@@ -242,8 +242,8 @@ class SerialConsoleSessionUnavailableException extends EC2InstanceConnectService
|
|
|
242
242
|
Object.setPrototypeOf(this, SerialConsoleSessionUnavailableException.prototype);
|
|
243
243
|
this.Message = opts.Message;
|
|
244
244
|
}
|
|
245
|
-
}
|
|
246
|
-
class SerialConsoleSessionUnsupportedException extends EC2InstanceConnectServiceException {
|
|
245
|
+
};
|
|
246
|
+
let SerialConsoleSessionUnsupportedException$1 = class SerialConsoleSessionUnsupportedException extends EC2InstanceConnectServiceException$1 {
|
|
247
247
|
name = "SerialConsoleSessionUnsupportedException";
|
|
248
248
|
$fault = "client";
|
|
249
249
|
Message;
|
|
@@ -256,8 +256,8 @@ class SerialConsoleSessionUnsupportedException extends EC2InstanceConnectService
|
|
|
256
256
|
Object.setPrototypeOf(this, SerialConsoleSessionUnsupportedException.prototype);
|
|
257
257
|
this.Message = opts.Message;
|
|
258
258
|
}
|
|
259
|
-
}
|
|
260
|
-
class ServiceException extends EC2InstanceConnectServiceException {
|
|
259
|
+
};
|
|
260
|
+
let ServiceException$1 = class ServiceException extends EC2InstanceConnectServiceException$1 {
|
|
261
261
|
name = "ServiceException";
|
|
262
262
|
$fault = "server";
|
|
263
263
|
Message;
|
|
@@ -270,8 +270,8 @@ class ServiceException extends EC2InstanceConnectServiceException {
|
|
|
270
270
|
Object.setPrototypeOf(this, ServiceException.prototype);
|
|
271
271
|
this.Message = opts.Message;
|
|
272
272
|
}
|
|
273
|
-
}
|
|
274
|
-
class ThrottlingException extends EC2InstanceConnectServiceException {
|
|
273
|
+
};
|
|
274
|
+
let ThrottlingException$1 = class ThrottlingException extends EC2InstanceConnectServiceException$1 {
|
|
275
275
|
name = "ThrottlingException";
|
|
276
276
|
$fault = "client";
|
|
277
277
|
Message;
|
|
@@ -284,249 +284,250 @@ class ThrottlingException extends EC2InstanceConnectServiceException {
|
|
|
284
284
|
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
285
285
|
this.Message = opts.Message;
|
|
286
286
|
}
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
const se_SendSerialConsoleSSHPublicKeyCommand = async (input, context) => {
|
|
290
|
-
const headers = sharedHeaders("SendSerialConsoleSSHPublicKey");
|
|
291
|
-
let body;
|
|
292
|
-
body = JSON.stringify(smithyClient._json(input));
|
|
293
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
294
|
-
};
|
|
295
|
-
const se_SendSSHPublicKeyCommand = async (input, context) => {
|
|
296
|
-
const headers = sharedHeaders("SendSSHPublicKey");
|
|
297
|
-
let body;
|
|
298
|
-
body = JSON.stringify(smithyClient._json(input));
|
|
299
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
300
|
-
};
|
|
301
|
-
const de_SendSerialConsoleSSHPublicKeyCommand = async (output, context) => {
|
|
302
|
-
if (output.statusCode >= 300) {
|
|
303
|
-
return de_CommandError(output, context);
|
|
304
|
-
}
|
|
305
|
-
const data = await core$1.parseJsonBody(output.body, context);
|
|
306
|
-
let contents = {};
|
|
307
|
-
contents = smithyClient._json(data);
|
|
308
|
-
const response = {
|
|
309
|
-
$metadata: deserializeMetadata(output),
|
|
310
|
-
...contents,
|
|
311
|
-
};
|
|
312
|
-
return response;
|
|
313
|
-
};
|
|
314
|
-
const de_SendSSHPublicKeyCommand = async (output, context) => {
|
|
315
|
-
if (output.statusCode >= 300) {
|
|
316
|
-
return de_CommandError(output, context);
|
|
317
|
-
}
|
|
318
|
-
const data = await core$1.parseJsonBody(output.body, context);
|
|
319
|
-
let contents = {};
|
|
320
|
-
contents = smithyClient._json(data);
|
|
321
|
-
const response = {
|
|
322
|
-
$metadata: deserializeMetadata(output),
|
|
323
|
-
...contents,
|
|
324
|
-
};
|
|
325
|
-
return response;
|
|
326
|
-
};
|
|
327
|
-
const de_CommandError = async (output, context) => {
|
|
328
|
-
const parsedOutput = {
|
|
329
|
-
...output,
|
|
330
|
-
body: await core$1.parseJsonErrorBody(output.body, context),
|
|
331
|
-
};
|
|
332
|
-
const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
|
|
333
|
-
switch (errorCode) {
|
|
334
|
-
case "AuthException":
|
|
335
|
-
case "com.amazonaws.ec2instanceconnect#AuthException":
|
|
336
|
-
throw await de_AuthExceptionRes(parsedOutput);
|
|
337
|
-
case "EC2InstanceNotFoundException":
|
|
338
|
-
case "com.amazonaws.ec2instanceconnect#EC2InstanceNotFoundException":
|
|
339
|
-
throw await de_EC2InstanceNotFoundExceptionRes(parsedOutput);
|
|
340
|
-
case "EC2InstanceStateInvalidException":
|
|
341
|
-
case "com.amazonaws.ec2instanceconnect#EC2InstanceStateInvalidException":
|
|
342
|
-
throw await de_EC2InstanceStateInvalidExceptionRes(parsedOutput);
|
|
343
|
-
case "EC2InstanceTypeInvalidException":
|
|
344
|
-
case "com.amazonaws.ec2instanceconnect#EC2InstanceTypeInvalidException":
|
|
345
|
-
throw await de_EC2InstanceTypeInvalidExceptionRes(parsedOutput);
|
|
346
|
-
case "EC2InstanceUnavailableException":
|
|
347
|
-
case "com.amazonaws.ec2instanceconnect#EC2InstanceUnavailableException":
|
|
348
|
-
throw await de_EC2InstanceUnavailableExceptionRes(parsedOutput);
|
|
349
|
-
case "InvalidArgsException":
|
|
350
|
-
case "com.amazonaws.ec2instanceconnect#InvalidArgsException":
|
|
351
|
-
throw await de_InvalidArgsExceptionRes(parsedOutput);
|
|
352
|
-
case "SerialConsoleAccessDisabledException":
|
|
353
|
-
case "com.amazonaws.ec2instanceconnect#SerialConsoleAccessDisabledException":
|
|
354
|
-
throw await de_SerialConsoleAccessDisabledExceptionRes(parsedOutput);
|
|
355
|
-
case "SerialConsoleSessionLimitExceededException":
|
|
356
|
-
case "com.amazonaws.ec2instanceconnect#SerialConsoleSessionLimitExceededException":
|
|
357
|
-
throw await de_SerialConsoleSessionLimitExceededExceptionRes(parsedOutput);
|
|
358
|
-
case "SerialConsoleSessionUnavailableException":
|
|
359
|
-
case "com.amazonaws.ec2instanceconnect#SerialConsoleSessionUnavailableException":
|
|
360
|
-
throw await de_SerialConsoleSessionUnavailableExceptionRes(parsedOutput);
|
|
361
|
-
case "SerialConsoleSessionUnsupportedException":
|
|
362
|
-
case "com.amazonaws.ec2instanceconnect#SerialConsoleSessionUnsupportedException":
|
|
363
|
-
throw await de_SerialConsoleSessionUnsupportedExceptionRes(parsedOutput);
|
|
364
|
-
case "ServiceException":
|
|
365
|
-
case "com.amazonaws.ec2instanceconnect#ServiceException":
|
|
366
|
-
throw await de_ServiceExceptionRes(parsedOutput);
|
|
367
|
-
case "ThrottlingException":
|
|
368
|
-
case "com.amazonaws.ec2instanceconnect#ThrottlingException":
|
|
369
|
-
throw await de_ThrottlingExceptionRes(parsedOutput);
|
|
370
|
-
default:
|
|
371
|
-
const parsedBody = parsedOutput.body;
|
|
372
|
-
return throwDefaultError({
|
|
373
|
-
output,
|
|
374
|
-
parsedBody,
|
|
375
|
-
errorCode,
|
|
376
|
-
});
|
|
377
|
-
}
|
|
378
|
-
};
|
|
379
|
-
const de_AuthExceptionRes = async (parsedOutput, context) => {
|
|
380
|
-
const body = parsedOutput.body;
|
|
381
|
-
const deserialized = smithyClient._json(body);
|
|
382
|
-
const exception = new AuthException({
|
|
383
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
384
|
-
...deserialized,
|
|
385
|
-
});
|
|
386
|
-
return smithyClient.decorateServiceException(exception, body);
|
|
387
|
-
};
|
|
388
|
-
const de_EC2InstanceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
389
|
-
const body = parsedOutput.body;
|
|
390
|
-
const deserialized = smithyClient._json(body);
|
|
391
|
-
const exception = new EC2InstanceNotFoundException({
|
|
392
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
393
|
-
...deserialized,
|
|
394
|
-
});
|
|
395
|
-
return smithyClient.decorateServiceException(exception, body);
|
|
396
|
-
};
|
|
397
|
-
const de_EC2InstanceStateInvalidExceptionRes = async (parsedOutput, context) => {
|
|
398
|
-
const body = parsedOutput.body;
|
|
399
|
-
const deserialized = smithyClient._json(body);
|
|
400
|
-
const exception = new EC2InstanceStateInvalidException({
|
|
401
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
402
|
-
...deserialized,
|
|
403
|
-
});
|
|
404
|
-
return smithyClient.decorateServiceException(exception, body);
|
|
405
|
-
};
|
|
406
|
-
const de_EC2InstanceTypeInvalidExceptionRes = async (parsedOutput, context) => {
|
|
407
|
-
const body = parsedOutput.body;
|
|
408
|
-
const deserialized = smithyClient._json(body);
|
|
409
|
-
const exception = new EC2InstanceTypeInvalidException({
|
|
410
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
411
|
-
...deserialized,
|
|
412
|
-
});
|
|
413
|
-
return smithyClient.decorateServiceException(exception, body);
|
|
414
|
-
};
|
|
415
|
-
const de_EC2InstanceUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
416
|
-
const body = parsedOutput.body;
|
|
417
|
-
const deserialized = smithyClient._json(body);
|
|
418
|
-
const exception = new EC2InstanceUnavailableException({
|
|
419
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
420
|
-
...deserialized,
|
|
421
|
-
});
|
|
422
|
-
return smithyClient.decorateServiceException(exception, body);
|
|
423
|
-
};
|
|
424
|
-
const de_InvalidArgsExceptionRes = async (parsedOutput, context) => {
|
|
425
|
-
const body = parsedOutput.body;
|
|
426
|
-
const deserialized = smithyClient._json(body);
|
|
427
|
-
const exception = new InvalidArgsException({
|
|
428
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
429
|
-
...deserialized,
|
|
430
|
-
});
|
|
431
|
-
return smithyClient.decorateServiceException(exception, body);
|
|
432
|
-
};
|
|
433
|
-
const de_SerialConsoleAccessDisabledExceptionRes = async (parsedOutput, context) => {
|
|
434
|
-
const body = parsedOutput.body;
|
|
435
|
-
const deserialized = smithyClient._json(body);
|
|
436
|
-
const exception = new SerialConsoleAccessDisabledException({
|
|
437
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
438
|
-
...deserialized,
|
|
439
|
-
});
|
|
440
|
-
return smithyClient.decorateServiceException(exception, body);
|
|
441
|
-
};
|
|
442
|
-
const de_SerialConsoleSessionLimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
443
|
-
const body = parsedOutput.body;
|
|
444
|
-
const deserialized = smithyClient._json(body);
|
|
445
|
-
const exception = new SerialConsoleSessionLimitExceededException({
|
|
446
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
447
|
-
...deserialized,
|
|
448
|
-
});
|
|
449
|
-
return smithyClient.decorateServiceException(exception, body);
|
|
450
|
-
};
|
|
451
|
-
const de_SerialConsoleSessionUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
452
|
-
const body = parsedOutput.body;
|
|
453
|
-
const deserialized = smithyClient._json(body);
|
|
454
|
-
const exception = new SerialConsoleSessionUnavailableException({
|
|
455
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
456
|
-
...deserialized,
|
|
457
|
-
});
|
|
458
|
-
return smithyClient.decorateServiceException(exception, body);
|
|
459
|
-
};
|
|
460
|
-
const de_SerialConsoleSessionUnsupportedExceptionRes = async (parsedOutput, context) => {
|
|
461
|
-
const body = parsedOutput.body;
|
|
462
|
-
const deserialized = smithyClient._json(body);
|
|
463
|
-
const exception = new SerialConsoleSessionUnsupportedException({
|
|
464
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
465
|
-
...deserialized,
|
|
466
|
-
});
|
|
467
|
-
return smithyClient.decorateServiceException(exception, body);
|
|
468
|
-
};
|
|
469
|
-
const de_ServiceExceptionRes = async (parsedOutput, context) => {
|
|
470
|
-
const body = parsedOutput.body;
|
|
471
|
-
const deserialized = smithyClient._json(body);
|
|
472
|
-
const exception = new ServiceException({
|
|
473
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
474
|
-
...deserialized,
|
|
475
|
-
});
|
|
476
|
-
return smithyClient.decorateServiceException(exception, body);
|
|
477
|
-
};
|
|
478
|
-
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
479
|
-
const body = parsedOutput.body;
|
|
480
|
-
const deserialized = smithyClient._json(body);
|
|
481
|
-
const exception = new ThrottlingException({
|
|
482
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
483
|
-
...deserialized,
|
|
484
|
-
});
|
|
485
|
-
return smithyClient.decorateServiceException(exception, body);
|
|
486
|
-
};
|
|
487
|
-
const deserializeMetadata = (output) => ({
|
|
488
|
-
httpStatusCode: output.statusCode,
|
|
489
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
490
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
491
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
492
|
-
});
|
|
493
|
-
const throwDefaultError = smithyClient.withBaseException(EC2InstanceConnectServiceException);
|
|
494
|
-
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
495
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
496
|
-
const contents = {
|
|
497
|
-
protocol,
|
|
498
|
-
hostname,
|
|
499
|
-
port,
|
|
500
|
-
method: "POST",
|
|
501
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
502
|
-
headers,
|
|
503
|
-
};
|
|
504
|
-
if (body !== undefined) {
|
|
505
|
-
contents.body = body;
|
|
506
|
-
}
|
|
507
|
-
return new protocolHttp.HttpRequest(contents);
|
|
508
287
|
};
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
288
|
+
|
|
289
|
+
const _AE = "AuthException";
|
|
290
|
+
const _AZ = "AvailabilityZone";
|
|
291
|
+
const _ECINFE = "EC2InstanceNotFoundException";
|
|
292
|
+
const _ECISIE = "EC2InstanceStateInvalidException";
|
|
293
|
+
const _ECITIE = "EC2InstanceTypeInvalidException";
|
|
294
|
+
const _ECIUE = "EC2InstanceUnavailableException";
|
|
295
|
+
const _IAE = "InvalidArgsException";
|
|
296
|
+
const _II = "InstanceId";
|
|
297
|
+
const _IOSU = "InstanceOSUser";
|
|
298
|
+
const _M = "Message";
|
|
299
|
+
const _RI = "RequestId";
|
|
300
|
+
const _S = "Success";
|
|
301
|
+
const _SCADE = "SerialConsoleAccessDisabledException";
|
|
302
|
+
const _SCSLEE = "SerialConsoleSessionLimitExceededException";
|
|
303
|
+
const _SCSUE = "SerialConsoleSessionUnavailableException";
|
|
304
|
+
const _SCSUEe = "SerialConsoleSessionUnsupportedException";
|
|
305
|
+
const _SE = "ServiceException";
|
|
306
|
+
const _SP = "SerialPort";
|
|
307
|
+
const _SSCSSHPK = "SendSerialConsoleSSHPublicKey";
|
|
308
|
+
const _SSCSSHPKR = "SendSerialConsoleSSHPublicKeyRequest";
|
|
309
|
+
const _SSCSSHPKRe = "SendSerialConsoleSSHPublicKeyResponse";
|
|
310
|
+
const _SSHPK = "SSHPublicKey";
|
|
311
|
+
const _SSSHPK = "SendSSHPublicKey";
|
|
312
|
+
const _SSSHPKR = "SendSSHPublicKeyRequest";
|
|
313
|
+
const _SSSHPKRe = "SendSSHPublicKeyResponse";
|
|
314
|
+
const _TE = "ThrottlingException";
|
|
315
|
+
const _aQE = "awsQueryError";
|
|
316
|
+
const _c = "client";
|
|
317
|
+
const _e = "error";
|
|
318
|
+
const _hE = "httpError";
|
|
319
|
+
const _s = "server";
|
|
320
|
+
const _sm = "smithy.ts.sdk.synthetic.com.amazonaws.ec2instanceconnect";
|
|
321
|
+
const n0 = "com.amazonaws.ec2instanceconnect";
|
|
322
|
+
var AuthException = [
|
|
323
|
+
-3,
|
|
324
|
+
n0,
|
|
325
|
+
_AE,
|
|
326
|
+
{
|
|
327
|
+
[_e]: _c,
|
|
328
|
+
[_hE]: 403,
|
|
329
|
+
[_aQE]: [`Forbidden`, 403],
|
|
330
|
+
},
|
|
331
|
+
[_M],
|
|
332
|
+
[0],
|
|
333
|
+
];
|
|
334
|
+
schema.TypeRegistry.for(n0).registerError(AuthException, AuthException$1);
|
|
335
|
+
var EC2InstanceNotFoundException = [
|
|
336
|
+
-3,
|
|
337
|
+
n0,
|
|
338
|
+
_ECINFE,
|
|
339
|
+
{
|
|
340
|
+
[_e]: _c,
|
|
341
|
+
[_hE]: 404,
|
|
342
|
+
[_aQE]: [`EC2InstanceNotFound`, 404],
|
|
343
|
+
},
|
|
344
|
+
[_M],
|
|
345
|
+
[0],
|
|
346
|
+
];
|
|
347
|
+
schema.TypeRegistry.for(n0).registerError(EC2InstanceNotFoundException, EC2InstanceNotFoundException$1);
|
|
348
|
+
var EC2InstanceStateInvalidException = [
|
|
349
|
+
-3,
|
|
350
|
+
n0,
|
|
351
|
+
_ECISIE,
|
|
352
|
+
{
|
|
353
|
+
[_e]: _c,
|
|
354
|
+
[_hE]: 400,
|
|
355
|
+
[_aQE]: [`EC2InstanceStateInvalid`, 400],
|
|
356
|
+
},
|
|
357
|
+
[_M],
|
|
358
|
+
[0],
|
|
359
|
+
];
|
|
360
|
+
schema.TypeRegistry.for(n0).registerError(EC2InstanceStateInvalidException, EC2InstanceStateInvalidException$1);
|
|
361
|
+
var EC2InstanceTypeInvalidException = [
|
|
362
|
+
-3,
|
|
363
|
+
n0,
|
|
364
|
+
_ECITIE,
|
|
365
|
+
{
|
|
366
|
+
[_e]: _c,
|
|
367
|
+
[_hE]: 400,
|
|
368
|
+
[_aQE]: [`EC2InstanceTypeInvalid`, 400],
|
|
369
|
+
},
|
|
370
|
+
[_M],
|
|
371
|
+
[0],
|
|
372
|
+
];
|
|
373
|
+
schema.TypeRegistry.for(n0).registerError(EC2InstanceTypeInvalidException, EC2InstanceTypeInvalidException$1);
|
|
374
|
+
var EC2InstanceUnavailableException = [
|
|
375
|
+
-3,
|
|
376
|
+
n0,
|
|
377
|
+
_ECIUE,
|
|
378
|
+
{
|
|
379
|
+
[_e]: _s,
|
|
380
|
+
[_hE]: 503,
|
|
381
|
+
[_aQE]: [`EC2InstanceUnavailable`, 503],
|
|
382
|
+
},
|
|
383
|
+
[_M],
|
|
384
|
+
[0],
|
|
385
|
+
];
|
|
386
|
+
schema.TypeRegistry.for(n0).registerError(EC2InstanceUnavailableException, EC2InstanceUnavailableException$1);
|
|
387
|
+
var InvalidArgsException = [
|
|
388
|
+
-3,
|
|
389
|
+
n0,
|
|
390
|
+
_IAE,
|
|
391
|
+
{
|
|
392
|
+
[_e]: _c,
|
|
393
|
+
[_hE]: 400,
|
|
394
|
+
[_aQE]: [`InvalidArguments`, 400],
|
|
395
|
+
},
|
|
396
|
+
[_M],
|
|
397
|
+
[0],
|
|
398
|
+
];
|
|
399
|
+
schema.TypeRegistry.for(n0).registerError(InvalidArgsException, InvalidArgsException$1);
|
|
400
|
+
var SendSerialConsoleSSHPublicKeyRequest = [
|
|
401
|
+
3,
|
|
402
|
+
n0,
|
|
403
|
+
_SSCSSHPKR,
|
|
404
|
+
0,
|
|
405
|
+
[_II, _SP, _SSHPK],
|
|
406
|
+
[0, 1, 0],
|
|
407
|
+
];
|
|
408
|
+
var SendSerialConsoleSSHPublicKeyResponse = [3, n0, _SSCSSHPKRe, 0, [_RI, _S], [0, 2]];
|
|
409
|
+
var SendSSHPublicKeyRequest = [
|
|
410
|
+
3,
|
|
411
|
+
n0,
|
|
412
|
+
_SSSHPKR,
|
|
413
|
+
0,
|
|
414
|
+
[_II, _IOSU, _SSHPK, _AZ],
|
|
415
|
+
[0, 0, 0, 0],
|
|
416
|
+
];
|
|
417
|
+
var SendSSHPublicKeyResponse = [3, n0, _SSSHPKRe, 0, [_RI, _S], [0, 2]];
|
|
418
|
+
var SerialConsoleAccessDisabledException = [
|
|
419
|
+
-3,
|
|
420
|
+
n0,
|
|
421
|
+
_SCADE,
|
|
422
|
+
{
|
|
423
|
+
[_e]: _c,
|
|
424
|
+
[_hE]: 403,
|
|
425
|
+
[_aQE]: [`SerialConsoleAccessDisabled`, 403],
|
|
426
|
+
},
|
|
427
|
+
[_M],
|
|
428
|
+
[0],
|
|
429
|
+
];
|
|
430
|
+
schema.TypeRegistry.for(n0).registerError(SerialConsoleAccessDisabledException, SerialConsoleAccessDisabledException$1);
|
|
431
|
+
var SerialConsoleSessionLimitExceededException = [
|
|
432
|
+
-3,
|
|
433
|
+
n0,
|
|
434
|
+
_SCSLEE,
|
|
435
|
+
{
|
|
436
|
+
[_e]: _c,
|
|
437
|
+
[_hE]: 400,
|
|
438
|
+
[_aQE]: [`SerialConsoleSessionLimitExceeded`, 400],
|
|
439
|
+
},
|
|
440
|
+
[_M],
|
|
441
|
+
[0],
|
|
442
|
+
];
|
|
443
|
+
schema.TypeRegistry.for(n0).registerError(SerialConsoleSessionLimitExceededException, SerialConsoleSessionLimitExceededException$1);
|
|
444
|
+
var SerialConsoleSessionUnavailableException = [
|
|
445
|
+
-3,
|
|
446
|
+
n0,
|
|
447
|
+
_SCSUE,
|
|
448
|
+
{
|
|
449
|
+
[_e]: _s,
|
|
450
|
+
[_hE]: 500,
|
|
451
|
+
[_aQE]: [`SerialConsoleSessionUnavailable`, 500],
|
|
452
|
+
},
|
|
453
|
+
[_M],
|
|
454
|
+
[0],
|
|
455
|
+
];
|
|
456
|
+
schema.TypeRegistry.for(n0).registerError(SerialConsoleSessionUnavailableException, SerialConsoleSessionUnavailableException$1);
|
|
457
|
+
var SerialConsoleSessionUnsupportedException = [
|
|
458
|
+
-3,
|
|
459
|
+
n0,
|
|
460
|
+
_SCSUEe,
|
|
461
|
+
{
|
|
462
|
+
[_e]: _c,
|
|
463
|
+
[_hE]: 400,
|
|
464
|
+
[_aQE]: [`SerialConsoleSessionUnsupported`, 400],
|
|
465
|
+
},
|
|
466
|
+
[_M],
|
|
467
|
+
[0],
|
|
468
|
+
];
|
|
469
|
+
schema.TypeRegistry.for(n0).registerError(SerialConsoleSessionUnsupportedException, SerialConsoleSessionUnsupportedException$1);
|
|
470
|
+
var ServiceException = [
|
|
471
|
+
-3,
|
|
472
|
+
n0,
|
|
473
|
+
_SE,
|
|
474
|
+
{
|
|
475
|
+
[_e]: _s,
|
|
476
|
+
[_hE]: 500,
|
|
477
|
+
[_aQE]: [`InternalServerError`, 500],
|
|
478
|
+
},
|
|
479
|
+
[_M],
|
|
480
|
+
[0],
|
|
481
|
+
];
|
|
482
|
+
schema.TypeRegistry.for(n0).registerError(ServiceException, ServiceException$1);
|
|
483
|
+
var ThrottlingException = [
|
|
484
|
+
-3,
|
|
485
|
+
n0,
|
|
486
|
+
_TE,
|
|
487
|
+
{
|
|
488
|
+
[_e]: _c,
|
|
489
|
+
[_hE]: 429,
|
|
490
|
+
[_aQE]: [`TooManyRequests`, 429],
|
|
491
|
+
},
|
|
492
|
+
[_M],
|
|
493
|
+
[0],
|
|
494
|
+
];
|
|
495
|
+
schema.TypeRegistry.for(n0).registerError(ThrottlingException, ThrottlingException$1);
|
|
496
|
+
var EC2InstanceConnectServiceException = [
|
|
497
|
+
-3,
|
|
498
|
+
_sm,
|
|
499
|
+
"EC2InstanceConnectServiceException",
|
|
500
|
+
0,
|
|
501
|
+
[],
|
|
502
|
+
[],
|
|
503
|
+
];
|
|
504
|
+
schema.TypeRegistry.for(_sm).registerError(EC2InstanceConnectServiceException, EC2InstanceConnectServiceException$1);
|
|
505
|
+
var SendSerialConsoleSSHPublicKey = [
|
|
506
|
+
9,
|
|
507
|
+
n0,
|
|
508
|
+
_SSCSSHPK,
|
|
509
|
+
0,
|
|
510
|
+
() => SendSerialConsoleSSHPublicKeyRequest,
|
|
511
|
+
() => SendSerialConsoleSSHPublicKeyResponse,
|
|
512
|
+
];
|
|
513
|
+
var SendSSHPublicKey = [
|
|
514
|
+
9,
|
|
515
|
+
n0,
|
|
516
|
+
_SSSHPK,
|
|
517
|
+
0,
|
|
518
|
+
() => SendSSHPublicKeyRequest,
|
|
519
|
+
() => SendSSHPublicKeyResponse,
|
|
520
|
+
];
|
|
515
521
|
|
|
516
522
|
class SendSerialConsoleSSHPublicKeyCommand extends smithyClient.Command
|
|
517
523
|
.classBuilder()
|
|
518
524
|
.ep(commonParams)
|
|
519
525
|
.m(function (Command, cs, config, o) {
|
|
520
|
-
return [
|
|
521
|
-
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
522
|
-
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
523
|
-
];
|
|
526
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
524
527
|
})
|
|
525
528
|
.s("AWSEC2InstanceConnectService", "SendSerialConsoleSSHPublicKey", {})
|
|
526
529
|
.n("EC2InstanceConnectClient", "SendSerialConsoleSSHPublicKeyCommand")
|
|
527
|
-
.
|
|
528
|
-
.ser(se_SendSerialConsoleSSHPublicKeyCommand)
|
|
529
|
-
.de(de_SendSerialConsoleSSHPublicKeyCommand)
|
|
530
|
+
.sc(SendSerialConsoleSSHPublicKey)
|
|
530
531
|
.build() {
|
|
531
532
|
}
|
|
532
533
|
|
|
@@ -534,16 +535,11 @@ class SendSSHPublicKeyCommand extends smithyClient.Command
|
|
|
534
535
|
.classBuilder()
|
|
535
536
|
.ep(commonParams)
|
|
536
537
|
.m(function (Command, cs, config, o) {
|
|
537
|
-
return [
|
|
538
|
-
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
539
|
-
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
540
|
-
];
|
|
538
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
541
539
|
})
|
|
542
540
|
.s("AWSEC2InstanceConnectService", "SendSSHPublicKey", {})
|
|
543
541
|
.n("EC2InstanceConnectClient", "SendSSHPublicKeyCommand")
|
|
544
|
-
.
|
|
545
|
-
.ser(se_SendSSHPublicKeyCommand)
|
|
546
|
-
.de(de_SendSSHPublicKeyCommand)
|
|
542
|
+
.sc(SendSSHPublicKey)
|
|
547
543
|
.build() {
|
|
548
544
|
}
|
|
549
545
|
|
|
@@ -563,20 +559,20 @@ Object.defineProperty(exports, "__Client", {
|
|
|
563
559
|
enumerable: true,
|
|
564
560
|
get: function () { return smithyClient.Client; }
|
|
565
561
|
});
|
|
566
|
-
exports.AuthException = AuthException;
|
|
562
|
+
exports.AuthException = AuthException$1;
|
|
567
563
|
exports.EC2InstanceConnect = EC2InstanceConnect;
|
|
568
564
|
exports.EC2InstanceConnectClient = EC2InstanceConnectClient;
|
|
569
|
-
exports.EC2InstanceConnectServiceException = EC2InstanceConnectServiceException;
|
|
570
|
-
exports.EC2InstanceNotFoundException = EC2InstanceNotFoundException;
|
|
571
|
-
exports.EC2InstanceStateInvalidException = EC2InstanceStateInvalidException;
|
|
572
|
-
exports.EC2InstanceTypeInvalidException = EC2InstanceTypeInvalidException;
|
|
573
|
-
exports.EC2InstanceUnavailableException = EC2InstanceUnavailableException;
|
|
574
|
-
exports.InvalidArgsException = InvalidArgsException;
|
|
565
|
+
exports.EC2InstanceConnectServiceException = EC2InstanceConnectServiceException$1;
|
|
566
|
+
exports.EC2InstanceNotFoundException = EC2InstanceNotFoundException$1;
|
|
567
|
+
exports.EC2InstanceStateInvalidException = EC2InstanceStateInvalidException$1;
|
|
568
|
+
exports.EC2InstanceTypeInvalidException = EC2InstanceTypeInvalidException$1;
|
|
569
|
+
exports.EC2InstanceUnavailableException = EC2InstanceUnavailableException$1;
|
|
570
|
+
exports.InvalidArgsException = InvalidArgsException$1;
|
|
575
571
|
exports.SendSSHPublicKeyCommand = SendSSHPublicKeyCommand;
|
|
576
572
|
exports.SendSerialConsoleSSHPublicKeyCommand = SendSerialConsoleSSHPublicKeyCommand;
|
|
577
|
-
exports.SerialConsoleAccessDisabledException = SerialConsoleAccessDisabledException;
|
|
578
|
-
exports.SerialConsoleSessionLimitExceededException = SerialConsoleSessionLimitExceededException;
|
|
579
|
-
exports.SerialConsoleSessionUnavailableException = SerialConsoleSessionUnavailableException;
|
|
580
|
-
exports.SerialConsoleSessionUnsupportedException = SerialConsoleSessionUnsupportedException;
|
|
581
|
-
exports.ServiceException = ServiceException;
|
|
582
|
-
exports.ThrottlingException = ThrottlingException;
|
|
573
|
+
exports.SerialConsoleAccessDisabledException = SerialConsoleAccessDisabledException$1;
|
|
574
|
+
exports.SerialConsoleSessionLimitExceededException = SerialConsoleSessionLimitExceededException$1;
|
|
575
|
+
exports.SerialConsoleSessionUnavailableException = SerialConsoleSessionUnavailableException$1;
|
|
576
|
+
exports.SerialConsoleSessionUnsupportedException = SerialConsoleSessionUnsupportedException$1;
|
|
577
|
+
exports.ServiceException = ServiceException$1;
|
|
578
|
+
exports.ThrottlingException = ThrottlingException$1;
|