#[non_exhaustive]pub struct ModifyCacheParameterGroupError {
pub kind: ModifyCacheParameterGroupErrorKind,
/* private fields */
}
Expand description
Error type for the ModifyCacheParameterGroup
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: ModifyCacheParameterGroupErrorKind
Kind of error that occurred.
Implementations§
source§impl ModifyCacheParameterGroupError
impl ModifyCacheParameterGroupError
sourcepub fn new(kind: ModifyCacheParameterGroupErrorKind, meta: Error) -> Self
pub fn new(kind: ModifyCacheParameterGroupErrorKind, meta: Error) -> Self
Creates a new ModifyCacheParameterGroupError
.
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 ModifyCacheParameterGroupError::Unhandled
variant from any error type.
Examples found in repository?
6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330
pub fn parse_modify_cache_parameter_group_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::ModifyCacheParameterGroupOutput,
crate::error::ModifyCacheParameterGroupError,
> {
let generic = crate::xml_deser::parse_http_generic_error(response)
.map_err(crate::error::ModifyCacheParameterGroupError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::ModifyCacheParameterGroupError::unhandled(
generic,
))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"CacheParameterGroupNotFound" => crate::error::ModifyCacheParameterGroupError { meta: generic, kind: crate::error::ModifyCacheParameterGroupErrorKind::CacheParameterGroupNotFoundFault({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::cache_parameter_group_not_found_fault::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_cache_parameter_group_not_found_fault_xml_err(response.body().as_ref(), output).map_err(crate::error::ModifyCacheParameterGroupError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidCacheParameterGroupState" => crate::error::ModifyCacheParameterGroupError { meta: generic, kind: crate::error::ModifyCacheParameterGroupErrorKind::InvalidCacheParameterGroupStateFault({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::invalid_cache_parameter_group_state_fault::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_invalid_cache_parameter_group_state_fault_xml_err(response.body().as_ref(), output).map_err(crate::error::ModifyCacheParameterGroupError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidGlobalReplicationGroupState" => crate::error::ModifyCacheParameterGroupError { meta: generic, kind: crate::error::ModifyCacheParameterGroupErrorKind::InvalidGlobalReplicationGroupStateFault({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::invalid_global_replication_group_state_fault::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_invalid_global_replication_group_state_fault_xml_err(response.body().as_ref(), output).map_err(crate::error::ModifyCacheParameterGroupError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidParameterCombination" => crate::error::ModifyCacheParameterGroupError { meta: generic, kind: crate::error::ModifyCacheParameterGroupErrorKind::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::ModifyCacheParameterGroupError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidParameterValue" => crate::error::ModifyCacheParameterGroupError { meta: generic, kind: crate::error::ModifyCacheParameterGroupErrorKind::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::ModifyCacheParameterGroupError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
_ => crate::error::ModifyCacheParameterGroupError::generic(generic)
})
}
sourcepub fn generic(err: Error) -> Self
pub fn generic(err: Error) -> Self
Creates the ModifyCacheParameterGroupError::Unhandled
variant from a aws_smithy_types::Error
.
Examples found in repository?
6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330
pub fn parse_modify_cache_parameter_group_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::ModifyCacheParameterGroupOutput,
crate::error::ModifyCacheParameterGroupError,
> {
let generic = crate::xml_deser::parse_http_generic_error(response)
.map_err(crate::error::ModifyCacheParameterGroupError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::ModifyCacheParameterGroupError::unhandled(
generic,
))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"CacheParameterGroupNotFound" => crate::error::ModifyCacheParameterGroupError { meta: generic, kind: crate::error::ModifyCacheParameterGroupErrorKind::CacheParameterGroupNotFoundFault({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::cache_parameter_group_not_found_fault::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_cache_parameter_group_not_found_fault_xml_err(response.body().as_ref(), output).map_err(crate::error::ModifyCacheParameterGroupError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidCacheParameterGroupState" => crate::error::ModifyCacheParameterGroupError { meta: generic, kind: crate::error::ModifyCacheParameterGroupErrorKind::InvalidCacheParameterGroupStateFault({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::invalid_cache_parameter_group_state_fault::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_invalid_cache_parameter_group_state_fault_xml_err(response.body().as_ref(), output).map_err(crate::error::ModifyCacheParameterGroupError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidGlobalReplicationGroupState" => crate::error::ModifyCacheParameterGroupError { meta: generic, kind: crate::error::ModifyCacheParameterGroupErrorKind::InvalidGlobalReplicationGroupStateFault({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::invalid_global_replication_group_state_fault::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_invalid_global_replication_group_state_fault_xml_err(response.body().as_ref(), output).map_err(crate::error::ModifyCacheParameterGroupError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidParameterCombination" => crate::error::ModifyCacheParameterGroupError { meta: generic, kind: crate::error::ModifyCacheParameterGroupErrorKind::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::ModifyCacheParameterGroupError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidParameterValue" => crate::error::ModifyCacheParameterGroupError { meta: generic, kind: crate::error::ModifyCacheParameterGroupErrorKind::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::ModifyCacheParameterGroupError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
_ => crate::error::ModifyCacheParameterGroupError::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_parameter_group_not_found_fault(&self) -> bool
pub fn is_cache_parameter_group_not_found_fault(&self) -> bool
Returns true
if the error kind is ModifyCacheParameterGroupErrorKind::CacheParameterGroupNotFoundFault
.
sourcepub fn is_invalid_cache_parameter_group_state_fault(&self) -> bool
pub fn is_invalid_cache_parameter_group_state_fault(&self) -> bool
Returns true
if the error kind is ModifyCacheParameterGroupErrorKind::InvalidCacheParameterGroupStateFault
.
sourcepub fn is_invalid_global_replication_group_state_fault(&self) -> bool
pub fn is_invalid_global_replication_group_state_fault(&self) -> bool
Returns true
if the error kind is ModifyCacheParameterGroupErrorKind::InvalidGlobalReplicationGroupStateFault
.
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 ModifyCacheParameterGroupErrorKind::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 ModifyCacheParameterGroupErrorKind::InvalidParameterValueException
.