#[non_exhaustive]pub struct DescribeCacheSecurityGroupsError {
pub kind: DescribeCacheSecurityGroupsErrorKind,
/* private fields */
}
Expand description
Error type for the DescribeCacheSecurityGroups
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: DescribeCacheSecurityGroupsErrorKind
Kind of error that occurred.
Implementations§
source§impl DescribeCacheSecurityGroupsError
impl DescribeCacheSecurityGroupsError
sourcepub fn new(kind: DescribeCacheSecurityGroupsErrorKind, meta: Error) -> Self
pub fn new(kind: DescribeCacheSecurityGroupsErrorKind, meta: Error) -> Self
Creates a new DescribeCacheSecurityGroupsError
.
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 DescribeCacheSecurityGroupsError::Unhandled
variant from any error type.
Examples found in repository?
4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146
pub fn parse_describe_cache_security_groups_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::DescribeCacheSecurityGroupsOutput,
crate::error::DescribeCacheSecurityGroupsError,
> {
let generic = crate::xml_deser::parse_http_generic_error(response)
.map_err(crate::error::DescribeCacheSecurityGroupsError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::DescribeCacheSecurityGroupsError::unhandled(
generic,
))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"CacheSecurityGroupNotFound" => crate::error::DescribeCacheSecurityGroupsError { meta: generic, kind: crate::error::DescribeCacheSecurityGroupsErrorKind::CacheSecurityGroupNotFoundFault({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::cache_security_group_not_found_fault::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_cache_security_group_not_found_fault_xml_err(response.body().as_ref(), output).map_err(crate::error::DescribeCacheSecurityGroupsError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidParameterCombination" => crate::error::DescribeCacheSecurityGroupsError { meta: generic, kind: crate::error::DescribeCacheSecurityGroupsErrorKind::InvalidParameterCombinationException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::invalid_parameter_combination_exception::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_invalid_parameter_combination_exception_xml_err(response.body().as_ref(), output).map_err(crate::error::DescribeCacheSecurityGroupsError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidParameterValue" => crate::error::DescribeCacheSecurityGroupsError { meta: generic, kind: crate::error::DescribeCacheSecurityGroupsErrorKind::InvalidParameterValueException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::invalid_parameter_value_exception::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_invalid_parameter_value_exception_xml_err(response.body().as_ref(), output).map_err(crate::error::DescribeCacheSecurityGroupsError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
_ => crate::error::DescribeCacheSecurityGroupsError::generic(generic)
})
}
sourcepub fn generic(err: Error) -> Self
pub fn generic(err: Error) -> Self
Creates the DescribeCacheSecurityGroupsError::Unhandled
variant from a aws_smithy_types::Error
.
Examples found in repository?
4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146
pub fn parse_describe_cache_security_groups_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::DescribeCacheSecurityGroupsOutput,
crate::error::DescribeCacheSecurityGroupsError,
> {
let generic = crate::xml_deser::parse_http_generic_error(response)
.map_err(crate::error::DescribeCacheSecurityGroupsError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::DescribeCacheSecurityGroupsError::unhandled(
generic,
))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"CacheSecurityGroupNotFound" => crate::error::DescribeCacheSecurityGroupsError { meta: generic, kind: crate::error::DescribeCacheSecurityGroupsErrorKind::CacheSecurityGroupNotFoundFault({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::cache_security_group_not_found_fault::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_cache_security_group_not_found_fault_xml_err(response.body().as_ref(), output).map_err(crate::error::DescribeCacheSecurityGroupsError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidParameterCombination" => crate::error::DescribeCacheSecurityGroupsError { meta: generic, kind: crate::error::DescribeCacheSecurityGroupsErrorKind::InvalidParameterCombinationException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::invalid_parameter_combination_exception::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_invalid_parameter_combination_exception_xml_err(response.body().as_ref(), output).map_err(crate::error::DescribeCacheSecurityGroupsError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidParameterValue" => crate::error::DescribeCacheSecurityGroupsError { meta: generic, kind: crate::error::DescribeCacheSecurityGroupsErrorKind::InvalidParameterValueException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::invalid_parameter_value_exception::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_invalid_parameter_value_exception_xml_err(response.body().as_ref(), output).map_err(crate::error::DescribeCacheSecurityGroupsError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
_ => crate::error::DescribeCacheSecurityGroupsError::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_cache_security_group_not_found_fault(&self) -> bool
pub fn is_cache_security_group_not_found_fault(&self) -> bool
Returns true
if the error kind is DescribeCacheSecurityGroupsErrorKind::CacheSecurityGroupNotFoundFault
.
sourcepub fn is_invalid_parameter_combination_exception(&self) -> bool
pub fn is_invalid_parameter_combination_exception(&self) -> bool
Returns true
if the error kind is DescribeCacheSecurityGroupsErrorKind::InvalidParameterCombinationException
.
sourcepub fn is_invalid_parameter_value_exception(&self) -> bool
pub fn is_invalid_parameter_value_exception(&self) -> bool
Returns true
if the error kind is DescribeCacheSecurityGroupsErrorKind::InvalidParameterValueException
.