diff --git a/clients/client-ec2-instance-connect/README.md b/clients/client-ec2-instance-connect/README.md index 002923b44fac..9502c92caf6e 100644 --- a/clients/client-ec2-instance-connect/README.md +++ b/clients/client-ec2-instance-connect/README.md @@ -6,9 +6,16 @@ AWS SDK for JavaScript EC2InstanceConnect Client for Node.js, Browser and React Native. -

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.

+

This is the Amazon EC2 Instance Connect API Reference. 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.

+

To view the Amazon EC2 Instance Connect content in the Amazon EC2 User +Guide, see Connect to +your Linux instance using EC2 Instance Connect.

+

For Amazon EC2 APIs, see the Amazon EC2 API +Reference.

## Installing diff --git a/clients/client-ec2-instance-connect/src/EC2InstanceConnect.ts b/clients/client-ec2-instance-connect/src/EC2InstanceConnect.ts index 48b5ca6e8254..2cb09039fecb 100644 --- a/clients/client-ec2-instance-connect/src/EC2InstanceConnect.ts +++ b/clients/client-ec2-instance-connect/src/EC2InstanceConnect.ts @@ -57,9 +57,16 @@ export interface EC2InstanceConnect { /** * @public - *

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.

+ *

This is the Amazon EC2 Instance Connect API Reference. 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.

+ *

To view the Amazon EC2 Instance Connect content in the Amazon EC2 User + * Guide, see Connect to + * your Linux instance using EC2 Instance Connect.

+ *

For Amazon EC2 APIs, see the Amazon EC2 API + * Reference.

*/ export class EC2InstanceConnect extends EC2InstanceConnectClient implements EC2InstanceConnect {} createAggregatedClient(commands, EC2InstanceConnect); diff --git a/clients/client-ec2-instance-connect/src/EC2InstanceConnectClient.ts b/clients/client-ec2-instance-connect/src/EC2InstanceConnectClient.ts index ab1c4c5dd1dd..02a825ef7c95 100644 --- a/clients/client-ec2-instance-connect/src/EC2InstanceConnectClient.ts +++ b/clients/client-ec2-instance-connect/src/EC2InstanceConnectClient.ts @@ -252,9 +252,16 @@ export interface EC2InstanceConnectClientResolvedConfig extends EC2InstanceConne /** * @public - *

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.

+ *

This is the Amazon EC2 Instance Connect API Reference. 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.

+ *

To view the Amazon EC2 Instance Connect content in the Amazon EC2 User + * Guide, see Connect to + * your Linux instance using EC2 Instance Connect.

+ *

For Amazon EC2 APIs, see the Amazon EC2 API + * Reference.

*/ export class EC2InstanceConnectClient extends __Client< __HttpHandlerOptions, diff --git a/clients/client-ec2-instance-connect/src/commands/SendSerialConsoleSSHPublicKeyCommand.ts b/clients/client-ec2-instance-connect/src/commands/SendSerialConsoleSSHPublicKeyCommand.ts index 97a2682bed15..aedadec00296 100644 --- a/clients/client-ec2-instance-connect/src/commands/SendSerialConsoleSSHPublicKeyCommand.ts +++ b/clients/client-ec2-instance-connect/src/commands/SendSerialConsoleSSHPublicKeyCommand.ts @@ -99,6 +99,9 @@ export interface SendSerialConsoleSSHPublicKeyCommandOutput * @throws {@link SerialConsoleSessionUnavailableException} (server fault) *

Unable to start a serial console session. Please try again.

* + * @throws {@link SerialConsoleSessionUnsupportedException} (client fault) + *

Your instance's BIOS version is unsupported for serial console connection. Reboot your instance to update its BIOS, and then try again to connect.

+ * * @throws {@link ServiceException} (server fault) *

The service encountered an error. Follow the instructions in the error message and try again.

* diff --git a/clients/client-ec2-instance-connect/src/index.ts b/clients/client-ec2-instance-connect/src/index.ts index d2e95c96ab86..95fa5328186a 100644 --- a/clients/client-ec2-instance-connect/src/index.ts +++ b/clients/client-ec2-instance-connect/src/index.ts @@ -1,9 +1,16 @@ // smithy-typescript generated code /* eslint-disable */ /** - *

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.

