Skip to content

Commit

Permalink
feat(client-ec2-instance-connect): This release includes a new except…
Browse files Browse the repository at this point in the history
…ion type "SerialConsoleSessionUnsupportedException" for SendSerialConsoleSSHPublicKey API.
  • Loading branch information
awstools committed Mar 14, 2024
1 parent 5e6af3f commit 0bce168
Show file tree
Hide file tree
Showing 8 changed files with 109 additions and 14 deletions.
13 changes: 10 additions & 3 deletions clients/client-ec2-instance-connect/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,16 @@

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

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

## Installing

Expand Down
13 changes: 10 additions & 3 deletions clients/client-ec2-instance-connect/src/EC2InstanceConnect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,16 @@ export interface EC2InstanceConnect {

/**
* @public
* <p>Amazon EC2 Instance Connect enables system administrators to publish one-time use SSH
* public keys to EC2, providing users a simple and secure way to connect to their
* instances.</p>
* <p>This is the <i> Amazon EC2 Instance Connect API Reference</i>. It
* provides descriptions, syntax, and usage examples for each of the actions for Amazon EC2
* Instance Connect. Amazon EC2 Instance Connect enables system administrators to publish
* one-time use SSH public keys to EC2, providing users a simple and secure way to connect
* to their instances.</p>
* <p>To view the Amazon EC2 Instance Connect content in the <i> Amazon EC2 User
* Guide</i>, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Connect-using-EC2-Instance-Connect.html">Connect to
* your Linux instance using EC2 Instance Connect</a>.</p>
* <p>For Amazon EC2 APIs, see the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Welcome.html">Amazon EC2 API
* Reference</a>.</p>
*/
export class EC2InstanceConnect extends EC2InstanceConnectClient implements EC2InstanceConnect {}
createAggregatedClient(commands, EC2InstanceConnect);
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,16 @@ export interface EC2InstanceConnectClientResolvedConfig extends EC2InstanceConne

/**
* @public
* <p>Amazon EC2 Instance Connect enables system administrators to publish one-time use SSH
* public keys to EC2, providing users a simple and secure way to connect to their
* instances.</p>
* <p>This is the <i> Amazon EC2 Instance Connect API Reference</i>. It
* provides descriptions, syntax, and usage examples for each of the actions for Amazon EC2
* Instance Connect. Amazon EC2 Instance Connect enables system administrators to publish
* one-time use SSH public keys to EC2, providing users a simple and secure way to connect
* to their instances.</p>
* <p>To view the Amazon EC2 Instance Connect content in the <i> Amazon EC2 User
* Guide</i>, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Connect-using-EC2-Instance-Connect.html">Connect to
* your Linux instance using EC2 Instance Connect</a>.</p>
* <p>For Amazon EC2 APIs, see the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Welcome.html">Amazon EC2 API
* Reference</a>.</p>
*/
export class EC2InstanceConnectClient extends __Client<
__HttpHandlerOptions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ export interface SendSerialConsoleSSHPublicKeyCommandOutput
* @throws {@link SerialConsoleSessionUnavailableException} (server fault)
* <p>Unable to start a serial console session. Please try again.</p>
*
* @throws {@link SerialConsoleSessionUnsupportedException} (client fault)
* <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>
*
* @throws {@link ServiceException} (server fault)
* <p>The service encountered an error. Follow the instructions in the error message and try again.</p>
*
Expand Down
13 changes: 10 additions & 3 deletions clients/client-ec2-instance-connect/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
// smithy-typescript generated code
/* eslint-disable */
/**
* <p>Amazon EC2 Instance Connect enables system administrators to publish one-time use SSH
* public keys to EC2, providing users a simple and secure way to connect to their
* instances.</p>
* <p>This is the <i> Amazon EC2 Instance Connect API Reference</i>. It
* provides descriptions, syntax, and usage examples for each of the actions for Amazon EC2
* Instance Connect. Amazon EC2 Instance Connect enables system administrators to publish
* one-time use SSH public keys to EC2, providing users a simple and secure way to connect
* to their instances.</p>
* <p>To view the Amazon EC2 Instance Connect content in the <i> Amazon EC2 User
* Guide</i>, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Connect-using-EC2-Instance-Connect.html">Connect to
* your Linux instance using EC2 Instance Connect</a>.</p>
* <p>For Amazon EC2 APIs, see the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Welcome.html">Amazon EC2 API
* Reference</a>.</p>
*
* @packageDocumentation
*/
Expand Down
22 changes: 22 additions & 0 deletions clients/client-ec2-instance-connect/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,28 @@ export class SerialConsoleSessionUnavailableException extends __BaseException {
}
}

