#[non_exhaustive]pub struct UpdateCloudFrontOriginAccessIdentityError {
pub kind: UpdateCloudFrontOriginAccessIdentityErrorKind,
/* private fields */
}
Expand description
Error type for the UpdateCloudFrontOriginAccessIdentity
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: UpdateCloudFrontOriginAccessIdentityErrorKind
Kind of error that occurred.
Implementations§
source§impl UpdateCloudFrontOriginAccessIdentityError
impl UpdateCloudFrontOriginAccessIdentityError
sourcepub fn new(
kind: UpdateCloudFrontOriginAccessIdentityErrorKind,
meta: Error
) -> Self
pub fn new(
kind: UpdateCloudFrontOriginAccessIdentityErrorKind,
meta: Error
) -> Self
Creates a new UpdateCloudFrontOriginAccessIdentityError
.
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 UpdateCloudFrontOriginAccessIdentityError::Unhandled
variant from any error type.
Examples found in repository?
10795 10796 10797 10798 10799 10800 10801 10802 10803 10804 10805 10806 10807 10808 10809 10810 10811 10812 10813 10814 10815 10816 10817 10818 10819 10820 10821 10822 10823 10824 10825 10826 10827 10828 10829 10830 10831 10832 10833 10834 10835 10836 10837 10838 10839 10840 10841 10842 10843 10844 10845 10846 10847 10848 10849 10850 10851 10852 10853 10854 10855 10856 10857 10858 10859 10860 10861 10862 10863 10864 10865 10866 10867 10868 10869 10870 10871 10872 10873 10874 10875 10876 10877 10878 10879 10880 10881 10882 10883 10884 10885 10886 10887 10888 10889 10890 10891 10892 10893 10894 10895 10896 10897 10898 10899 10900 10901 10902 10903 10904 10905 10906 10907 10908 10909 10910 10911 10912 10913 10914 10915 10916 10917 10918 10919 10920 10921 10922 10923 10924 10925 10926 10927 10928 10929 10930 10931 10932 10933 10934 10935 10936 10937 10938 10939 10940 10941 10942 10943 10944 10945 10946 10947 10948 10949
pub fn parse_update_cloud_front_origin_access_identity_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::UpdateCloudFrontOriginAccessIdentityOutput,
crate::error::UpdateCloudFrontOriginAccessIdentityError,
> {
let generic = crate::xml_deser::parse_http_generic_error(response)
.map_err(crate::error::UpdateCloudFrontOriginAccessIdentityError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::UpdateCloudFrontOriginAccessIdentityError::unhandled(generic))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"AccessDenied" => crate::error::UpdateCloudFrontOriginAccessIdentityError { meta: generic, kind: crate::error::UpdateCloudFrontOriginAccessIdentityErrorKind::AccessDenied({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::access_denied::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_access_denied_xml_err(response.body().as_ref(), output).map_err(crate::error::UpdateCloudFrontOriginAccessIdentityError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"IllegalUpdate" => crate::error::UpdateCloudFrontOriginAccessIdentityError { meta: generic, kind: crate::error::UpdateCloudFrontOriginAccessIdentityErrorKind::IllegalUpdate({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::illegal_update::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_illegal_update_xml_err(response.body().as_ref(), output).map_err(crate::error::UpdateCloudFrontOriginAccessIdentityError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InconsistentQuantities" => crate::error::UpdateCloudFrontOriginAccessIdentityError { meta: generic, kind: crate::error::UpdateCloudFrontOriginAccessIdentityErrorKind::InconsistentQuantities({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::inconsistent_quantities::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_inconsistent_quantities_xml_err(response.body().as_ref(), output).map_err(crate::error::UpdateCloudFrontOriginAccessIdentityError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidArgument" => crate::error::UpdateCloudFrontOriginAccessIdentityError { meta: generic, kind: crate::error::UpdateCloudFrontOriginAccessIdentityErrorKind::InvalidArgument({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::invalid_argument::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_invalid_argument_xml_err(response.body().as_ref(), output).map_err(crate::error::UpdateCloudFrontOriginAccessIdentityError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidIfMatchVersion" => crate::error::UpdateCloudFrontOriginAccessIdentityError { meta: generic, kind: crate::error::UpdateCloudFrontOriginAccessIdentityErrorKind::InvalidIfMatchVersion({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::invalid_if_match_version::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_invalid_if_match_version_xml_err(response.body().as_ref(), output).map_err(crate::error::UpdateCloudFrontOriginAccessIdentityError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"MissingBody" => crate::error::UpdateCloudFrontOriginAccessIdentityError { meta: generic, kind: crate::error::UpdateCloudFrontOriginAccessIdentityErrorKind::MissingBody({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::missing_body::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_missing_body_xml_err(response.body().as_ref(), output).map_err(crate::error::UpdateCloudFrontOriginAccessIdentityError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"NoSuchCloudFrontOriginAccessIdentity" => crate::error::UpdateCloudFrontOriginAccessIdentityError { meta: generic, kind: crate::error::UpdateCloudFrontOriginAccessIdentityErrorKind::NoSuchCloudFrontOriginAccessIdentity({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::no_such_cloud_front_origin_access_identity::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_no_such_cloud_front_origin_access_identity_xml_err(response.body().as_ref(), output).map_err(crate::error::UpdateCloudFrontOriginAccessIdentityError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"PreconditionFailed" => crate::error::UpdateCloudFrontOriginAccessIdentityError { meta: generic, kind: crate::error::UpdateCloudFrontOriginAccessIdentityErrorKind::PreconditionFailed({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::precondition_failed::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_precondition_failed_xml_err(response.body().as_ref(), output).map_err(crate::error::UpdateCloudFrontOriginAccessIdentityError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
_ => crate::error::UpdateCloudFrontOriginAccessIdentityError::generic(generic)
})
}
#[allow(clippy::unnecessary_wraps)]
pub fn parse_update_cloud_front_origin_access_identity_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::UpdateCloudFrontOriginAccessIdentityOutput,
crate::error::UpdateCloudFrontOriginAccessIdentityError,
> {
Ok({
#[allow(unused_mut)]
let mut output =
crate::output::update_cloud_front_origin_access_identity_output::Builder::default();
let _ = response;
output = output.set_cloud_front_origin_access_identity(
crate::http_serde::deser_payload_update_cloud_front_origin_access_identity_update_cloud_front_origin_access_identity_output_cloud_front_origin_access_identity(response.body().as_ref())?
);
output = output.set_e_tag(
crate::http_serde::deser_header_update_cloud_front_origin_access_identity_update_cloud_front_origin_access_identity_output_e_tag(response.headers())
.map_err(|_|crate::error::UpdateCloudFrontOriginAccessIdentityError::unhandled("Failed to parse ETag from header `ETag"))?
);
output.build()
})
}
sourcepub fn generic(err: Error) -> Self
pub fn generic(err: Error) -> Self
Creates the UpdateCloudFrontOriginAccessIdentityError::Unhandled
variant from a aws_smithy_types::Error
.
Examples found in repository?
10795 10796 10797 10798 10799 10800 10801 10802 10803 10804 10805 10806 10807 10808 10809 10810 10811 10812 10813 10814 10815 10816 10817 10818 10819 10820 10821 10822 10823 10824 10825 10826 10827 10828 10829 10830 10831 10832 10833 10834 10835 10836 10837 10838 10839 10840 10841 10842 10843 10844 10845 10846 10847 10848 10849 10850 10851 10852 10853 10854 10855 10856 10857 10858 10859 10860 10861 10862 10863 10864 10865 10866 10867 10868 10869 10870 10871 10872 10873 10874 10875 10876 10877 10878 10879 10880 10881 10882 10883 10884 10885 10886 10887 10888 10889 10890 10891 10892 10893 10894 10895 10896 10897 10898 10899 10900 10901 10902 10903 10904 10905 10906 10907 10908 10909 10910 10911 10912 10913 10914 10915 10916 10917 10918 10919 10920 10921 10922 10923 10924 10925 10926
pub fn parse_update_cloud_front_origin_access_identity_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::UpdateCloudFrontOriginAccessIdentityOutput,
crate::error::UpdateCloudFrontOriginAccessIdentityError,
> {
let generic = crate::xml_deser::parse_http_generic_error(response)
.map_err(crate::error::UpdateCloudFrontOriginAccessIdentityError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::UpdateCloudFrontOriginAccessIdentityError::unhandled(generic))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"AccessDenied" => crate::error::UpdateCloudFrontOriginAccessIdentityError { meta: generic, kind: crate::error::UpdateCloudFrontOriginAccessIdentityErrorKind::AccessDenied({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::access_denied::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_access_denied_xml_err(response.body().as_ref(), output).map_err(crate::error::UpdateCloudFrontOriginAccessIdentityError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"IllegalUpdate" => crate::error::UpdateCloudFrontOriginAccessIdentityError { meta: generic, kind: crate::error::UpdateCloudFrontOriginAccessIdentityErrorKind::IllegalUpdate({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::illegal_update::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_illegal_update_xml_err(response.body().as_ref(), output).map_err(crate::error::UpdateCloudFrontOriginAccessIdentityError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InconsistentQuantities" => crate::error::UpdateCloudFrontOriginAccessIdentityError { meta: generic, kind: crate::error::UpdateCloudFrontOriginAccessIdentityErrorKind::InconsistentQuantities({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::inconsistent_quantities::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_inconsistent_quantities_xml_err(response.body().as_ref(), output).map_err(crate::error::UpdateCloudFrontOriginAccessIdentityError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidArgument" => crate::error::UpdateCloudFrontOriginAccessIdentityError { meta: generic, kind: crate::error::UpdateCloudFrontOriginAccessIdentityErrorKind::InvalidArgument({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::invalid_argument::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_invalid_argument_xml_err(response.body().as_ref(), output).map_err(crate::error::UpdateCloudFrontOriginAccessIdentityError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidIfMatchVersion" => crate::error::UpdateCloudFrontOriginAccessIdentityError { meta: generic, kind: crate::error::UpdateCloudFrontOriginAccessIdentityErrorKind::InvalidIfMatchVersion({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::invalid_if_match_version::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_invalid_if_match_version_xml_err(response.body().as_ref(), output).map_err(crate::error::UpdateCloudFrontOriginAccessIdentityError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"MissingBody" => crate::error::UpdateCloudFrontOriginAccessIdentityError { meta: generic, kind: crate::error::UpdateCloudFrontOriginAccessIdentityErrorKind::MissingBody({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::missing_body::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_missing_body_xml_err(response.body().as_ref(), output).map_err(crate::error::UpdateCloudFrontOriginAccessIdentityError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"NoSuchCloudFrontOriginAccessIdentity" => crate::error::UpdateCloudFrontOriginAccessIdentityError { meta: generic, kind: crate::error::UpdateCloudFrontOriginAccessIdentityErrorKind::NoSuchCloudFrontOriginAccessIdentity({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::no_such_cloud_front_origin_access_identity::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_no_such_cloud_front_origin_access_identity_xml_err(response.body().as_ref(), output).map_err(crate::error::UpdateCloudFrontOriginAccessIdentityError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"PreconditionFailed" => crate::error::UpdateCloudFrontOriginAccessIdentityError { meta: generic, kind: crate::error::UpdateCloudFrontOriginAccessIdentityErrorKind::PreconditionFailed({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::precondition_failed::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_precondition_failed_xml_err(response.body().as_ref(), output).map_err(crate::error::UpdateCloudFrontOriginAccessIdentityError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
_ => crate::error::UpdateCloudFrontOriginAccessIdentityError::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_access_denied(&self) -> bool
pub fn is_access_denied(&self) -> bool
Returns true
if the error kind is UpdateCloudFrontOriginAccessIdentityErrorKind::AccessDenied
.
sourcepub fn is_illegal_update(&self) -> bool
pub fn is_illegal_update(&self) -> bool
Returns true
if the error kind is UpdateCloudFrontOriginAccessIdentityErrorKind::IllegalUpdate
.
sourcepub fn is_inconsistent_quantities(&self) -> bool
pub fn is_inconsistent_quantities(&self) -> bool
Returns true
if the error kind is UpdateCloudFrontOriginAccessIdentityErrorKind::InconsistentQuantities
.
sourcepub fn is_invalid_argument(&self) -> bool
pub fn is_invalid_argument(&self) -> bool
Returns true
if the error kind is UpdateCloudFrontOriginAccessIdentityErrorKind::InvalidArgument
.
sourcepub fn is_invalid_if_match_version(&self) -> bool
pub fn is_invalid_if_match_version(&self) -> bool
Returns true
if the error kind is UpdateCloudFrontOriginAccessIdentityErrorKind::InvalidIfMatchVersion
.
sourcepub fn is_missing_body(&self) -> bool
pub fn is_missing_body(&self) -> bool
Returns true
if the error kind is UpdateCloudFrontOriginAccessIdentityErrorKind::MissingBody
.
sourcepub fn is_no_such_cloud_front_origin_access_identity(&self) -> bool
pub fn is_no_such_cloud_front_origin_access_identity(&self) -> bool
Returns true
if the error kind is UpdateCloudFrontOriginAccessIdentityErrorKind::NoSuchCloudFrontOriginAccessIdentity
.
sourcepub fn is_precondition_failed(&self) -> bool
pub fn is_precondition_failed(&self) -> bool
Returns true
if the error kind is UpdateCloudFrontOriginAccessIdentityErrorKind::PreconditionFailed
.