+ *

This is the Amazon EC2 Instance Connect API Reference. 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.

+ *

To view the Amazon EC2 Instance Connect content in the Amazon EC2 User + * Guide, see Connect to + * your Linux instance using EC2 Instance Connect.

+ *

For Amazon EC2 APIs, see the Amazon EC2 API + * Reference.

* * @packageDocumentation */ diff --git a/clients/client-ec2-instance-connect/src/models/models_0.ts b/clients/client-ec2-instance-connect/src/models/models_0.ts index eaf21a0e376b..d7ed8ec2cbf7 100644 --- a/clients/client-ec2-instance-connect/src/models/models_0.ts +++ b/clients/client-ec2-instance-connect/src/models/models_0.ts @@ -249,6 +249,28 @@ export class SerialConsoleSessionUnavailableException extends __BaseException { } } +/** + * @public + *

Your instance's BIOS version is unsupported for serial console connection. Reboot your instance to update its BIOS, and then try again to connect.

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

The service encountered an error. Follow the instructions in the error message and try again.

diff --git a/clients/client-ec2-instance-connect/src/protocols/Aws_json1_1.ts b/clients/client-ec2-instance-connect/src/protocols/Aws_json1_1.ts index 24c4ed418095..1f4054c6de10 100644 --- a/clients/client-ec2-instance-connect/src/protocols/Aws_json1_1.ts +++ b/clients/client-ec2-instance-connect/src/protocols/Aws_json1_1.ts @@ -32,6 +32,7 @@ import { SerialConsoleAccessDisabledException, SerialConsoleSessionLimitExceededException, SerialConsoleSessionUnavailableException, + SerialConsoleSessionUnsupportedException, ServiceException, ThrottlingException, } from "../models/models_0"; @@ -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); @@ -296,6 +300,22 @@ const de_SerialConsoleSessionUnavailableExceptionRes = async ( return __decorateServiceException(exception, body); }; +/** + * deserializeAws_json1_1SerialConsoleSessionUnsupportedExceptionRes + */ +const de_SerialConsoleSessionUnsupportedExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new SerialConsoleSessionUnsupportedException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + /** * deserializeAws_json1_1ServiceExceptionRes */ @@ -348,6 +368,8 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont // de_SerialConsoleSessionUnavailableException omitted. +// de_SerialConsoleSessionUnsupportedException omitted. + // de_ServiceException omitted. // de_ThrottlingException omitted. diff --git a/codegen/sdk-codegen/aws-models/ec2-instance-connect.json b/codegen/sdk-codegen/aws-models/ec2-instance-connect.json index 295d5658bf55..63b53db67cb0 100644 --- a/codegen/sdk-codegen/aws-models/ec2-instance-connect.json +++ b/codegen/sdk-codegen/aws-models/ec2-instance-connect.json @@ -52,7 +52,7 @@ "name": "ec2-instance-connect" }, "aws.protocols#awsJson1_1": {}, - "smithy.api#documentation": "

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.

", + "smithy.api#documentation": "

This is the Amazon EC2 Instance Connect API Reference. 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.

\n

To view the Amazon EC2 Instance Connect content in the Amazon EC2 User\n Guide, see Connect to\n your Linux instance using EC2 Instance Connect.

\n

For Amazon EC2 APIs, see the Amazon EC2 API\n Reference.

", "smithy.api#title": "AWS EC2 Instance Connect", "smithy.rules#endpointRuleSet": { "version": "1.0", @@ -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": { @@ -971,6 +971,9 @@ { "target": "com.amazonaws.ec2instanceconnect#SerialConsoleSessionUnavailableException" }, + { + "target": "com.amazonaws.ec2instanceconnect#SerialConsoleSessionUnsupportedException" + }, { "target": "com.amazonaws.ec2instanceconnect#ServiceException" }, @@ -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": "

Your instance's BIOS version is unsupported for serial console connection. Reboot your instance to update its BIOS, and then try again to connect.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, "com.amazonaws.ec2instanceconnect#SerialPort": { "type": "integer", "traits": {