/**
* @public
* <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>
*/
export class SerialConsoleSessionUnsupportedException extends __BaseException {
readonly name: "SerialConsoleSessionUnsupportedException" = "SerialConsoleSessionUnsupportedException";
readonly $fault: "client" = "client";
Message?: string;
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<SerialConsoleSessionUnsupportedException, __BaseException>) {
super({
name: "SerialConsoleSessionUnsupportedException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, SerialConsoleSessionUnsupportedException.prototype);
this.Message = opts.Message;
}
}

/**
* @public
* <p>The service encountered an error. Follow the instructions in the error message and try again.</p>
Expand Down
22 changes: 22 additions & 0 deletions clients/client-ec2-instance-connect/src/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import {
SerialConsoleAccessDisabledException,
SerialConsoleSessionLimitExceededException,
SerialConsoleSessionUnavailableException,
SerialConsoleSessionUnsupportedException,
ServiceException,
ThrottlingException,
} from "../models/models_0";
Expand Down Expand Up @@ -139,6 +140,9 @@ const de_CommandError = async (output: __HttpResponse, context: __SerdeContext):
case "SerialConsoleSessionUnavailableException":
case "com.amazonaws.ec2instanceconnect#SerialConsoleSessionUnavailableException":
throw await de_SerialConsoleSessionUnavailableExceptionRes(parsedOutput, context);
case "SerialConsoleSessionUnsupportedException":
case "com.amazonaws.ec2instanceconnect#SerialConsoleSessionUnsupportedException":
throw await de_SerialConsoleSessionUnsupportedExceptionRes(parsedOutput, context);
case "ServiceException":
case "com.amazonaws.ec2instanceconnect#ServiceException":
throw await de_ServiceExceptionRes(parsedOutput, context);
Expand Down Expand Up @@ -296,6 +300,22 @@ const de_SerialConsoleSessionUnavailableExceptionRes = async (
return __decorateServiceException(exception, body);
};

/**
* deserializeAws_json1_1SerialConsoleSessionUnsupportedExceptionRes
*/
const de_SerialConsoleSessionUnsupportedExceptionRes = async (
parsedOutput: any,
context: __SerdeContext
): Promise<SerialConsoleSessionUnsupportedException> => {
const body = parsedOutput.body;
const deserialized: any = _json(body);
const exception = new SerialConsoleSessionUnsupportedException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
});
return __decorateServiceException(exception, body);
};

/**
* deserializeAws_json1_1ServiceExceptionRes
*/
Expand Down Expand Up @@ -348,6 +368,8 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont

// de_SerialConsoleSessionUnavailableException omitted.

// de_SerialConsoleSessionUnsupportedException omitted.

// de_ServiceException omitted.

// de_ThrottlingException omitted.
Expand Down
24 changes: 22 additions & 2 deletions codegen/sdk-codegen/aws-models/ec2-instance-connect.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"name": "ec2-instance-connect"
},
"aws.protocols#awsJson1_1": {},
"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>",
"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>",
"smithy.api#title": "AWS EC2 Instance Connect",
"smithy.rules#endpointRuleSet": {
"version": "1.0",
Expand Down Expand Up @@ -796,7 +796,7 @@
"min": 1,
"max": 32
},
"smithy.api#pattern": "^[A-Za-z_][A-Za-z0-9\\@\\._-]{0,30}[A-Za-z0-9\\$_-]?$"
"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\\$_-]?$)$"
}
},
"com.amazonaws.ec2instanceconnect#InvalidArgsException": {
Expand Down Expand Up @@ -971,6 +971,9 @@
{
"target": "com.amazonaws.ec2instanceconnect#SerialConsoleSessionUnavailableException"
},
{
"target": "com.amazonaws.ec2instanceconnect#SerialConsoleSessionUnsupportedException"
},
{
"target": "com.amazonaws.ec2instanceconnect#ServiceException"
},
Expand Down Expand Up @@ -1083,6 +1086,23 @@
"smithy.api#httpError": 500
}
},
"com.amazonaws.ec2instanceconnect#SerialConsoleSessionUnsupportedException": {
"type": "structure",
"members": {
"Message": {
"target": "com.amazonaws.ec2instanceconnect#String"
}
},
"traits": {
"aws.protocols#awsQueryError": {
"code": "SerialConsoleSessionUnsupported",
"httpResponseCode": 400
},
"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>",
"smithy.api#error": "client",
"smithy.api#httpError": 400
}
},
"com.amazonaws.ec2instanceconnect#SerialPort": {
"type": "integer",
"traits": {
Expand Down

0 comments on commit 0bce168

Please sign in to comment.