#[non_exhaustive]pub struct DisassociateDRTLogBucketError {
pub kind: DisassociateDRTLogBucketErrorKind,
/* private fields */
}
Expand description
Error type for the DisassociateDRTLogBucket
operation.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.kind: DisassociateDRTLogBucketErrorKind
Kind of error that occurred.
Implementations§
source§impl DisassociateDRTLogBucketError
impl DisassociateDRTLogBucketError
sourcepub fn new(kind: DisassociateDRTLogBucketErrorKind, meta: Error) -> Self
pub fn new(kind: DisassociateDRTLogBucketErrorKind, meta: Error) -> Self
Creates a new DisassociateDRTLogBucketError
.
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 DisassociateDRTLogBucketError::Unhandled
variant from any error type.
Examples found in repository?
1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078
pub fn parse_disassociate_drt_log_bucket_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::DisassociateDrtLogBucketOutput,
crate::error::DisassociateDRTLogBucketError,
> {
let generic = crate::json_deser::parse_http_generic_error(response)
.map_err(crate::error::DisassociateDRTLogBucketError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::DisassociateDRTLogBucketError::unhandled(
generic,
))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"AccessDeniedForDependencyException" => crate::error::DisassociateDRTLogBucketError {
meta: generic,
kind:
crate::error::DisassociateDRTLogBucketErrorKind::AccessDeniedForDependencyException(
{
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]let mut output = crate::error::access_denied_for_dependency_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_access_denied_for_dependency_exception_json_err(response.body().as_ref(), output).map_err(crate::error::DisassociateDRTLogBucketError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
},
"InternalErrorException" => crate::error::DisassociateDRTLogBucketError {
meta: generic,
kind: crate::error::DisassociateDRTLogBucketErrorKind::InternalErrorException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::internal_error_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_internal_error_exception_json_err(response.body().as_ref(), output).map_err(crate::error::DisassociateDRTLogBucketError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"InvalidOperationException" => crate::error::DisassociateDRTLogBucketError {
meta: generic,
kind: crate::error::DisassociateDRTLogBucketErrorKind::InvalidOperationException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::invalid_operation_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_invalid_operation_exception_json_err(response.body().as_ref(), output).map_err(crate::error::DisassociateDRTLogBucketError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"NoAssociatedRoleException" => crate::error::DisassociateDRTLogBucketError {
meta: generic,
kind: crate::error::DisassociateDRTLogBucketErrorKind::NoAssociatedRoleException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::no_associated_role_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_no_associated_role_exception_json_err(response.body().as_ref(), output).map_err(crate::error::DisassociateDRTLogBucketError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"OptimisticLockException" => crate::error::DisassociateDRTLogBucketError {
meta: generic,
kind: crate::error::DisassociateDRTLogBucketErrorKind::OptimisticLockException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::optimistic_lock_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_optimistic_lock_exception_json_err(response.body().as_ref(), output).map_err(crate::error::DisassociateDRTLogBucketError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"ResourceNotFoundException" => crate::error::DisassociateDRTLogBucketError {
meta: generic,
kind: crate::error::DisassociateDRTLogBucketErrorKind::ResourceNotFoundException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::resource_not_found_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_resource_not_found_exception_json_err(response.body().as_ref(), output).map_err(crate::error::DisassociateDRTLogBucketError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
_ => crate::error::DisassociateDRTLogBucketError::generic(generic),
})
}
sourcepub fn generic(err: Error) -> Self
pub fn generic(err: Error) -> Self
Creates the DisassociateDRTLogBucketError::Unhandled
variant from a aws_smithy_types::Error
.
Examples found in repository?
1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078
pub fn parse_disassociate_drt_log_bucket_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::DisassociateDrtLogBucketOutput,
crate::error::DisassociateDRTLogBucketError,
> {
let generic = crate::json_deser::parse_http_generic_error(response)
.map_err(crate::error::DisassociateDRTLogBucketError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::DisassociateDRTLogBucketError::unhandled(
generic,
))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"AccessDeniedForDependencyException" => crate::error::DisassociateDRTLogBucketError {
meta: generic,
kind:
crate::error::DisassociateDRTLogBucketErrorKind::AccessDeniedForDependencyException(
{
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]let mut output = crate::error::access_denied_for_dependency_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_access_denied_for_dependency_exception_json_err(response.body().as_ref(), output).map_err(crate::error::DisassociateDRTLogBucketError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
},
"InternalErrorException" => crate::error::DisassociateDRTLogBucketError {
meta: generic,
kind: crate::error::DisassociateDRTLogBucketErrorKind::InternalErrorException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::internal_error_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_internal_error_exception_json_err(response.body().as_ref(), output).map_err(crate::error::DisassociateDRTLogBucketError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"InvalidOperationException" => crate::error::DisassociateDRTLogBucketError {
meta: generic,
kind: crate::error::DisassociateDRTLogBucketErrorKind::InvalidOperationException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::invalid_operation_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_invalid_operation_exception_json_err(response.body().as_ref(), output).map_err(crate::error::DisassociateDRTLogBucketError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"NoAssociatedRoleException" => crate::error::DisassociateDRTLogBucketError {
meta: generic,
kind: crate::error::DisassociateDRTLogBucketErrorKind::NoAssociatedRoleException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::no_associated_role_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_no_associated_role_exception_json_err(response.body().as_ref(), output).map_err(crate::error::DisassociateDRTLogBucketError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"OptimisticLockException" => crate::error::DisassociateDRTLogBucketError {
meta: generic,
kind: crate::error::DisassociateDRTLogBucketErrorKind::OptimisticLockException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::optimistic_lock_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_optimistic_lock_exception_json_err(response.body().as_ref(), output).map_err(crate::error::DisassociateDRTLogBucketError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"ResourceNotFoundException" => crate::error::DisassociateDRTLogBucketError {
meta: generic,
kind: crate::error::DisassociateDRTLogBucketErrorKind::ResourceNotFoundException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::resource_not_found_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_resource_not_found_exception_json_err(response.body().as_ref(), output).map_err(crate::error::DisassociateDRTLogBucketError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
_ => crate::error::DisassociateDRTLogBucketError::generic(generic),
})
}
sourcepub fn meta(&self) -> &Error
pub fn meta(&self) -> &Error
Returns error metadata, which includes the error code, message, request ID, and potentially additional information.
sourcepub fn request_id(&self) -> Option<&str>
pub fn request_id(&self) -> Option<&str>
Returns the request ID if it’s available.
sourcepub fn is_access_denied_for_dependency_exception(&self) -> bool
pub fn is_access_denied_for_dependency_exception(&self) -> bool
Returns true
if the error kind is DisassociateDRTLogBucketErrorKind::AccessDeniedForDependencyException
.
sourcepub fn is_internal_error_exception(&self) -> bool
pub fn is_internal_error_exception(&self) -> bool
Returns true
if the error kind is DisassociateDRTLogBucketErrorKind::InternalErrorException
.
sourcepub fn is_invalid_operation_exception(&self) -> bool
pub fn is_invalid_operation_exception(&self) -> bool
Returns true
if the error kind is DisassociateDRTLogBucketErrorKind::InvalidOperationException
.
sourcepub fn is_no_associated_role_exception(&self) -> bool
pub fn is_no_associated_role_exception(&self) -> bool
Returns true
if the error kind is DisassociateDRTLogBucketErrorKind::NoAssociatedRoleException
.
sourcepub fn is_optimistic_lock_exception(&self) -> bool
pub fn is_optimistic_lock_exception(&self) -> bool
Returns true
if the error kind is DisassociateDRTLogBucketErrorKind::OptimisticLockException
.
sourcepub fn is_resource_not_found_exception(&self) -> bool
pub fn is_resource_not_found_exception(&self) -> bool
Returns true
if the error kind is DisassociateDRTLogBucketErrorKind::ResourceNotFoundException
.