#[non_exhaustive]pub struct GetDashboardEmbedUrlError {
pub kind: GetDashboardEmbedUrlErrorKind,
/* private fields */
}Expand description
Error type for the GetDashboardEmbedUrl 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: GetDashboardEmbedUrlErrorKindKind of error that occurred.
Implementations§
source§impl GetDashboardEmbedUrlError
impl GetDashboardEmbedUrlError
sourcepub fn new(kind: GetDashboardEmbedUrlErrorKind, meta: Error) -> Self
pub fn new(kind: GetDashboardEmbedUrlErrorKind, meta: Error) -> Self
Creates a new GetDashboardEmbedUrlError.
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 GetDashboardEmbedUrlError::Unhandled variant from any error type.
Examples found in repository?
9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 10000 10001 10002 10003 10004 10005 10006 10007 10008 10009 10010 10011 10012 10013 10014 10015 10016 10017 10018 10019 10020 10021 10022 10023 10024 10025 10026 10027 10028 10029 10030 10031 10032 10033 10034 10035 10036 10037 10038 10039 10040 10041 10042 10043 10044 10045 10046 10047 10048 10049 10050 10051 10052 10053 10054 10055 10056 10057 10058 10059 10060 10061 10062 10063 10064 10065 10066 10067 10068 10069 10070 10071 10072 10073 10074 10075 10076 10077 10078 10079 10080 10081 10082 10083 10084 10085 10086 10087 10088 10089 10090 10091 10092 10093 10094 10095 10096 10097 10098 10099 10100 10101 10102 10103 10104 10105 10106 10107 10108 10109 10110 10111 10112 10113 10114 10115 10116 10117 10118 10119 10120 10121 10122 10123 10124 10125 10126 10127 10128 10129 10130 10131 10132 10133 10134 10135 10136 10137 10138 10139 10140 10141 10142 10143 10144 10145 10146 10147 10148 10149 10150 10151 10152 10153 10154 10155 10156 10157 10158 10159 10160
pub fn parse_get_dashboard_embed_url_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::GetDashboardEmbedUrlOutput,
crate::error::GetDashboardEmbedUrlError,
> {
let generic = crate::json_deser::parse_http_generic_error(response)
.map_err(crate::error::GetDashboardEmbedUrlError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => return Err(crate::error::GetDashboardEmbedUrlError::unhandled(generic)),
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"AccessDeniedException" => crate::error::GetDashboardEmbedUrlError { meta: generic, kind: crate::error::GetDashboardEmbedUrlErrorKind::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::GetDashboardEmbedUrlError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"DomainNotWhitelistedException" => crate::error::GetDashboardEmbedUrlError { meta: generic, kind: crate::error::GetDashboardEmbedUrlErrorKind::DomainNotWhitelistedException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::domain_not_whitelisted_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_domain_not_whitelisted_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GetDashboardEmbedUrlError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"IdentityTypeNotSupportedException" => crate::error::GetDashboardEmbedUrlError { meta: generic, kind: crate::error::GetDashboardEmbedUrlErrorKind::IdentityTypeNotSupportedException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::identity_type_not_supported_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_identity_type_not_supported_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GetDashboardEmbedUrlError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InternalFailureException" => crate::error::GetDashboardEmbedUrlError { meta: generic, kind: crate::error::GetDashboardEmbedUrlErrorKind::InternalFailureException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::internal_failure_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_internal_failure_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GetDashboardEmbedUrlError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidParameterValueException" => crate::error::GetDashboardEmbedUrlError { meta: generic, kind: crate::error::GetDashboardEmbedUrlErrorKind::InvalidParameterValueException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::invalid_parameter_value_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_invalid_parameter_value_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GetDashboardEmbedUrlError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"QuickSightUserNotFoundException" => crate::error::GetDashboardEmbedUrlError { meta: generic, kind: crate::error::GetDashboardEmbedUrlErrorKind::QuickSightUserNotFoundException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::quick_sight_user_not_found_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_quick_sight_user_not_found_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GetDashboardEmbedUrlError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"ResourceExistsException" => crate::error::GetDashboardEmbedUrlError { meta: generic, kind: crate::error::GetDashboardEmbedUrlErrorKind::ResourceExistsException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::resource_exists_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_resource_exists_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GetDashboardEmbedUrlError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"ResourceNotFoundException" => crate::error::GetDashboardEmbedUrlError { meta: generic, kind: crate::error::GetDashboardEmbedUrlErrorKind::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::GetDashboardEmbedUrlError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"SessionLifetimeInMinutesInvalidException" => crate::error::GetDashboardEmbedUrlError { meta: generic, kind: crate::error::GetDashboardEmbedUrlErrorKind::SessionLifetimeInMinutesInvalidException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::session_lifetime_in_minutes_invalid_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_session_lifetime_in_minutes_invalid_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GetDashboardEmbedUrlError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"ThrottlingException" => crate::error::GetDashboardEmbedUrlError { meta: generic, kind: crate::error::GetDashboardEmbedUrlErrorKind::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::GetDashboardEmbedUrlError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"UnsupportedPricingPlanException" => crate::error::GetDashboardEmbedUrlError { meta: generic, kind: crate::error::GetDashboardEmbedUrlErrorKind::UnsupportedPricingPlanException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::unsupported_pricing_plan_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_unsupported_pricing_plan_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GetDashboardEmbedUrlError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"UnsupportedUserEditionException" => crate::error::GetDashboardEmbedUrlError { meta: generic, kind: crate::error::GetDashboardEmbedUrlErrorKind::UnsupportedUserEditionException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::unsupported_user_edition_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_unsupported_user_edition_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GetDashboardEmbedUrlError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
_ => crate::error::GetDashboardEmbedUrlError::generic(generic)
})
}sourcepub fn generic(err: Error) -> Self
pub fn generic(err: Error) -> Self
Creates the GetDashboardEmbedUrlError::Unhandled variant from a aws_smithy_types::Error.
Examples found in repository?
9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 10000 10001 10002 10003 10004 10005 10006 10007 10008 10009 10010 10011 10012 10013 10014 10015 10016 10017 10018 10019 10020 10021 10022 10023 10024 10025 10026 10027 10028 10029 10030 10031 10032 10033 10034 10035 10036 10037 10038 10039 10040 10041 10042 10043 10044 10045 10046 10047 10048 10049 10050 10051 10052 10053 10054 10055 10056 10057 10058 10059 10060 10061 10062 10063 10064 10065 10066 10067 10068 10069 10070 10071 10072 10073 10074 10075 10076 10077 10078 10079 10080 10081 10082 10083 10084 10085 10086 10087 10088 10089 10090 10091 10092 10093 10094 10095 10096 10097 10098 10099 10100 10101 10102 10103 10104 10105 10106 10107 10108 10109 10110 10111 10112 10113 10114 10115 10116 10117 10118 10119 10120 10121 10122 10123 10124 10125 10126 10127 10128 10129 10130 10131 10132 10133 10134 10135 10136 10137 10138 10139 10140 10141 10142 10143 10144 10145 10146 10147 10148 10149 10150 10151 10152 10153 10154 10155 10156 10157 10158 10159 10160
pub fn parse_get_dashboard_embed_url_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::GetDashboardEmbedUrlOutput,
crate::error::GetDashboardEmbedUrlError,
> {
let generic = crate::json_deser::parse_http_generic_error(response)
.map_err(crate::error::GetDashboardEmbedUrlError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => return Err(crate::error::GetDashboardEmbedUrlError::unhandled(generic)),
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"AccessDeniedException" => crate::error::GetDashboardEmbedUrlError { meta: generic, kind: crate::error::GetDashboardEmbedUrlErrorKind::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::GetDashboardEmbedUrlError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"DomainNotWhitelistedException" => crate::error::GetDashboardEmbedUrlError { meta: generic, kind: crate::error::GetDashboardEmbedUrlErrorKind::DomainNotWhitelistedException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::domain_not_whitelisted_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_domain_not_whitelisted_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GetDashboardEmbedUrlError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"IdentityTypeNotSupportedException" => crate::error::GetDashboardEmbedUrlError { meta: generic, kind: crate::error::GetDashboardEmbedUrlErrorKind::IdentityTypeNotSupportedException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::identity_type_not_supported_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_identity_type_not_supported_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GetDashboardEmbedUrlError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InternalFailureException" => crate::error::GetDashboardEmbedUrlError { meta: generic, kind: crate::error::GetDashboardEmbedUrlErrorKind::InternalFailureException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::internal_failure_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_internal_failure_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GetDashboardEmbedUrlError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidParameterValueException" => crate::error::GetDashboardEmbedUrlError { meta: generic, kind: crate::error::GetDashboardEmbedUrlErrorKind::InvalidParameterValueException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::invalid_parameter_value_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_invalid_parameter_value_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GetDashboardEmbedUrlError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"QuickSightUserNotFoundException" => crate::error::GetDashboardEmbedUrlError { meta: generic, kind: crate::error::GetDashboardEmbedUrlErrorKind::QuickSightUserNotFoundException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::quick_sight_user_not_found_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_quick_sight_user_not_found_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GetDashboardEmbedUrlError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"ResourceExistsException" => crate::error::GetDashboardEmbedUrlError { meta: generic, kind: crate::error::GetDashboardEmbedUrlErrorKind::ResourceExistsException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::resource_exists_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_resource_exists_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GetDashboardEmbedUrlError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"ResourceNotFoundException" => crate::error::GetDashboardEmbedUrlError { meta: generic, kind: crate::error::GetDashboardEmbedUrlErrorKind::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::GetDashboardEmbedUrlError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"SessionLifetimeInMinutesInvalidException" => crate::error::GetDashboardEmbedUrlError { meta: generic, kind: crate::error::GetDashboardEmbedUrlErrorKind::SessionLifetimeInMinutesInvalidException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::session_lifetime_in_minutes_invalid_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_session_lifetime_in_minutes_invalid_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GetDashboardEmbedUrlError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"ThrottlingException" => crate::error::GetDashboardEmbedUrlError { meta: generic, kind: crate::error::GetDashboardEmbedUrlErrorKind::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::GetDashboardEmbedUrlError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"UnsupportedPricingPlanException" => crate::error::GetDashboardEmbedUrlError { meta: generic, kind: crate::error::GetDashboardEmbedUrlErrorKind::UnsupportedPricingPlanException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::unsupported_pricing_plan_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_unsupported_pricing_plan_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GetDashboardEmbedUrlError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"UnsupportedUserEditionException" => crate::error::GetDashboardEmbedUrlError { meta: generic, kind: crate::error::GetDashboardEmbedUrlErrorKind::UnsupportedUserEditionException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::unsupported_user_edition_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_unsupported_user_edition_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GetDashboardEmbedUrlError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
_ => crate::error::GetDashboardEmbedUrlError::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 GetDashboardEmbedUrlErrorKind::AccessDeniedException.
sourcepub fn is_domain_not_whitelisted_exception(&self) -> bool
pub fn is_domain_not_whitelisted_exception(&self) -> bool
Returns true if the error kind is GetDashboardEmbedUrlErrorKind::DomainNotWhitelistedException.
sourcepub fn is_identity_type_not_supported_exception(&self) -> bool
pub fn is_identity_type_not_supported_exception(&self) -> bool
Returns true if the error kind is GetDashboardEmbedUrlErrorKind::IdentityTypeNotSupportedException.
sourcepub fn is_internal_failure_exception(&self) -> bool
pub fn is_internal_failure_exception(&self) -> bool
Returns true if the error kind is GetDashboardEmbedUrlErrorKind::InternalFailureException.
sourcepub fn is_invalid_parameter_value_exception(&self) -> bool
pub fn is_invalid_parameter_value_exception(&self) -> bool
Returns true if the error kind is GetDashboardEmbedUrlErrorKind::InvalidParameterValueException.
sourcepub fn is_quick_sight_user_not_found_exception(&self) -> bool
pub fn is_quick_sight_user_not_found_exception(&self) -> bool
Returns true if the error kind is GetDashboardEmbedUrlErrorKind::QuickSightUserNotFoundException.
sourcepub fn is_resource_exists_exception(&self) -> bool
pub fn is_resource_exists_exception(&self) -> bool
Returns true if the error kind is GetDashboardEmbedUrlErrorKind::ResourceExistsException.
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 GetDashboardEmbedUrlErrorKind::ResourceNotFoundException.
sourcepub fn is_session_lifetime_in_minutes_invalid_exception(&self) -> bool
pub fn is_session_lifetime_in_minutes_invalid_exception(&self) -> bool
Returns true if the error kind is GetDashboardEmbedUrlErrorKind::SessionLifetimeInMinutesInvalidException.
sourcepub fn is_throttling_exception(&self) -> bool
pub fn is_throttling_exception(&self) -> bool
Returns true if the error kind is GetDashboardEmbedUrlErrorKind::ThrottlingException.
sourcepub fn is_unsupported_pricing_plan_exception(&self) -> bool
pub fn is_unsupported_pricing_plan_exception(&self) -> bool
Returns true if the error kind is GetDashboardEmbedUrlErrorKind::UnsupportedPricingPlanException.
sourcepub fn is_unsupported_user_edition_exception(&self) -> bool
pub fn is_unsupported_user_edition_exception(&self) -> bool
Returns true if the error kind is GetDashboardEmbedUrlErrorKind::UnsupportedUserEditionException.