#[non_exhaustive]pub enum GetCommandInvocationError {
InternalServerError(InternalServerError),
InvalidCommandId(InvalidCommandId),
InvalidInstanceId(InvalidInstanceId),
InvalidPluginName(InvalidPluginName),
InvocationDoesNotExist(InvocationDoesNotExist),
Unhandled(Unhandled),
}
Expand description
Error type for the GetCommandInvocationError
operation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InternalServerError(InternalServerError)
An error occurred on the server side.
InvalidCommandId(InvalidCommandId)
The specified command ID isn't valid. Verify the ID and try again.
InvalidInstanceId(InvalidInstanceId)
The following problems can cause this exception:
-
You don't have permission to access the managed node.
-
Amazon Web Services Systems Manager Agent (SSM Agent) isn't running. Verify that SSM Agent is running.
-
SSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM Agent.
-
The managed node isn't in a valid state. Valid states are:
Running
,Pending
,Stopped
, andStopping
. Invalid states are:Shutting-down
andTerminated
.
InvalidPluginName(InvalidPluginName)
The plugin name isn't valid.
InvocationDoesNotExist(InvocationDoesNotExist)
The command ID and managed node ID you specified didn't match any invocations. Verify the command ID and the managed node ID and try again.
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 GetCommandInvocationError
impl GetCommandInvocationError
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 GetCommandInvocationError::Unhandled
variant from any error type.
sourcepub fn generic(err: ErrorMetadata) -> Self
pub fn generic(err: ErrorMetadata) -> Self
Creates the GetCommandInvocationError::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_internal_server_error(&self) -> bool
pub fn is_internal_server_error(&self) -> bool
Returns true
if the error kind is GetCommandInvocationError::InternalServerError
.
sourcepub fn is_invalid_command_id(&self) -> bool
pub fn is_invalid_command_id(&self) -> bool
Returns true
if the error kind is GetCommandInvocationError::InvalidCommandId
.
sourcepub fn is_invalid_instance_id(&self) -> bool
pub fn is_invalid_instance_id(&self) -> bool
Returns true
if the error kind is GetCommandInvocationError::InvalidInstanceId
.
sourcepub fn is_invalid_plugin_name(&self) -> bool
pub fn is_invalid_plugin_name(&self) -> bool
Returns true
if the error kind is GetCommandInvocationError::InvalidPluginName
.
sourcepub fn is_invocation_does_not_exist(&self) -> bool
pub fn is_invocation_does_not_exist(&self) -> bool
Returns true
if the error kind is GetCommandInvocationError::InvocationDoesNotExist
.
Trait Implementations§
source§impl CreateUnhandledError for GetCommandInvocationError
impl CreateUnhandledError for GetCommandInvocationError
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 GetCommandInvocationError
impl Debug for GetCommandInvocationError
source§impl Display for GetCommandInvocationError
impl Display for GetCommandInvocationError
source§impl Error for GetCommandInvocationError
impl Error for GetCommandInvocationError
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<GetCommandInvocationError> for Error
impl From<GetCommandInvocationError> for Error
source§fn from(err: GetCommandInvocationError) -> Self
fn from(err: GetCommandInvocationError) -> Self
source§impl ProvideErrorMetadata for GetCommandInvocationError
impl ProvideErrorMetadata for GetCommandInvocationError
source§fn meta(&self) -> &ErrorMetadata
fn meta(&self) -> &ErrorMetadata
source§impl RequestId for GetCommandInvocationError
impl RequestId for GetCommandInvocationError
source§fn request_id(&self) -> Option<&str>
fn request_id(&self) -> Option<&str>
None
if the service could not be reached.