#[non_exhaustive]pub enum Error {
Show 13 variants
AuthException(AuthException),
Ec2InstanceNotFoundException(Ec2InstanceNotFoundException),
Ec2InstanceStateInvalidException(Ec2InstanceStateInvalidException),
Ec2InstanceTypeInvalidException(Ec2InstanceTypeInvalidException),
Ec2InstanceUnavailableException(Ec2InstanceUnavailableException),
InvalidArgsException(InvalidArgsException),
SerialConsoleAccessDisabledException(SerialConsoleAccessDisabledException),
SerialConsoleSessionLimitExceededException(SerialConsoleSessionLimitExceededException),
SerialConsoleSessionUnavailableException(SerialConsoleSessionUnavailableException),
SerialConsoleSessionUnsupportedException(SerialConsoleSessionUnsupportedException),
ServiceException(ServiceException),
ThrottlingException(ThrottlingException),
Unhandled(Unhandled),
}
Expand description
All possible error types for this service.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AuthException(AuthException)
Either your AWS credentials are not valid or you do not have access to the EC2 instance.
Ec2InstanceNotFoundException(Ec2InstanceNotFoundException)
The specified instance was not found.
Ec2InstanceStateInvalidException(Ec2InstanceStateInvalidException)
Unable to connect because the instance is not in a valid state. Connecting to a stopped or terminated instance is not supported. If the instance is stopped, start your instance, and try to connect again.
Ec2InstanceTypeInvalidException(Ec2InstanceTypeInvalidException)
The instance type is not supported for connecting via the serial console. Only Nitro instance types are currently supported.
The instance is currently unavailable. Wait a few minutes and try again.
InvalidArgsException(InvalidArgsException)
One of the parameters is not valid.
SerialConsoleAccessDisabledException(SerialConsoleAccessDisabledException)
Your account is not authorized to use the EC2 Serial Console. To authorize your account, run the EnableSerialConsoleAccess API. For more information, see EnableSerialConsoleAccess in the Amazon EC2 API Reference.
SerialConsoleSessionLimitExceededException(SerialConsoleSessionLimitExceededException)
The instance currently has 1 active serial console session. Only 1 session is supported at a time.
Unable to start a serial console session. Please try again.
SerialConsoleSessionUnsupportedException(SerialConsoleSessionUnsupportedException)
Your instance's BIOS version is unsupported for serial console connection. Reboot your instance to update its BIOS, and then try again to connect.
ServiceException(ServiceException)
The service encountered an error. Follow the instructions in the error message and try again.
ThrottlingException(ThrottlingException)
The requests were made too frequently and have been throttled. Wait a while and try again. To increase the limit on your request frequency, contact AWS Support.
Unhandled(Unhandled)
Unhandled
directly is not forwards compatible. Instead, match using a variable wildcard pattern and check .code()
:
err if err.code() == Some("SpecificExceptionCode") => { /* handle the error */ }
See ProvideErrorMetadata
for what information is available for the error.An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
Trait Implementations§
source§impl Error for Error
impl Error for Error
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl From<BuildError> for Error
impl From<BuildError> for Error
source§fn from(value: BuildError) -> Self
fn from(value: BuildError) -> Self
source§impl<R> From<SdkError<SendSSHPublicKeyError, R>> for Error
impl<R> From<SdkError<SendSSHPublicKeyError, R>> for Error
source§fn from(err: SdkError<SendSSHPublicKeyError, R>) -> Self
fn from(err: SdkError<SendSSHPublicKeyError, R>) -> Self
source§impl<R> From<SdkError<SendSerialConsoleSSHPublicKeyError, R>> for Error
impl<R> From<SdkError<SendSerialConsoleSSHPublicKeyError, R>> for Error
source§fn from(err: SdkError<SendSerialConsoleSSHPublicKeyError, R>) -> Self
fn from(err: SdkError<SendSerialConsoleSSHPublicKeyError, R>) -> Self
source§impl From<SendSSHPublicKeyError> for Error
impl From<SendSSHPublicKeyError> for Error
source§fn from(err: SendSSHPublicKeyError) -> Self
fn from(err: SendSSHPublicKeyError) -> Self
source§impl From<SendSerialConsoleSSHPublicKeyError> for Error
impl From<SendSerialConsoleSSHPublicKeyError> for Error
source§fn from(err: SendSerialConsoleSSHPublicKeyError) -> Self
fn from(err: SendSerialConsoleSSHPublicKeyError) -> Self
source§impl ProvideErrorMetadata for Error
impl ProvideErrorMetadata for Error
source§fn meta(&self) -> &ErrorMetadata
fn meta(&self) -> &ErrorMetadata
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more