pub enum CreateBucketError {
BucketAlreadyExists(BucketAlreadyExists),
BucketAlreadyOwnedByYou(BucketAlreadyOwnedByYou),
Unhandled(Unhandled),
}
Expand description
Error type for the CreateBucketError
operation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
BucketAlreadyExists(BucketAlreadyExists)
The requested bucket name is not available. The bucket namespace is shared by all users of the system. Select a different name and try again.
BucketAlreadyOwnedByYou(BucketAlreadyOwnedByYou)
The bucket you tried to create already exists, and you own it. Amazon S3 returns this error in all Amazon Web Services Regions except in the North Virginia Region. For legacy compatibility, if you re-create an existing bucket that you already own in the North Virginia Region, Amazon S3 returns 200 OK and resets the bucket access control lists (ACLs).
Unhandled(Unhandled)
An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
Implementations§
§impl CreateBucketError
impl CreateBucketError
pub fn unhandled(
err: impl Into<Box<dyn Error + Sync + Send, Global>>
) -> CreateBucketError
pub fn unhandled( err: impl Into<Box<dyn Error + Sync + Send, Global>> ) -> CreateBucketError
Creates the CreateBucketError::Unhandled
variant from any error type.
pub fn generic(err: ErrorMetadata) -> CreateBucketError
pub fn generic(err: ErrorMetadata) -> CreateBucketError
Creates the CreateBucketError::Unhandled
variant from a ::aws_smithy_types::error::ErrorMetadata
.
pub fn meta(&self) -> &ErrorMetadata
pub fn meta(&self) -> &ErrorMetadata
Returns error metadata, which includes the error code, message, request ID, and potentially additional information.
pub fn is_bucket_already_exists(&self) -> bool
pub fn is_bucket_already_exists(&self) -> bool
Returns true
if the error kind is CreateBucketError::BucketAlreadyExists
.
pub fn is_bucket_already_owned_by_you(&self) -> bool
pub fn is_bucket_already_owned_by_you(&self) -> bool
Returns true
if the error kind is CreateBucketError::BucketAlreadyOwnedByYou
.
Trait Implementations§
§impl CreateUnhandledError for CreateBucketError
impl CreateUnhandledError for CreateBucketError
§fn create_unhandled_error(
source: Box<dyn Error + Sync + Send, Global>,
meta: Option<ErrorMetadata>
) -> CreateBucketError
fn create_unhandled_error( source: Box<dyn Error + Sync + Send, Global>, meta: Option<ErrorMetadata> ) -> CreateBucketError
source
and error metadata.§impl Debug for CreateBucketError
impl Debug for CreateBucketError
§impl Display for CreateBucketError
impl Display for CreateBucketError
§impl Error for CreateBucketError
impl Error for CreateBucketError
§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
§impl From<CreateBucketError> for Error
impl From<CreateBucketError> for Error
§fn from(err: CreateBucketError) -> Error
fn from(err: CreateBucketError) -> Error
§impl ProvideErrorKind for CreateBucketError
impl ProvideErrorKind for CreateBucketError
§impl ProvideErrorMetadata for CreateBucketError
impl ProvideErrorMetadata for CreateBucketError
§impl RequestId for CreateBucketError
impl RequestId for CreateBucketError
§fn request_id(&self) -> Option<&str>
fn request_id(&self) -> Option<&str>
None
if the service could not be reached.