#[non_exhaustive]pub enum CreateUserError {
DuplicateUserNameFault(DuplicateUserNameFault),
InvalidParameterCombinationException(InvalidParameterCombinationException),
InvalidParameterValueException(InvalidParameterValueException),
ServiceLinkedRoleNotFoundFault(ServiceLinkedRoleNotFoundFault),
TagQuotaPerResourceExceeded(TagQuotaPerResourceExceeded),
UserAlreadyExistsFault(UserAlreadyExistsFault),
UserQuotaExceededFault(UserQuotaExceededFault),
Unhandled(Unhandled),
}
Expand description
Error type for the CreateUserError
operation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
DuplicateUserNameFault(DuplicateUserNameFault)
A user with this username already exists.
InvalidParameterCombinationException(InvalidParameterCombinationException)
Two or more incompatible parameters were specified.
InvalidParameterValueException(InvalidParameterValueException)
The value for a parameter is invalid.
ServiceLinkedRoleNotFoundFault(ServiceLinkedRoleNotFoundFault)
The specified service linked role (SLR) was not found.
TagQuotaPerResourceExceeded(TagQuotaPerResourceExceeded)
The request cannot be processed because it would cause the resource to have more than the allowed number of tags. The maximum number of tags permitted on a resource is 50.
UserAlreadyExistsFault(UserAlreadyExistsFault)
A user with this ID already exists.
UserQuotaExceededFault(UserQuotaExceededFault)
The quota of users has been exceeded.
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 CreateUserError
impl CreateUserError
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 CreateUserError::Unhandled
variant from any error type.
sourcepub fn generic(err: ErrorMetadata) -> Self
pub fn generic(err: ErrorMetadata) -> Self
Creates the CreateUserError::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_user_name_fault(&self) -> bool
pub fn is_duplicate_user_name_fault(&self) -> bool
Returns true
if the error kind is CreateUserError::DuplicateUserNameFault
.
sourcepub fn is_invalid_parameter_combination_exception(&self) -> bool
pub fn is_invalid_parameter_combination_exception(&self) -> bool
Returns true
if the error kind is CreateUserError::InvalidParameterCombinationException
.
sourcepub fn is_invalid_parameter_value_exception(&self) -> bool
pub fn is_invalid_parameter_value_exception(&self) -> bool
Returns true
if the error kind is CreateUserError::InvalidParameterValueException
.
sourcepub fn is_service_linked_role_not_found_fault(&self) -> bool
pub fn is_service_linked_role_not_found_fault(&self) -> bool
Returns true
if the error kind is CreateUserError::ServiceLinkedRoleNotFoundFault
.
sourcepub fn is_tag_quota_per_resource_exceeded(&self) -> bool
pub fn is_tag_quota_per_resource_exceeded(&self) -> bool
Returns true
if the error kind is CreateUserError::TagQuotaPerResourceExceeded
.
sourcepub fn is_user_already_exists_fault(&self) -> bool
pub fn is_user_already_exists_fault(&self) -> bool
Returns true
if the error kind is CreateUserError::UserAlreadyExistsFault
.
sourcepub fn is_user_quota_exceeded_fault(&self) -> bool
pub fn is_user_quota_exceeded_fault(&self) -> bool
Returns true
if the error kind is CreateUserError::UserQuotaExceededFault
.
Trait Implementations§
source§impl CreateUnhandledError for CreateUserError
impl CreateUnhandledError for CreateUserError
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 CreateUserError
impl Debug for CreateUserError
source§impl Display for CreateUserError
impl Display for CreateUserError
source§impl Error for CreateUserError
impl Error for CreateUserError
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<CreateUserError> for Error
impl From<CreateUserError> for Error
source§fn from(err: CreateUserError) -> Self
fn from(err: CreateUserError) -> Self
source§impl ProvideErrorKind for CreateUserError
impl ProvideErrorKind for CreateUserError
source§impl ProvideErrorMetadata for CreateUserError
impl ProvideErrorMetadata for CreateUserError
source§fn meta(&self) -> &ErrorMetadata
fn meta(&self) -> &ErrorMetadata
source§impl RequestId for CreateUserError
impl RequestId for CreateUserError
source§fn request_id(&self) -> Option<&str>
fn request_id(&self) -> Option<&str>
None
if the service could not be reached.