Skip to content

Commit 0bce168

Browse files
author
awstools
committed
feat(client-ec2-instance-connect): This release includes a new exception type "SerialConsoleSessionUnsupportedException" for SendSerialConsoleSSHPublicKey API.
1 parent 5e6af3f commit 0bce168

File tree

8 files changed

+109
-14
lines changed

8 files changed

+109
-14
lines changed

clients/client-ec2-instance-connect/README.md

+10-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,16 @@
66

77
AWS SDK for JavaScript EC2InstanceConnect Client for Node.js, Browser and React Native.
88

9-
<p>Amazon EC2 Instance Connect enables system administrators to publish one-time use SSH
10-
public keys to EC2, providing users a simple and secure way to connect to their
11-
instances.</p>
9+
<p>This is the <i> Amazon EC2 Instance Connect API Reference</i>. It
10+
provides descriptions, syntax, and usage examples for each of the actions for Amazon EC2
11+
Instance Connect. Amazon EC2 Instance Connect enables system administrators to publish
12+
one-time use SSH public keys to EC2, providing users a simple and secure way to connect
13+
to their instances.</p>
14+
<p>To view the Amazon EC2 Instance Connect content in the <i> Amazon EC2 User
15+
Guide</i>, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Connect-using-EC2-Instance-Connect.html">Connect to
16+
your Linux instance using EC2 Instance Connect</a>.</p>
17+
<p>For Amazon EC2 APIs, see the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Welcome.html">Amazon EC2 API
18+
Reference</a>.</p>
1219

1320
## Installing
1421

clients/client-ec2-instance-connect/src/EC2InstanceConnect.ts

+10-3
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,16 @@ export interface EC2InstanceConnect {
5757

5858
/**
5959
* @public
60-
* <p>Amazon EC2 Instance Connect enables system administrators to publish one-time use SSH
61-
* public keys to EC2, providing users a simple and secure way to connect to their
62-
* instances.</p>
60+
* <p>This is the <i> Amazon EC2 Instance Connect API Reference</i>. It
61+
* provides descriptions, syntax, and usage examples for each of the actions for Amazon EC2
62+
* Instance Connect. Amazon EC2 Instance Connect enables system administrators to publish
63+
* one-time use SSH public keys to EC2, providing users a simple and secure way to connect
64+
* to their instances.</p>
65+
* <p>To view the Amazon EC2 Instance Connect content in the <i> Amazon EC2 User
66+
* Guide</i>, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Connect-using-EC2-Instance-Connect.html">Connect to
67+
* your Linux instance using EC2 Instance Connect</a>.</p>
68+
* <p>For Amazon EC2 APIs, see the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Welcome.html">Amazon EC2 API
69+
* Reference</a>.</p>
6370
*/
6471
export class EC2InstanceConnect extends EC2InstanceConnectClient implements EC2InstanceConnect {}
6572
createAggregatedClient(commands, EC2InstanceConnect);

clients/client-ec2-instance-connect/src/EC2InstanceConnectClient.ts

+10-3
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,16 @@ export interface EC2InstanceConnectClientResolvedConfig extends EC2InstanceConne
252252

253253
/**
254254
* @public
255-
* <p>Amazon EC2 Instance Connect enables system administrators to publish one-time use SSH
256-
* public keys to EC2, providing users a simple and secure way to connect to their
257-
* instances.</p>
255+
* <p>This is the <i> Amazon EC2 Instance Connect API Reference</i>. It
256+
* provides descriptions, syntax, and usage examples for each of the actions for Amazon EC2
257+
* Instance Connect. Amazon EC2 Instance Connect enables system administrators to publish
258+
* one-time use SSH public keys to EC2, providing users a simple and secure way to connect
259+
* to their instances.</p>
260+
* <p>To view the Amazon EC2 Instance Connect content in the <i> Amazon EC2 User
261+
* Guide</i>, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Connect-using-EC2-Instance-Connect.html">Connect to
262+
* your Linux instance using EC2 Instance Connect</a>.</p>
263+
* <p>For Amazon EC2 APIs, see the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Welcome.html">Amazon EC2 API
264+
* Reference</a>.</p>
258265
*/
259266
export class EC2InstanceConnectClient extends __Client<
260267
__HttpHandlerOptions,

clients/client-ec2-instance-connect/src/commands/SendSerialConsoleSSHPublicKeyCommand.ts

+3
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ export interface SendSerialConsoleSSHPublicKeyCommandOutput
9999
* @throws {@link SerialConsoleSessionUnavailableException} (server fault)
100100
* <p>Unable to start a serial console session. Please try again.</p>
101101
*
102+
* @throws {@link SerialConsoleSessionUnsupportedException} (client fault)
103+
* <p>Your instance's BIOS version is unsupported for serial console connection. Reboot your instance to update its BIOS, and then try again to connect.</p>
104+
*
102105
* @throws {@link ServiceException} (server fault)
103106
* <p>The service encountered an error. Follow the instructions in the error message and try again.</p>
104107
*

clients/client-ec2-instance-connect/src/index.ts

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
// smithy-typescript generated code
22
/* eslint-disable */
33
/**
4-
* <p>Amazon EC2 Instance Connect enables system administrators to publish one-time use SSH
5-
* public keys to EC2, providing users a simple and secure way to connect to their
6-
* instances.</p>
4+
* <p>This is the <i> Amazon EC2 Instance Connect API Reference</i>. It
5+
* provides descriptions, syntax, and usage examples for each of the actions for Amazon EC2
6+
* Instance Connect. Amazon EC2 Instance Connect enables system administrators to publish
7+
* one-time use SSH public keys to EC2, providing users a simple and secure way to connect
8+
* to their instances.</p>
9+
* <p>To view the Amazon EC2 Instance Connect content in the <i> Amazon EC2 User
10+
* Guide</i>, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Connect-using-EC2-Instance-Connect.html">Connect to
11+
* your Linux instance using EC2 Instance Connect</a>.</p>
12+
* <p>For Amazon EC2 APIs, see the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Welcome.html">Amazon EC2 API
13+
* Reference</a>.</p>
714
*
815
* @packageDocumentation
916
*/

clients/client-ec2-instance-connect/src/models/models_0.ts

+22
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,28 @@ export class SerialConsoleSessionUnavailableException extends __BaseException {
249249
}
250250
}
251251

