aws_sdk_synthetics/
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>You don't have permission to perform this operation on this resource.</p>
7    AccessDeniedException(crate::types::error::AccessDeniedException),
8    /// <p>The request was not valid.</p>
9    BadRequestException(crate::types::error::BadRequestException),
10    /// <p>A conflicting operation is already in progress.</p>
11    ConflictException(crate::types::error::ConflictException),
12    /// <p>An internal failure occurred. Try the operation again.</p>
13    InternalFailureException(crate::types::error::InternalFailureException),
14    /// <p>An unknown internal error occurred.</p>
15    InternalServerException(crate::types::error::InternalServerException),
16    /// <p>The specified resource was not found.</p>
17    NotFoundException(crate::types::error::NotFoundException),
18    /// <p>One of the input resources is larger than is allowed.</p>
19    RequestEntityTooLargeException(crate::types::error::RequestEntityTooLargeException),
20    /// <p>One of the specified resources was not found.</p>
21    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
22    /// <p>The request exceeded a service quota value.</p>
23    ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
24    /// <p>There were too many simultaneous requests. Try the operation again.</p>
25    TooManyRequestsException(crate::types::error::TooManyRequestsException),
26    /// <p>A parameter could not be validated.</p>
27    ValidationException(crate::types::error::ValidationException),
28    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
29    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
30    variable wildcard pattern and check `.code()`:
31     \
32    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
33     \
34    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
35    Unhandled(crate::error::sealed_unhandled::Unhandled),
36}
37impl ::std::fmt::Display for Error {
38    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
39        match self {
40            Error::AccessDeniedException(inner) => inner.fmt(f),
41            Error::BadRequestException(inner) => inner.fmt(f),
42            Error::ConflictException(inner) => inner.fmt(f),
43            Error::InternalFailureException(inner) => inner.fmt(f),
44            Error::InternalServerException(inner) => inner.fmt(f),
45            Error::NotFoundException(inner) => inner.fmt(f),
46            Error::RequestEntityTooLargeException(inner) => inner.fmt(f),
47            Error::ResourceNotFoundException(inner) => inner.fmt(f),
48            Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
49            Error::TooManyRequestsException(inner) => inner.fmt(f),
50            Error::ValidationException(inner) => inner.fmt(f),
51            Error::Unhandled(_) => {
52                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
53                    write!(f, "unhandled error ({code})")
54                } else {
55                    f.write_str("unhandled error")
56                }
57            }
58        }
59    }
60}
61impl From<::aws_smithy_types::error::operation::BuildError> for Error {
62    fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
63        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
64            source: value.into(),
65            meta: ::std::default::Default::default(),
66        })
67    }
68}
69impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
70    fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
71        match self {
72            Self::AccessDeniedException(inner) => inner.meta(),
73            Self::BadRequestException(inner) => inner.meta(),
74            Self::ConflictException(inner) => inner.meta(),
75            Self::InternalFailureException(inner) => inner.meta(),
76            Self::InternalServerException(inner) => inner.meta(),
77            Self::NotFoundException(inner) => inner.meta(),
78            Self::RequestEntityTooLargeException(inner) => inner.meta(),
79            Self::ResourceNotFoundException(inner) => inner.meta(),
80            Self::ServiceQuotaExceededException(inner) => inner.meta(),
81            Self::TooManyRequestsException(inner) => inner.meta(),
82            Self::ValidationException(inner) => inner.meta(),
83            Self::Unhandled(inner) => &inner.meta,
84        }
85    }
86}
87impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::associate_resource::AssociateResourceError, R>> for Error
88where
89    R: Send + Sync + std::fmt::Debug + 'static,
90{
91    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::associate_resource::AssociateResourceError, R>) -> Self {
92        match err {
93            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
94            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
95                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
96                source: err.into(),
97            }),
98        }
99    }
100}
101impl From<crate::operation::associate_resource::AssociateResourceError> for Error {
102    fn from(err: crate::operation::associate_resource::AssociateResourceError) -> Self {
103        match err {
104            crate::operation::associate_resource::AssociateResourceError::ConflictException(inner) => Error::ConflictException(inner),
105            crate::operation::associate_resource::AssociateResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
106            crate::operation::associate_resource::AssociateResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
107            crate::operation::associate_resource::AssociateResourceError::ServiceQuotaExceededException(inner) => {
108                Error::ServiceQuotaExceededException(inner)
109            }
110            crate::operation::associate_resource::AssociateResourceError::ValidationException(inner) => Error::ValidationException(inner),
111            crate::operation::associate_resource::AssociateResourceError::Unhandled(inner) => Error::Unhandled(inner),
112        }
113    }
114}
115impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_canary::CreateCanaryError, R>> for Error
116where
117    R: Send + Sync + std::fmt::Debug + 'static,
118{
119    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_canary::CreateCanaryError, R>) -> Self {
120        match err {
121            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
122            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
123                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
124                source: err.into(),
125            }),
126        }
127    }
128}
129impl From<crate::operation::create_canary::CreateCanaryError> for Error {
130    fn from(err: crate::operation::create_canary::CreateCanaryError) -> Self {
131        match err {
132            crate::operation::create_canary::CreateCanaryError::InternalServerException(inner) => Error::InternalServerException(inner),
133            crate::operation::create_canary::CreateCanaryError::RequestEntityTooLargeException(inner) => Error::RequestEntityTooLargeException(inner),
134            crate::operation::create_canary::CreateCanaryError::ValidationException(inner) => Error::ValidationException(inner),
135            crate::operation::create_canary::CreateCanaryError::Unhandled(inner) => Error::Unhandled(inner),
136        }
137    }
138}
139impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_group::CreateGroupError, R>> for Error
140where
141    R: Send + Sync + std::fmt::Debug + 'static,
142{
143    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_group::CreateGroupError, R>) -> Self {
144        match err {
145            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
146            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
147                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
148                source: err.into(),
149            }),
150        }
151    }
152}
153impl From<crate::operation::create_group::CreateGroupError> for Error {
154    fn from(err: crate::operation::create_group::CreateGroupError) -> Self {
155        match err {
156            crate::operation::create_group::CreateGroupError::ConflictException(inner) => Error::ConflictException(inner),
157            crate::operation::create_group::CreateGroupError::InternalServerException(inner) => Error::InternalServerException(inner),
158            crate::operation::create_group::CreateGroupError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
159            crate::operation::create_group::CreateGroupError::ValidationException(inner) => Error::ValidationException(inner),
160            crate::operation::create_group::CreateGroupError::Unhandled(inner) => Error::Unhandled(inner),
161        }
162    }
163}
164impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_canary::DeleteCanaryError, R>> for Error
165where
166    R: Send + Sync + std::fmt::Debug + 'static,
167{
168    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_canary::DeleteCanaryError, R>) -> Self {
169        match err {
170            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
171            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
172                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
173                source: err.into(),
174            }),
175        }
176    }
177}
178impl From<crate::operation::delete_canary::DeleteCanaryError> for Error {
179    fn from(err: crate::operation::delete_canary::DeleteCanaryError) -> Self {
180        match err {
181            crate::operation::delete_canary::DeleteCanaryError::ConflictException(inner) => Error::ConflictException(inner),
182            crate::operation::delete_canary::DeleteCanaryError::InternalServerException(inner) => Error::InternalServerException(inner),
183            crate::operation::delete_canary::DeleteCanaryError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
184            crate::operation::delete_canary::DeleteCanaryError::ValidationException(inner) => Error::ValidationException(inner),
185            crate::operation::delete_canary::DeleteCanaryError::Unhandled(inner) => Error::Unhandled(inner),
186        }
187    }
188}
189impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_group::DeleteGroupError, R>> for Error
190where
191    R: Send + Sync + std::fmt::Debug + 'static,
192{
193    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_group::DeleteGroupError, R>) -> Self {
194        match err {
195            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
196            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
197                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
198                source: err.into(),
199            }),
200        }
201    }
202}
203impl From<crate::operation::delete_group::DeleteGroupError> for Error {
204    fn from(err: crate::operation::delete_group::DeleteGroupError) -> Self {
205        match err {
206            crate::operation::delete_group::DeleteGroupError::ConflictException(inner) => Error::ConflictException(inner),
207            crate::operation::delete_group::DeleteGroupError::InternalServerException(inner) => Error::InternalServerException(inner),
208            crate::operation::delete_group::DeleteGroupError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
209            crate::operation::delete_group::DeleteGroupError::ValidationException(inner) => Error::ValidationException(inner),
210            crate::operation::delete_group::DeleteGroupError::Unhandled(inner) => Error::Unhandled(inner),
211        }
212    }
213}
214impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_canaries::DescribeCanariesError, R>> for Error
215where
216    R: Send + Sync + std::fmt::Debug + 'static,
217{
218    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_canaries::DescribeCanariesError, R>) -> Self {
219        match err {
220            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
221            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
222                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
223                source: err.into(),
224            }),
225        }
226    }
227}
228impl From<crate::operation::describe_canaries::DescribeCanariesError> for Error {
229    fn from(err: crate::operation::describe_canaries::DescribeCanariesError) -> Self {
230        match err {
231            crate::operation::describe_canaries::DescribeCanariesError::InternalServerException(inner) => Error::InternalServerException(inner),
232            crate::operation::describe_canaries::DescribeCanariesError::ValidationException(inner) => Error::ValidationException(inner),
233            crate::operation::describe_canaries::DescribeCanariesError::Unhandled(inner) => Error::Unhandled(inner),
234        }
235    }
236}
237impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_canaries_last_run::DescribeCanariesLastRunError, R>>
238    for Error
239where
240    R: Send + Sync + std::fmt::Debug + 'static,
241{
242    fn from(
243        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_canaries_last_run::DescribeCanariesLastRunError, R>,
244    ) -> Self {
245        match err {
246            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
247            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
248                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
249                source: err.into(),
250            }),
251        }
252    }
253}
254impl From<crate::operation::describe_canaries_last_run::DescribeCanariesLastRunError> for Error {
255    fn from(err: crate::operation::describe_canaries_last_run::DescribeCanariesLastRunError) -> Self {
256        match err {
257            crate::operation::describe_canaries_last_run::DescribeCanariesLastRunError::InternalServerException(inner) => {
258                Error::InternalServerException(inner)
259            }
260            crate::operation::describe_canaries_last_run::DescribeCanariesLastRunError::ValidationException(inner) => {
261                Error::ValidationException(inner)
262            }
263            crate::operation::describe_canaries_last_run::DescribeCanariesLastRunError::Unhandled(inner) => Error::Unhandled(inner),
264        }
265    }
266}
267impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_runtime_versions::DescribeRuntimeVersionsError, R>>
268    for Error
269where
270    R: Send + Sync + std::fmt::Debug + 'static,
271{
272    fn from(
273        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_runtime_versions::DescribeRuntimeVersionsError, R>,
274    ) -> Self {
275        match err {
276            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
277            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
278                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
279                source: err.into(),
280            }),
281        }
282    }
283}
284impl From<crate::operation::describe_runtime_versions::DescribeRuntimeVersionsError> for Error {
285    fn from(err: crate::operation::describe_runtime_versions::DescribeRuntimeVersionsError) -> Self {
286        match err {
287            crate::operation::describe_runtime_versions::DescribeRuntimeVersionsError::InternalServerException(inner) => {
288                Error::InternalServerException(inner)
289            }
290            crate::operation::describe_runtime_versions::DescribeRuntimeVersionsError::ValidationException(inner) => {
291                Error::ValidationException(inner)
292            }
293            crate::operation::describe_runtime_versions::DescribeRuntimeVersionsError::Unhandled(inner) => Error::Unhandled(inner),
294        }
295    }
296}
297impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disassociate_resource::DisassociateResourceError, R>> for Error
298where
299    R: Send + Sync + std::fmt::Debug + 'static,
300{
301    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disassociate_resource::DisassociateResourceError, R>) -> Self {
302        match err {
303            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
304            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
305                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
306                source: err.into(),
307            }),
308        }
309    }
310}
311impl From<crate::operation::disassociate_resource::DisassociateResourceError> for Error {
312    fn from(err: crate::operation::disassociate_resource::DisassociateResourceError) -> Self {
313        match err {
314            crate::operation::disassociate_resource::DisassociateResourceError::ConflictException(inner) => Error::ConflictException(inner),
315            crate::operation::disassociate_resource::DisassociateResourceError::InternalServerException(inner) => {
316                Error::InternalServerException(inner)
317            }
318            crate::operation::disassociate_resource::DisassociateResourceError::ResourceNotFoundException(inner) => {
319                Error::ResourceNotFoundException(inner)
320            }
321            crate::operation::disassociate_resource::DisassociateResourceError::ValidationException(inner) => Error::ValidationException(inner),
322            crate::operation::disassociate_resource::DisassociateResourceError::Unhandled(inner) => Error::Unhandled(inner),
323        }
324    }
325}
326impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_canary::GetCanaryError, R>> for Error
327where
328    R: Send + Sync + std::fmt::Debug + 'static,
329{
330    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_canary::GetCanaryError, R>) -> Self {
331        match err {
332            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
333            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
334                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
335                source: err.into(),
336            }),
337        }
338    }
339}
340impl From<crate::operation::get_canary::GetCanaryError> for Error {
341    fn from(err: crate::operation::get_canary::GetCanaryError) -> Self {
342        match err {
343            crate::operation::get_canary::GetCanaryError::InternalServerException(inner) => Error::InternalServerException(inner),
344            crate::operation::get_canary::GetCanaryError::ValidationException(inner) => Error::ValidationException(inner),
345            crate::operation::get_canary::GetCanaryError::Unhandled(inner) => Error::Unhandled(inner),
346        }
347    }
348}
349impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_canary_runs::GetCanaryRunsError, R>> for Error
350where
351    R: Send + Sync + std::fmt::Debug + 'static,
352{
353    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_canary_runs::GetCanaryRunsError, R>) -> Self {
354        match err {
355            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
356            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
357                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
358                source: err.into(),
359            }),
360        }
361    }
362}
363impl From<crate::operation::get_canary_runs::GetCanaryRunsError> for Error {
364    fn from(err: crate::operation::get_canary_runs::GetCanaryRunsError) -> Self {
365        match err {
366            crate::operation::get_canary_runs::GetCanaryRunsError::InternalServerException(inner) => Error::InternalServerException(inner),
367            crate::operation::get_canary_runs::GetCanaryRunsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
368            crate::operation::get_canary_runs::GetCanaryRunsError::ValidationException(inner) => Error::ValidationException(inner),
369            crate::operation::get_canary_runs::GetCanaryRunsError::Unhandled(inner) => Error::Unhandled(inner),
370        }
371    }
372}
373impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_group::GetGroupError, R>> for Error
374where
375    R: Send + Sync + std::fmt::Debug + 'static,
376{
377    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_group::GetGroupError, R>) -> Self {
378        match err {
379            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
380            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
381                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
382                source: err.into(),
383            }),
384        }
385    }
386}
387impl From<crate::operation::get_group::GetGroupError> for Error {
388    fn from(err: crate::operation::get_group::GetGroupError) -> Self {
389        match err {
390            crate::operation::get_group::GetGroupError::ConflictException(inner) => Error::ConflictException(inner),
391            crate::operation::get_group::GetGroupError::InternalServerException(inner) => Error::InternalServerException(inner),
392            crate::operation::get_group::GetGroupError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
393            crate::operation::get_group::GetGroupError::ValidationException(inner) => Error::ValidationException(inner),
394            crate::operation::get_group::GetGroupError::Unhandled(inner) => Error::Unhandled(inner),
395        }
396    }
397}
398impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_associated_groups::ListAssociatedGroupsError, R>> for Error
399where
400    R: Send + Sync + std::fmt::Debug + 'static,
401{
402    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_associated_groups::ListAssociatedGroupsError, R>) -> Self {
403        match err {
404            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
405            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
406                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
407                source: err.into(),
408            }),
409        }
410    }
411}
412impl From<crate::operation::list_associated_groups::ListAssociatedGroupsError> for Error {
413    fn from(err: crate::operation::list_associated_groups::ListAssociatedGroupsError) -> Self {
414        match err {
415            crate::operation::list_associated_groups::ListAssociatedGroupsError::InternalServerException(inner) => {
416                Error::InternalServerException(inner)
417            }
418            crate::operation::list_associated_groups::ListAssociatedGroupsError::ResourceNotFoundException(inner) => {
419                Error::ResourceNotFoundException(inner)
420            }
421            crate::operation::list_associated_groups::ListAssociatedGroupsError::ValidationException(inner) => Error::ValidationException(inner),
422            crate::operation::list_associated_groups::ListAssociatedGroupsError::Unhandled(inner) => Error::Unhandled(inner),
423        }
424    }
425}
426impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_group_resources::ListGroupResourcesError, R>> for Error
427where
428    R: Send + Sync + std::fmt::Debug + 'static,
429{
430    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_group_resources::ListGroupResourcesError, R>) -> Self {
431        match err {
432            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
433            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
434                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
435                source: err.into(),
436            }),
437        }
438    }
439}
440impl From<crate::operation::list_group_resources::ListGroupResourcesError> for Error {
441    fn from(err: crate::operation::list_group_resources::ListGroupResourcesError) -> Self {
442        match err {
443            crate::operation::list_group_resources::ListGroupResourcesError::ConflictException(inner) => Error::ConflictException(inner),
444            crate::operation::list_group_resources::ListGroupResourcesError::InternalServerException(inner) => Error::InternalServerException(inner),
445            crate::operation::list_group_resources::ListGroupResourcesError::ResourceNotFoundException(inner) => {
446                Error::ResourceNotFoundException(inner)
447            }
448            crate::operation::list_group_resources::ListGroupResourcesError::ValidationException(inner) => Error::ValidationException(inner),
449            crate::operation::list_group_resources::ListGroupResourcesError::Unhandled(inner) => Error::Unhandled(inner),
450        }
451    }
452}
453impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_groups::ListGroupsError, R>> for Error
454where
455    R: Send + Sync + std::fmt::Debug + 'static,
456{
457    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_groups::ListGroupsError, R>) -> Self {
458        match err {
459            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
460            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
461                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
462                source: err.into(),
463            }),
464        }
465    }
466}
467impl From<crate::operation::list_groups::ListGroupsError> for Error {
468    fn from(err: crate::operation::list_groups::ListGroupsError) -> Self {
469        match err {
470            crate::operation::list_groups::ListGroupsError::InternalServerException(inner) => Error::InternalServerException(inner),
471            crate::operation::list_groups::ListGroupsError::ValidationException(inner) => Error::ValidationException(inner),
472            crate::operation::list_groups::ListGroupsError::Unhandled(inner) => Error::Unhandled(inner),
473        }
474    }
475}
476impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, 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::list_tags_for_resource::ListTagsForResourceError, 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::list_tags_for_resource::ListTagsForResourceError> for Error {
491    fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
492        match err {
493            crate::operation::list_tags_for_resource::ListTagsForResourceError::BadRequestException(inner) => Error::BadRequestException(inner),
494            crate::operation::list_tags_for_resource::ListTagsForResourceError::ConflictException(inner) => Error::ConflictException(inner),
495            crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalFailureException(inner) => {
496                Error::InternalFailureException(inner)
497            }
498            crate::operation::list_tags_for_resource::ListTagsForResourceError::NotFoundException(inner) => Error::NotFoundException(inner),
499            crate::operation::list_tags_for_resource::ListTagsForResourceError::TooManyRequestsException(inner) => {
500                Error::TooManyRequestsException(inner)
501            }
502            crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
503        }
504    }
505}
506impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_canary::StartCanaryError, R>> for Error
507where
508    R: Send + Sync + std::fmt::Debug + 'static,
509{
510    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_canary::StartCanaryError, R>) -> Self {
511        match err {
512            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
513            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
514                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
515                source: err.into(),
516            }),
517        }
518    }
519}
520impl From<crate::operation::start_canary::StartCanaryError> for Error {
521    fn from(err: crate::operation::start_canary::StartCanaryError) -> Self {
522        match err {
523            crate::operation::start_canary::StartCanaryError::ConflictException(inner) => Error::ConflictException(inner),
524            crate::operation::start_canary::StartCanaryError::InternalServerException(inner) => Error::InternalServerException(inner),
525            crate::operation::start_canary::StartCanaryError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
526            crate::operation::start_canary::StartCanaryError::ValidationException(inner) => Error::ValidationException(inner),
527            crate::operation::start_canary::StartCanaryError::Unhandled(inner) => Error::Unhandled(inner),
528        }
529    }
530}
531impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_canary_dry_run::StartCanaryDryRunError, R>> for Error
532where
533    R: Send + Sync + std::fmt::Debug + 'static,
534{
535    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_canary_dry_run::StartCanaryDryRunError, R>) -> Self {
536        match err {
537            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
538            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
539                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
540                source: err.into(),
541            }),
542        }
543    }
544}
545impl From<crate::operation::start_canary_dry_run::StartCanaryDryRunError> for Error {
546    fn from(err: crate::operation::start_canary_dry_run::StartCanaryDryRunError) -> Self {
547        match err {
548            crate::operation::start_canary_dry_run::StartCanaryDryRunError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
549            crate::operation::start_canary_dry_run::StartCanaryDryRunError::ConflictException(inner) => Error::ConflictException(inner),
550            crate::operation::start_canary_dry_run::StartCanaryDryRunError::InternalServerException(inner) => Error::InternalServerException(inner),
551            crate::operation::start_canary_dry_run::StartCanaryDryRunError::ResourceNotFoundException(inner) => {
552                Error::ResourceNotFoundException(inner)
553            }
554            crate::operation::start_canary_dry_run::StartCanaryDryRunError::ValidationException(inner) => Error::ValidationException(inner),
555            crate::operation::start_canary_dry_run::StartCanaryDryRunError::Unhandled(inner) => Error::Unhandled(inner),
556        }
557    }
558}
559impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_canary::StopCanaryError, R>> for Error
560where
561    R: Send + Sync + std::fmt::Debug + 'static,
562{
563    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_canary::StopCanaryError, R>) -> Self {
564        match err {
565            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
566            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
567                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
568                source: err.into(),
569            }),
570        }
571    }
572}
573impl From<crate::operation::stop_canary::StopCanaryError> for Error {
574    fn from(err: crate::operation::stop_canary::StopCanaryError) -> Self {
575        match err {
576            crate::operation::stop_canary::StopCanaryError::ConflictException(inner) => Error::ConflictException(inner),
577            crate::operation::stop_canary::StopCanaryError::InternalServerException(inner) => Error::InternalServerException(inner),
578            crate::operation::stop_canary::StopCanaryError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
579            crate::operation::stop_canary::StopCanaryError::ValidationException(inner) => Error::ValidationException(inner),
580            crate::operation::stop_canary::StopCanaryError::Unhandled(inner) => Error::Unhandled(inner),
581        }
582    }
583}
584impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
585where
586    R: Send + Sync + std::fmt::Debug + 'static,
587{
588    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
589        match err {
590            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
591            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
592                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
593                source: err.into(),
594            }),
595        }
596    }
597}
598impl From<crate::operation::tag_resource::TagResourceError> for Error {
599    fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
600        match err {
601            crate::operation::tag_resource::TagResourceError::BadRequestException(inner) => Error::BadRequestException(inner),
602            crate::operation::tag_resource::TagResourceError::ConflictException(inner) => Error::ConflictException(inner),
603            crate::operation::tag_resource::TagResourceError::InternalFailureException(inner) => Error::InternalFailureException(inner),
604            crate::operation::tag_resource::TagResourceError::NotFoundException(inner) => Error::NotFoundException(inner),
605            crate::operation::tag_resource::TagResourceError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
606            crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
607        }
608    }
609}
610impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
611where
612    R: Send + Sync + std::fmt::Debug + 'static,
613{
614    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
615        match err {
616            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
617            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
618                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
619                source: err.into(),
620            }),
621        }
622    }
623}
624impl From<crate::operation::untag_resource::UntagResourceError> for Error {
625    fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
626        match err {
627            crate::operation::untag_resource::UntagResourceError::BadRequestException(inner) => Error::BadRequestException(inner),
628            crate::operation::untag_resource::UntagResourceError::ConflictException(inner) => Error::ConflictException(inner),
629            crate::operation::untag_resource::UntagResourceError::InternalFailureException(inner) => Error::InternalFailureException(inner),
630            crate::operation::untag_resource::UntagResourceError::NotFoundException(inner) => Error::NotFoundException(inner),
631            crate::operation::untag_resource::UntagResourceError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
632            crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
633        }
634    }
635}
636impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_canary::UpdateCanaryError, R>> for Error
637where
638    R: Send + Sync + std::fmt::Debug + 'static,
639{
640    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_canary::UpdateCanaryError, R>) -> Self {
641        match err {
642            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
643            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
644                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
645                source: err.into(),
646            }),
647        }
648    }
649}
650impl From<crate::operation::update_canary::UpdateCanaryError> for Error {
651    fn from(err: crate::operation::update_canary::UpdateCanaryError) -> Self {
652        match err {
653            crate::operation::update_canary::UpdateCanaryError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
654            crate::operation::update_canary::UpdateCanaryError::ConflictException(inner) => Error::ConflictException(inner),
655            crate::operation::update_canary::UpdateCanaryError::InternalServerException(inner) => Error::InternalServerException(inner),
656            crate::operation::update_canary::UpdateCanaryError::RequestEntityTooLargeException(inner) => Error::RequestEntityTooLargeException(inner),
657            crate::operation::update_canary::UpdateCanaryError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
658            crate::operation::update_canary::UpdateCanaryError::ValidationException(inner) => Error::ValidationException(inner),
659            crate::operation::update_canary::UpdateCanaryError::Unhandled(inner) => Error::Unhandled(inner),
660        }
661    }
662}
663impl ::std::error::Error for Error {
664    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
665        match self {
666            Error::AccessDeniedException(inner) => inner.source(),
667            Error::BadRequestException(inner) => inner.source(),
668            Error::ConflictException(inner) => inner.source(),
669            Error::InternalFailureException(inner) => inner.source(),
670            Error::InternalServerException(inner) => inner.source(),
671            Error::NotFoundException(inner) => inner.source(),
672            Error::RequestEntityTooLargeException(inner) => inner.source(),
673            Error::ResourceNotFoundException(inner) => inner.source(),
674            Error::ServiceQuotaExceededException(inner) => inner.source(),
675            Error::TooManyRequestsException(inner) => inner.source(),
676            Error::ValidationException(inner) => inner.source(),
677            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
678        }
679    }
680}
681impl ::aws_types::request_id::RequestId for Error {
682    fn request_id(&self) -> Option<&str> {
683        match self {
684            Self::AccessDeniedException(e) => e.request_id(),
685            Self::BadRequestException(e) => e.request_id(),
686            Self::ConflictException(e) => e.request_id(),
687            Self::InternalFailureException(e) => e.request_id(),
688            Self::InternalServerException(e) => e.request_id(),
689            Self::NotFoundException(e) => e.request_id(),
690            Self::RequestEntityTooLargeException(e) => e.request_id(),
691            Self::ResourceNotFoundException(e) => e.request_id(),
692            Self::ServiceQuotaExceededException(e) => e.request_id(),
693            Self::TooManyRequestsException(e) => e.request_id(),
694            Self::ValidationException(e) => e.request_id(),
695            Self::Unhandled(e) => e.meta.request_id(),
696        }
697    }
698}