#[non_exhaustive]pub struct BatchPutScheduledUpdateGroupActionError {
pub kind: BatchPutScheduledUpdateGroupActionErrorKind,
/* private fields */
}Expand description
Error type for the BatchPutScheduledUpdateGroupAction 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: BatchPutScheduledUpdateGroupActionErrorKindKind of error that occurred.
Implementations§
source§impl BatchPutScheduledUpdateGroupActionError
impl BatchPutScheduledUpdateGroupActionError
sourcepub fn new(
kind: BatchPutScheduledUpdateGroupActionErrorKind,
meta: Error
) -> Self
pub fn new(
kind: BatchPutScheduledUpdateGroupActionErrorKind,
meta: Error
) -> Self
Creates a new BatchPutScheduledUpdateGroupActionError.
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 BatchPutScheduledUpdateGroupActionError::Unhandled variant from any error type.
Examples found in repository?
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 345 346 347 348 349 350 351
pub fn parse_batch_put_scheduled_update_group_action_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::BatchPutScheduledUpdateGroupActionOutput,
crate::error::BatchPutScheduledUpdateGroupActionError,
> {
let generic = crate::xml_deser::parse_http_generic_error(response)
.map_err(crate::error::BatchPutScheduledUpdateGroupActionError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::BatchPutScheduledUpdateGroupActionError::unhandled(generic))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"AlreadyExists" => {
crate::error::BatchPutScheduledUpdateGroupActionError {
meta: generic,
kind: crate::error::BatchPutScheduledUpdateGroupActionErrorKind::AlreadyExistsFault(
{
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::already_exists_fault::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_already_exists_fault_xml_err(response.body().as_ref(), output).map_err(crate::error::BatchPutScheduledUpdateGroupActionError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
}
}
"LimitExceeded" => {
crate::error::BatchPutScheduledUpdateGroupActionError {
meta: generic,
kind: crate::error::BatchPutScheduledUpdateGroupActionErrorKind::LimitExceededFault(
{
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::limit_exceeded_fault::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_limit_exceeded_fault_xml_err(response.body().as_ref(), output).map_err(crate::error::BatchPutScheduledUpdateGroupActionError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
}
}
"ResourceContention" => crate::error::BatchPutScheduledUpdateGroupActionError {
meta: generic,
kind:
crate::error::BatchPutScheduledUpdateGroupActionErrorKind::ResourceContentionFault(
{
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output =
crate::error::resource_contention_fault::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_resource_contention_fault_xml_err(response.body().as_ref(), output).map_err(crate::error::BatchPutScheduledUpdateGroupActionError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
},
_ => crate::error::BatchPutScheduledUpdateGroupActionError::generic(generic),
})
}sourcepub fn generic(err: Error) -> Self
pub fn generic(err: Error) -> Self
Creates the BatchPutScheduledUpdateGroupActionError::Unhandled variant from a aws_smithy_types::Error.
Examples found in repository?
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 345 346 347 348 349 350 351
pub fn parse_batch_put_scheduled_update_group_action_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::BatchPutScheduledUpdateGroupActionOutput,
crate::error::BatchPutScheduledUpdateGroupActionError,
> {
let generic = crate::xml_deser::parse_http_generic_error(response)
.map_err(crate::error::BatchPutScheduledUpdateGroupActionError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::BatchPutScheduledUpdateGroupActionError::unhandled(generic))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"AlreadyExists" => {
crate::error::BatchPutScheduledUpdateGroupActionError {
meta: generic,
kind: crate::error::BatchPutScheduledUpdateGroupActionErrorKind::AlreadyExistsFault(
{
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::already_exists_fault::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_already_exists_fault_xml_err(response.body().as_ref(), output).map_err(crate::error::BatchPutScheduledUpdateGroupActionError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
}
}
"LimitExceeded" => {
crate::error::BatchPutScheduledUpdateGroupActionError {
meta: generic,
kind: crate::error::BatchPutScheduledUpdateGroupActionErrorKind::LimitExceededFault(
{
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::limit_exceeded_fault::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_limit_exceeded_fault_xml_err(response.body().as_ref(), output).map_err(crate::error::BatchPutScheduledUpdateGroupActionError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
}
}
"ResourceContention" => crate::error::BatchPutScheduledUpdateGroupActionError {
meta: generic,
kind:
crate::error::BatchPutScheduledUpdateGroupActionErrorKind::ResourceContentionFault(
{
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output =
crate::error::resource_contention_fault::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_resource_contention_fault_xml_err(response.body().as_ref(), output).map_err(crate::error::BatchPutScheduledUpdateGroupActionError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
},
_ => crate::error::BatchPutScheduledUpdateGroupActionError::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_already_exists_fault(&self) -> bool
pub fn is_already_exists_fault(&self) -> bool
Returns true if the error kind is BatchPutScheduledUpdateGroupActionErrorKind::AlreadyExistsFault.
sourcepub fn is_limit_exceeded_fault(&self) -> bool
pub fn is_limit_exceeded_fault(&self) -> bool
Returns true if the error kind is BatchPutScheduledUpdateGroupActionErrorKind::LimitExceededFault.
sourcepub fn is_resource_contention_fault(&self) -> bool
pub fn is_resource_contention_fault(&self) -> bool
Returns true if the error kind is BatchPutScheduledUpdateGroupActionErrorKind::ResourceContentionFault.