#[non_exhaustive]pub struct UpdateEnvironmentAccountConnectionError {
pub kind: UpdateEnvironmentAccountConnectionErrorKind,
/* private fields */
}
Expand description
Error type for the UpdateEnvironmentAccountConnection
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: UpdateEnvironmentAccountConnectionErrorKind
Kind of error that occurred.
Implementations§
source§impl UpdateEnvironmentAccountConnectionError
impl UpdateEnvironmentAccountConnectionError
sourcepub fn new(
kind: UpdateEnvironmentAccountConnectionErrorKind,
meta: Error
) -> Self
pub fn new(
kind: UpdateEnvironmentAccountConnectionErrorKind,
meta: Error
) -> Self
Creates a new UpdateEnvironmentAccountConnectionError
.
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 UpdateEnvironmentAccountConnectionError::Unhandled
variant from any error type.
Examples found in repository?
8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876 8877 8878 8879 8880 8881 8882 8883 8884 8885 8886 8887 8888 8889 8890 8891 8892 8893 8894 8895 8896 8897 8898 8899 8900 8901 8902 8903 8904 8905 8906 8907 8908 8909 8910 8911 8912 8913 8914 8915 8916 8917 8918 8919 8920 8921 8922 8923 8924 8925 8926 8927 8928 8929 8930 8931 8932 8933 8934 8935 8936 8937 8938 8939 8940 8941 8942 8943 8944 8945 8946 8947 8948 8949 8950 8951 8952
pub fn parse_update_environment_account_connection_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::UpdateEnvironmentAccountConnectionOutput,
crate::error::UpdateEnvironmentAccountConnectionError,
> {
let generic = crate::json_deser::parse_http_generic_error(response)
.map_err(crate::error::UpdateEnvironmentAccountConnectionError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::UpdateEnvironmentAccountConnectionError::unhandled(generic))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"AccessDeniedException" => crate::error::UpdateEnvironmentAccountConnectionError {
meta: generic,
kind: crate::error::UpdateEnvironmentAccountConnectionErrorKind::AccessDeniedException(
{
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::access_denied_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_access_denied_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateEnvironmentAccountConnectionError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
},
"ConflictException" => {
crate::error::UpdateEnvironmentAccountConnectionError {
meta: generic,
kind: crate::error::UpdateEnvironmentAccountConnectionErrorKind::ConflictException(
{
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::conflict_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_conflict_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateEnvironmentAccountConnectionError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
}
}
"InternalServerException" => crate::error::UpdateEnvironmentAccountConnectionError {
meta: generic,
kind:
crate::error::UpdateEnvironmentAccountConnectionErrorKind::InternalServerException(
{
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output =
crate::error::internal_server_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_internal_server_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateEnvironmentAccountConnectionError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
},
"ResourceNotFoundException" => crate::error::UpdateEnvironmentAccountConnectionError {
meta: generic,
kind:
crate::error::UpdateEnvironmentAccountConnectionErrorKind::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::UpdateEnvironmentAccountConnectionError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
},
"ThrottlingException" => crate::error::UpdateEnvironmentAccountConnectionError {
meta: generic,
kind: crate::error::UpdateEnvironmentAccountConnectionErrorKind::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::UpdateEnvironmentAccountConnectionError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"ValidationException" => crate::error::UpdateEnvironmentAccountConnectionError {
meta: generic,
kind: crate::error::UpdateEnvironmentAccountConnectionErrorKind::ValidationException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::validation_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_validation_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateEnvironmentAccountConnectionError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
_ => crate::error::UpdateEnvironmentAccountConnectionError::generic(generic),
})
}
sourcepub fn generic(err: Error) -> Self
pub fn generic(err: Error) -> Self
Creates the UpdateEnvironmentAccountConnectionError::Unhandled
variant from a aws_smithy_types::Error
.
Examples found in repository?
8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876 8877 8878 8879 8880 8881 8882 8883 8884 8885 8886 8887 8888 8889 8890 8891 8892 8893 8894 8895 8896 8897 8898 8899 8900 8901 8902 8903 8904 8905 8906 8907 8908 8909 8910 8911 8912 8913 8914 8915 8916 8917 8918 8919 8920 8921 8922 8923 8924 8925 8926 8927 8928 8929 8930 8931 8932 8933 8934 8935 8936 8937 8938 8939 8940 8941 8942 8943 8944 8945 8946 8947 8948 8949 8950 8951 8952
pub fn parse_update_environment_account_connection_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::UpdateEnvironmentAccountConnectionOutput,
crate::error::UpdateEnvironmentAccountConnectionError,
> {
let generic = crate::json_deser::parse_http_generic_error(response)
.map_err(crate::error::UpdateEnvironmentAccountConnectionError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::UpdateEnvironmentAccountConnectionError::unhandled(generic))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"AccessDeniedException" => crate::error::UpdateEnvironmentAccountConnectionError {
meta: generic,
kind: crate::error::UpdateEnvironmentAccountConnectionErrorKind::AccessDeniedException(
{
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::access_denied_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_access_denied_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateEnvironmentAccountConnectionError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
},
"ConflictException" => {
crate::error::UpdateEnvironmentAccountConnectionError {
meta: generic,
kind: crate::error::UpdateEnvironmentAccountConnectionErrorKind::ConflictException(
{
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::conflict_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_conflict_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateEnvironmentAccountConnectionError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
}
}
"InternalServerException" => crate::error::UpdateEnvironmentAccountConnectionError {
meta: generic,
kind:
crate::error::UpdateEnvironmentAccountConnectionErrorKind::InternalServerException(
{
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output =
crate::error::internal_server_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_internal_server_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateEnvironmentAccountConnectionError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
},
"ResourceNotFoundException" => crate::error::UpdateEnvironmentAccountConnectionError {
meta: generic,
kind:
crate::error::UpdateEnvironmentAccountConnectionErrorKind::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::UpdateEnvironmentAccountConnectionError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
},
"ThrottlingException" => crate::error::UpdateEnvironmentAccountConnectionError {
meta: generic,
kind: crate::error::UpdateEnvironmentAccountConnectionErrorKind::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::UpdateEnvironmentAccountConnectionError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"ValidationException" => crate::error::UpdateEnvironmentAccountConnectionError {
meta: generic,
kind: crate::error::UpdateEnvironmentAccountConnectionErrorKind::ValidationException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::validation_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_validation_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateEnvironmentAccountConnectionError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
_ => crate::error::UpdateEnvironmentAccountConnectionError::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_exception(&self) -> bool
pub fn is_access_denied_exception(&self) -> bool
Returns true
if the error kind is UpdateEnvironmentAccountConnectionErrorKind::AccessDeniedException
.
sourcepub fn is_conflict_exception(&self) -> bool
pub fn is_conflict_exception(&self) -> bool
Returns true
if the error kind is UpdateEnvironmentAccountConnectionErrorKind::ConflictException
.
sourcepub fn is_internal_server_exception(&self) -> bool
pub fn is_internal_server_exception(&self) -> bool
Returns true
if the error kind is UpdateEnvironmentAccountConnectionErrorKind::InternalServerException
.
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 UpdateEnvironmentAccountConnectionErrorKind::ResourceNotFoundException
.
sourcepub fn is_throttling_exception(&self) -> bool
pub fn is_throttling_exception(&self) -> bool
Returns true
if the error kind is UpdateEnvironmentAccountConnectionErrorKind::ThrottlingException
.
sourcepub fn is_validation_exception(&self) -> bool
pub fn is_validation_exception(&self) -> bool
Returns true
if the error kind is UpdateEnvironmentAccountConnectionErrorKind::ValidationException
.