#[non_exhaustive]pub enum SendSSHPublicKeyError {
AuthException(AuthException),
Ec2InstanceNotFoundException(Ec2InstanceNotFoundException),
Ec2InstanceStateInvalidException(Ec2InstanceStateInvalidException),
Ec2InstanceUnavailableException(Ec2InstanceUnavailableException),
InvalidArgsException(InvalidArgsException),
ServiceException(ServiceException),
ThrottlingException(ThrottlingException),
Unhandled(Unhandled),
}
Expand description
Error type for the SendSSHPublicKeyError
operation.
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.
The instance is currently unavailable. Wait a few minutes and try again.
InvalidArgsException(InvalidArgsException)
One of the parameters is not valid.
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).
Implementations§
source§impl SendSSHPublicKeyError
impl SendSSHPublicKeyError
sourcepub fn unhandled(err: impl Into<Box<dyn Error + Send + Sync + 'static>>) -> Self
pub fn unhandled(err: impl Into<Box<dyn Error + Send + Sync + 'static>>) -> Self
Creates the SendSSHPublicKeyError::Unhandled
variant from any error type.
sourcepub fn generic(err: ErrorMetadata) -> Self
pub fn generic(err: ErrorMetadata) -> Self
Creates the SendSSHPublicKeyError::Unhandled
variant from an ErrorMetadata
.
sourcepub fn meta(&self) -> &ErrorMetadata
pub fn meta(&self) -> &ErrorMetadata
Returns error metadata, which includes the error code, message, request ID, and potentially additional information.
sourcepub fn is_auth_exception(&self) -> bool
pub fn is_auth_exception(&self) -> bool
Returns true
if the error kind is SendSSHPublicKeyError::AuthException
.
sourcepub fn is_ec2_instance_not_found_exception(&self) -> bool
pub fn is_ec2_instance_not_found_exception(&self) -> bool
Returns true
if the error kind is SendSSHPublicKeyError::Ec2InstanceNotFoundException
.
sourcepub fn is_ec2_instance_state_invalid_exception(&self) -> bool
pub fn is_ec2_instance_state_invalid_exception(&self) -> bool
Returns true
if the error kind is SendSSHPublicKeyError::Ec2InstanceStateInvalidException
.
Returns true
if the error kind is SendSSHPublicKeyError::Ec2InstanceUnavailableException
.
sourcepub fn is_invalid_args_exception(&self) -> bool
pub fn is_invalid_args_exception(&self) -> bool
Returns true
if the error kind is SendSSHPublicKeyError::InvalidArgsException
.
sourcepub fn is_service_exception(&self) -> bool
pub fn is_service_exception(&self) -> bool
Returns true
if the error kind is SendSSHPublicKeyError::ServiceException
.
sourcepub fn is_throttling_exception(&self) -> bool
pub fn is_throttling_exception(&self) -> bool
Returns true
if the error kind is SendSSHPublicKeyError::ThrottlingException
.
Trait Implementations§
source§impl CreateUnhandledError for SendSSHPublicKeyError
impl CreateUnhandledError for SendSSHPublicKeyError
source§fn create_unhandled_error(
source: Box<dyn Error + Send + Sync + 'static>,
meta: Option<ErrorMetadata>
) -> Self
fn create_unhandled_error( source: Box<dyn Error + Send + Sync + 'static>, meta: Option<ErrorMetadata> ) -> Self
source
and error metadata.source§impl Debug for SendSSHPublicKeyError
impl Debug for SendSSHPublicKeyError
source§impl Display for SendSSHPublicKeyError
impl Display for SendSSHPublicKeyError
source§impl Error for SendSSHPublicKeyError
impl Error for SendSSHPublicKeyError
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<SendSSHPublicKeyError> for Error
impl From<SendSSHPublicKeyError> for Error
source§fn from(err: SendSSHPublicKeyError) -> Self
fn from(err: SendSSHPublicKeyError) -> Self
source§impl ProvideErrorMetadata for SendSSHPublicKeyError
impl ProvideErrorMetadata for SendSSHPublicKeyError
source§fn meta(&self) -> &ErrorMetadata
fn meta(&self) -> &ErrorMetadata
source§impl RequestId for SendSSHPublicKeyError
impl RequestId for SendSSHPublicKeyError
source§fn request_id(&self) -> Option<&str>
fn request_id(&self) -> Option<&str>
None
if the service could not be reached.