#[non_exhaustive]pub enum SendCommandError {
DuplicateInstanceId(DuplicateInstanceId),
InternalServerError(InternalServerError),
InvalidDocument(InvalidDocument),
InvalidDocumentVersion(InvalidDocumentVersion),
InvalidInstanceId(InvalidInstanceId),
InvalidNotificationConfig(InvalidNotificationConfig),
InvalidOutputFolder(InvalidOutputFolder),
InvalidParameters(InvalidParameters),
InvalidRole(InvalidRole),
MaxDocumentSizeExceeded(MaxDocumentSizeExceeded),
UnsupportedPlatformType(UnsupportedPlatformType),
Unhandled(Unhandled),
}
Expand description
Error type for the SendCommandError
operation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
DuplicateInstanceId(DuplicateInstanceId)
You can't specify a managed node ID in more than one association.
InternalServerError(InternalServerError)
An error occurred on the server side.
InvalidDocument(InvalidDocument)
The specified SSM document doesn't exist.
InvalidDocumentVersion(InvalidDocumentVersion)
The document version isn't valid or doesn't exist.
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
.
InvalidNotificationConfig(InvalidNotificationConfig)
One or more configuration items isn't valid. Verify that a valid Amazon Resource Name (ARN) was provided for an Amazon Simple Notification Service topic.
InvalidOutputFolder(InvalidOutputFolder)
The S3 bucket doesn't exist.
InvalidParameters(InvalidParameters)
You must specify values for all required parameters in the Amazon Web Services Systems Manager document (SSM document). You can only supply values to parameters defined in the SSM document.
InvalidRole(InvalidRole)
The role name can't contain invalid characters. Also verify that you specified an IAM role for notifications that includes the required trust policy. For information about configuring the IAM role for Run Command notifications, see Monitoring Systems Manager status changes using Amazon SNS notifications in the Amazon Web Services Systems Manager User Guide.
MaxDocumentSizeExceeded(MaxDocumentSizeExceeded)
The size limit of a document is 64 KB.
UnsupportedPlatformType(UnsupportedPlatformType)
The document doesn't support the platform type of the given managed node IDs. For example, you sent an document for a Windows managed node to a Linux node.
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 SendCommandError
impl SendCommandError
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 SendCommandError::Unhandled
variant from any error type.
sourcepub fn generic(err: ErrorMetadata) -> Self
pub fn generic(err: ErrorMetadata) -> Self
Creates the SendCommandError::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_duplicate_instance_id(&self) -> bool
pub fn is_duplicate_instance_id(&self) -> bool
Returns true
if the error kind is SendCommandError::DuplicateInstanceId
.
sourcepub fn is_internal_server_error(&self) -> bool
pub fn is_internal_server_error(&self) -> bool
Returns true
if the error kind is SendCommandError::InternalServerError
.
sourcepub fn is_invalid_document(&self) -> bool
pub fn is_invalid_document(&self) -> bool
Returns true
if the error kind is SendCommandError::InvalidDocument
.
sourcepub fn is_invalid_document_version(&self) -> bool
pub fn is_invalid_document_version(&self) -> bool
Returns true
if the error kind is SendCommandError::InvalidDocumentVersion
.
sourcepub fn is_invalid_instance_id(&self) -> bool
pub fn is_invalid_instance_id(&self) -> bool
Returns true
if the error kind is SendCommandError::InvalidInstanceId
.
sourcepub fn is_invalid_notification_config(&self) -> bool
pub fn is_invalid_notification_config(&self) -> bool
Returns true
if the error kind is SendCommandError::InvalidNotificationConfig
.
sourcepub fn is_invalid_output_folder(&self) -> bool
pub fn is_invalid_output_folder(&self) -> bool
Returns true
if the error kind is SendCommandError::InvalidOutputFolder
.
sourcepub fn is_invalid_parameters(&self) -> bool
pub fn is_invalid_parameters(&self) -> bool
Returns true
if the error kind is SendCommandError::InvalidParameters
.
sourcepub fn is_invalid_role(&self) -> bool
pub fn is_invalid_role(&self) -> bool
Returns true
if the error kind is SendCommandError::InvalidRole
.
sourcepub fn is_max_document_size_exceeded(&self) -> bool
pub fn is_max_document_size_exceeded(&self) -> bool
Returns true
if the error kind is SendCommandError::MaxDocumentSizeExceeded
.
sourcepub fn is_unsupported_platform_type(&self) -> bool
pub fn is_unsupported_platform_type(&self) -> bool
Returns true
if the error kind is SendCommandError::UnsupportedPlatformType
.
Trait Implementations§
source§impl CreateUnhandledError for SendCommandError
impl CreateUnhandledError for SendCommandError
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 SendCommandError
impl Debug for SendCommandError
source§impl Display for SendCommandError
impl Display for SendCommandError
source§impl Error for SendCommandError
impl Error for SendCommandError
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<SendCommandError> for Error
impl From<SendCommandError> for Error
source§fn from(err: SendCommandError) -> Self
fn from(err: SendCommandError) -> Self
source§impl ProvideErrorKind for SendCommandError
impl ProvideErrorKind for SendCommandError
source§impl ProvideErrorMetadata for SendCommandError
impl ProvideErrorMetadata for SendCommandError
source§fn meta(&self) -> &ErrorMetadata
fn meta(&self) -> &ErrorMetadata
source§impl RequestId for SendCommandError
impl RequestId for SendCommandError
source§fn request_id(&self) -> Option<&str>
fn request_id(&self) -> Option<&str>
None
if the service could not be reached.Auto Trait Implementations§
impl Freeze for SendCommandError
impl !RefUnwindSafe for SendCommandError
impl Send for SendCommandError
impl Sync for SendCommandError
impl Unpin for SendCommandError
impl !UnwindSafe for SendCommandError
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