#[non_exhaustive]pub enum CreateUsageLimitError {
ClusterNotFoundFault(ClusterNotFoundFault),
InvalidClusterStateFault(InvalidClusterStateFault),
InvalidUsageLimitFault(InvalidUsageLimitFault),
LimitExceededFault(LimitExceededFault),
TagLimitExceededFault(TagLimitExceededFault),
UnsupportedOperationFault(UnsupportedOperationFault),
UsageLimitAlreadyExistsFault(UsageLimitAlreadyExistsFault),
Unhandled(Unhandled),
}
Expand description
Error type for the CreateUsageLimitError
operation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ClusterNotFoundFault(ClusterNotFoundFault)
The ClusterIdentifier
parameter does not refer to an existing cluster.
InvalidClusterStateFault(InvalidClusterStateFault)
The specified cluster is not in the available
state.
InvalidUsageLimitFault(InvalidUsageLimitFault)
The usage limit is not valid.
LimitExceededFault(LimitExceededFault)
The encryption key has exceeded its grant limit in Amazon Web Services KMS.
TagLimitExceededFault(TagLimitExceededFault)
You have exceeded the number of tags allowed.
UnsupportedOperationFault(UnsupportedOperationFault)
The requested operation isn't supported.
UsageLimitAlreadyExistsFault(UsageLimitAlreadyExistsFault)
The usage limit already exists.
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 CreateUsageLimitError
impl CreateUsageLimitError
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 CreateUsageLimitError::Unhandled
variant from any error type.
sourcepub fn generic(err: ErrorMetadata) -> Self
pub fn generic(err: ErrorMetadata) -> Self
Creates the CreateUsageLimitError::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_cluster_not_found_fault(&self) -> bool
pub fn is_cluster_not_found_fault(&self) -> bool
Returns true
if the error kind is CreateUsageLimitError::ClusterNotFoundFault
.
sourcepub fn is_invalid_cluster_state_fault(&self) -> bool
pub fn is_invalid_cluster_state_fault(&self) -> bool
Returns true
if the error kind is CreateUsageLimitError::InvalidClusterStateFault
.
sourcepub fn is_invalid_usage_limit_fault(&self) -> bool
pub fn is_invalid_usage_limit_fault(&self) -> bool
Returns true
if the error kind is CreateUsageLimitError::InvalidUsageLimitFault
.
sourcepub fn is_limit_exceeded_fault(&self) -> bool
pub fn is_limit_exceeded_fault(&self) -> bool
Returns true
if the error kind is CreateUsageLimitError::LimitExceededFault
.
sourcepub fn is_tag_limit_exceeded_fault(&self) -> bool
pub fn is_tag_limit_exceeded_fault(&self) -> bool
Returns true
if the error kind is CreateUsageLimitError::TagLimitExceededFault
.
sourcepub fn is_unsupported_operation_fault(&self) -> bool
pub fn is_unsupported_operation_fault(&self) -> bool
Returns true
if the error kind is CreateUsageLimitError::UnsupportedOperationFault
.
sourcepub fn is_usage_limit_already_exists_fault(&self) -> bool
pub fn is_usage_limit_already_exists_fault(&self) -> bool
Returns true
if the error kind is CreateUsageLimitError::UsageLimitAlreadyExistsFault
.
Trait Implementations§
source§impl CreateUnhandledError for CreateUsageLimitError
impl CreateUnhandledError for CreateUsageLimitError
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 CreateUsageLimitError
impl Debug for CreateUsageLimitError
source§impl Display for CreateUsageLimitError
impl Display for CreateUsageLimitError
source§impl Error for CreateUsageLimitError
impl Error for CreateUsageLimitError
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<CreateUsageLimitError> for Error
impl From<CreateUsageLimitError> for Error
source§fn from(err: CreateUsageLimitError) -> Self
fn from(err: CreateUsageLimitError) -> Self
source§impl ProvideErrorMetadata for CreateUsageLimitError
impl ProvideErrorMetadata for CreateUsageLimitError
source§fn meta(&self) -> &ErrorMetadata
fn meta(&self) -> &ErrorMetadata
source§impl RequestId for CreateUsageLimitError
impl RequestId for CreateUsageLimitError
source§fn request_id(&self) -> Option<&str>
fn request_id(&self) -> Option<&str>
None
if the service could not be reached.