aws_sdk_applicationautoscaling/
error_meta.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// All possible error types for this service.
3#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6    /// <p>Concurrent updates caused an exception, for example, if you request an update to an Application Auto Scaling resource that already has a pending update.</p>
7    ConcurrentUpdateException(crate::types::error::ConcurrentUpdateException),
8    /// <p>Failed access to resources caused an exception. This exception is thrown when Application Auto Scaling is unable to retrieve the alarms associated with a scaling policy due to a client error, for example, if the role ARN specified for a scalable target does not have permission to call the CloudWatch <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DescribeAlarms.html">DescribeAlarms</a> on your behalf.</p>
9    FailedResourceAccessException(crate::types::error::FailedResourceAccessException),
10    /// <p>The service encountered an internal error.</p>
11    InternalServiceException(crate::types::error::InternalServiceException),
12    /// <p>The next token supplied was invalid.</p>
13    InvalidNextTokenException(crate::types::error::InvalidNextTokenException),
14    /// <p>A per-account resource limit is exceeded. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-limits.html">Application Auto Scaling service quotas</a>.</p>
15    LimitExceededException(crate::types::error::LimitExceededException),
16    /// <p>The specified object could not be found. For any operation that depends on the existence of a scalable target, this exception is thrown if the scalable target with the specified service namespace, resource ID, and scalable dimension does not exist. For any operation that deletes or deregisters a resource, this exception is thrown if the resource cannot be found.</p>
17    ObjectNotFoundException(crate::types::error::ObjectNotFoundException),
18    /// <p>The specified resource doesn't exist.</p>
19    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
20    /// <p>The request contains too many tags. Try the request again with fewer tags.</p>
21    TooManyTagsException(crate::types::error::TooManyTagsException),
22    /// <p>An exception was thrown for a validation issue. Review the available parameters for the API request.</p>
23    ValidationException(crate::types::error::ValidationException),
24    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
25    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
26    variable wildcard pattern and check `.code()`:
27     \
28    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
29     \
30    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
31    Unhandled(crate::error::sealed_unhandled::Unhandled),
32}
33impl ::std::fmt::Display for Error {
34    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
35        match self {
36            Error::ConcurrentUpdateException(inner) => inner.fmt(f),
37            Error::FailedResourceAccessException(inner) => inner.fmt(f),
38            Error::InternalServiceException(inner) => inner.fmt(f),
39            Error::InvalidNextTokenException(inner) => inner.fmt(f),
40            Error::LimitExceededException(inner) => inner.fmt(f),
41            Error::ObjectNotFoundException(inner) => inner.fmt(f),
42            Error::ResourceNotFoundException(inner) => inner.fmt(f),
43            Error::TooManyTagsException(inner) => inner.fmt(f),
44            Error::ValidationException(inner) => inner.fmt(f),
45            Error::Unhandled(_) => {
46                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
47                    write!(f, "unhandled error ({code})")
48                } else {
49                    f.write_str("unhandled error")
50                }
51            }
52        }
53    }
54}
55impl From<::aws_smithy_types::error::operation::BuildError> for Error {
56    fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
57        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
58            source: value.into(),
59            meta: ::std::default::Default::default(),
60        })
61    }
62}
63impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
64    fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
65        match self {
66            Self::ConcurrentUpdateException(inner) => inner.meta(),
67            Self::FailedResourceAccessException(inner) => inner.meta(),
68            Self::InternalServiceException(inner) => inner.meta(),
69            Self::InvalidNextTokenException(inner) => inner.meta(),
70            Self::LimitExceededException(inner) => inner.meta(),
71            Self::ObjectNotFoundException(inner) => inner.meta(),
72            Self::ResourceNotFoundException(inner) => inner.meta(),
73            Self::TooManyTagsException(inner) => inner.meta(),
74            Self::ValidationException(inner) => inner.meta(),
75            Self::Unhandled(inner) => &inner.meta,
76        }
77    }
78}
79impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_scaling_policy::DeleteScalingPolicyError, R>> for Error
80where
81    R: Send + Sync + std::fmt::Debug + 'static,
82{
83    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_scaling_policy::DeleteScalingPolicyError, R>) -> Self {
84        match err {
85            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
86            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
87                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
88                source: err.into(),
89            }),
90        }
91    }
92}
93impl From<crate::operation::delete_scaling_policy::DeleteScalingPolicyError> for Error {
94    fn from(err: crate::operation::delete_scaling_policy::DeleteScalingPolicyError) -> Self {
95        match err {
96            crate::operation::delete_scaling_policy::DeleteScalingPolicyError::ConcurrentUpdateException(inner) => {
97                Error::ConcurrentUpdateException(inner)
98            }
99            crate::operation::delete_scaling_policy::DeleteScalingPolicyError::InternalServiceException(inner) => {
100                Error::InternalServiceException(inner)
101            }
102            crate::operation::delete_scaling_policy::DeleteScalingPolicyError::ObjectNotFoundException(inner) => {
103                Error::ObjectNotFoundException(inner)
104            }
105            crate::operation::delete_scaling_policy::DeleteScalingPolicyError::ValidationException(inner) => Error::ValidationException(inner),
106            crate::operation::delete_scaling_policy::DeleteScalingPolicyError::Unhandled(inner) => Error::Unhandled(inner),
107        }
108    }
109}
110impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_scheduled_action::DeleteScheduledActionError, R>> for Error
111where
112    R: Send + Sync + std::fmt::Debug + 'static,
113{
114    fn from(
115        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_scheduled_action::DeleteScheduledActionError, R>,
116    ) -> Self {
117        match err {
118            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
119            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
120                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
121                source: err.into(),
122            }),
123        }
124    }
125}
126impl From<crate::operation::delete_scheduled_action::DeleteScheduledActionError> for Error {
127    fn from(err: crate::operation::delete_scheduled_action::DeleteScheduledActionError) -> Self {
128        match err {
129            crate::operation::delete_scheduled_action::DeleteScheduledActionError::ConcurrentUpdateException(inner) => {
130                Error::ConcurrentUpdateException(inner)
131            }
132            crate::operation::delete_scheduled_action::DeleteScheduledActionError::InternalServiceException(inner) => {
133                Error::InternalServiceException(inner)
134            }
135            crate::operation::delete_scheduled_action::DeleteScheduledActionError::ObjectNotFoundException(inner) => {
136                Error::ObjectNotFoundException(inner)
137            }
138            crate::operation::delete_scheduled_action::DeleteScheduledActionError::ValidationException(inner) => Error::ValidationException(inner),
139            crate::operation::delete_scheduled_action::DeleteScheduledActionError::Unhandled(inner) => Error::Unhandled(inner),
140        }
141    }
142}
143impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::deregister_scalable_target::DeregisterScalableTargetError, R>>
144    for Error
145where
146    R: Send + Sync + std::fmt::Debug + 'static,
147{
148    fn from(
149        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::deregister_scalable_target::DeregisterScalableTargetError, R>,
150    ) -> Self {
151        match err {
152            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
153            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
154                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
155                source: err.into(),
156            }),
157        }
158    }
159}
160impl From<crate::operation::deregister_scalable_target::DeregisterScalableTargetError> for Error {
161    fn from(err: crate::operation::deregister_scalable_target::DeregisterScalableTargetError) -> Self {
162        match err {
163            crate::operation::deregister_scalable_target::DeregisterScalableTargetError::ConcurrentUpdateException(inner) => {
164                Error::ConcurrentUpdateException(inner)
165            }
166            crate::operation::deregister_scalable_target::DeregisterScalableTargetError::InternalServiceException(inner) => {
167                Error::InternalServiceException(inner)
168            }
169            crate::operation::deregister_scalable_target::DeregisterScalableTargetError::ObjectNotFoundException(inner) => {
170                Error::ObjectNotFoundException(inner)
171            }
172            crate::operation::deregister_scalable_target::DeregisterScalableTargetError::ValidationException(inner) => {
173                Error::ValidationException(inner)
174            }
175            crate::operation::deregister_scalable_target::DeregisterScalableTargetError::Unhandled(inner) => Error::Unhandled(inner),
176        }
177    }
178}
179impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_scalable_targets::DescribeScalableTargetsError, R>>
180    for Error
181where
182    R: Send + Sync + std::fmt::Debug + 'static,
183{
184    fn from(
185        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_scalable_targets::DescribeScalableTargetsError, R>,
186    ) -> Self {
187        match err {
188            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
189            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
190                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
191                source: err.into(),
192            }),
193        }
194    }
195}
196impl From<crate::operation::describe_scalable_targets::DescribeScalableTargetsError> for Error {
197    fn from(err: crate::operation::describe_scalable_targets::DescribeScalableTargetsError) -> Self {
198        match err {
199            crate::operation::describe_scalable_targets::DescribeScalableTargetsError::ConcurrentUpdateException(inner) => {
200                Error::ConcurrentUpdateException(inner)
201            }
202            crate::operation::describe_scalable_targets::DescribeScalableTargetsError::InternalServiceException(inner) => {
203                Error::InternalServiceException(inner)
204            }
205            crate::operation::describe_scalable_targets::DescribeScalableTargetsError::InvalidNextTokenException(inner) => {
206                Error::InvalidNextTokenException(inner)
207            }
208            crate::operation::describe_scalable_targets::DescribeScalableTargetsError::ValidationException(inner) => {
209                Error::ValidationException(inner)
210            }
211            crate::operation::describe_scalable_targets::DescribeScalableTargetsError::Unhandled(inner) => Error::Unhandled(inner),
212        }
213    }
214}
215impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_scaling_activities::DescribeScalingActivitiesError, R>>
216    for Error
217where
218    R: Send + Sync + std::fmt::Debug + 'static,
219{
220    fn from(
221        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_scaling_activities::DescribeScalingActivitiesError, R>,
222    ) -> Self {
223        match err {
224            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
225            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
226                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
227                source: err.into(),
228            }),
229        }
230    }
231}
232impl From<crate::operation::describe_scaling_activities::DescribeScalingActivitiesError> for Error {
233    fn from(err: crate::operation::describe_scaling_activities::DescribeScalingActivitiesError) -> Self {
234        match err {
235            crate::operation::describe_scaling_activities::DescribeScalingActivitiesError::ConcurrentUpdateException(inner) => {
236                Error::ConcurrentUpdateException(inner)
237            }
238            crate::operation::describe_scaling_activities::DescribeScalingActivitiesError::InternalServiceException(inner) => {
239                Error::InternalServiceException(inner)
240            }
241            crate::operation::describe_scaling_activities::DescribeScalingActivitiesError::InvalidNextTokenException(inner) => {
242                Error::InvalidNextTokenException(inner)
243            }
244            crate::operation::describe_scaling_activities::DescribeScalingActivitiesError::ValidationException(inner) => {
245                Error::ValidationException(inner)
246            }
247            crate::operation::describe_scaling_activities::DescribeScalingActivitiesError::Unhandled(inner) => Error::Unhandled(inner),
248        }
249    }
250}
251impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_scaling_policies::DescribeScalingPoliciesError, R>>
252    for Error
253where
254    R: Send + Sync + std::fmt::Debug + 'static,
255{
256    fn from(
257        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_scaling_policies::DescribeScalingPoliciesError, R>,
258    ) -> Self {
259        match err {
260            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
261            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
262                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
263                source: err.into(),
264            }),
265        }
266    }
267}
268impl From<crate::operation::describe_scaling_policies::DescribeScalingPoliciesError> for Error {
269    fn from(err: crate::operation::describe_scaling_policies::DescribeScalingPoliciesError) -> Self {
270        match err {
271            crate::operation::describe_scaling_policies::DescribeScalingPoliciesError::ConcurrentUpdateException(inner) => {
272                Error::ConcurrentUpdateException(inner)
273            }
274            crate::operation::describe_scaling_policies::DescribeScalingPoliciesError::FailedResourceAccessException(inner) => {
275                Error::FailedResourceAccessException(inner)
276            }
277            crate::operation::describe_scaling_policies::DescribeScalingPoliciesError::InternalServiceException(inner) => {
278                Error::InternalServiceException(inner)
279            }
280            crate::operation::describe_scaling_policies::DescribeScalingPoliciesError::InvalidNextTokenException(inner) => {
281                Error::InvalidNextTokenException(inner)
282            }
283            crate::operation::describe_scaling_policies::DescribeScalingPoliciesError::ValidationException(inner) => {
284                Error::ValidationException(inner)
285            }
286            crate::operation::describe_scaling_policies::DescribeScalingPoliciesError::Unhandled(inner) => Error::Unhandled(inner),
287        }
288    }
289}
290impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_scheduled_actions::DescribeScheduledActionsError, R>>
291    for Error
292where
293    R: Send + Sync + std::fmt::Debug + 'static,
294{
295    fn from(
296        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_scheduled_actions::DescribeScheduledActionsError, R>,
297    ) -> Self {
298        match err {
299            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
300            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
301                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
302                source: err.into(),
303            }),
304        }
305    }
306}
307impl From<crate::operation::describe_scheduled_actions::DescribeScheduledActionsError> for Error {
308    fn from(err: crate::operation::describe_scheduled_actions::DescribeScheduledActionsError) -> Self {
309        match err {
310            crate::operation::describe_scheduled_actions::DescribeScheduledActionsError::ConcurrentUpdateException(inner) => {
311                Error::ConcurrentUpdateException(inner)
312            }
313            crate::operation::describe_scheduled_actions::DescribeScheduledActionsError::InternalServiceException(inner) => {
314                Error::InternalServiceException(inner)
315            }
316            crate::operation::describe_scheduled_actions::DescribeScheduledActionsError::InvalidNextTokenException(inner) => {
317                Error::InvalidNextTokenException(inner)
318            }
319            crate::operation::describe_scheduled_actions::DescribeScheduledActionsError::ValidationException(inner) => {
320                Error::ValidationException(inner)
321            }
322            crate::operation::describe_scheduled_actions::DescribeScheduledActionsError::Unhandled(inner) => Error::Unhandled(inner),
323        }
324    }
325}
326impl<R>
327    From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_predictive_scaling_forecast::GetPredictiveScalingForecastError, R>>
328    for Error
329where
330    R: Send + Sync + std::fmt::Debug + 'static,
331{
332    fn from(
333        err: ::aws_smithy_runtime_api::client::result::SdkError<
334            crate::operation::get_predictive_scaling_forecast::GetPredictiveScalingForecastError,
335            R,
336        >,
337    ) -> Self {
338        match err {
339            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
340            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
341                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
342                source: err.into(),
343            }),
344        }
345    }
346}
347impl From<crate::operation::get_predictive_scaling_forecast::GetPredictiveScalingForecastError> for Error {
348    fn from(err: crate::operation::get_predictive_scaling_forecast::GetPredictiveScalingForecastError) -> Self {
349        match err {
350            crate::operation::get_predictive_scaling_forecast::GetPredictiveScalingForecastError::InternalServiceException(inner) => {
351                Error::InternalServiceException(inner)
352            }
353            crate::operation::get_predictive_scaling_forecast::GetPredictiveScalingForecastError::ValidationException(inner) => {
354                Error::ValidationException(inner)
355            }
356            crate::operation::get_predictive_scaling_forecast::GetPredictiveScalingForecastError::Unhandled(inner) => Error::Unhandled(inner),
357        }
358    }
359}
360impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
361where
362    R: Send + Sync + std::fmt::Debug + 'static,
363{
364    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
365        match err {
366            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
367            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
368                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
369                source: err.into(),
370            }),
371        }
372    }
373}
374impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
375    fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
376        match err {
377            crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
378                Error::ResourceNotFoundException(inner)
379            }
380            crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
381        }
382    }
383}
384impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_scaling_policy::PutScalingPolicyError, R>> for Error
385where
386    R: Send + Sync + std::fmt::Debug + 'static,
387{
388    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_scaling_policy::PutScalingPolicyError, R>) -> Self {
389        match err {
390            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
391            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
392                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
393                source: err.into(),
394            }),
395        }
396    }
397}
398impl From<crate::operation::put_scaling_policy::PutScalingPolicyError> for Error {
399    fn from(err: crate::operation::put_scaling_policy::PutScalingPolicyError) -> Self {
400        match err {
401            crate::operation::put_scaling_policy::PutScalingPolicyError::ConcurrentUpdateException(inner) => Error::ConcurrentUpdateException(inner),
402            crate::operation::put_scaling_policy::PutScalingPolicyError::FailedResourceAccessException(inner) => {
403                Error::FailedResourceAccessException(inner)
404            }
405            crate::operation::put_scaling_policy::PutScalingPolicyError::InternalServiceException(inner) => Error::InternalServiceException(inner),
406            crate::operation::put_scaling_policy::PutScalingPolicyError::LimitExceededException(inner) => Error::LimitExceededException(inner),
407            crate::operation::put_scaling_policy::PutScalingPolicyError::ObjectNotFoundException(inner) => Error::ObjectNotFoundException(inner),
408            crate::operation::put_scaling_policy::PutScalingPolicyError::ValidationException(inner) => Error::ValidationException(inner),
409            crate::operation::put_scaling_policy::PutScalingPolicyError::Unhandled(inner) => Error::Unhandled(inner),
410        }
411    }
412}
413impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_scheduled_action::PutScheduledActionError, R>> for Error
414where
415    R: Send + Sync + std::fmt::Debug + 'static,
416{
417    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_scheduled_action::PutScheduledActionError, R>) -> Self {
418        match err {
419            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
420            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
421                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
422                source: err.into(),
423            }),
424        }
425    }
426}
427impl From<crate::operation::put_scheduled_action::PutScheduledActionError> for Error {
428    fn from(err: crate::operation::put_scheduled_action::PutScheduledActionError) -> Self {
429        match err {
430            crate::operation::put_scheduled_action::PutScheduledActionError::ConcurrentUpdateException(inner) => {
431                Error::ConcurrentUpdateException(inner)
432            }
433            crate::operation::put_scheduled_action::PutScheduledActionError::InternalServiceException(inner) => {
434                Error::InternalServiceException(inner)
435            }
436            crate::operation::put_scheduled_action::PutScheduledActionError::LimitExceededException(inner) => Error::LimitExceededException(inner),
437            crate::operation::put_scheduled_action::PutScheduledActionError::ObjectNotFoundException(inner) => Error::ObjectNotFoundException(inner),
438            crate::operation::put_scheduled_action::PutScheduledActionError::ValidationException(inner) => Error::ValidationException(inner),
439            crate::operation::put_scheduled_action::PutScheduledActionError::Unhandled(inner) => Error::Unhandled(inner),
440        }
441    }
442}
443impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::register_scalable_target::RegisterScalableTargetError, R>> for Error
444where
445    R: Send + Sync + std::fmt::Debug + 'static,
446{
447    fn from(
448        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::register_scalable_target::RegisterScalableTargetError, R>,
449    ) -> Self {
450        match err {
451            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
452            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
453                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
454                source: err.into(),
455            }),
456        }
457    }
458}
459impl From<crate::operation::register_scalable_target::RegisterScalableTargetError> for Error {
460    fn from(err: crate::operation::register_scalable_target::RegisterScalableTargetError) -> Self {
461        match err {
462            crate::operation::register_scalable_target::RegisterScalableTargetError::ConcurrentUpdateException(inner) => {
463                Error::ConcurrentUpdateException(inner)
464            }
465            crate::operation::register_scalable_target::RegisterScalableTargetError::InternalServiceException(inner) => {
466                Error::InternalServiceException(inner)
467            }
468            crate::operation::register_scalable_target::RegisterScalableTargetError::LimitExceededException(inner) => {
469                Error::LimitExceededException(inner)
470            }
471            crate::operation::register_scalable_target::RegisterScalableTargetError::ValidationException(inner) => Error::ValidationException(inner),
472            crate::operation::register_scalable_target::RegisterScalableTargetError::Unhandled(inner) => Error::Unhandled(inner),
473        }
474    }
475}
476impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
477where
478    R: Send + Sync + std::fmt::Debug + 'static,
479{
480    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
481        match err {
482            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
483            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
484                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
485                source: err.into(),
486            }),
487        }
488    }
489}
490impl From<crate::operation::tag_resource::TagResourceError> for Error {
491    fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
492        match err {
493            crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
494            crate::operation::tag_resource::TagResourceError::TooManyTagsException(inner) => Error::TooManyTagsException(inner),
495            crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
496            crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
497        }
498    }
499}
500impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
501where
502    R: Send + Sync + std::fmt::Debug + 'static,
503{
504    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
505        match err {
506            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
507            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
508                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
509                source: err.into(),
510            }),
511        }
512    }
513}
514impl From<crate::operation::untag_resource::UntagResourceError> for Error {
515    fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
516        match err {
517            crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
518            crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
519            crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
520        }
521    }
522}
523impl ::std::error::Error for Error {
524    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
525        match self {
526            Error::ConcurrentUpdateException(inner) => inner.source(),
527            Error::FailedResourceAccessException(inner) => inner.source(),
528            Error::InternalServiceException(inner) => inner.source(),
529            Error::InvalidNextTokenException(inner) => inner.source(),
530            Error::LimitExceededException(inner) => inner.source(),
531            Error::ObjectNotFoundException(inner) => inner.source(),
532            Error::ResourceNotFoundException(inner) => inner.source(),
533            Error::TooManyTagsException(inner) => inner.source(),
534            Error::ValidationException(inner) => inner.source(),
535            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
536        }
537    }
538}
539impl ::aws_types::request_id::RequestId for Error {
540    fn request_id(&self) -> Option<&str> {
541        match self {
542            Self::ConcurrentUpdateException(e) => e.request_id(),
543            Self::FailedResourceAccessException(e) => e.request_id(),
544            Self::InternalServiceException(e) => e.request_id(),
545            Self::InvalidNextTokenException(e) => e.request_id(),
546            Self::LimitExceededException(e) => e.request_id(),
547            Self::ObjectNotFoundException(e) => e.request_id(),
548            Self::ResourceNotFoundException(e) => e.request_id(),
549            Self::TooManyTagsException(e) => e.request_id(),
550            Self::ValidationException(e) => e.request_id(),
551            Self::Unhandled(e) => e.meta.request_id(),
552        }
553    }
554}