#[non_exhaustive]pub struct UpdateUserHierarchyGroupNameError {
pub kind: UpdateUserHierarchyGroupNameErrorKind,
/* private fields */
}
Expand description
Error type for the UpdateUserHierarchyGroupName
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: UpdateUserHierarchyGroupNameErrorKind
Kind of error that occurred.
Implementations§
source§impl UpdateUserHierarchyGroupNameError
impl UpdateUserHierarchyGroupNameError
sourcepub fn new(kind: UpdateUserHierarchyGroupNameErrorKind, meta: Error) -> Self
pub fn new(kind: UpdateUserHierarchyGroupNameErrorKind, meta: Error) -> Self
Creates a new UpdateUserHierarchyGroupNameError
.
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 UpdateUserHierarchyGroupNameError::Unhandled
variant from any error type.
Examples found in repository?
19042 19043 19044 19045 19046 19047 19048 19049 19050 19051 19052 19053 19054 19055 19056 19057 19058 19059 19060 19061 19062 19063 19064 19065 19066 19067 19068 19069 19070 19071 19072 19073 19074 19075 19076 19077 19078 19079 19080 19081 19082 19083 19084 19085 19086 19087 19088 19089 19090 19091 19092 19093 19094 19095 19096 19097 19098 19099 19100 19101 19102 19103 19104 19105 19106 19107 19108 19109 19110 19111 19112 19113 19114 19115 19116 19117 19118 19119 19120 19121 19122 19123 19124 19125 19126 19127 19128 19129 19130 19131 19132 19133 19134 19135 19136 19137 19138 19139 19140 19141 19142 19143 19144 19145 19146 19147 19148 19149 19150 19151 19152 19153 19154 19155 19156 19157 19158 19159 19160 19161 19162 19163 19164 19165 19166 19167 19168
pub fn parse_update_user_hierarchy_group_name_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::UpdateUserHierarchyGroupNameOutput,
crate::error::UpdateUserHierarchyGroupNameError,
> {
let generic = crate::json_deser::parse_http_generic_error(response)
.map_err(crate::error::UpdateUserHierarchyGroupNameError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::UpdateUserHierarchyGroupNameError::unhandled(
generic,
))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"DuplicateResourceException" => crate::error::UpdateUserHierarchyGroupNameError {
meta: generic,
kind: crate::error::UpdateUserHierarchyGroupNameErrorKind::DuplicateResourceException(
{
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output =
crate::error::duplicate_resource_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_duplicate_resource_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateUserHierarchyGroupNameError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
},
"InternalServiceException" => crate::error::UpdateUserHierarchyGroupNameError {
meta: generic,
kind: crate::error::UpdateUserHierarchyGroupNameErrorKind::InternalServiceException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::internal_service_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_internal_service_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateUserHierarchyGroupNameError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"InvalidParameterException" => crate::error::UpdateUserHierarchyGroupNameError {
meta: generic,
kind: crate::error::UpdateUserHierarchyGroupNameErrorKind::InvalidParameterException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::invalid_parameter_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_invalid_parameter_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateUserHierarchyGroupNameError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"InvalidRequestException" => crate::error::UpdateUserHierarchyGroupNameError {
meta: generic,
kind: crate::error::UpdateUserHierarchyGroupNameErrorKind::InvalidRequestException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::invalid_request_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_invalid_request_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateUserHierarchyGroupNameError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"ResourceNotFoundException" => crate::error::UpdateUserHierarchyGroupNameError {
meta: generic,
kind: crate::error::UpdateUserHierarchyGroupNameErrorKind::ResourceNotFoundException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::resource_not_found_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_resource_not_found_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateUserHierarchyGroupNameError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"ThrottlingException" => crate::error::UpdateUserHierarchyGroupNameError {
meta: generic,
kind: crate::error::UpdateUserHierarchyGroupNameErrorKind::ThrottlingException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::throttling_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_throttling_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateUserHierarchyGroupNameError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
_ => crate::error::UpdateUserHierarchyGroupNameError::generic(generic),
})
}
sourcepub fn generic(err: Error) -> Self
pub fn generic(err: Error) -> Self
Creates the UpdateUserHierarchyGroupNameError::Unhandled
variant from a aws_smithy_types::Error
.
Examples found in repository?
19042 19043 19044 19045 19046 19047 19048 19049 19050 19051 19052 19053 19054 19055 19056 19057 19058 19059 19060 19061 19062 19063 19064 19065 19066 19067 19068 19069 19070 19071 19072 19073 19074 19075 19076 19077 19078 19079 19080 19081 19082 19083 19084 19085 19086 19087 19088 19089 19090 19091 19092 19093 19094 19095 19096 19097 19098 19099 19100 19101 19102 19103 19104 19105 19106 19107 19108 19109 19110 19111 19112 19113 19114 19115 19116 19117 19118 19119 19120 19121 19122 19123 19124 19125 19126 19127 19128 19129 19130 19131 19132 19133 19134 19135 19136 19137 19138 19139 19140 19141 19142 19143 19144 19145 19146 19147 19148 19149 19150 19151 19152 19153 19154 19155 19156 19157 19158 19159 19160 19161 19162 19163 19164 19165 19166 19167 19168
pub fn parse_update_user_hierarchy_group_name_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::UpdateUserHierarchyGroupNameOutput,
crate::error::UpdateUserHierarchyGroupNameError,
> {
let generic = crate::json_deser::parse_http_generic_error(response)
.map_err(crate::error::UpdateUserHierarchyGroupNameError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::UpdateUserHierarchyGroupNameError::unhandled(
generic,
))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"DuplicateResourceException" => crate::error::UpdateUserHierarchyGroupNameError {
meta: generic,
kind: crate::error::UpdateUserHierarchyGroupNameErrorKind::DuplicateResourceException(
{
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output =
crate::error::duplicate_resource_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_duplicate_resource_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateUserHierarchyGroupNameError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
},
"InternalServiceException" => crate::error::UpdateUserHierarchyGroupNameError {
meta: generic,
kind: crate::error::UpdateUserHierarchyGroupNameErrorKind::InternalServiceException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::internal_service_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_internal_service_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateUserHierarchyGroupNameError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"InvalidParameterException" => crate::error::UpdateUserHierarchyGroupNameError {
meta: generic,
kind: crate::error::UpdateUserHierarchyGroupNameErrorKind::InvalidParameterException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::invalid_parameter_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_invalid_parameter_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateUserHierarchyGroupNameError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"InvalidRequestException" => crate::error::UpdateUserHierarchyGroupNameError {
meta: generic,
kind: crate::error::UpdateUserHierarchyGroupNameErrorKind::InvalidRequestException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::invalid_request_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_invalid_request_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateUserHierarchyGroupNameError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"ResourceNotFoundException" => crate::error::UpdateUserHierarchyGroupNameError {
meta: generic,
kind: crate::error::UpdateUserHierarchyGroupNameErrorKind::ResourceNotFoundException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::resource_not_found_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_resource_not_found_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateUserHierarchyGroupNameError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"ThrottlingException" => crate::error::UpdateUserHierarchyGroupNameError {
meta: generic,
kind: crate::error::UpdateUserHierarchyGroupNameErrorKind::ThrottlingException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::throttling_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_throttling_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateUserHierarchyGroupNameError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
_ => crate::error::UpdateUserHierarchyGroupNameError::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_duplicate_resource_exception(&self) -> bool
pub fn is_duplicate_resource_exception(&self) -> bool
Returns true
if the error kind is UpdateUserHierarchyGroupNameErrorKind::DuplicateResourceException
.
sourcepub fn is_internal_service_exception(&self) -> bool
pub fn is_internal_service_exception(&self) -> bool
Returns true
if the error kind is UpdateUserHierarchyGroupNameErrorKind::InternalServiceException
.
sourcepub fn is_invalid_parameter_exception(&self) -> bool
pub fn is_invalid_parameter_exception(&self) -> bool
Returns true
if the error kind is UpdateUserHierarchyGroupNameErrorKind::InvalidParameterException
.
sourcepub fn is_invalid_request_exception(&self) -> bool
pub fn is_invalid_request_exception(&self) -> bool
Returns true
if the error kind is UpdateUserHierarchyGroupNameErrorKind::InvalidRequestException
.
sourcepub fn is_resource_not_found_exception(&self) -> bool
pub fn is_resource_not_found_exception(&self) -> bool
Returns true
if the error kind is UpdateUserHierarchyGroupNameErrorKind::ResourceNotFoundException
.
sourcepub fn is_throttling_exception(&self) -> bool
pub fn is_throttling_exception(&self) -> bool
Returns true
if the error kind is UpdateUserHierarchyGroupNameErrorKind::ThrottlingException
.