Enum aws_sdk_codedeploy::operation::register_on_premises_instance::RegisterOnPremisesInstanceError
source · #[non_exhaustive]pub enum RegisterOnPremisesInstanceError {
IamArnRequiredException(IamArnRequiredException),
IamSessionArnAlreadyRegisteredException(IamSessionArnAlreadyRegisteredException),
IamUserArnAlreadyRegisteredException(IamUserArnAlreadyRegisteredException),
IamUserArnRequiredException(IamUserArnRequiredException),
InstanceNameAlreadyRegisteredException(InstanceNameAlreadyRegisteredException),
InstanceNameRequiredException(InstanceNameRequiredException),
InvalidIamSessionArnException(InvalidIamSessionArnException),
InvalidIamUserArnException(InvalidIamUserArnException),
InvalidInstanceNameException(InvalidInstanceNameException),
MultipleIamArnsProvidedException(MultipleIamArnsProvidedException),
Unhandled(Unhandled),
}Expand description
Error type for the RegisterOnPremisesInstanceError operation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
IamArnRequiredException(IamArnRequiredException)
No IAM ARN was included in the request. You must use an IAM session ARN or user ARN in the request.
IamSessionArnAlreadyRegisteredException(IamSessionArnAlreadyRegisteredException)
The request included an IAM session ARN that has already been used to register a different instance.
IamUserArnAlreadyRegisteredException(IamUserArnAlreadyRegisteredException)
The specified user ARN is already registered with an on-premises instance.
IamUserArnRequiredException(IamUserArnRequiredException)
An user ARN was not specified.
InstanceNameAlreadyRegisteredException(InstanceNameAlreadyRegisteredException)
The specified on-premises instance name is already registered.
InstanceNameRequiredException(InstanceNameRequiredException)
An on-premises instance name was not specified.
InvalidIamSessionArnException(InvalidIamSessionArnException)
The IAM session ARN was specified in an invalid format.
InvalidIamUserArnException(InvalidIamUserArnException)
The user ARN was specified in an invalid format.
InvalidInstanceNameException(InvalidInstanceNameException)
The on-premises instance name was specified in an invalid format.
MultipleIamArnsProvidedException(MultipleIamArnsProvidedException)
Both an user ARN and an IAM session ARN were included in the request. Use only one ARN type.
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 RegisterOnPremisesInstanceError
impl RegisterOnPremisesInstanceError
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 RegisterOnPremisesInstanceError::Unhandled variant from any error type.
sourcepub fn generic(err: ErrorMetadata) -> Self
pub fn generic(err: ErrorMetadata) -> Self
Creates the RegisterOnPremisesInstanceError::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_iam_arn_required_exception(&self) -> bool
pub fn is_iam_arn_required_exception(&self) -> bool
Returns true if the error kind is RegisterOnPremisesInstanceError::IamArnRequiredException.
sourcepub fn is_iam_session_arn_already_registered_exception(&self) -> bool
pub fn is_iam_session_arn_already_registered_exception(&self) -> bool
Returns true if the error kind is RegisterOnPremisesInstanceError::IamSessionArnAlreadyRegisteredException.
sourcepub fn is_iam_user_arn_already_registered_exception(&self) -> bool
pub fn is_iam_user_arn_already_registered_exception(&self) -> bool
Returns true if the error kind is RegisterOnPremisesInstanceError::IamUserArnAlreadyRegisteredException.
sourcepub fn is_iam_user_arn_required_exception(&self) -> bool
pub fn is_iam_user_arn_required_exception(&self) -> bool
Returns true if the error kind is RegisterOnPremisesInstanceError::IamUserArnRequiredException.
sourcepub fn is_instance_name_already_registered_exception(&self) -> bool
pub fn is_instance_name_already_registered_exception(&self) -> bool
Returns true if the error kind is RegisterOnPremisesInstanceError::InstanceNameAlreadyRegisteredException.
sourcepub fn is_instance_name_required_exception(&self) -> bool
pub fn is_instance_name_required_exception(&self) -> bool
Returns true if the error kind is RegisterOnPremisesInstanceError::InstanceNameRequiredException.
sourcepub fn is_invalid_iam_session_arn_exception(&self) -> bool
pub fn is_invalid_iam_session_arn_exception(&self) -> bool
Returns true if the error kind is RegisterOnPremisesInstanceError::InvalidIamSessionArnException.
sourcepub fn is_invalid_iam_user_arn_exception(&self) -> bool
pub fn is_invalid_iam_user_arn_exception(&self) -> bool
Returns true if the error kind is RegisterOnPremisesInstanceError::InvalidIamUserArnException.
sourcepub fn is_invalid_instance_name_exception(&self) -> bool
pub fn is_invalid_instance_name_exception(&self) -> bool
Returns true if the error kind is RegisterOnPremisesInstanceError::InvalidInstanceNameException.
sourcepub fn is_multiple_iam_arns_provided_exception(&self) -> bool
pub fn is_multiple_iam_arns_provided_exception(&self) -> bool
Returns true if the error kind is RegisterOnPremisesInstanceError::MultipleIamArnsProvidedException.
Trait Implementations§
source§impl CreateUnhandledError for RegisterOnPremisesInstanceError
impl CreateUnhandledError for RegisterOnPremisesInstanceError
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 Error for RegisterOnPremisesInstanceError
impl Error for RegisterOnPremisesInstanceError
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<RegisterOnPremisesInstanceError> for Error
impl From<RegisterOnPremisesInstanceError> for Error
source§fn from(err: RegisterOnPremisesInstanceError) -> Self
fn from(err: RegisterOnPremisesInstanceError) -> Self
source§impl ProvideErrorMetadata for RegisterOnPremisesInstanceError
impl ProvideErrorMetadata for RegisterOnPremisesInstanceError
source§fn meta(&self) -> &ErrorMetadata
fn meta(&self) -> &ErrorMetadata
source§impl RequestId for RegisterOnPremisesInstanceError
impl RequestId for RegisterOnPremisesInstanceError
source§fn request_id(&self) -> Option<&str>
fn request_id(&self) -> Option<&str>
None if the service could not be reached.