252+
/**
253+
* @public
254+
* <p>Your instance's BIOS version is unsupported for serial console connection. Reboot your instance to update its BIOS, and then try again to connect.</p>
255+
*/
256+
export class SerialConsoleSessionUnsupportedException extends __BaseException {
257+
readonly name: "SerialConsoleSessionUnsupportedException" = "SerialConsoleSessionUnsupportedException";
258+
readonly $fault: "client" = "client";
259+
Message?: string;
260+
/**
261+
* @internal
262+
*/
263+
constructor(opts: __ExceptionOptionType<SerialConsoleSessionUnsupportedException, __BaseException>) {
264+
super({
265+
name: "SerialConsoleSessionUnsupportedException",
266+
$fault: "client",
267+
...opts,
268+
});
269+
Object.setPrototypeOf(this, SerialConsoleSessionUnsupportedException.prototype);
270+
this.Message = opts.Message;
271+
}
272+
}
273+
252274
/**
253275
* @public
254276
* <p>The service encountered an error. Follow the instructions in the error message and try again.</p>

clients/client-ec2-instance-connect/src/protocols/Aws_json1_1.ts

+22
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import {
3232
SerialConsoleAccessDisabledException,
3333
SerialConsoleSessionLimitExceededException,
3434
SerialConsoleSessionUnavailableException,
35+
SerialConsoleSessionUnsupportedException,
3536
ServiceException,
3637
ThrottlingException,
3738
} from "../models/models_0";
@@ -139,6 +140,9 @@ const de_CommandError = async (output: __HttpResponse, context: __SerdeContext):
139140
case "SerialConsoleSessionUnavailableException":
140141
case "com.amazonaws.ec2instanceconnect#SerialConsoleSessionUnavailableException":
141142
throw await de_SerialConsoleSessionUnavailableExceptionRes(parsedOutput, context);
143+
case "SerialConsoleSessionUnsupportedException":
144+
case "com.amazonaws.ec2instanceconnect#SerialConsoleSessionUnsupportedException":
145+
throw await de_SerialConsoleSessionUnsupportedExceptionRes(parsedOutput, context);
142146
case "ServiceException":
143147
case "com.amazonaws.ec2instanceconnect#ServiceException":
144148
throw await de_ServiceExceptionRes(parsedOutput, context);
@@ -296,6 +300,22 @@ const de_SerialConsoleSessionUnavailableExceptionRes = async (
296300
return __decorateServiceException(exception, body);
297301
};
298302

303+
/**
304+
* deserializeAws_json1_1SerialConsoleSessionUnsupportedExceptionRes
305+
*/
306+
const de_SerialConsoleSessionUnsupportedExceptionRes = async (
307+
parsedOutput: any,
308+
context: __SerdeContext
309+
): Promise<SerialConsoleSessionUnsupportedException> => {
310+
const body = parsedOutput.body;
311+
const deserialized: any = _json(body);
312+
const exception = new SerialConsoleSessionUnsupportedException({
313+
$metadata: deserializeMetadata(parsedOutput),
314+
...deserialized,
315+
});
316+
return __decorateServiceException(exception, body);
317+
};
318+
299319
/**
300320
* deserializeAws_json1_1ServiceExceptionRes
301321
*/
@@ -348,6 +368,8 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont
348368

