Enum aws_sdk_cloudfront::operation::update_origin_access_control::UpdateOriginAccessControlError
source · #[non_exhaustive]pub enum UpdateOriginAccessControlError {
AccessDenied(AccessDenied),
IllegalUpdate(IllegalUpdate),
InvalidArgument(InvalidArgument),
InvalidIfMatchVersion(InvalidIfMatchVersion),
NoSuchOriginAccessControl(NoSuchOriginAccessControl),
OriginAccessControlAlreadyExists(OriginAccessControlAlreadyExists),
PreconditionFailed(PreconditionFailed),
Unhandled(Unhandled),
}
Expand description
Error type for the UpdateOriginAccessControlError
operation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AccessDenied(AccessDenied)
Access denied.
IllegalUpdate(IllegalUpdate)
The update contains modifications that are not allowed.
InvalidArgument(InvalidArgument)
An argument is invalid.
InvalidIfMatchVersion(InvalidIfMatchVersion)
The If-Match
version is missing or not valid.
NoSuchOriginAccessControl(NoSuchOriginAccessControl)
The origin access control does not exist.
OriginAccessControlAlreadyExists(OriginAccessControlAlreadyExists)
An origin access control with the specified parameters already exists.
PreconditionFailed(PreconditionFailed)
The precondition in one or more of the request fields evaluated to false
.
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 UpdateOriginAccessControlError
impl UpdateOriginAccessControlError
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 UpdateOriginAccessControlError::Unhandled
variant from any error type.
sourcepub fn generic(err: ErrorMetadata) -> Self
pub fn generic(err: ErrorMetadata) -> Self
Creates the UpdateOriginAccessControlError::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_access_denied(&self) -> bool
pub fn is_access_denied(&self) -> bool
Returns true
if the error kind is UpdateOriginAccessControlError::AccessDenied
.
sourcepub fn is_illegal_update(&self) -> bool
pub fn is_illegal_update(&self) -> bool
Returns true
if the error kind is UpdateOriginAccessControlError::IllegalUpdate
.
sourcepub fn is_invalid_argument(&self) -> bool
pub fn is_invalid_argument(&self) -> bool
Returns true
if the error kind is UpdateOriginAccessControlError::InvalidArgument
.
sourcepub fn is_invalid_if_match_version(&self) -> bool
pub fn is_invalid_if_match_version(&self) -> bool
Returns true
if the error kind is UpdateOriginAccessControlError::InvalidIfMatchVersion
.
sourcepub fn is_no_such_origin_access_control(&self) -> bool
pub fn is_no_such_origin_access_control(&self) -> bool
Returns true
if the error kind is UpdateOriginAccessControlError::NoSuchOriginAccessControl
.
sourcepub fn is_origin_access_control_already_exists(&self) -> bool
pub fn is_origin_access_control_already_exists(&self) -> bool
Returns true
if the error kind is UpdateOriginAccessControlError::OriginAccessControlAlreadyExists
.
sourcepub fn is_precondition_failed(&self) -> bool
pub fn is_precondition_failed(&self) -> bool
Returns true
if the error kind is UpdateOriginAccessControlError::PreconditionFailed
.
Trait Implementations§
source§impl CreateUnhandledError for UpdateOriginAccessControlError
impl CreateUnhandledError for UpdateOriginAccessControlError
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 UpdateOriginAccessControlError
impl Error for UpdateOriginAccessControlError
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<UpdateOriginAccessControlError> for Error
impl From<UpdateOriginAccessControlError> for Error
source§fn from(err: UpdateOriginAccessControlError) -> Self
fn from(err: UpdateOriginAccessControlError) -> Self
source§impl ProvideErrorMetadata for UpdateOriginAccessControlError
impl ProvideErrorMetadata for UpdateOriginAccessControlError
source§fn meta(&self) -> &ErrorMetadata
fn meta(&self) -> &ErrorMetadata
source§impl RequestId for UpdateOriginAccessControlError
impl RequestId for UpdateOriginAccessControlError
source§fn request_id(&self) -> Option<&str>
fn request_id(&self) -> Option<&str>
None
if the service could not be reached.