#[non_exhaustive]pub enum ExecuteCommandError {
AccessDeniedException(AccessDeniedException),
ClientException(ClientException),
ClusterNotFoundException(ClusterNotFoundException),
InvalidParameterException(InvalidParameterException),
ServerException(ServerException),
TargetNotConnectedException(TargetNotConnectedException),
Unhandled(Unhandled),
}
Expand description
Error type for the ExecuteCommandError
operation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AccessDeniedException(AccessDeniedException)
You don't have authorization to perform the requested action.
ClientException(ClientException)
These errors are usually caused by a client action. This client action might be using an action or resource on behalf of a user that doesn't have permissions to use the action or resource,. Or, it might be specifying an identifier that isn't valid.
ClusterNotFoundException(ClusterNotFoundException)
The specified cluster wasn't found. You can view your available clusters with ListClusters
. Amazon ECS clusters are Region specific.
InvalidParameterException(InvalidParameterException)
The specified parameter isn't valid. Review the available parameters for the API request.
ServerException(ServerException)
These errors are usually caused by a server issue.
TargetNotConnectedException(TargetNotConnectedException)
The execute command cannot run. This error can be caused by any of the following configuration issues:
-
Incorrect IAM permissions
-
The SSM agent is not installed or is not running
-
There is an interface Amazon VPC endpoint for Amazon ECS, but there is not one for Systems Manager Session Manager
For information about how to troubleshoot the issues, see Troubleshooting issues with ECS Exec in the Amazon Elastic Container Service Developer Guide.
Unhandled(Unhandled)
An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
Implementations§
source§impl ExecuteCommandError
impl ExecuteCommandError
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 ExecuteCommandError::Unhandled
variant from any error type.
sourcepub fn generic(err: ErrorMetadata) -> Self
pub fn generic(err: ErrorMetadata) -> Self
Creates the ExecuteCommandError::Unhandled
variant from a ::aws_smithy_types::error::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_access_denied_exception(&self) -> bool
pub fn is_access_denied_exception(&self) -> bool
Returns true
if the error kind is ExecuteCommandError::AccessDeniedException
.
sourcepub fn is_client_exception(&self) -> bool
pub fn is_client_exception(&self) -> bool
Returns true
if the error kind is ExecuteCommandError::ClientException
.
sourcepub fn is_cluster_not_found_exception(&self) -> bool
pub fn is_cluster_not_found_exception(&self) -> bool
Returns true
if the error kind is ExecuteCommandError::ClusterNotFoundException
.
sourcepub fn is_invalid_parameter_exception(&self) -> bool
pub fn is_invalid_parameter_exception(&self) -> bool
Returns true
if the error kind is ExecuteCommandError::InvalidParameterException
.
sourcepub fn is_server_exception(&self) -> bool
pub fn is_server_exception(&self) -> bool
Returns true
if the error kind is ExecuteCommandError::ServerException
.
sourcepub fn is_target_not_connected_exception(&self) -> bool
pub fn is_target_not_connected_exception(&self) -> bool
Returns true
if the error kind is ExecuteCommandError::TargetNotConnectedException
.
Trait Implementations§
source§impl CreateUnhandledError for ExecuteCommandError
impl CreateUnhandledError for ExecuteCommandError
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 ExecuteCommandError
impl Debug for ExecuteCommandError
source§impl Display for ExecuteCommandError
impl Display for ExecuteCommandError
source§impl Error for ExecuteCommandError
impl Error for ExecuteCommandError
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<ExecuteCommandError> for Error
impl From<ExecuteCommandError> for Error
source§fn from(err: ExecuteCommandError) -> Self
fn from(err: ExecuteCommandError) -> Self
source§impl ProvideErrorMetadata for ExecuteCommandError
impl ProvideErrorMetadata for ExecuteCommandError
source§fn meta(&self) -> &ErrorMetadata
fn meta(&self) -> &ErrorMetadata
source§impl RequestId for ExecuteCommandError
impl RequestId for ExecuteCommandError
source§fn request_id(&self) -> Option<&str>
fn request_id(&self) -> Option<&str>
None
if the service could not be reached.