349369
// de_SerialConsoleSessionUnavailableException omitted.
350370

371+
// de_SerialConsoleSessionUnsupportedException omitted.
372+
351373
// de_ServiceException omitted.
352374

353375
// de_ThrottlingException omitted.

codegen/sdk-codegen/aws-models/ec2-instance-connect.json

+22-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"name": "ec2-instance-connect"
5353
},
5454
"aws.protocols#awsJson1_1": {},
55-
"smithy.api#documentation": "<p>Amazon EC2 Instance Connect enables system administrators to publish one-time use SSH\n public keys to EC2, providing users a simple and secure way to connect to their\n instances.</p>",
55+
"smithy.api#documentation": "<p>This is the <i> Amazon EC2 Instance Connect API Reference</i>. It\n provides descriptions, syntax, and usage examples for each of the actions for Amazon EC2\n Instance Connect. Amazon EC2 Instance Connect enables system administrators to publish\n one-time use SSH public keys to EC2, providing users a simple and secure way to connect\n to their instances.</p>\n <p>To view the Amazon EC2 Instance Connect content in the <i> Amazon EC2 User\n Guide</i>, see <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Connect-using-EC2-Instance-Connect.html\">Connect to\n your Linux instance using EC2 Instance Connect</a>.</p>\n <p>For Amazon EC2 APIs, see the <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Welcome.html\">Amazon EC2 API\n Reference</a>.</p>",
5656
"smithy.api#title": "AWS EC2 Instance Connect",
5757
"smithy.rules#endpointRuleSet": {
5858
"version": "1.0",
@@ -796,7 +796,7 @@
796796
"min": 1,
797797
"max": 32
798798
},
799-
"smithy.api#pattern": "^[A-Za-z_][A-Za-z0-9\\@\\._-]{0,30}[A-Za-z0-9\\$_-]?$"
799+
"smithy.api#pattern": "^(^[A-Za-z_][A-Za-z0-9\\@\\._-]{0,30}[A-Za-z0-9\\$_-]?$)|(^(?=.{2,32}$)[0-9]{1,32}[A-Za-z\\@\\._-][A-Za-z0-9\\@\\._-]*[A-Za-z0-9\\$_-]?$)$"
800800
}
801801
},
802802
"com.amazonaws.ec2instanceconnect#InvalidArgsException": {
@@ -971,6 +971,9 @@
971971
{
972972
"target": "com.amazonaws.ec2instanceconnect#SerialConsoleSessionUnavailableException"
973973
},
974+
{
975+
"target": "com.amazonaws.ec2instanceconnect#SerialConsoleSessionUnsupportedException"
976+
},
974977
{
975978
"target": "com.amazonaws.ec2instanceconnect#ServiceException"
976979
},
@@ -1083,6 +1086,23 @@
10831086
"smithy.api#httpError": 500
10841087
}
10851088
},
1089+
"com.amazonaws.ec2instanceconnect#SerialConsoleSessionUnsupportedException": {
1090+
"type": "structure",
1091+
"members": {
1092+
"Message": {
1093+
"target": "com.amazonaws.ec2instanceconnect#String"
1094+
}
1095+
},
1096+
"traits": {
1097+
"aws.protocols#awsQueryError": {
1098+
"code": "SerialConsoleSessionUnsupported",
1099+
"httpResponseCode": 400
1100+
},
1101+
"smithy.api#documentation": "<p>Your instance's BIOS version is unsupported for serial console connection. Reboot your instance to update its BIOS, and then try again to connect.</p>",
1102+
"smithy.api#error": "client",
1103+
"smithy.api#httpError": 400
1104+
}
1105+
},
10861106
"com.amazonaws.ec2instanceconnect#SerialPort": {
10871107
"type": "integer",
10881108
"traits": {

0 commit comments

Comments
 (0)