#[non_exhaustive]pub struct RejectEnvironmentAccountConnectionError {
pub kind: RejectEnvironmentAccountConnectionErrorKind,
/* private fields */
}
Expand description
Error type for the RejectEnvironmentAccountConnection
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: RejectEnvironmentAccountConnectionErrorKind
Kind of error that occurred.
Implementations§
source§impl RejectEnvironmentAccountConnectionError
impl RejectEnvironmentAccountConnectionError
sourcepub fn new(
kind: RejectEnvironmentAccountConnectionErrorKind,
meta: Error
) -> Self
pub fn new(
kind: RejectEnvironmentAccountConnectionErrorKind,
meta: Error
) -> Self
Creates a new RejectEnvironmentAccountConnectionError
.
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 RejectEnvironmentAccountConnectionError::Unhandled
variant from any error type.
Examples found in repository?
7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108
pub fn parse_reject_environment_account_connection_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::RejectEnvironmentAccountConnectionOutput,
crate::error::RejectEnvironmentAccountConnectionError,
> {
let generic = crate::json_deser::parse_http_generic_error(response)
.map_err(crate::error::RejectEnvironmentAccountConnectionError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::RejectEnvironmentAccountConnectionError::unhandled(generic))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"AccessDeniedException" => crate::error::RejectEnvironmentAccountConnectionError {
meta: generic,
kind: crate::error::RejectEnvironmentAccountConnectionErrorKind::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::RejectEnvironmentAccountConnectionError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
},
"ConflictException" => {
crate::error::RejectEnvironmentAccountConnectionError {
meta: generic,
kind: crate::error::RejectEnvironmentAccountConnectionErrorKind::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::RejectEnvironmentAccountConnectionError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
}
}
"InternalServerException" => crate::error::RejectEnvironmentAccountConnectionError {
meta: generic,
kind:
crate::error::RejectEnvironmentAccountConnectionErrorKind::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::RejectEnvironmentAccountConnectionError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
},
"ResourceNotFoundException" => crate::error::RejectEnvironmentAccountConnectionError {
meta: generic,
kind:
crate::error::RejectEnvironmentAccountConnectionErrorKind::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::RejectEnvironmentAccountConnectionError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
},
"ThrottlingException" => crate::error::RejectEnvironmentAccountConnectionError {
meta: generic,
kind: crate::error::RejectEnvironmentAccountConnectionErrorKind::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::RejectEnvironmentAccountConnectionError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"ValidationException" => crate::error::RejectEnvironmentAccountConnectionError {
meta: generic,
kind: crate::error::RejectEnvironmentAccountConnectionErrorKind::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::RejectEnvironmentAccountConnectionError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
_ => crate::error::RejectEnvironmentAccountConnectionError::generic(generic),
})
}
sourcepub fn generic(err: Error) -> Self
pub fn generic(err: Error) -> Self
Creates the RejectEnvironmentAccountConnectionError::Unhandled
variant from a aws_smithy_types::Error
.
Examples found in repository?
7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108
pub fn parse_reject_environment_account_connection_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::RejectEnvironmentAccountConnectionOutput,
crate::error::RejectEnvironmentAccountConnectionError,
> {
let generic = crate::json_deser::parse_http_generic_error(response)
.map_err(crate::error::RejectEnvironmentAccountConnectionError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::RejectEnvironmentAccountConnectionError::unhandled(generic))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"AccessDeniedException" => crate::error::RejectEnvironmentAccountConnectionError {
meta: generic,
kind: crate::error::RejectEnvironmentAccountConnectionErrorKind::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::RejectEnvironmentAccountConnectionError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
},
"ConflictException" => {
crate::error::RejectEnvironmentAccountConnectionError {
meta: generic,
kind: crate::error::RejectEnvironmentAccountConnectionErrorKind::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::RejectEnvironmentAccountConnectionError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
}
}
"InternalServerException" => crate::error::RejectEnvironmentAccountConnectionError {
meta: generic,
kind:
crate::error::RejectEnvironmentAccountConnectionErrorKind::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::RejectEnvironmentAccountConnectionError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
},
"ResourceNotFoundException" => crate::error::RejectEnvironmentAccountConnectionError {
meta: generic,
kind:
crate::error::RejectEnvironmentAccountConnectionErrorKind::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::RejectEnvironmentAccountConnectionError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
},
"ThrottlingException" => crate::error::RejectEnvironmentAccountConnectionError {
meta: generic,
kind: crate::error::RejectEnvironmentAccountConnectionErrorKind::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::RejectEnvironmentAccountConnectionError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"ValidationException" => crate::error::RejectEnvironmentAccountConnectionError {
meta: generic,
kind: crate::error::RejectEnvironmentAccountConnectionErrorKind::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::RejectEnvironmentAccountConnectionError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
_ => crate::error::RejectEnvironmentAccountConnectionError::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 RejectEnvironmentAccountConnectionErrorKind::AccessDeniedException
.
sourcepub fn is_conflict_exception(&self) -> bool
pub fn is_conflict_exception(&self) -> bool
Returns true
if the error kind is RejectEnvironmentAccountConnectionErrorKind::ConflictException
.
sourcepub fn is_internal_server_exception(&self) -> bool
pub fn is_internal_server_exception(&self) -> bool
Returns true
if the error kind is RejectEnvironmentAccountConnectionErrorKind::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 RejectEnvironmentAccountConnectionErrorKind::ResourceNotFoundException
.
sourcepub fn is_throttling_exception(&self) -> bool
pub fn is_throttling_exception(&self) -> bool
Returns true
if the error kind is RejectEnvironmentAccountConnectionErrorKind::ThrottlingException
.
sourcepub fn is_validation_exception(&self) -> bool
pub fn is_validation_exception(&self) -> bool
Returns true
if the error kind is RejectEnvironmentAccountConnectionErrorKind::ValidationException
.