Struct aws_sdk_cloudformation::error::UpdateStackSetError
source · #[non_exhaustive]pub struct UpdateStackSetError {
pub kind: UpdateStackSetErrorKind,
/* private fields */
}Expand description
Error type for the UpdateStackSet 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: UpdateStackSetErrorKindKind of error that occurred.
Implementations§
source§impl UpdateStackSetError
impl UpdateStackSetError
sourcepub fn new(kind: UpdateStackSetErrorKind, meta: Error) -> Self
pub fn new(kind: UpdateStackSetErrorKind, meta: Error) -> Self
Creates a new UpdateStackSetError.
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 UpdateStackSetError::Unhandled variant from any error type.
Examples found in repository?
3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902
pub fn parse_update_stack_set_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::UpdateStackSetOutput, crate::error::UpdateStackSetError> {
let generic = crate::xml_deser::parse_http_generic_error(response)
.map_err(crate::error::UpdateStackSetError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => return Err(crate::error::UpdateStackSetError::unhandled(generic)),
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"InvalidOperationException" => crate::error::UpdateStackSetError {
meta: generic,
kind: crate::error::UpdateStackSetErrorKind::InvalidOperationException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::invalid_operation_exception::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_invalid_operation_exception_xml_err(response.body().as_ref(), output).map_err(crate::error::UpdateStackSetError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"OperationIdAlreadyExistsException" => crate::error::UpdateStackSetError {
meta: generic,
kind: crate::error::UpdateStackSetErrorKind::OperationIdAlreadyExistsException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output =
crate::error::operation_id_already_exists_exception::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_operation_id_already_exists_exception_xml_err(response.body().as_ref(), output).map_err(crate::error::UpdateStackSetError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"OperationInProgressException" => crate::error::UpdateStackSetError {
meta: generic,
kind: crate::error::UpdateStackSetErrorKind::OperationInProgressException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output =
crate::error::operation_in_progress_exception::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_operation_in_progress_exception_xml_err(response.body().as_ref(), output).map_err(crate::error::UpdateStackSetError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"StackInstanceNotFoundException" => crate::error::UpdateStackSetError {
meta: generic,
kind: crate::error::UpdateStackSetErrorKind::StackInstanceNotFoundException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output =
crate::error::stack_instance_not_found_exception::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_stack_instance_not_found_exception_xml_err(response.body().as_ref(), output).map_err(crate::error::UpdateStackSetError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"StackSetNotFoundException" => crate::error::UpdateStackSetError {
meta: generic,
kind: crate::error::UpdateStackSetErrorKind::StackSetNotFoundException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output =
crate::error::stack_set_not_found_exception::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_stack_set_not_found_exception_xml_err(response.body().as_ref(), output).map_err(crate::error::UpdateStackSetError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"StaleRequestException" => crate::error::UpdateStackSetError {
meta: generic,
kind: crate::error::UpdateStackSetErrorKind::StaleRequestException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::stale_request_exception::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_stale_request_exception_xml_err(response.body().as_ref(), output).map_err(crate::error::UpdateStackSetError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
_ => crate::error::UpdateStackSetError::generic(generic),
})
}sourcepub fn generic(err: Error) -> Self
pub fn generic(err: Error) -> Self
Creates the UpdateStackSetError::Unhandled variant from a aws_smithy_types::Error.
Examples found in repository?
3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902
pub fn parse_update_stack_set_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::UpdateStackSetOutput, crate::error::UpdateStackSetError> {
let generic = crate::xml_deser::parse_http_generic_error(response)
.map_err(crate::error::UpdateStackSetError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => return Err(crate::error::UpdateStackSetError::unhandled(generic)),
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"InvalidOperationException" => crate::error::UpdateStackSetError {
meta: generic,
kind: crate::error::UpdateStackSetErrorKind::InvalidOperationException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::invalid_operation_exception::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_invalid_operation_exception_xml_err(response.body().as_ref(), output).map_err(crate::error::UpdateStackSetError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"OperationIdAlreadyExistsException" => crate::error::UpdateStackSetError {
meta: generic,
kind: crate::error::UpdateStackSetErrorKind::OperationIdAlreadyExistsException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output =
crate::error::operation_id_already_exists_exception::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_operation_id_already_exists_exception_xml_err(response.body().as_ref(), output).map_err(crate::error::UpdateStackSetError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"OperationInProgressException" => crate::error::UpdateStackSetError {
meta: generic,
kind: crate::error::UpdateStackSetErrorKind::OperationInProgressException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output =
crate::error::operation_in_progress_exception::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_operation_in_progress_exception_xml_err(response.body().as_ref(), output).map_err(crate::error::UpdateStackSetError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"StackInstanceNotFoundException" => crate::error::UpdateStackSetError {
meta: generic,
kind: crate::error::UpdateStackSetErrorKind::StackInstanceNotFoundException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output =
crate::error::stack_instance_not_found_exception::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_stack_instance_not_found_exception_xml_err(response.body().as_ref(), output).map_err(crate::error::UpdateStackSetError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"StackSetNotFoundException" => crate::error::UpdateStackSetError {
meta: generic,
kind: crate::error::UpdateStackSetErrorKind::StackSetNotFoundException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output =
crate::error::stack_set_not_found_exception::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_stack_set_not_found_exception_xml_err(response.body().as_ref(), output).map_err(crate::error::UpdateStackSetError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"StaleRequestException" => crate::error::UpdateStackSetError {
meta: generic,
kind: crate::error::UpdateStackSetErrorKind::StaleRequestException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::stale_request_exception::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_stale_request_exception_xml_err(response.body().as_ref(), output).map_err(crate::error::UpdateStackSetError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
_ => crate::error::UpdateStackSetError::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_invalid_operation_exception(&self) -> bool
pub fn is_invalid_operation_exception(&self) -> bool
Returns true if the error kind is UpdateStackSetErrorKind::InvalidOperationException.
sourcepub fn is_operation_id_already_exists_exception(&self) -> bool
pub fn is_operation_id_already_exists_exception(&self) -> bool
Returns true if the error kind is UpdateStackSetErrorKind::OperationIdAlreadyExistsException.
sourcepub fn is_operation_in_progress_exception(&self) -> bool
pub fn is_operation_in_progress_exception(&self) -> bool
Returns true if the error kind is UpdateStackSetErrorKind::OperationInProgressException.
sourcepub fn is_stack_instance_not_found_exception(&self) -> bool
pub fn is_stack_instance_not_found_exception(&self) -> bool
Returns true if the error kind is UpdateStackSetErrorKind::StackInstanceNotFoundException.
sourcepub fn is_stack_set_not_found_exception(&self) -> bool
pub fn is_stack_set_not_found_exception(&self) -> bool
Returns true if the error kind is UpdateStackSetErrorKind::StackSetNotFoundException.
sourcepub fn is_stale_request_exception(&self) -> bool
pub fn is_stale_request_exception(&self) -> bool
Returns true if the error kind is UpdateStackSetErrorKind::StaleRequestException.