#[non_exhaustive]
#[derive(::std::fmt::Debug)]
pub enum Error {
ConcurrentModificationException(crate::types::error::ConcurrentModificationException),
ConflictException(crate::types::error::ConflictException),
DashboardInvalidInputError(crate::types::error::DashboardInvalidInputError),
DashboardNotFoundError(crate::types::error::DashboardNotFoundError),
InternalServiceFault(crate::types::error::InternalServiceFault),
InvalidFormatFault(crate::types::error::InvalidFormatFault),
InvalidNextToken(crate::types::error::InvalidNextToken),
InvalidParameterCombinationException(crate::types::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::types::error::InvalidParameterValueException),
LimitExceededException(crate::types::error::LimitExceededException),
LimitExceededFault(crate::types::error::LimitExceededFault),
MissingRequiredParameterException(crate::types::error::MissingRequiredParameterException),
ResourceNotFound(crate::types::error::ResourceNotFound),
ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
#[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
variable wildcard pattern and check `.code()`:
\
`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
\
See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
Unhandled(crate::error::sealed_unhandled::Unhandled),
}
impl ::std::fmt::Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Error::ConcurrentModificationException(inner) => inner.fmt(f),
Error::ConflictException(inner) => inner.fmt(f),
Error::DashboardInvalidInputError(inner) => inner.fmt(f),
Error::DashboardNotFoundError(inner) => inner.fmt(f),
Error::InternalServiceFault(inner) => inner.fmt(f),
Error::InvalidFormatFault(inner) => inner.fmt(f),
Error::InvalidNextToken(inner) => inner.fmt(f),
Error::InvalidParameterCombinationException(inner) => inner.fmt(f),
Error::InvalidParameterValueException(inner) => inner.fmt(f),
Error::LimitExceededException(inner) => inner.fmt(f),
Error::LimitExceededFault(inner) => inner.fmt(f),
Error::MissingRequiredParameterException(inner) => inner.fmt(f),
Error::ResourceNotFound(inner) => inner.fmt(f),
Error::ResourceNotFoundException(inner) => inner.fmt(f),
Error::Unhandled(_) => {
if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
write!(f, "unhandled error ({code})")
} else {
f.write_str("unhandled error")
}
}
}
}
}
impl From<::aws_smithy_types::error::operation::BuildError> for Error {
fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
source: value.into(),
meta: ::std::default::Default::default(),
})
}
}
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
match self {
Self::ConcurrentModificationException(inner) => inner.meta(),
Self::ConflictException(inner) => inner.meta(),
Self::DashboardInvalidInputError(inner) => inner.meta(),
Self::DashboardNotFoundError(inner) => inner.meta(),
Self::InternalServiceFault(inner) => inner.meta(),
Self::InvalidFormatFault(inner) => inner.meta(),
Self::InvalidNextToken(inner) => inner.meta(),
Self::InvalidParameterCombinationException(inner) => inner.meta(),
Self::InvalidParameterValueException(inner) => inner.meta(),
Self::LimitExceededException(inner) => inner.meta(),
Self::LimitExceededFault(inner) => inner.meta(),
Self::MissingRequiredParameterException(inner) => inner.meta(),
Self::ResourceNotFound(inner) => inner.meta(),
Self::ResourceNotFoundException(inner) => inner.meta(),
Self::Unhandled(inner) => &inner.meta,
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_alarm_mute_rule::DeleteAlarmMuteRuleError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_alarm_mute_rule::DeleteAlarmMuteRuleError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::delete_alarm_mute_rule::DeleteAlarmMuteRuleError> for Error {
fn from(err: crate::operation::delete_alarm_mute_rule::DeleteAlarmMuteRuleError) -> Self {
match err {
crate::operation::delete_alarm_mute_rule::DeleteAlarmMuteRuleError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_alarms::DeleteAlarmsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_alarms::DeleteAlarmsError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::delete_alarms::DeleteAlarmsError> for Error {
fn from(err: crate::operation::delete_alarms::DeleteAlarmsError) -> Self {
match err {
crate::operation::delete_alarms::DeleteAlarmsError::ResourceNotFound(inner) => Error::ResourceNotFound(inner),
crate::operation::delete_alarms::DeleteAlarmsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_anomaly_detector::DeleteAnomalyDetectorError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_anomaly_detector::DeleteAnomalyDetectorError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::delete_anomaly_detector::DeleteAnomalyDetectorError> for Error {
fn from(err: crate::operation::delete_anomaly_detector::DeleteAnomalyDetectorError) -> Self {
match err {
crate::operation::delete_anomaly_detector::DeleteAnomalyDetectorError::InternalServiceFault(inner) => Error::InternalServiceFault(inner),
crate::operation::delete_anomaly_detector::DeleteAnomalyDetectorError::InvalidParameterCombinationException(inner) => {
Error::InvalidParameterCombinationException(inner)
}
crate::operation::delete_anomaly_detector::DeleteAnomalyDetectorError::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::operation::delete_anomaly_detector::DeleteAnomalyDetectorError::MissingRequiredParameterException(inner) => {
Error::MissingRequiredParameterException(inner)
}
crate::operation::delete_anomaly_detector::DeleteAnomalyDetectorError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::delete_anomaly_detector::DeleteAnomalyDetectorError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_dashboards::DeleteDashboardsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_dashboards::DeleteDashboardsError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::delete_dashboards::DeleteDashboardsError> for Error {
fn from(err: crate::operation::delete_dashboards::DeleteDashboardsError) -> Self {
match err {
crate::operation::delete_dashboards::DeleteDashboardsError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::delete_dashboards::DeleteDashboardsError::InternalServiceFault(inner) => Error::InternalServiceFault(inner),
crate::operation::delete_dashboards::DeleteDashboardsError::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::operation::delete_dashboards::DeleteDashboardsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_insight_rules::DeleteInsightRulesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_insight_rules::DeleteInsightRulesError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::delete_insight_rules::DeleteInsightRulesError> for Error {
fn from(err: crate::operation::delete_insight_rules::DeleteInsightRulesError) -> Self {
match err {
crate::operation::delete_insight_rules::DeleteInsightRulesError::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::operation::delete_insight_rules::DeleteInsightRulesError::MissingRequiredParameterException(inner) => {
Error::MissingRequiredParameterException(inner)
}
crate::operation::delete_insight_rules::DeleteInsightRulesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_metric_stream::DeleteMetricStreamError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_metric_stream::DeleteMetricStreamError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::delete_metric_stream::DeleteMetricStreamError> for Error {
fn from(err: crate::operation::delete_metric_stream::DeleteMetricStreamError) -> Self {
match err {
crate::operation::delete_metric_stream::DeleteMetricStreamError::InternalServiceFault(inner) => Error::InternalServiceFault(inner),
crate::operation::delete_metric_stream::DeleteMetricStreamError::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::operation::delete_metric_stream::DeleteMetricStreamError::MissingRequiredParameterException(inner) => {
Error::MissingRequiredParameterException(inner)
}
crate::operation::delete_metric_stream::DeleteMetricStreamError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_alarm_contributors::DescribeAlarmContributorsError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_alarm_contributors::DescribeAlarmContributorsError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::describe_alarm_contributors::DescribeAlarmContributorsError> for Error {
fn from(err: crate::operation::describe_alarm_contributors::DescribeAlarmContributorsError) -> Self {
match err {
crate::operation::describe_alarm_contributors::DescribeAlarmContributorsError::InvalidNextToken(inner) => Error::InvalidNextToken(inner),
crate::operation::describe_alarm_contributors::DescribeAlarmContributorsError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::describe_alarm_contributors::DescribeAlarmContributorsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_alarm_history::DescribeAlarmHistoryError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_alarm_history::DescribeAlarmHistoryError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::describe_alarm_history::DescribeAlarmHistoryError> for Error {
fn from(err: crate::operation::describe_alarm_history::DescribeAlarmHistoryError) -> Self {
match err {
crate::operation::describe_alarm_history::DescribeAlarmHistoryError::InvalidNextToken(inner) => Error::InvalidNextToken(inner),
crate::operation::describe_alarm_history::DescribeAlarmHistoryError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_alarms::DescribeAlarmsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_alarms::DescribeAlarmsError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::describe_alarms::DescribeAlarmsError> for Error {
fn from(err: crate::operation::describe_alarms::DescribeAlarmsError) -> Self {
match err {
crate::operation::describe_alarms::DescribeAlarmsError::InvalidNextToken(inner) => Error::InvalidNextToken(inner),
crate::operation::describe_alarms::DescribeAlarmsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_alarms_for_metric::DescribeAlarmsForMetricError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_alarms_for_metric::DescribeAlarmsForMetricError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::describe_alarms_for_metric::DescribeAlarmsForMetricError> for Error {
fn from(err: crate::operation::describe_alarms_for_metric::DescribeAlarmsForMetricError) -> Self {
match err {
crate::operation::describe_alarms_for_metric::DescribeAlarmsForMetricError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_anomaly_detectors::DescribeAnomalyDetectorsError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_anomaly_detectors::DescribeAnomalyDetectorsError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::describe_anomaly_detectors::DescribeAnomalyDetectorsError> for Error {
fn from(err: crate::operation::describe_anomaly_detectors::DescribeAnomalyDetectorsError) -> Self {
match err {
crate::operation::describe_anomaly_detectors::DescribeAnomalyDetectorsError::InternalServiceFault(inner) => {
Error::InternalServiceFault(inner)
}
crate::operation::describe_anomaly_detectors::DescribeAnomalyDetectorsError::InvalidNextToken(inner) => Error::InvalidNextToken(inner),
crate::operation::describe_anomaly_detectors::DescribeAnomalyDetectorsError::InvalidParameterCombinationException(inner) => {
Error::InvalidParameterCombinationException(inner)
}
crate::operation::describe_anomaly_detectors::DescribeAnomalyDetectorsError::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::operation::describe_anomaly_detectors::DescribeAnomalyDetectorsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_insight_rules::DescribeInsightRulesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_insight_rules::DescribeInsightRulesError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::describe_insight_rules::DescribeInsightRulesError> for Error {
fn from(err: crate::operation::describe_insight_rules::DescribeInsightRulesError) -> Self {
match err {
crate::operation::describe_insight_rules::DescribeInsightRulesError::InvalidNextToken(inner) => Error::InvalidNextToken(inner),
crate::operation::describe_insight_rules::DescribeInsightRulesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disable_alarm_actions::DisableAlarmActionsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disable_alarm_actions::DisableAlarmActionsError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::disable_alarm_actions::DisableAlarmActionsError> for Error {
fn from(err: crate::operation::disable_alarm_actions::DisableAlarmActionsError) -> Self {
match err {
crate::operation::disable_alarm_actions::DisableAlarmActionsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disable_insight_rules::DisableInsightRulesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disable_insight_rules::DisableInsightRulesError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::disable_insight_rules::DisableInsightRulesError> for Error {
fn from(err: crate::operation::disable_insight_rules::DisableInsightRulesError) -> Self {
match err {
crate::operation::disable_insight_rules::DisableInsightRulesError::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::operation::disable_insight_rules::DisableInsightRulesError::MissingRequiredParameterException(inner) => {
Error::MissingRequiredParameterException(inner)
}
crate::operation::disable_insight_rules::DisableInsightRulesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::enable_alarm_actions::EnableAlarmActionsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::enable_alarm_actions::EnableAlarmActionsError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::enable_alarm_actions::EnableAlarmActionsError> for Error {
fn from(err: crate::operation::enable_alarm_actions::EnableAlarmActionsError) -> Self {
match err {
crate::operation::enable_alarm_actions::EnableAlarmActionsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::enable_insight_rules::EnableInsightRulesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::enable_insight_rules::EnableInsightRulesError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::enable_insight_rules::EnableInsightRulesError> for Error {
fn from(err: crate::operation::enable_insight_rules::EnableInsightRulesError) -> Self {
match err {
crate::operation::enable_insight_rules::EnableInsightRulesError::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::operation::enable_insight_rules::EnableInsightRulesError::LimitExceededException(inner) => Error::LimitExceededException(inner),
crate::operation::enable_insight_rules::EnableInsightRulesError::MissingRequiredParameterException(inner) => {
Error::MissingRequiredParameterException(inner)
}
crate::operation::enable_insight_rules::EnableInsightRulesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_alarm_mute_rule::GetAlarmMuteRuleError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_alarm_mute_rule::GetAlarmMuteRuleError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::get_alarm_mute_rule::GetAlarmMuteRuleError> for Error {
fn from(err: crate::operation::get_alarm_mute_rule::GetAlarmMuteRuleError) -> Self {
match err {
crate::operation::get_alarm_mute_rule::GetAlarmMuteRuleError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_alarm_mute_rule::GetAlarmMuteRuleError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_dashboard::GetDashboardError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_dashboard::GetDashboardError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::get_dashboard::GetDashboardError> for Error {
fn from(err: crate::operation::get_dashboard::GetDashboardError) -> Self {
match err {
crate::operation::get_dashboard::GetDashboardError::DashboardNotFoundError(inner) => Error::DashboardNotFoundError(inner),
crate::operation::get_dashboard::GetDashboardError::InternalServiceFault(inner) => Error::InternalServiceFault(inner),
crate::operation::get_dashboard::GetDashboardError::InvalidParameterValueException(inner) => Error::InvalidParameterValueException(inner),
crate::operation::get_dashboard::GetDashboardError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_insight_rule_report::GetInsightRuleReportError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_insight_rule_report::GetInsightRuleReportError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::get_insight_rule_report::GetInsightRuleReportError> for Error {
fn from(err: crate::operation::get_insight_rule_report::GetInsightRuleReportError) -> Self {
match err {
crate::operation::get_insight_rule_report::GetInsightRuleReportError::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::operation::get_insight_rule_report::GetInsightRuleReportError::MissingRequiredParameterException(inner) => {
Error::MissingRequiredParameterException(inner)
}
crate::operation::get_insight_rule_report::GetInsightRuleReportError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::get_insight_rule_report::GetInsightRuleReportError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_metric_data::GetMetricDataError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_metric_data::GetMetricDataError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::get_metric_data::GetMetricDataError> for Error {
fn from(err: crate::operation::get_metric_data::GetMetricDataError) -> Self {
match err {
crate::operation::get_metric_data::GetMetricDataError::InvalidNextToken(inner) => Error::InvalidNextToken(inner),
crate::operation::get_metric_data::GetMetricDataError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_metric_statistics::GetMetricStatisticsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_metric_statistics::GetMetricStatisticsError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::get_metric_statistics::GetMetricStatisticsError> for Error {
fn from(err: crate::operation::get_metric_statistics::GetMetricStatisticsError) -> Self {
match err {
crate::operation::get_metric_statistics::GetMetricStatisticsError::InternalServiceFault(inner) => Error::InternalServiceFault(inner),
crate::operation::get_metric_statistics::GetMetricStatisticsError::InvalidParameterCombinationException(inner) => {
Error::InvalidParameterCombinationException(inner)
}
crate::operation::get_metric_statistics::GetMetricStatisticsError::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::operation::get_metric_statistics::GetMetricStatisticsError::MissingRequiredParameterException(inner) => {
Error::MissingRequiredParameterException(inner)
}
crate::operation::get_metric_statistics::GetMetricStatisticsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_metric_stream::GetMetricStreamError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_metric_stream::GetMetricStreamError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::get_metric_stream::GetMetricStreamError> for Error {
fn from(err: crate::operation::get_metric_stream::GetMetricStreamError) -> Self {
match err {
crate::operation::get_metric_stream::GetMetricStreamError::InternalServiceFault(inner) => Error::InternalServiceFault(inner),
crate::operation::get_metric_stream::GetMetricStreamError::InvalidParameterCombinationException(inner) => {
Error::InvalidParameterCombinationException(inner)
}
crate::operation::get_metric_stream::GetMetricStreamError::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::operation::get_metric_stream::GetMetricStreamError::MissingRequiredParameterException(inner) => {
Error::MissingRequiredParameterException(inner)
}
crate::operation::get_metric_stream::GetMetricStreamError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_metric_stream::GetMetricStreamError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_metric_widget_image::GetMetricWidgetImageError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_metric_widget_image::GetMetricWidgetImageError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::get_metric_widget_image::GetMetricWidgetImageError> for Error {
fn from(err: crate::operation::get_metric_widget_image::GetMetricWidgetImageError) -> Self {
match err {
crate::operation::get_metric_widget_image::GetMetricWidgetImageError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_o_tel_enrichment::GetOTelEnrichmentError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_o_tel_enrichment::GetOTelEnrichmentError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::get_o_tel_enrichment::GetOTelEnrichmentError> for Error {
fn from(err: crate::operation::get_o_tel_enrichment::GetOTelEnrichmentError) -> Self {
match err {
crate::operation::get_o_tel_enrichment::GetOTelEnrichmentError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_alarm_mute_rules::ListAlarmMuteRulesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_alarm_mute_rules::ListAlarmMuteRulesError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_alarm_mute_rules::ListAlarmMuteRulesError> for Error {
fn from(err: crate::operation::list_alarm_mute_rules::ListAlarmMuteRulesError) -> Self {
match err {
crate::operation::list_alarm_mute_rules::ListAlarmMuteRulesError::InvalidNextToken(inner) => Error::InvalidNextToken(inner),
crate::operation::list_alarm_mute_rules::ListAlarmMuteRulesError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::list_alarm_mute_rules::ListAlarmMuteRulesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_dashboards::ListDashboardsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_dashboards::ListDashboardsError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_dashboards::ListDashboardsError> for Error {
fn from(err: crate::operation::list_dashboards::ListDashboardsError) -> Self {
match err {
crate::operation::list_dashboards::ListDashboardsError::InternalServiceFault(inner) => Error::InternalServiceFault(inner),
crate::operation::list_dashboards::ListDashboardsError::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::operation::list_dashboards::ListDashboardsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_managed_insight_rules::ListManagedInsightRulesError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_managed_insight_rules::ListManagedInsightRulesError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_managed_insight_rules::ListManagedInsightRulesError> for Error {
fn from(err: crate::operation::list_managed_insight_rules::ListManagedInsightRulesError) -> Self {
match err {
crate::operation::list_managed_insight_rules::ListManagedInsightRulesError::InvalidNextToken(inner) => Error::InvalidNextToken(inner),
crate::operation::list_managed_insight_rules::ListManagedInsightRulesError::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::operation::list_managed_insight_rules::ListManagedInsightRulesError::MissingRequiredParameterException(inner) => {
Error::MissingRequiredParameterException(inner)
}
crate::operation::list_managed_insight_rules::ListManagedInsightRulesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_metrics::ListMetricsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_metrics::ListMetricsError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_metrics::ListMetricsError> for Error {
fn from(err: crate::operation::list_metrics::ListMetricsError) -> Self {
match err {
crate::operation::list_metrics::ListMetricsError::InternalServiceFault(inner) => Error::InternalServiceFault(inner),
crate::operation::list_metrics::ListMetricsError::InvalidParameterValueException(inner) => Error::InvalidParameterValueException(inner),
crate::operation::list_metrics::ListMetricsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_metric_streams::ListMetricStreamsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_metric_streams::ListMetricStreamsError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_metric_streams::ListMetricStreamsError> for Error {
fn from(err: crate::operation::list_metric_streams::ListMetricStreamsError) -> Self {
match err {
crate::operation::list_metric_streams::ListMetricStreamsError::InternalServiceFault(inner) => Error::InternalServiceFault(inner),
crate::operation::list_metric_streams::ListMetricStreamsError::InvalidNextToken(inner) => Error::InvalidNextToken(inner),
crate::operation::list_metric_streams::ListMetricStreamsError::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::operation::list_metric_streams::ListMetricStreamsError::MissingRequiredParameterException(inner) => {
Error::MissingRequiredParameterException(inner)
}
crate::operation::list_metric_streams::ListMetricStreamsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
match err {
crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServiceFault(inner) => Error::InternalServiceFault(inner),
crate::operation::list_tags_for_resource::ListTagsForResourceError::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_alarm_mute_rule::PutAlarmMuteRuleError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_alarm_mute_rule::PutAlarmMuteRuleError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::put_alarm_mute_rule::PutAlarmMuteRuleError> for Error {
fn from(err: crate::operation::put_alarm_mute_rule::PutAlarmMuteRuleError) -> Self {
match err {
crate::operation::put_alarm_mute_rule::PutAlarmMuteRuleError::LimitExceededFault(inner) => Error::LimitExceededFault(inner),
crate::operation::put_alarm_mute_rule::PutAlarmMuteRuleError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_anomaly_detector::PutAnomalyDetectorError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_anomaly_detector::PutAnomalyDetectorError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::put_anomaly_detector::PutAnomalyDetectorError> for Error {
fn from(err: crate::operation::put_anomaly_detector::PutAnomalyDetectorError) -> Self {
match err {
crate::operation::put_anomaly_detector::PutAnomalyDetectorError::InternalServiceFault(inner) => Error::InternalServiceFault(inner),
crate::operation::put_anomaly_detector::PutAnomalyDetectorError::InvalidParameterCombinationException(inner) => {
Error::InvalidParameterCombinationException(inner)
}
crate::operation::put_anomaly_detector::PutAnomalyDetectorError::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::operation::put_anomaly_detector::PutAnomalyDetectorError::LimitExceededException(inner) => Error::LimitExceededException(inner),
crate::operation::put_anomaly_detector::PutAnomalyDetectorError::MissingRequiredParameterException(inner) => {
Error::MissingRequiredParameterException(inner)
}
crate::operation::put_anomaly_detector::PutAnomalyDetectorError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_composite_alarm::PutCompositeAlarmError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_composite_alarm::PutCompositeAlarmError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::put_composite_alarm::PutCompositeAlarmError> for Error {
fn from(err: crate::operation::put_composite_alarm::PutCompositeAlarmError) -> Self {
match err {
crate::operation::put_composite_alarm::PutCompositeAlarmError::LimitExceededFault(inner) => Error::LimitExceededFault(inner),
crate::operation::put_composite_alarm::PutCompositeAlarmError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_dashboard::PutDashboardError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_dashboard::PutDashboardError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::put_dashboard::PutDashboardError> for Error {
fn from(err: crate::operation::put_dashboard::PutDashboardError) -> Self {
match err {
crate::operation::put_dashboard::PutDashboardError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::put_dashboard::PutDashboardError::DashboardInvalidInputError(inner) => Error::DashboardInvalidInputError(inner),
crate::operation::put_dashboard::PutDashboardError::InternalServiceFault(inner) => Error::InternalServiceFault(inner),
crate::operation::put_dashboard::PutDashboardError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_insight_rule::PutInsightRuleError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_insight_rule::PutInsightRuleError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::put_insight_rule::PutInsightRuleError> for Error {
fn from(err: crate::operation::put_insight_rule::PutInsightRuleError) -> Self {
match err {
crate::operation::put_insight_rule::PutInsightRuleError::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::operation::put_insight_rule::PutInsightRuleError::LimitExceededException(inner) => Error::LimitExceededException(inner),
crate::operation::put_insight_rule::PutInsightRuleError::MissingRequiredParameterException(inner) => {
Error::MissingRequiredParameterException(inner)
}
crate::operation::put_insight_rule::PutInsightRuleError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_managed_insight_rules::PutManagedInsightRulesError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_managed_insight_rules::PutManagedInsightRulesError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::put_managed_insight_rules::PutManagedInsightRulesError> for Error {
fn from(err: crate::operation::put_managed_insight_rules::PutManagedInsightRulesError) -> Self {
match err {
crate::operation::put_managed_insight_rules::PutManagedInsightRulesError::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::operation::put_managed_insight_rules::PutManagedInsightRulesError::MissingRequiredParameterException(inner) => {
Error::MissingRequiredParameterException(inner)
}
crate::operation::put_managed_insight_rules::PutManagedInsightRulesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_metric_alarm::PutMetricAlarmError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_metric_alarm::PutMetricAlarmError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::put_metric_alarm::PutMetricAlarmError> for Error {
fn from(err: crate::operation::put_metric_alarm::PutMetricAlarmError) -> Self {
match err {
crate::operation::put_metric_alarm::PutMetricAlarmError::LimitExceededFault(inner) => Error::LimitExceededFault(inner),
crate::operation::put_metric_alarm::PutMetricAlarmError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_metric_data::PutMetricDataError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_metric_data::PutMetricDataError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::put_metric_data::PutMetricDataError> for Error {
fn from(err: crate::operation::put_metric_data::PutMetricDataError) -> Self {
match err {
crate::operation::put_metric_data::PutMetricDataError::InternalServiceFault(inner) => Error::InternalServiceFault(inner),
crate::operation::put_metric_data::PutMetricDataError::InvalidParameterCombinationException(inner) => {
Error::InvalidParameterCombinationException(inner)
}
crate::operation::put_metric_data::PutMetricDataError::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::operation::put_metric_data::PutMetricDataError::MissingRequiredParameterException(inner) => {
Error::MissingRequiredParameterException(inner)
}
crate::operation::put_metric_data::PutMetricDataError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_metric_stream::PutMetricStreamError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_metric_stream::PutMetricStreamError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::put_metric_stream::PutMetricStreamError> for Error {
fn from(err: crate::operation::put_metric_stream::PutMetricStreamError) -> Self {
match err {
crate::operation::put_metric_stream::PutMetricStreamError::ConcurrentModificationException(inner) => {
Error::ConcurrentModificationException(inner)
}
crate::operation::put_metric_stream::PutMetricStreamError::InternalServiceFault(inner) => Error::InternalServiceFault(inner),
crate::operation::put_metric_stream::PutMetricStreamError::InvalidParameterCombinationException(inner) => {
Error::InvalidParameterCombinationException(inner)
}
crate::operation::put_metric_stream::PutMetricStreamError::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::operation::put_metric_stream::PutMetricStreamError::MissingRequiredParameterException(inner) => {
Error::MissingRequiredParameterException(inner)
}
crate::operation::put_metric_stream::PutMetricStreamError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::set_alarm_state::SetAlarmStateError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::set_alarm_state::SetAlarmStateError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::set_alarm_state::SetAlarmStateError> for Error {
fn from(err: crate::operation::set_alarm_state::SetAlarmStateError) -> Self {
match err {
crate::operation::set_alarm_state::SetAlarmStateError::InvalidFormatFault(inner) => Error::InvalidFormatFault(inner),
crate::operation::set_alarm_state::SetAlarmStateError::ResourceNotFound(inner) => Error::ResourceNotFound(inner),
crate::operation::set_alarm_state::SetAlarmStateError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_metric_streams::StartMetricStreamsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_metric_streams::StartMetricStreamsError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::start_metric_streams::StartMetricStreamsError> for Error {
fn from(err: crate::operation::start_metric_streams::StartMetricStreamsError) -> Self {
match err {
crate::operation::start_metric_streams::StartMetricStreamsError::InternalServiceFault(inner) => Error::InternalServiceFault(inner),
crate::operation::start_metric_streams::StartMetricStreamsError::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::operation::start_metric_streams::StartMetricStreamsError::MissingRequiredParameterException(inner) => {
Error::MissingRequiredParameterException(inner)
}
crate::operation::start_metric_streams::StartMetricStreamsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_o_tel_enrichment::StartOTelEnrichmentError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_o_tel_enrichment::StartOTelEnrichmentError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::start_o_tel_enrichment::StartOTelEnrichmentError> for Error {
fn from(err: crate::operation::start_o_tel_enrichment::StartOTelEnrichmentError) -> Self {
match err {
crate::operation::start_o_tel_enrichment::StartOTelEnrichmentError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_metric_streams::StopMetricStreamsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_metric_streams::StopMetricStreamsError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::stop_metric_streams::StopMetricStreamsError> for Error {
fn from(err: crate::operation::stop_metric_streams::StopMetricStreamsError) -> Self {
match err {
crate::operation::stop_metric_streams::StopMetricStreamsError::InternalServiceFault(inner) => Error::InternalServiceFault(inner),
crate::operation::stop_metric_streams::StopMetricStreamsError::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::operation::stop_metric_streams::StopMetricStreamsError::MissingRequiredParameterException(inner) => {
Error::MissingRequiredParameterException(inner)
}
crate::operation::stop_metric_streams::StopMetricStreamsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_o_tel_enrichment::StopOTelEnrichmentError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_o_tel_enrichment::StopOTelEnrichmentError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::stop_o_tel_enrichment::StopOTelEnrichmentError> for Error {
fn from(err: crate::operation::stop_o_tel_enrichment::StopOTelEnrichmentError) -> Self {
match err {
crate::operation::stop_o_tel_enrichment::StopOTelEnrichmentError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::tag_resource::TagResourceError> for Error {
fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
match err {
crate::operation::tag_resource::TagResourceError::ConcurrentModificationException(inner) => Error::ConcurrentModificationException(inner),
crate::operation::tag_resource::TagResourceError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::tag_resource::TagResourceError::InternalServiceFault(inner) => Error::InternalServiceFault(inner),
crate::operation::tag_resource::TagResourceError::InvalidParameterValueException(inner) => Error::InvalidParameterValueException(inner),
crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::untag_resource::UntagResourceError> for Error {
fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
match err {
crate::operation::untag_resource::UntagResourceError::ConcurrentModificationException(inner) => {
Error::ConcurrentModificationException(inner)
}
crate::operation::untag_resource::UntagResourceError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::untag_resource::UntagResourceError::InternalServiceFault(inner) => Error::InternalServiceFault(inner),
crate::operation::untag_resource::UntagResourceError::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<O, E> ::std::convert::From<::aws_smithy_runtime_api::client::waiters::error::WaiterError<O, E>> for Error
where
O: ::std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
E: ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::waiters::error::WaiterError<O, E>) -> Self {
Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::std::default::Default::default(),
source: err.into(),
})
}
}
impl ::std::error::Error for Error {
fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
match self {
Error::ConcurrentModificationException(inner) => inner.source(),
Error::ConflictException(inner) => inner.source(),
Error::DashboardInvalidInputError(inner) => inner.source(),
Error::DashboardNotFoundError(inner) => inner.source(),
Error::InternalServiceFault(inner) => inner.source(),
Error::InvalidFormatFault(inner) => inner.source(),
Error::InvalidNextToken(inner) => inner.source(),
Error::InvalidParameterCombinationException(inner) => inner.source(),
Error::InvalidParameterValueException(inner) => inner.source(),
Error::LimitExceededException(inner) => inner.source(),
Error::LimitExceededFault(inner) => inner.source(),
Error::MissingRequiredParameterException(inner) => inner.source(),
Error::ResourceNotFound(inner) => inner.source(),
Error::ResourceNotFoundException(inner) => inner.source(),
Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
}
}
}
impl ::aws_types::request_id::RequestId for Error {
fn request_id(&self) -> Option<&str> {
match self {
Self::ConcurrentModificationException(e) => e.request_id(),
Self::ConflictException(e) => e.request_id(),
Self::DashboardInvalidInputError(e) => e.request_id(),
Self::DashboardNotFoundError(e) => e.request_id(),
Self::InternalServiceFault(e) => e.request_id(),
Self::InvalidFormatFault(e) => e.request_id(),
Self::InvalidNextToken(e) => e.request_id(),
Self::InvalidParameterCombinationException(e) => e.request_id(),
Self::InvalidParameterValueException(e) => e.request_id(),
Self::LimitExceededException(e) => e.request_id(),
Self::LimitExceededFault(e) => e.request_id(),
Self::MissingRequiredParameterException(e) => e.request_id(),
Self::ResourceNotFound(e) => e.request_id(),
Self::ResourceNotFoundException(e) => e.request_id(),
Self::Unhandled(e) => e.meta.request_id(),
}
}
}