#[non_exhaustive]pub enum CreateOrganizationError {
DirectoryInUseException(DirectoryInUseException),
DirectoryUnavailableException(DirectoryUnavailableException),
InvalidParameterException(InvalidParameterException),
LimitExceededException(LimitExceededException),
NameAvailabilityException(NameAvailabilityException),
Unhandled(Unhandled),
}
Expand description
Error type for the CreateOrganizationError
operation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
DirectoryInUseException(DirectoryInUseException)
The directory is already in use by another WorkMail organization in the same account and Region.
The directory is unavailable. It might be located in another Region or deleted.
InvalidParameterException(InvalidParameterException)
One or more of the input parameters don't match the service's restrictions.
LimitExceededException(LimitExceededException)
The request exceeds the limit of the resource.
NameAvailabilityException(NameAvailabilityException)
The user, group, or resource name isn't unique in WorkMail.
Unhandled(Unhandled)
An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
Implementations§
source§impl CreateOrganizationError
impl CreateOrganizationError
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 CreateOrganizationError::Unhandled
variant from any error type.
sourcepub fn generic(err: ErrorMetadata) -> Self
pub fn generic(err: ErrorMetadata) -> Self
Creates the CreateOrganizationError::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_directory_in_use_exception(&self) -> bool
pub fn is_directory_in_use_exception(&self) -> bool
Returns true
if the error kind is CreateOrganizationError::DirectoryInUseException
.
Returns true
if the error kind is CreateOrganizationError::DirectoryUnavailableException
.
sourcepub fn is_invalid_parameter_exception(&self) -> bool
pub fn is_invalid_parameter_exception(&self) -> bool
Returns true
if the error kind is CreateOrganizationError::InvalidParameterException
.
sourcepub fn is_limit_exceeded_exception(&self) -> bool
pub fn is_limit_exceeded_exception(&self) -> bool
Returns true
if the error kind is CreateOrganizationError::LimitExceededException
.
sourcepub fn is_name_availability_exception(&self) -> bool
pub fn is_name_availability_exception(&self) -> bool
Returns true
if the error kind is CreateOrganizationError::NameAvailabilityException
.
Trait Implementations§
source§impl CreateUnhandledError for CreateOrganizationError
impl CreateUnhandledError for CreateOrganizationError
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 CreateOrganizationError
impl Debug for CreateOrganizationError
source§impl Display for CreateOrganizationError
impl Display for CreateOrganizationError
source§impl Error for CreateOrganizationError
impl Error for CreateOrganizationError
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<CreateOrganizationError> for Error
impl From<CreateOrganizationError> for Error
source§fn from(err: CreateOrganizationError) -> Self
fn from(err: CreateOrganizationError) -> Self
source§impl ProvideErrorMetadata for CreateOrganizationError
impl ProvideErrorMetadata for CreateOrganizationError
source§fn meta(&self) -> &ErrorMetadata
fn meta(&self) -> &ErrorMetadata
source§impl RequestId for CreateOrganizationError
impl RequestId for CreateOrganizationError
source§fn request_id(&self) -> Option<&str>
fn request_id(&self) -> Option<&str>
None
if the service could not be reached.