#[non_exhaustive]pub struct UpdateVPCEConfigurationError {
pub kind: UpdateVPCEConfigurationErrorKind,
/* private fields */
}Expand description
Error type for the UpdateVPCEConfiguration 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: UpdateVPCEConfigurationErrorKindKind of error that occurred.
Implementations§
source§impl UpdateVPCEConfigurationError
impl UpdateVPCEConfigurationError
sourcepub fn new(kind: UpdateVPCEConfigurationErrorKind, meta: Error) -> Self
pub fn new(kind: UpdateVPCEConfigurationErrorKind, meta: Error) -> Self
Creates a new UpdateVPCEConfigurationError.
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 UpdateVPCEConfigurationError::Unhandled variant from any error type.
Examples found in repository?
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 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131
pub fn parse_update_vpce_configuration_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::UpdateVpceConfigurationOutput,
crate::error::UpdateVPCEConfigurationError,
> {
let generic = crate::json_deser::parse_http_generic_error(response)
.map_err(crate::error::UpdateVPCEConfigurationError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::UpdateVPCEConfigurationError::unhandled(
generic,
))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"ArgumentException" => {
crate::error::UpdateVPCEConfigurationError {
meta: generic,
kind: crate::error::UpdateVPCEConfigurationErrorKind::ArgumentException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::argument_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_argument_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateVPCEConfigurationError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
}
}
"InvalidOperationException" => crate::error::UpdateVPCEConfigurationError {
meta: generic,
kind: crate::error::UpdateVPCEConfigurationErrorKind::InvalidOperationException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::invalid_operation_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_invalid_operation_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateVPCEConfigurationError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"NotFoundException" => crate::error::UpdateVPCEConfigurationError {
meta: generic,
kind: crate::error::UpdateVPCEConfigurationErrorKind::NotFoundException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::not_found_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_not_found_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateVPCEConfigurationError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"ServiceAccountException" => crate::error::UpdateVPCEConfigurationError {
meta: generic,
kind: crate::error::UpdateVPCEConfigurationErrorKind::ServiceAccountException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::service_account_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_service_account_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateVPCEConfigurationError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
_ => crate::error::UpdateVPCEConfigurationError::generic(generic),
})
}sourcepub fn generic(err: Error) -> Self
pub fn generic(err: Error) -> Self
Creates the UpdateVPCEConfigurationError::Unhandled variant from a aws_smithy_types::Error.
Examples found in repository?
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 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131
pub fn parse_update_vpce_configuration_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::UpdateVpceConfigurationOutput,
crate::error::UpdateVPCEConfigurationError,
> {
let generic = crate::json_deser::parse_http_generic_error(response)
.map_err(crate::error::UpdateVPCEConfigurationError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::UpdateVPCEConfigurationError::unhandled(
generic,
))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"ArgumentException" => {
crate::error::UpdateVPCEConfigurationError {
meta: generic,
kind: crate::error::UpdateVPCEConfigurationErrorKind::ArgumentException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::argument_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_argument_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateVPCEConfigurationError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
}
}
"InvalidOperationException" => crate::error::UpdateVPCEConfigurationError {
meta: generic,
kind: crate::error::UpdateVPCEConfigurationErrorKind::InvalidOperationException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::invalid_operation_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_invalid_operation_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateVPCEConfigurationError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"NotFoundException" => crate::error::UpdateVPCEConfigurationError {
meta: generic,
kind: crate::error::UpdateVPCEConfigurationErrorKind::NotFoundException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::not_found_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_not_found_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateVPCEConfigurationError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"ServiceAccountException" => crate::error::UpdateVPCEConfigurationError {
meta: generic,
kind: crate::error::UpdateVPCEConfigurationErrorKind::ServiceAccountException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::service_account_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_service_account_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateVPCEConfigurationError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
_ => crate::error::UpdateVPCEConfigurationError::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_argument_exception(&self) -> bool
pub fn is_argument_exception(&self) -> bool
Returns true if the error kind is UpdateVPCEConfigurationErrorKind::ArgumentException.
sourcepub fn is_invalid_operation_exception(&self) -> bool
pub fn is_invalid_operation_exception(&self) -> bool
Returns true if the error kind is UpdateVPCEConfigurationErrorKind::InvalidOperationException.
sourcepub fn is_not_found_exception(&self) -> bool
pub fn is_not_found_exception(&self) -> bool
Returns true if the error kind is UpdateVPCEConfigurationErrorKind::NotFoundException.
sourcepub fn is_service_account_exception(&self) -> bool
pub fn is_service_account_exception(&self) -> bool
Returns true if the error kind is UpdateVPCEConfigurationErrorKind::ServiceAccountException.