#[non_exhaustive]pub struct AuthorizeCacheSecurityGroupIngressError {
pub kind: AuthorizeCacheSecurityGroupIngressErrorKind,
/* private fields */
}
Expand description
Error type for the AuthorizeCacheSecurityGroupIngress
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: AuthorizeCacheSecurityGroupIngressErrorKind
Kind of error that occurred.
Implementations§
source§impl AuthorizeCacheSecurityGroupIngressError
impl AuthorizeCacheSecurityGroupIngressError
sourcepub fn new(
kind: AuthorizeCacheSecurityGroupIngressErrorKind,
meta: Error
) -> Self
pub fn new(
kind: AuthorizeCacheSecurityGroupIngressErrorKind,
meta: Error
) -> Self
Creates a new AuthorizeCacheSecurityGroupIngressError
.
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 AuthorizeCacheSecurityGroupIngressError::Unhandled
variant from any error type.
Examples found in repository?
255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344
pub fn parse_authorize_cache_security_group_ingress_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::AuthorizeCacheSecurityGroupIngressOutput,
crate::error::AuthorizeCacheSecurityGroupIngressError,
> {
let generic = crate::xml_deser::parse_http_generic_error(response)
.map_err(crate::error::AuthorizeCacheSecurityGroupIngressError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::AuthorizeCacheSecurityGroupIngressError::unhandled(generic))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"AuthorizationAlreadyExists" => crate::error::AuthorizeCacheSecurityGroupIngressError { meta: generic, kind: crate::error::AuthorizeCacheSecurityGroupIngressErrorKind::AuthorizationAlreadyExistsFault({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::authorization_already_exists_fault::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_authorization_already_exists_fault_xml_err(response.body().as_ref(), output).map_err(crate::error::AuthorizeCacheSecurityGroupIngressError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"CacheSecurityGroupNotFound" => crate::error::AuthorizeCacheSecurityGroupIngressError { meta: generic, kind: crate::error::AuthorizeCacheSecurityGroupIngressErrorKind::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::AuthorizeCacheSecurityGroupIngressError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidCacheSecurityGroupState" => crate::error::AuthorizeCacheSecurityGroupIngressError { meta: generic, kind: crate::error::AuthorizeCacheSecurityGroupIngressErrorKind::InvalidCacheSecurityGroupStateFault({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::invalid_cache_security_group_state_fault::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_invalid_cache_security_group_state_fault_xml_err(response.body().as_ref(), output).map_err(crate::error::AuthorizeCacheSecurityGroupIngressError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidParameterCombination" => crate::error::AuthorizeCacheSecurityGroupIngressError { meta: generic, kind: crate::error::AuthorizeCacheSecurityGroupIngressErrorKind::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::AuthorizeCacheSecurityGroupIngressError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidParameterValue" => crate::error::AuthorizeCacheSecurityGroupIngressError { meta: generic, kind: crate::error::AuthorizeCacheSecurityGroupIngressErrorKind::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::AuthorizeCacheSecurityGroupIngressError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
_ => crate::error::AuthorizeCacheSecurityGroupIngressError::generic(generic)
})
}
sourcepub fn generic(err: Error) -> Self
pub fn generic(err: Error) -> Self
Creates the AuthorizeCacheSecurityGroupIngressError::Unhandled
variant from a aws_smithy_types::Error
.
Examples found in repository?
255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344
pub fn parse_authorize_cache_security_group_ingress_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::AuthorizeCacheSecurityGroupIngressOutput,
crate::error::AuthorizeCacheSecurityGroupIngressError,
> {
let generic = crate::xml_deser::parse_http_generic_error(response)
.map_err(crate::error::AuthorizeCacheSecurityGroupIngressError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::AuthorizeCacheSecurityGroupIngressError::unhandled(generic))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"AuthorizationAlreadyExists" => crate::error::AuthorizeCacheSecurityGroupIngressError { meta: generic, kind: crate::error::AuthorizeCacheSecurityGroupIngressErrorKind::AuthorizationAlreadyExistsFault({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::authorization_already_exists_fault::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_authorization_already_exists_fault_xml_err(response.body().as_ref(), output).map_err(crate::error::AuthorizeCacheSecurityGroupIngressError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"CacheSecurityGroupNotFound" => crate::error::AuthorizeCacheSecurityGroupIngressError { meta: generic, kind: crate::error::AuthorizeCacheSecurityGroupIngressErrorKind::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::AuthorizeCacheSecurityGroupIngressError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidCacheSecurityGroupState" => crate::error::AuthorizeCacheSecurityGroupIngressError { meta: generic, kind: crate::error::AuthorizeCacheSecurityGroupIngressErrorKind::InvalidCacheSecurityGroupStateFault({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::invalid_cache_security_group_state_fault::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_invalid_cache_security_group_state_fault_xml_err(response.body().as_ref(), output).map_err(crate::error::AuthorizeCacheSecurityGroupIngressError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidParameterCombination" => crate::error::AuthorizeCacheSecurityGroupIngressError { meta: generic, kind: crate::error::AuthorizeCacheSecurityGroupIngressErrorKind::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::AuthorizeCacheSecurityGroupIngressError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidParameterValue" => crate::error::AuthorizeCacheSecurityGroupIngressError { meta: generic, kind: crate::error::AuthorizeCacheSecurityGroupIngressErrorKind::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::AuthorizeCacheSecurityGroupIngressError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
_ => crate::error::AuthorizeCacheSecurityGroupIngressError::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.
Returns true
if the error kind is AuthorizeCacheSecurityGroupIngressErrorKind::AuthorizationAlreadyExistsFault
.
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 AuthorizeCacheSecurityGroupIngressErrorKind::CacheSecurityGroupNotFoundFault
.
sourcepub fn is_invalid_cache_security_group_state_fault(&self) -> bool
pub fn is_invalid_cache_security_group_state_fault(&self) -> bool
Returns true
if the error kind is AuthorizeCacheSecurityGroupIngressErrorKind::InvalidCacheSecurityGroupStateFault
.
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 AuthorizeCacheSecurityGroupIngressErrorKind::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 AuthorizeCacheSecurityGroupIngressErrorKind::InvalidParameterValueException
.