#[non_exhaustive]pub enum CreateSnapshotCopyGrantError {
DependentServiceRequestThrottlingFault(DependentServiceRequestThrottlingFault),
InvalidTagFault(InvalidTagFault),
LimitExceededFault(LimitExceededFault),
SnapshotCopyGrantAlreadyExistsFault(SnapshotCopyGrantAlreadyExistsFault),
SnapshotCopyGrantQuotaExceededFault(SnapshotCopyGrantQuotaExceededFault),
TagLimitExceededFault(TagLimitExceededFault),
Unhandled(Unhandled),
}
Expand description
Error type for the CreateSnapshotCopyGrantError
operation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
DependentServiceRequestThrottlingFault(DependentServiceRequestThrottlingFault)
The request cannot be completed because a dependent service is throttling requests made by Amazon Redshift on your behalf. Wait and retry the request.
InvalidTagFault(InvalidTagFault)
The tag is invalid.
LimitExceededFault(LimitExceededFault)
The encryption key has exceeded its grant limit in Amazon Web Services KMS.
SnapshotCopyGrantAlreadyExistsFault(SnapshotCopyGrantAlreadyExistsFault)
The snapshot copy grant can't be created because a grant with the same name already exists.
SnapshotCopyGrantQuotaExceededFault(SnapshotCopyGrantQuotaExceededFault)
The Amazon Web Services account has exceeded the maximum number of snapshot copy grants in this region.
TagLimitExceededFault(TagLimitExceededFault)
You have exceeded the number of tags allowed.
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 CreateSnapshotCopyGrantError
impl CreateSnapshotCopyGrantError
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 CreateSnapshotCopyGrantError::Unhandled
variant from any error type.
sourcepub fn generic(err: ErrorMetadata) -> Self
pub fn generic(err: ErrorMetadata) -> Self
Creates the CreateSnapshotCopyGrantError::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_dependent_service_request_throttling_fault(&self) -> bool
pub fn is_dependent_service_request_throttling_fault(&self) -> bool
Returns true
if the error kind is CreateSnapshotCopyGrantError::DependentServiceRequestThrottlingFault
.
sourcepub fn is_invalid_tag_fault(&self) -> bool
pub fn is_invalid_tag_fault(&self) -> bool
Returns true
if the error kind is CreateSnapshotCopyGrantError::InvalidTagFault
.
sourcepub fn is_limit_exceeded_fault(&self) -> bool
pub fn is_limit_exceeded_fault(&self) -> bool
Returns true
if the error kind is CreateSnapshotCopyGrantError::LimitExceededFault
.
sourcepub fn is_snapshot_copy_grant_already_exists_fault(&self) -> bool
pub fn is_snapshot_copy_grant_already_exists_fault(&self) -> bool
Returns true
if the error kind is CreateSnapshotCopyGrantError::SnapshotCopyGrantAlreadyExistsFault
.
sourcepub fn is_snapshot_copy_grant_quota_exceeded_fault(&self) -> bool
pub fn is_snapshot_copy_grant_quota_exceeded_fault(&self) -> bool
Returns true
if the error kind is CreateSnapshotCopyGrantError::SnapshotCopyGrantQuotaExceededFault
.
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 CreateSnapshotCopyGrantError::TagLimitExceededFault
.
Trait Implementations§
source§impl CreateUnhandledError for CreateSnapshotCopyGrantError
impl CreateUnhandledError for CreateSnapshotCopyGrantError
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 CreateSnapshotCopyGrantError
impl Debug for CreateSnapshotCopyGrantError
source§impl Error for CreateSnapshotCopyGrantError
impl Error for CreateSnapshotCopyGrantError
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<CreateSnapshotCopyGrantError> for Error
impl From<CreateSnapshotCopyGrantError> for Error
source§fn from(err: CreateSnapshotCopyGrantError) -> Self
fn from(err: CreateSnapshotCopyGrantError) -> Self
source§impl ProvideErrorMetadata for CreateSnapshotCopyGrantError
impl ProvideErrorMetadata for CreateSnapshotCopyGrantError
source§fn meta(&self) -> &ErrorMetadata
fn meta(&self) -> &ErrorMetadata
source§impl RequestId for CreateSnapshotCopyGrantError
impl RequestId for CreateSnapshotCopyGrantError
source§fn request_id(&self) -> Option<&str>
fn request_id(&self) -> Option<&str>
None
if the service could not be reached.