aws_sdk_observabilityadmin/
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>Indicates you don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html">Access management for Amazon Web Services resources</a> in the IAM user guide.</p>
7    AccessDeniedException(crate::types::error::AccessDeniedException),
8    /// <p>The requested operation conflicts with the current state of the specified resource or with another request.</p>
9    ConflictException(crate::types::error::ConflictException),
10    /// <p>Indicates the request has failed to process because of an unknown server error, exception, or failure.</p>
11    InternalServerException(crate::types::error::InternalServerException),
12    /// <p>The specified resource (such as a telemetry rule) could not be found.</p>
13    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
14    /// <p>The requested operation would exceed the allowed quota for the specified resource type.</p>
15    ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
16    /// <p>The request throughput limit was exceeded.</p>
17    TooManyRequestsException(crate::types::error::TooManyRequestsException),
18    /// <p>Indicates input validation failed. Check your request parameters and retry the request.</p>
19    ValidationException(crate::types::error::ValidationException),
20    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
21    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
22    variable wildcard pattern and check `.code()`:
23     \
24    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
25     \
26    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
27    Unhandled(crate::error::sealed_unhandled::Unhandled),
28}
29impl ::std::fmt::Display for Error {
30    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
31        match self {
32            Error::AccessDeniedException(inner) => inner.fmt(f),
33            Error::ConflictException(inner) => inner.fmt(f),
34            Error::InternalServerException(inner) => inner.fmt(f),
35            Error::ResourceNotFoundException(inner) => inner.fmt(f),
36            Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
37            Error::TooManyRequestsException(inner) => inner.fmt(f),
38            Error::ValidationException(inner) => inner.fmt(f),
39            Error::Unhandled(_) => {
40                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
41                    write!(f, "unhandled error ({code})")
42                } else {
43                    f.write_str("unhandled error")
44                }
45            }
46        }
47    }
48}
49impl From<::aws_smithy_types::error::operation::BuildError> for Error {
50    fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
51        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
52            source: value.into(),
53            meta: ::std::default::Default::default(),
54        })
55    }
56}
57impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
58    fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
59        match self {
60            Self::AccessDeniedException(inner) => inner.meta(),
61            Self::ConflictException(inner) => inner.meta(),
62            Self::InternalServerException(inner) => inner.meta(),
63            Self::ResourceNotFoundException(inner) => inner.meta(),
64            Self::ServiceQuotaExceededException(inner) => inner.meta(),
65            Self::TooManyRequestsException(inner) => inner.meta(),
66            Self::ValidationException(inner) => inner.meta(),
67            Self::Unhandled(inner) => &inner.meta,
68        }
69    }
70}
71impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_telemetry_rule::CreateTelemetryRuleError, R>> for Error
72where
73    R: Send + Sync + std::fmt::Debug + 'static,
74{
75    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_telemetry_rule::CreateTelemetryRuleError, R>) -> Self {
76        match err {
77            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
78            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
79                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
80                source: err.into(),
81            }),
82        }
83    }
84}
85impl From<crate::operation::create_telemetry_rule::CreateTelemetryRuleError> for Error {
86    fn from(err: crate::operation::create_telemetry_rule::CreateTelemetryRuleError) -> Self {
87        match err {
88            crate::operation::create_telemetry_rule::CreateTelemetryRuleError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
89            crate::operation::create_telemetry_rule::CreateTelemetryRuleError::ConflictException(inner) => Error::ConflictException(inner),
90            crate::operation::create_telemetry_rule::CreateTelemetryRuleError::InternalServerException(inner) => {
91                Error::InternalServerException(inner)
92            }
93            crate::operation::create_telemetry_rule::CreateTelemetryRuleError::ServiceQuotaExceededException(inner) => {
94                Error::ServiceQuotaExceededException(inner)
95            }
96            crate::operation::create_telemetry_rule::CreateTelemetryRuleError::TooManyRequestsException(inner) => {
97                Error::TooManyRequestsException(inner)
98            }
99            crate::operation::create_telemetry_rule::CreateTelemetryRuleError::ValidationException(inner) => Error::ValidationException(inner),
100            crate::operation::create_telemetry_rule::CreateTelemetryRuleError::Unhandled(inner) => Error::Unhandled(inner),
101        }
102    }
103}
104impl<R>
105    From<
106        ::aws_smithy_runtime_api::client::result::SdkError<
107            crate::operation::create_telemetry_rule_for_organization::CreateTelemetryRuleForOrganizationError,
108            R,
109        >,
110    > for Error
111where
112    R: Send + Sync + std::fmt::Debug + 'static,
113{
114    fn from(
115        err: ::aws_smithy_runtime_api::client::result::SdkError<
116            crate::operation::create_telemetry_rule_for_organization::CreateTelemetryRuleForOrganizationError,
117            R,
118        >,
119    ) -> 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_telemetry_rule_for_organization::CreateTelemetryRuleForOrganizationError> for Error {
130    fn from(err: crate::operation::create_telemetry_rule_for_organization::CreateTelemetryRuleForOrganizationError) -> Self {
131        match err {
132            crate::operation::create_telemetry_rule_for_organization::CreateTelemetryRuleForOrganizationError::AccessDeniedException(inner) => {
133                Error::AccessDeniedException(inner)
134            }
135            crate::operation::create_telemetry_rule_for_organization::CreateTelemetryRuleForOrganizationError::ConflictException(inner) => {
136                Error::ConflictException(inner)
137            }
138            crate::operation::create_telemetry_rule_for_organization::CreateTelemetryRuleForOrganizationError::InternalServerException(inner) => {
139                Error::InternalServerException(inner)
140            }
141            crate::operation::create_telemetry_rule_for_organization::CreateTelemetryRuleForOrganizationError::ServiceQuotaExceededException(
142                inner,
143            ) => Error::ServiceQuotaExceededException(inner),
144            crate::operation::create_telemetry_rule_for_organization::CreateTelemetryRuleForOrganizationError::TooManyRequestsException(inner) => {
145                Error::TooManyRequestsException(inner)
146            }
147            crate::operation::create_telemetry_rule_for_organization::CreateTelemetryRuleForOrganizationError::ValidationException(inner) => {
148                Error::ValidationException(inner)
149            }
150            crate::operation::create_telemetry_rule_for_organization::CreateTelemetryRuleForOrganizationError::Unhandled(inner) => {
151                Error::Unhandled(inner)
152            }
153        }
154    }
155}
156impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_telemetry_rule::DeleteTelemetryRuleError, R>> for Error
157where
158    R: Send + Sync + std::fmt::Debug + 'static,
159{
160    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_telemetry_rule::DeleteTelemetryRuleError, R>) -> Self {
161        match err {
162            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
163            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
164                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
165                source: err.into(),
166            }),
167        }
168    }
169}
170impl From<crate::operation::delete_telemetry_rule::DeleteTelemetryRuleError> for Error {
171    fn from(err: crate::operation::delete_telemetry_rule::DeleteTelemetryRuleError) -> Self {
172        match err {
173            crate::operation::delete_telemetry_rule::DeleteTelemetryRuleError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
174            crate::operation::delete_telemetry_rule::DeleteTelemetryRuleError::InternalServerException(inner) => {
175                Error::InternalServerException(inner)
176            }
177            crate::operation::delete_telemetry_rule::DeleteTelemetryRuleError::ResourceNotFoundException(inner) => {
178                Error::ResourceNotFoundException(inner)
179            }
180            crate::operation::delete_telemetry_rule::DeleteTelemetryRuleError::TooManyRequestsException(inner) => {
181                Error::TooManyRequestsException(inner)
182            }
183            crate::operation::delete_telemetry_rule::DeleteTelemetryRuleError::ValidationException(inner) => Error::ValidationException(inner),
184            crate::operation::delete_telemetry_rule::DeleteTelemetryRuleError::Unhandled(inner) => Error::Unhandled(inner),
185        }
186    }
187}
188impl<R>
189    From<
190        ::aws_smithy_runtime_api::client::result::SdkError<
191            crate::operation::delete_telemetry_rule_for_organization::DeleteTelemetryRuleForOrganizationError,
192            R,
193        >,
194    > for Error
195where
196    R: Send + Sync + std::fmt::Debug + 'static,
197{
198    fn from(
199        err: ::aws_smithy_runtime_api::client::result::SdkError<
200            crate::operation::delete_telemetry_rule_for_organization::DeleteTelemetryRuleForOrganizationError,
201            R,
202        >,
203    ) -> Self {
204        match err {
205            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
206            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
207                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
208                source: err.into(),
209            }),
210        }
211    }
212}
213impl From<crate::operation::delete_telemetry_rule_for_organization::DeleteTelemetryRuleForOrganizationError> for Error {
214    fn from(err: crate::operation::delete_telemetry_rule_for_organization::DeleteTelemetryRuleForOrganizationError) -> Self {
215        match err {
216            crate::operation::delete_telemetry_rule_for_organization::DeleteTelemetryRuleForOrganizationError::AccessDeniedException(inner) => {
217                Error::AccessDeniedException(inner)
218            }
219            crate::operation::delete_telemetry_rule_for_organization::DeleteTelemetryRuleForOrganizationError::InternalServerException(inner) => {
220                Error::InternalServerException(inner)
221            }
222            crate::operation::delete_telemetry_rule_for_organization::DeleteTelemetryRuleForOrganizationError::ResourceNotFoundException(inner) => {
223                Error::ResourceNotFoundException(inner)
224            }
225            crate::operation::delete_telemetry_rule_for_organization::DeleteTelemetryRuleForOrganizationError::TooManyRequestsException(inner) => {
226                Error::TooManyRequestsException(inner)
227            }
228            crate::operation::delete_telemetry_rule_for_organization::DeleteTelemetryRuleForOrganizationError::ValidationException(inner) => {
229                Error::ValidationException(inner)
230            }
231            crate::operation::delete_telemetry_rule_for_organization::DeleteTelemetryRuleForOrganizationError::Unhandled(inner) => {
232                Error::Unhandled(inner)
233            }
234        }
235    }
236}
237impl<R>
238    From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_telemetry_evaluation_status::GetTelemetryEvaluationStatusError, R>>
239    for Error
240where
241    R: Send + Sync + std::fmt::Debug + 'static,
242{
243    fn from(
244        err: ::aws_smithy_runtime_api::client::result::SdkError<
245            crate::operation::get_telemetry_evaluation_status::GetTelemetryEvaluationStatusError,
246            R,
247        >,
248    ) -> Self {
249        match err {
250            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
251            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
252                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
253                source: err.into(),
254            }),
255        }
256    }
257}
258impl From<crate::operation::get_telemetry_evaluation_status::GetTelemetryEvaluationStatusError> for Error {
259    fn from(err: crate::operation::get_telemetry_evaluation_status::GetTelemetryEvaluationStatusError) -> Self {
260        match err {
261            crate::operation::get_telemetry_evaluation_status::GetTelemetryEvaluationStatusError::AccessDeniedException(inner) => {
262                Error::AccessDeniedException(inner)
263            }
264            crate::operation::get_telemetry_evaluation_status::GetTelemetryEvaluationStatusError::InternalServerException(inner) => {
265                Error::InternalServerException(inner)
266            }
267            crate::operation::get_telemetry_evaluation_status::GetTelemetryEvaluationStatusError::TooManyRequestsException(inner) => {
268                Error::TooManyRequestsException(inner)
269            }
270            crate::operation::get_telemetry_evaluation_status::GetTelemetryEvaluationStatusError::Unhandled(inner) => Error::Unhandled(inner),
271        }
272    }
273}
274impl<R>
275    From<
276        ::aws_smithy_runtime_api::client::result::SdkError<
277            crate::operation::get_telemetry_evaluation_status_for_organization::GetTelemetryEvaluationStatusForOrganizationError,
278            R,
279        >,
280    > for Error
281where
282    R: Send + Sync + std::fmt::Debug + 'static,
283{
284    fn from(
285        err: ::aws_smithy_runtime_api::client::result::SdkError<
286            crate::operation::get_telemetry_evaluation_status_for_organization::GetTelemetryEvaluationStatusForOrganizationError,
287            R,
288        >,
289    ) -> Self {
290        match err {
291            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
292            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
293                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
294                source: err.into(),
295            }),
296        }
297    }
298}
299impl From<crate::operation::get_telemetry_evaluation_status_for_organization::GetTelemetryEvaluationStatusForOrganizationError> for Error {
300    fn from(err: crate::operation::get_telemetry_evaluation_status_for_organization::GetTelemetryEvaluationStatusForOrganizationError) -> Self {
301        match err {
302            crate::operation::get_telemetry_evaluation_status_for_organization::GetTelemetryEvaluationStatusForOrganizationError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
303            crate::operation::get_telemetry_evaluation_status_for_organization::GetTelemetryEvaluationStatusForOrganizationError::InternalServerException(inner) => Error::InternalServerException(inner),
304            crate::operation::get_telemetry_evaluation_status_for_organization::GetTelemetryEvaluationStatusForOrganizationError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
305            crate::operation::get_telemetry_evaluation_status_for_organization::GetTelemetryEvaluationStatusForOrganizationError::ValidationException(inner) => Error::ValidationException(inner),
306            crate::operation::get_telemetry_evaluation_status_for_organization::GetTelemetryEvaluationStatusForOrganizationError::Unhandled(inner) => Error::Unhandled(inner),
307        }
308    }
309}
310impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_telemetry_rule::GetTelemetryRuleError, R>> for Error
311where
312    R: Send + Sync + std::fmt::Debug + 'static,
313{
314    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_telemetry_rule::GetTelemetryRuleError, R>) -> Self {
315        match err {
316            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
317            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
318                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
319                source: err.into(),
320            }),
321        }
322    }
323}
324impl From<crate::operation::get_telemetry_rule::GetTelemetryRuleError> for Error {
325    fn from(err: crate::operation::get_telemetry_rule::GetTelemetryRuleError) -> Self {
326        match err {
327            crate::operation::get_telemetry_rule::GetTelemetryRuleError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
328            crate::operation::get_telemetry_rule::GetTelemetryRuleError::InternalServerException(inner) => Error::InternalServerException(inner),
329            crate::operation::get_telemetry_rule::GetTelemetryRuleError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
330            crate::operation::get_telemetry_rule::GetTelemetryRuleError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
331            crate::operation::get_telemetry_rule::GetTelemetryRuleError::ValidationException(inner) => Error::ValidationException(inner),
332            crate::operation::get_telemetry_rule::GetTelemetryRuleError::Unhandled(inner) => Error::Unhandled(inner),
333        }
334    }
335}
336impl<R>
337    From<
338        ::aws_smithy_runtime_api::client::result::SdkError<
339            crate::operation::get_telemetry_rule_for_organization::GetTelemetryRuleForOrganizationError,
340            R,
341        >,
342    > for Error
343where
344    R: Send + Sync + std::fmt::Debug + 'static,
345{
346    fn from(
347        err: ::aws_smithy_runtime_api::client::result::SdkError<
348            crate::operation::get_telemetry_rule_for_organization::GetTelemetryRuleForOrganizationError,
349            R,
350        >,
351    ) -> Self {
352        match err {
353            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
354            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
355                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
356                source: err.into(),
357            }),
358        }
359    }
360}
361impl From<crate::operation::get_telemetry_rule_for_organization::GetTelemetryRuleForOrganizationError> for Error {
362    fn from(err: crate::operation::get_telemetry_rule_for_organization::GetTelemetryRuleForOrganizationError) -> Self {
363        match err {
364            crate::operation::get_telemetry_rule_for_organization::GetTelemetryRuleForOrganizationError::AccessDeniedException(inner) => {
365                Error::AccessDeniedException(inner)
366            }
367            crate::operation::get_telemetry_rule_for_organization::GetTelemetryRuleForOrganizationError::InternalServerException(inner) => {
368                Error::InternalServerException(inner)
369            }
370            crate::operation::get_telemetry_rule_for_organization::GetTelemetryRuleForOrganizationError::ResourceNotFoundException(inner) => {
371                Error::ResourceNotFoundException(inner)
372            }
373            crate::operation::get_telemetry_rule_for_organization::GetTelemetryRuleForOrganizationError::TooManyRequestsException(inner) => {
374                Error::TooManyRequestsException(inner)
375            }
376            crate::operation::get_telemetry_rule_for_organization::GetTelemetryRuleForOrganizationError::ValidationException(inner) => {
377                Error::ValidationException(inner)
378            }
379            crate::operation::get_telemetry_rule_for_organization::GetTelemetryRuleForOrganizationError::Unhandled(inner) => Error::Unhandled(inner),
380        }
381    }
382}
383impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_resource_telemetry::ListResourceTelemetryError, R>> for Error
384where
385    R: Send + Sync + std::fmt::Debug + 'static,
386{
387    fn from(
388        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_resource_telemetry::ListResourceTelemetryError, R>,
389    ) -> Self {
390        match err {
391            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
392            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
393                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
394                source: err.into(),
395            }),
396        }
397    }
398}
399impl From<crate::operation::list_resource_telemetry::ListResourceTelemetryError> for Error {
400    fn from(err: crate::operation::list_resource_telemetry::ListResourceTelemetryError) -> Self {
401        match err {
402            crate::operation::list_resource_telemetry::ListResourceTelemetryError::AccessDeniedException(inner) => {
403                Error::AccessDeniedException(inner)
404            }
405            crate::operation::list_resource_telemetry::ListResourceTelemetryError::InternalServerException(inner) => {
406                Error::InternalServerException(inner)
407            }
408            crate::operation::list_resource_telemetry::ListResourceTelemetryError::TooManyRequestsException(inner) => {
409                Error::TooManyRequestsException(inner)
410            }
411            crate::operation::list_resource_telemetry::ListResourceTelemetryError::ValidationException(inner) => Error::ValidationException(inner),
412            crate::operation::list_resource_telemetry::ListResourceTelemetryError::Unhandled(inner) => Error::Unhandled(inner),
413        }
414    }
415}
416impl<R>
417    From<
418        ::aws_smithy_runtime_api::client::result::SdkError<
419            crate::operation::list_resource_telemetry_for_organization::ListResourceTelemetryForOrganizationError,
420            R,
421        >,
422    > for Error
423where
424    R: Send + Sync + std::fmt::Debug + 'static,
425{
426    fn from(
427        err: ::aws_smithy_runtime_api::client::result::SdkError<
428            crate::operation::list_resource_telemetry_for_organization::ListResourceTelemetryForOrganizationError,
429            R,
430        >,
431    ) -> Self {
432        match err {
433            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
434            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
435                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
436                source: err.into(),
437            }),
438        }
439    }
440}
441impl From<crate::operation::list_resource_telemetry_for_organization::ListResourceTelemetryForOrganizationError> for Error {
442    fn from(err: crate::operation::list_resource_telemetry_for_organization::ListResourceTelemetryForOrganizationError) -> Self {
443        match err {
444            crate::operation::list_resource_telemetry_for_organization::ListResourceTelemetryForOrganizationError::AccessDeniedException(inner) => {
445                Error::AccessDeniedException(inner)
446            }
447            crate::operation::list_resource_telemetry_for_organization::ListResourceTelemetryForOrganizationError::InternalServerException(inner) => {
448                Error::InternalServerException(inner)
449            }
450            crate::operation::list_resource_telemetry_for_organization::ListResourceTelemetryForOrganizationError::TooManyRequestsException(
451                inner,
452            ) => Error::TooManyRequestsException(inner),
453            crate::operation::list_resource_telemetry_for_organization::ListResourceTelemetryForOrganizationError::ValidationException(inner) => {
454                Error::ValidationException(inner)
455            }
456            crate::operation::list_resource_telemetry_for_organization::ListResourceTelemetryForOrganizationError::Unhandled(inner) => {
457                Error::Unhandled(inner)
458            }
459        }
460    }
461}
462impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
463where
464    R: Send + Sync + std::fmt::Debug + 'static,
465{
466    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
467        match err {
468            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
469            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
470                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
471                source: err.into(),
472            }),
473        }
474    }
475}
476impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
477    fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
478        match err {
479            crate::operation::list_tags_for_resource::ListTagsForResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
480            crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
481                Error::InternalServerException(inner)
482            }
483            crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
484                Error::ResourceNotFoundException(inner)
485            }
486            crate::operation::list_tags_for_resource::ListTagsForResourceError::TooManyRequestsException(inner) => {
487                Error::TooManyRequestsException(inner)
488            }
489            crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
490            crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
491        }
492    }
493}
494impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_telemetry_rules::ListTelemetryRulesError, R>> for Error
495where
496    R: Send + Sync + std::fmt::Debug + 'static,
497{
498    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_telemetry_rules::ListTelemetryRulesError, R>) -> Self {
499        match err {
500            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
501            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
502                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
503                source: err.into(),
504            }),
505        }
506    }
507}
508impl From<crate::operation::list_telemetry_rules::ListTelemetryRulesError> for Error {
509    fn from(err: crate::operation::list_telemetry_rules::ListTelemetryRulesError) -> Self {
510        match err {
511            crate::operation::list_telemetry_rules::ListTelemetryRulesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
512            crate::operation::list_telemetry_rules::ListTelemetryRulesError::InternalServerException(inner) => Error::InternalServerException(inner),
513            crate::operation::list_telemetry_rules::ListTelemetryRulesError::TooManyRequestsException(inner) => {
514                Error::TooManyRequestsException(inner)
515            }
516            crate::operation::list_telemetry_rules::ListTelemetryRulesError::ValidationException(inner) => Error::ValidationException(inner),
517            crate::operation::list_telemetry_rules::ListTelemetryRulesError::Unhandled(inner) => Error::Unhandled(inner),
518        }
519    }
520}
521impl<R>
522    From<
523        ::aws_smithy_runtime_api::client::result::SdkError<
524            crate::operation::list_telemetry_rules_for_organization::ListTelemetryRulesForOrganizationError,
525            R,
526        >,
527    > for Error
528where
529    R: Send + Sync + std::fmt::Debug + 'static,
530{
531    fn from(
532        err: ::aws_smithy_runtime_api::client::result::SdkError<
533            crate::operation::list_telemetry_rules_for_organization::ListTelemetryRulesForOrganizationError,
534            R,
535        >,
536    ) -> Self {
537        match err {
538            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
539            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
540                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
541                source: err.into(),
542            }),
543        }
544    }
545}
546impl From<crate::operation::list_telemetry_rules_for_organization::ListTelemetryRulesForOrganizationError> for Error {
547    fn from(err: crate::operation::list_telemetry_rules_for_organization::ListTelemetryRulesForOrganizationError) -> Self {
548        match err {
549            crate::operation::list_telemetry_rules_for_organization::ListTelemetryRulesForOrganizationError::AccessDeniedException(inner) => {
550                Error::AccessDeniedException(inner)
551            }
552            crate::operation::list_telemetry_rules_for_organization::ListTelemetryRulesForOrganizationError::InternalServerException(inner) => {
553                Error::InternalServerException(inner)
554            }
555            crate::operation::list_telemetry_rules_for_organization::ListTelemetryRulesForOrganizationError::TooManyRequestsException(inner) => {
556                Error::TooManyRequestsException(inner)
557            }
558            crate::operation::list_telemetry_rules_for_organization::ListTelemetryRulesForOrganizationError::ValidationException(inner) => {
559                Error::ValidationException(inner)
560            }
561            crate::operation::list_telemetry_rules_for_organization::ListTelemetryRulesForOrganizationError::Unhandled(inner) => {
562                Error::Unhandled(inner)
563            }
564        }
565    }
566}
567impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_telemetry_evaluation::StartTelemetryEvaluationError, R>>
568    for Error
569where
570    R: Send + Sync + std::fmt::Debug + 'static,
571{
572    fn from(
573        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_telemetry_evaluation::StartTelemetryEvaluationError, R>,
574    ) -> Self {
575        match err {
576            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
577            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
578                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
579                source: err.into(),
580            }),
581        }
582    }
583}
584impl From<crate::operation::start_telemetry_evaluation::StartTelemetryEvaluationError> for Error {
585    fn from(err: crate::operation::start_telemetry_evaluation::StartTelemetryEvaluationError) -> Self {
586        match err {
587            crate::operation::start_telemetry_evaluation::StartTelemetryEvaluationError::AccessDeniedException(inner) => {
588                Error::AccessDeniedException(inner)
589            }
590            crate::operation::start_telemetry_evaluation::StartTelemetryEvaluationError::InternalServerException(inner) => {
591                Error::InternalServerException(inner)
592            }
593            crate::operation::start_telemetry_evaluation::StartTelemetryEvaluationError::TooManyRequestsException(inner) => {
594                Error::TooManyRequestsException(inner)
595            }
596            crate::operation::start_telemetry_evaluation::StartTelemetryEvaluationError::ValidationException(inner) => {
597                Error::ValidationException(inner)
598            }
599            crate::operation::start_telemetry_evaluation::StartTelemetryEvaluationError::Unhandled(inner) => Error::Unhandled(inner),
600        }
601    }
602}
603impl<R>
604    From<
605        ::aws_smithy_runtime_api::client::result::SdkError<
606            crate::operation::start_telemetry_evaluation_for_organization::StartTelemetryEvaluationForOrganizationError,
607            R,
608        >,
609    > for Error
610where
611    R: Send + Sync + std::fmt::Debug + 'static,
612{
613    fn from(
614        err: ::aws_smithy_runtime_api::client::result::SdkError<
615            crate::operation::start_telemetry_evaluation_for_organization::StartTelemetryEvaluationForOrganizationError,
616            R,
617        >,
618    ) -> Self {
619        match err {
620            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
621            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
622                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
623                source: err.into(),
624            }),
625        }
626    }
627}
628impl From<crate::operation::start_telemetry_evaluation_for_organization::StartTelemetryEvaluationForOrganizationError> for Error {
629    fn from(err: crate::operation::start_telemetry_evaluation_for_organization::StartTelemetryEvaluationForOrganizationError) -> Self {
630        match err {
631            crate::operation::start_telemetry_evaluation_for_organization::StartTelemetryEvaluationForOrganizationError::AccessDeniedException(
632                inner,
633            ) => Error::AccessDeniedException(inner),
634            crate::operation::start_telemetry_evaluation_for_organization::StartTelemetryEvaluationForOrganizationError::InternalServerException(
635                inner,
636            ) => Error::InternalServerException(inner),
637            crate::operation::start_telemetry_evaluation_for_organization::StartTelemetryEvaluationForOrganizationError::TooManyRequestsException(
638                inner,
639            ) => Error::TooManyRequestsException(inner),
640            crate::operation::start_telemetry_evaluation_for_organization::StartTelemetryEvaluationForOrganizationError::ValidationException(
641                inner,
642            ) => Error::ValidationException(inner),
643            crate::operation::start_telemetry_evaluation_for_organization::StartTelemetryEvaluationForOrganizationError::Unhandled(inner) => {
644                Error::Unhandled(inner)
645            }
646        }
647    }
648}
649impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_telemetry_evaluation::StopTelemetryEvaluationError, R>>
650    for Error
651where
652    R: Send + Sync + std::fmt::Debug + 'static,
653{
654    fn from(
655        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_telemetry_evaluation::StopTelemetryEvaluationError, R>,
656    ) -> Self {
657        match err {
658            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
659            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
660                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
661                source: err.into(),
662            }),
663        }
664    }
665}
666impl From<crate::operation::stop_telemetry_evaluation::StopTelemetryEvaluationError> for Error {
667    fn from(err: crate::operation::stop_telemetry_evaluation::StopTelemetryEvaluationError) -> Self {
668        match err {
669            crate::operation::stop_telemetry_evaluation::StopTelemetryEvaluationError::AccessDeniedException(inner) => {
670                Error::AccessDeniedException(inner)
671            }
672            crate::operation::stop_telemetry_evaluation::StopTelemetryEvaluationError::InternalServerException(inner) => {
673                Error::InternalServerException(inner)
674            }
675            crate::operation::stop_telemetry_evaluation::StopTelemetryEvaluationError::TooManyRequestsException(inner) => {
676                Error::TooManyRequestsException(inner)
677            }
678            crate::operation::stop_telemetry_evaluation::StopTelemetryEvaluationError::ValidationException(inner) => {
679                Error::ValidationException(inner)
680            }
681            crate::operation::stop_telemetry_evaluation::StopTelemetryEvaluationError::Unhandled(inner) => Error::Unhandled(inner),
682        }
683    }
684}
685impl<R>
686    From<
687        ::aws_smithy_runtime_api::client::result::SdkError<
688            crate::operation::stop_telemetry_evaluation_for_organization::StopTelemetryEvaluationForOrganizationError,
689            R,
690        >,
691    > for Error
692where
693    R: Send + Sync + std::fmt::Debug + 'static,
694{
695    fn from(
696        err: ::aws_smithy_runtime_api::client::result::SdkError<
697            crate::operation::stop_telemetry_evaluation_for_organization::StopTelemetryEvaluationForOrganizationError,
698            R,
699        >,
700    ) -> Self {
701        match err {
702            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
703            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
704                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
705                source: err.into(),
706            }),
707        }
708    }
709}
710impl From<crate::operation::stop_telemetry_evaluation_for_organization::StopTelemetryEvaluationForOrganizationError> for Error {
711    fn from(err: crate::operation::stop_telemetry_evaluation_for_organization::StopTelemetryEvaluationForOrganizationError) -> Self {
712        match err {
713            crate::operation::stop_telemetry_evaluation_for_organization::StopTelemetryEvaluationForOrganizationError::AccessDeniedException(
714                inner,
715            ) => Error::AccessDeniedException(inner),
716            crate::operation::stop_telemetry_evaluation_for_organization::StopTelemetryEvaluationForOrganizationError::InternalServerException(
717                inner,
718            ) => Error::InternalServerException(inner),
719            crate::operation::stop_telemetry_evaluation_for_organization::StopTelemetryEvaluationForOrganizationError::TooManyRequestsException(
720                inner,
721            ) => Error::TooManyRequestsException(inner),
722            crate::operation::stop_telemetry_evaluation_for_organization::StopTelemetryEvaluationForOrganizationError::ValidationException(inner) => {
723                Error::ValidationException(inner)
724            }
725            crate::operation::stop_telemetry_evaluation_for_organization::StopTelemetryEvaluationForOrganizationError::Unhandled(inner) => {
726                Error::Unhandled(inner)
727            }
728        }
729    }
730}
731impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
732where
733    R: Send + Sync + std::fmt::Debug + 'static,
734{
735    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
736        match err {
737            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
738            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
739                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
740                source: err.into(),
741            }),
742        }
743    }
744}
745impl From<crate::operation::tag_resource::TagResourceError> for Error {
746    fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
747        match err {
748            crate::operation::tag_resource::TagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
749            crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
750            crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
751            crate::operation::tag_resource::TagResourceError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
752            crate::operation::tag_resource::TagResourceError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
753            crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
754            crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
755        }
756    }
757}
758impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
759where
760    R: Send + Sync + std::fmt::Debug + 'static,
761{
762    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
763        match err {
764            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
765            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
766                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
767                source: err.into(),
768            }),
769        }
770    }
771}
772impl From<crate::operation::untag_resource::UntagResourceError> for Error {
773    fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
774        match err {
775            crate::operation::untag_resource::UntagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
776            crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
777            crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
778            crate::operation::untag_resource::UntagResourceError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
779            crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
780            crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
781        }
782    }
783}
784impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_telemetry_rule::UpdateTelemetryRuleError, R>> for Error
785where
786    R: Send + Sync + std::fmt::Debug + 'static,
787{
788    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_telemetry_rule::UpdateTelemetryRuleError, R>) -> Self {
789        match err {
790            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
791            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
792                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
793                source: err.into(),
794            }),
795        }
796    }
797}
798impl From<crate::operation::update_telemetry_rule::UpdateTelemetryRuleError> for Error {
799    fn from(err: crate::operation::update_telemetry_rule::UpdateTelemetryRuleError) -> Self {
800        match err {
801            crate::operation::update_telemetry_rule::UpdateTelemetryRuleError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
802            crate::operation::update_telemetry_rule::UpdateTelemetryRuleError::InternalServerException(inner) => {
803                Error::InternalServerException(inner)
804            }
805            crate::operation::update_telemetry_rule::UpdateTelemetryRuleError::ResourceNotFoundException(inner) => {
806                Error::ResourceNotFoundException(inner)
807            }
808            crate::operation::update_telemetry_rule::UpdateTelemetryRuleError::ServiceQuotaExceededException(inner) => {
809                Error::ServiceQuotaExceededException(inner)
810            }
811            crate::operation::update_telemetry_rule::UpdateTelemetryRuleError::TooManyRequestsException(inner) => {
812                Error::TooManyRequestsException(inner)
813            }
814            crate::operation::update_telemetry_rule::UpdateTelemetryRuleError::ValidationException(inner) => Error::ValidationException(inner),
815            crate::operation::update_telemetry_rule::UpdateTelemetryRuleError::Unhandled(inner) => Error::Unhandled(inner),
816        }
817    }
818}
819impl<R>
820    From<
821        ::aws_smithy_runtime_api::client::result::SdkError<
822            crate::operation::update_telemetry_rule_for_organization::UpdateTelemetryRuleForOrganizationError,
823            R,
824        >,
825    > for Error
826where
827    R: Send + Sync + std::fmt::Debug + 'static,
828{
829    fn from(
830        err: ::aws_smithy_runtime_api::client::result::SdkError<
831            crate::operation::update_telemetry_rule_for_organization::UpdateTelemetryRuleForOrganizationError,
832            R,
833        >,
834    ) -> Self {
835        match err {
836            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
837            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
838                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
839                source: err.into(),
840            }),
841        }
842    }
843}
844impl From<crate::operation::update_telemetry_rule_for_organization::UpdateTelemetryRuleForOrganizationError> for Error {
845    fn from(err: crate::operation::update_telemetry_rule_for_organization::UpdateTelemetryRuleForOrganizationError) -> Self {
846        match err {
847            crate::operation::update_telemetry_rule_for_organization::UpdateTelemetryRuleForOrganizationError::AccessDeniedException(inner) => {
848                Error::AccessDeniedException(inner)
849            }
850            crate::operation::update_telemetry_rule_for_organization::UpdateTelemetryRuleForOrganizationError::InternalServerException(inner) => {
851                Error::InternalServerException(inner)
852            }
853            crate::operation::update_telemetry_rule_for_organization::UpdateTelemetryRuleForOrganizationError::ResourceNotFoundException(inner) => {
854                Error::ResourceNotFoundException(inner)
855            }
856            crate::operation::update_telemetry_rule_for_organization::UpdateTelemetryRuleForOrganizationError::ServiceQuotaExceededException(
857                inner,
858            ) => Error::ServiceQuotaExceededException(inner),
859            crate::operation::update_telemetry_rule_for_organization::UpdateTelemetryRuleForOrganizationError::TooManyRequestsException(inner) => {
860                Error::TooManyRequestsException(inner)
861            }
862            crate::operation::update_telemetry_rule_for_organization::UpdateTelemetryRuleForOrganizationError::ValidationException(inner) => {
863                Error::ValidationException(inner)
864            }
865            crate::operation::update_telemetry_rule_for_organization::UpdateTelemetryRuleForOrganizationError::Unhandled(inner) => {
866                Error::Unhandled(inner)
867            }
868        }
869    }
870}
871impl ::std::error::Error for Error {
872    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
873        match self {
874            Error::AccessDeniedException(inner) => inner.source(),
875            Error::ConflictException(inner) => inner.source(),
876            Error::InternalServerException(inner) => inner.source(),
877            Error::ResourceNotFoundException(inner) => inner.source(),
878            Error::ServiceQuotaExceededException(inner) => inner.source(),
879            Error::TooManyRequestsException(inner) => inner.source(),
880            Error::ValidationException(inner) => inner.source(),
881            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
882        }
883    }
884}
885impl ::aws_types::request_id::RequestId for Error {
886    fn request_id(&self) -> Option<&str> {
887        match self {
888            Self::AccessDeniedException(e) => e.request_id(),
889            Self::ConflictException(e) => e.request_id(),
890            Self::InternalServerException(e) => e.request_id(),
891            Self::ResourceNotFoundException(e) => e.request_id(),
892            Self::ServiceQuotaExceededException(e) => e.request_id(),
893            Self::TooManyRequestsException(e) => e.request_id(),
894            Self::ValidationException(e) => e.request_id(),
895            Self::Unhandled(e) => e.meta.request_id(),
896        }
897    }
898}