#[non_exhaustive]pub struct NotifyResourceDeploymentStatusChangeError {
pub kind: NotifyResourceDeploymentStatusChangeErrorKind,
/* private fields */
}
Expand description
Error type for the NotifyResourceDeploymentStatusChange
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: NotifyResourceDeploymentStatusChangeErrorKind
Kind of error that occurred.
Implementations§
source§impl NotifyResourceDeploymentStatusChangeError
impl NotifyResourceDeploymentStatusChangeError
sourcepub fn new(
kind: NotifyResourceDeploymentStatusChangeErrorKind,
meta: Error
) -> Self
pub fn new(
kind: NotifyResourceDeploymentStatusChangeErrorKind,
meta: Error
) -> Self
Creates a new NotifyResourceDeploymentStatusChangeError
.
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 NotifyResourceDeploymentStatusChangeError::Unhandled
variant from any error type.
Examples found in repository?
7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954
pub fn parse_notify_resource_deployment_status_change_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::NotifyResourceDeploymentStatusChangeOutput,
crate::error::NotifyResourceDeploymentStatusChangeError,
> {
let generic = crate::json_deser::parse_http_generic_error(response)
.map_err(crate::error::NotifyResourceDeploymentStatusChangeError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::NotifyResourceDeploymentStatusChangeError::unhandled(generic))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"AccessDeniedException" => crate::error::NotifyResourceDeploymentStatusChangeError { meta: generic, kind: crate::error::NotifyResourceDeploymentStatusChangeErrorKind::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::NotifyResourceDeploymentStatusChangeError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"ConflictException" => crate::error::NotifyResourceDeploymentStatusChangeError { meta: generic, kind: crate::error::NotifyResourceDeploymentStatusChangeErrorKind::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::NotifyResourceDeploymentStatusChangeError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InternalServerException" => crate::error::NotifyResourceDeploymentStatusChangeError { meta: generic, kind: crate::error::NotifyResourceDeploymentStatusChangeErrorKind::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::NotifyResourceDeploymentStatusChangeError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"ResourceNotFoundException" => crate::error::NotifyResourceDeploymentStatusChangeError { meta: generic, kind: crate::error::NotifyResourceDeploymentStatusChangeErrorKind::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::NotifyResourceDeploymentStatusChangeError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"ServiceQuotaExceededException" => crate::error::NotifyResourceDeploymentStatusChangeError { meta: generic, kind: crate::error::NotifyResourceDeploymentStatusChangeErrorKind::ServiceQuotaExceededException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::service_quota_exceeded_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_service_quota_exceeded_exception_json_err(response.body().as_ref(), output).map_err(crate::error::NotifyResourceDeploymentStatusChangeError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"ThrottlingException" => crate::error::NotifyResourceDeploymentStatusChangeError { meta: generic, kind: crate::error::NotifyResourceDeploymentStatusChangeErrorKind::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::NotifyResourceDeploymentStatusChangeError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"ValidationException" => crate::error::NotifyResourceDeploymentStatusChangeError { meta: generic, kind: crate::error::NotifyResourceDeploymentStatusChangeErrorKind::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::NotifyResourceDeploymentStatusChangeError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
_ => crate::error::NotifyResourceDeploymentStatusChangeError::generic(generic)
})
}
sourcepub fn generic(err: Error) -> Self
pub fn generic(err: Error) -> Self
Creates the NotifyResourceDeploymentStatusChangeError::Unhandled
variant from a aws_smithy_types::Error
.
Examples found in repository?
7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954
pub fn parse_notify_resource_deployment_status_change_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::NotifyResourceDeploymentStatusChangeOutput,
crate::error::NotifyResourceDeploymentStatusChangeError,
> {
let generic = crate::json_deser::parse_http_generic_error(response)
.map_err(crate::error::NotifyResourceDeploymentStatusChangeError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::NotifyResourceDeploymentStatusChangeError::unhandled(generic))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"AccessDeniedException" => crate::error::NotifyResourceDeploymentStatusChangeError { meta: generic, kind: crate::error::NotifyResourceDeploymentStatusChangeErrorKind::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::NotifyResourceDeploymentStatusChangeError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"ConflictException" => crate::error::NotifyResourceDeploymentStatusChangeError { meta: generic, kind: crate::error::NotifyResourceDeploymentStatusChangeErrorKind::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::NotifyResourceDeploymentStatusChangeError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InternalServerException" => crate::error::NotifyResourceDeploymentStatusChangeError { meta: generic, kind: crate::error::NotifyResourceDeploymentStatusChangeErrorKind::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::NotifyResourceDeploymentStatusChangeError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"ResourceNotFoundException" => crate::error::NotifyResourceDeploymentStatusChangeError { meta: generic, kind: crate::error::NotifyResourceDeploymentStatusChangeErrorKind::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::NotifyResourceDeploymentStatusChangeError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"ServiceQuotaExceededException" => crate::error::NotifyResourceDeploymentStatusChangeError { meta: generic, kind: crate::error::NotifyResourceDeploymentStatusChangeErrorKind::ServiceQuotaExceededException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::service_quota_exceeded_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_service_quota_exceeded_exception_json_err(response.body().as_ref(), output).map_err(crate::error::NotifyResourceDeploymentStatusChangeError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"ThrottlingException" => crate::error::NotifyResourceDeploymentStatusChangeError { meta: generic, kind: crate::error::NotifyResourceDeploymentStatusChangeErrorKind::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::NotifyResourceDeploymentStatusChangeError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"ValidationException" => crate::error::NotifyResourceDeploymentStatusChangeError { meta: generic, kind: crate::error::NotifyResourceDeploymentStatusChangeErrorKind::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::NotifyResourceDeploymentStatusChangeError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
_ => crate::error::NotifyResourceDeploymentStatusChangeError::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 NotifyResourceDeploymentStatusChangeErrorKind::AccessDeniedException
.
sourcepub fn is_conflict_exception(&self) -> bool
pub fn is_conflict_exception(&self) -> bool
Returns true
if the error kind is NotifyResourceDeploymentStatusChangeErrorKind::ConflictException
.
sourcepub fn is_internal_server_exception(&self) -> bool
pub fn is_internal_server_exception(&self) -> bool
Returns true
if the error kind is NotifyResourceDeploymentStatusChangeErrorKind::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 NotifyResourceDeploymentStatusChangeErrorKind::ResourceNotFoundException
.
sourcepub fn is_service_quota_exceeded_exception(&self) -> bool
pub fn is_service_quota_exceeded_exception(&self) -> bool
Returns true
if the error kind is NotifyResourceDeploymentStatusChangeErrorKind::ServiceQuotaExceededException
.
sourcepub fn is_throttling_exception(&self) -> bool
pub fn is_throttling_exception(&self) -> bool
Returns true
if the error kind is NotifyResourceDeploymentStatusChangeErrorKind::ThrottlingException
.
sourcepub fn is_validation_exception(&self) -> bool
pub fn is_validation_exception(&self) -> bool
Returns true
if the error kind is NotifyResourceDeploymentStatusChangeErrorKind::ValidationException
.