1#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6 AccessDeniedException(crate::types::error::AccessDeniedException),
8 ConflictException(crate::types::error::ConflictException),
10 InternalServerException(crate::types::error::InternalServerException),
12 ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
14 ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
16 TooManyRequestsException(crate::types::error::TooManyRequestsException),
18 ValidationException(crate::types::error::ValidationException),
20 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
22 variable wildcard pattern and check `.code()`:
23 \
24 `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>
72 From<
73 ::aws_smithy_runtime_api::client::result::SdkError<
74 crate::operation::create_centralization_rule_for_organization::CreateCentralizationRuleForOrganizationError,
75 R,
76 >,
77 > for Error
78where
79 R: Send + Sync + std::fmt::Debug + 'static,
80{
81 fn from(
82 err: ::aws_smithy_runtime_api::client::result::SdkError<
83 crate::operation::create_centralization_rule_for_organization::CreateCentralizationRuleForOrganizationError,
84 R,
85 >,
86 ) -> Self {
87 match err {
88 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
89 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
90 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
91 source: err.into(),
92 }),
93 }
94 }
95}
96impl From<crate::operation::create_centralization_rule_for_organization::CreateCentralizationRuleForOrganizationError> for Error {
97 fn from(err: crate::operation::create_centralization_rule_for_organization::CreateCentralizationRuleForOrganizationError) -> Self {
98 match err {
99 crate::operation::create_centralization_rule_for_organization::CreateCentralizationRuleForOrganizationError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
100 crate::operation::create_centralization_rule_for_organization::CreateCentralizationRuleForOrganizationError::ConflictException(inner) => Error::ConflictException(inner),
101 crate::operation::create_centralization_rule_for_organization::CreateCentralizationRuleForOrganizationError::InternalServerException(inner) => Error::InternalServerException(inner),
102 crate::operation::create_centralization_rule_for_organization::CreateCentralizationRuleForOrganizationError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
103 crate::operation::create_centralization_rule_for_organization::CreateCentralizationRuleForOrganizationError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
104 crate::operation::create_centralization_rule_for_organization::CreateCentralizationRuleForOrganizationError::ValidationException(inner) => Error::ValidationException(inner),
105 crate::operation::create_centralization_rule_for_organization::CreateCentralizationRuleForOrganizationError::Unhandled(inner) => Error::Unhandled(inner),
106 }
107 }
108}
109impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_telemetry_rule::CreateTelemetryRuleError, R>> for Error
110where
111 R: Send + Sync + std::fmt::Debug + 'static,
112{
113 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_telemetry_rule::CreateTelemetryRuleError, R>) -> Self {
114 match err {
115 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
116 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
117 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
118 source: err.into(),
119 }),
120 }
121 }
122}
123impl From<crate::operation::create_telemetry_rule::CreateTelemetryRuleError> for Error {
124 fn from(err: crate::operation::create_telemetry_rule::CreateTelemetryRuleError) -> Self {
125 match err {
126 crate::operation::create_telemetry_rule::CreateTelemetryRuleError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
127 crate::operation::create_telemetry_rule::CreateTelemetryRuleError::ConflictException(inner) => Error::ConflictException(inner),
128 crate::operation::create_telemetry_rule::CreateTelemetryRuleError::InternalServerException(inner) => {
129 Error::InternalServerException(inner)
130 }
131 crate::operation::create_telemetry_rule::CreateTelemetryRuleError::ServiceQuotaExceededException(inner) => {
132 Error::ServiceQuotaExceededException(inner)
133 }
134 crate::operation::create_telemetry_rule::CreateTelemetryRuleError::TooManyRequestsException(inner) => {
135 Error::TooManyRequestsException(inner)
136 }
137 crate::operation::create_telemetry_rule::CreateTelemetryRuleError::ValidationException(inner) => Error::ValidationException(inner),
138 crate::operation::create_telemetry_rule::CreateTelemetryRuleError::Unhandled(inner) => Error::Unhandled(inner),
139 }
140 }
141}
142impl<R>
143 From<
144 ::aws_smithy_runtime_api::client::result::SdkError<
145 crate::operation::create_telemetry_rule_for_organization::CreateTelemetryRuleForOrganizationError,
146 R,
147 >,
148 > for Error
149where
150 R: Send + Sync + std::fmt::Debug + 'static,
151{
152 fn from(
153 err: ::aws_smithy_runtime_api::client::result::SdkError<
154 crate::operation::create_telemetry_rule_for_organization::CreateTelemetryRuleForOrganizationError,
155 R,
156 >,
157 ) -> Self {
158 match err {
159 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
160 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
161 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
162 source: err.into(),
163 }),
164 }
165 }
166}
167impl From<crate::operation::create_telemetry_rule_for_organization::CreateTelemetryRuleForOrganizationError> for Error {
168 fn from(err: crate::operation::create_telemetry_rule_for_organization::CreateTelemetryRuleForOrganizationError) -> Self {
169 match err {
170 crate::operation::create_telemetry_rule_for_organization::CreateTelemetryRuleForOrganizationError::AccessDeniedException(inner) => {
171 Error::AccessDeniedException(inner)
172 }
173 crate::operation::create_telemetry_rule_for_organization::CreateTelemetryRuleForOrganizationError::ConflictException(inner) => {
174 Error::ConflictException(inner)
175 }
176 crate::operation::create_telemetry_rule_for_organization::CreateTelemetryRuleForOrganizationError::InternalServerException(inner) => {
177 Error::InternalServerException(inner)
178 }
179 crate::operation::create_telemetry_rule_for_organization::CreateTelemetryRuleForOrganizationError::ServiceQuotaExceededException(
180 inner,
181 ) => Error::ServiceQuotaExceededException(inner),
182 crate::operation::create_telemetry_rule_for_organization::CreateTelemetryRuleForOrganizationError::TooManyRequestsException(inner) => {
183 Error::TooManyRequestsException(inner)
184 }
185 crate::operation::create_telemetry_rule_for_organization::CreateTelemetryRuleForOrganizationError::ValidationException(inner) => {
186 Error::ValidationException(inner)
187 }
188 crate::operation::create_telemetry_rule_for_organization::CreateTelemetryRuleForOrganizationError::Unhandled(inner) => {
189 Error::Unhandled(inner)
190 }
191 }
192 }
193}
194impl<R>
195 From<
196 ::aws_smithy_runtime_api::client::result::SdkError<
197 crate::operation::delete_centralization_rule_for_organization::DeleteCentralizationRuleForOrganizationError,
198 R,
199 >,
200 > for Error
201where
202 R: Send + Sync + std::fmt::Debug + 'static,
203{
204 fn from(
205 err: ::aws_smithy_runtime_api::client::result::SdkError<
206 crate::operation::delete_centralization_rule_for_organization::DeleteCentralizationRuleForOrganizationError,
207 R,
208 >,
209 ) -> Self {
210 match err {
211 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
212 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
213 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
214 source: err.into(),
215 }),
216 }
217 }
218}
219impl From<crate::operation::delete_centralization_rule_for_organization::DeleteCentralizationRuleForOrganizationError> for Error {
220 fn from(err: crate::operation::delete_centralization_rule_for_organization::DeleteCentralizationRuleForOrganizationError) -> Self {
221 match err {
222 crate::operation::delete_centralization_rule_for_organization::DeleteCentralizationRuleForOrganizationError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
223 crate::operation::delete_centralization_rule_for_organization::DeleteCentralizationRuleForOrganizationError::InternalServerException(inner) => Error::InternalServerException(inner),
224 crate::operation::delete_centralization_rule_for_organization::DeleteCentralizationRuleForOrganizationError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
225 crate::operation::delete_centralization_rule_for_organization::DeleteCentralizationRuleForOrganizationError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
226 crate::operation::delete_centralization_rule_for_organization::DeleteCentralizationRuleForOrganizationError::ValidationException(inner) => Error::ValidationException(inner),
227 crate::operation::delete_centralization_rule_for_organization::DeleteCentralizationRuleForOrganizationError::Unhandled(inner) => Error::Unhandled(inner),
228 }
229 }
230}
231impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_telemetry_rule::DeleteTelemetryRuleError, R>> for Error
232where
233 R: Send + Sync + std::fmt::Debug + 'static,
234{
235 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_telemetry_rule::DeleteTelemetryRuleError, R>) -> Self {
236 match err {
237 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
238 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
239 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
240 source: err.into(),
241 }),
242 }
243 }
244}
245impl From<crate::operation::delete_telemetry_rule::DeleteTelemetryRuleError> for Error {
246 fn from(err: crate::operation::delete_telemetry_rule::DeleteTelemetryRuleError) -> Self {
247 match err {
248 crate::operation::delete_telemetry_rule::DeleteTelemetryRuleError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
249 crate::operation::delete_telemetry_rule::DeleteTelemetryRuleError::InternalServerException(inner) => {
250 Error::InternalServerException(inner)
251 }
252 crate::operation::delete_telemetry_rule::DeleteTelemetryRuleError::ResourceNotFoundException(inner) => {
253 Error::ResourceNotFoundException(inner)
254 }
255 crate::operation::delete_telemetry_rule::DeleteTelemetryRuleError::TooManyRequestsException(inner) => {
256 Error::TooManyRequestsException(inner)
257 }
258 crate::operation::delete_telemetry_rule::DeleteTelemetryRuleError::ValidationException(inner) => Error::ValidationException(inner),
259 crate::operation::delete_telemetry_rule::DeleteTelemetryRuleError::Unhandled(inner) => Error::Unhandled(inner),
260 }
261 }
262}
263impl<R>
264 From<
265 ::aws_smithy_runtime_api::client::result::SdkError<
266 crate::operation::delete_telemetry_rule_for_organization::DeleteTelemetryRuleForOrganizationError,
267 R,
268 >,
269 > for Error
270where
271 R: Send + Sync + std::fmt::Debug + 'static,
272{
273 fn from(
274 err: ::aws_smithy_runtime_api::client::result::SdkError<
275 crate::operation::delete_telemetry_rule_for_organization::DeleteTelemetryRuleForOrganizationError,
276 R,
277 >,
278 ) -> Self {
279 match err {
280 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
281 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
282 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
283 source: err.into(),
284 }),
285 }
286 }
287}
288impl From<crate::operation::delete_telemetry_rule_for_organization::DeleteTelemetryRuleForOrganizationError> for Error {
289 fn from(err: crate::operation::delete_telemetry_rule_for_organization::DeleteTelemetryRuleForOrganizationError) -> Self {
290 match err {
291 crate::operation::delete_telemetry_rule_for_organization::DeleteTelemetryRuleForOrganizationError::AccessDeniedException(inner) => {
292 Error::AccessDeniedException(inner)
293 }
294 crate::operation::delete_telemetry_rule_for_organization::DeleteTelemetryRuleForOrganizationError::InternalServerException(inner) => {
295 Error::InternalServerException(inner)
296 }
297 crate::operation::delete_telemetry_rule_for_organization::DeleteTelemetryRuleForOrganizationError::ResourceNotFoundException(inner) => {
298 Error::ResourceNotFoundException(inner)
299 }
300 crate::operation::delete_telemetry_rule_for_organization::DeleteTelemetryRuleForOrganizationError::TooManyRequestsException(inner) => {
301 Error::TooManyRequestsException(inner)
302 }
303 crate::operation::delete_telemetry_rule_for_organization::DeleteTelemetryRuleForOrganizationError::ValidationException(inner) => {
304 Error::ValidationException(inner)
305 }
306 crate::operation::delete_telemetry_rule_for_organization::DeleteTelemetryRuleForOrganizationError::Unhandled(inner) => {
307 Error::Unhandled(inner)
308 }
309 }
310 }
311}
312impl<R>
313 From<
314 ::aws_smithy_runtime_api::client::result::SdkError<
315 crate::operation::get_centralization_rule_for_organization::GetCentralizationRuleForOrganizationError,
316 R,
317 >,
318 > for Error
319where
320 R: Send + Sync + std::fmt::Debug + 'static,
321{
322 fn from(
323 err: ::aws_smithy_runtime_api::client::result::SdkError<
324 crate::operation::get_centralization_rule_for_organization::GetCentralizationRuleForOrganizationError,
325 R,
326 >,
327 ) -> Self {
328 match err {
329 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
330 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
331 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
332 source: err.into(),
333 }),
334 }
335 }
336}
337impl From<crate::operation::get_centralization_rule_for_organization::GetCentralizationRuleForOrganizationError> for Error {
338 fn from(err: crate::operation::get_centralization_rule_for_organization::GetCentralizationRuleForOrganizationError) -> Self {
339 match err {
340 crate::operation::get_centralization_rule_for_organization::GetCentralizationRuleForOrganizationError::AccessDeniedException(inner) => {
341 Error::AccessDeniedException(inner)
342 }
343 crate::operation::get_centralization_rule_for_organization::GetCentralizationRuleForOrganizationError::InternalServerException(inner) => {
344 Error::InternalServerException(inner)
345 }
346 crate::operation::get_centralization_rule_for_organization::GetCentralizationRuleForOrganizationError::ResourceNotFoundException(
347 inner,
348 ) => Error::ResourceNotFoundException(inner),
349 crate::operation::get_centralization_rule_for_organization::GetCentralizationRuleForOrganizationError::TooManyRequestsException(
350 inner,
351 ) => Error::TooManyRequestsException(inner),
352 crate::operation::get_centralization_rule_for_organization::GetCentralizationRuleForOrganizationError::ValidationException(inner) => {
353 Error::ValidationException(inner)
354 }
355 crate::operation::get_centralization_rule_for_organization::GetCentralizationRuleForOrganizationError::Unhandled(inner) => {
356 Error::Unhandled(inner)
357 }
358 }
359 }
360}
361impl<R>
362 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_telemetry_evaluation_status::GetTelemetryEvaluationStatusError, R>>
363 for Error
364where
365 R: Send + Sync + std::fmt::Debug + 'static,
366{
367 fn from(
368 err: ::aws_smithy_runtime_api::client::result::SdkError<
369 crate::operation::get_telemetry_evaluation_status::GetTelemetryEvaluationStatusError,
370 R,
371 >,
372 ) -> Self {
373 match err {
374 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
375 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
376 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
377 source: err.into(),
378 }),
379 }
380 }
381}
382impl From<crate::operation::get_telemetry_evaluation_status::GetTelemetryEvaluationStatusError> for Error {
383 fn from(err: crate::operation::get_telemetry_evaluation_status::GetTelemetryEvaluationStatusError) -> Self {
384 match err {
385 crate::operation::get_telemetry_evaluation_status::GetTelemetryEvaluationStatusError::AccessDeniedException(inner) => {
386 Error::AccessDeniedException(inner)
387 }
388 crate::operation::get_telemetry_evaluation_status::GetTelemetryEvaluationStatusError::InternalServerException(inner) => {
389 Error::InternalServerException(inner)
390 }
391 crate::operation::get_telemetry_evaluation_status::GetTelemetryEvaluationStatusError::TooManyRequestsException(inner) => {
392 Error::TooManyRequestsException(inner)
393 }
394 crate::operation::get_telemetry_evaluation_status::GetTelemetryEvaluationStatusError::Unhandled(inner) => Error::Unhandled(inner),
395 }
396 }
397}
398impl<R>
399 From<
400 ::aws_smithy_runtime_api::client::result::SdkError<
401 crate::operation::get_telemetry_evaluation_status_for_organization::GetTelemetryEvaluationStatusForOrganizationError,
402 R,
403 >,
404 > for Error
405where
406 R: Send + Sync + std::fmt::Debug + 'static,
407{
408 fn from(
409 err: ::aws_smithy_runtime_api::client::result::SdkError<
410 crate::operation::get_telemetry_evaluation_status_for_organization::GetTelemetryEvaluationStatusForOrganizationError,
411 R,
412 >,
413 ) -> Self {
414 match err {
415 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
416 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
417 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
418 source: err.into(),
419 }),
420 }
421 }
422}
423impl From<crate::operation::get_telemetry_evaluation_status_for_organization::GetTelemetryEvaluationStatusForOrganizationError> for Error {
424 fn from(err: crate::operation::get_telemetry_evaluation_status_for_organization::GetTelemetryEvaluationStatusForOrganizationError) -> Self {
425 match err {
426 crate::operation::get_telemetry_evaluation_status_for_organization::GetTelemetryEvaluationStatusForOrganizationError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
427 crate::operation::get_telemetry_evaluation_status_for_organization::GetTelemetryEvaluationStatusForOrganizationError::InternalServerException(inner) => Error::InternalServerException(inner),
428 crate::operation::get_telemetry_evaluation_status_for_organization::GetTelemetryEvaluationStatusForOrganizationError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
429 crate::operation::get_telemetry_evaluation_status_for_organization::GetTelemetryEvaluationStatusForOrganizationError::ValidationException(inner) => Error::ValidationException(inner),
430 crate::operation::get_telemetry_evaluation_status_for_organization::GetTelemetryEvaluationStatusForOrganizationError::Unhandled(inner) => Error::Unhandled(inner),
431 }
432 }
433}
434impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_telemetry_rule::GetTelemetryRuleError, R>> for Error
435where
436 R: Send + Sync + std::fmt::Debug + 'static,
437{
438 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_telemetry_rule::GetTelemetryRuleError, R>) -> Self {
439 match err {
440 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
441 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
442 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
443 source: err.into(),
444 }),
445 }
446 }
447}
448impl From<crate::operation::get_telemetry_rule::GetTelemetryRuleError> for Error {
449 fn from(err: crate::operation::get_telemetry_rule::GetTelemetryRuleError) -> Self {
450 match err {
451 crate::operation::get_telemetry_rule::GetTelemetryRuleError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
452 crate::operation::get_telemetry_rule::GetTelemetryRuleError::InternalServerException(inner) => Error::InternalServerException(inner),
453 crate::operation::get_telemetry_rule::GetTelemetryRuleError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
454 crate::operation::get_telemetry_rule::GetTelemetryRuleError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
455 crate::operation::get_telemetry_rule::GetTelemetryRuleError::ValidationException(inner) => Error::ValidationException(inner),
456 crate::operation::get_telemetry_rule::GetTelemetryRuleError::Unhandled(inner) => Error::Unhandled(inner),
457 }
458 }
459}
460impl<R>
461 From<
462 ::aws_smithy_runtime_api::client::result::SdkError<
463 crate::operation::get_telemetry_rule_for_organization::GetTelemetryRuleForOrganizationError,
464 R,
465 >,
466 > for Error
467where
468 R: Send + Sync + std::fmt::Debug + 'static,
469{
470 fn from(
471 err: ::aws_smithy_runtime_api::client::result::SdkError<
472 crate::operation::get_telemetry_rule_for_organization::GetTelemetryRuleForOrganizationError,
473 R,
474 >,
475 ) -> Self {
476 match err {
477 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
478 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
479 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
480 source: err.into(),
481 }),
482 }
483 }
484}
485impl From<crate::operation::get_telemetry_rule_for_organization::GetTelemetryRuleForOrganizationError> for Error {
486 fn from(err: crate::operation::get_telemetry_rule_for_organization::GetTelemetryRuleForOrganizationError) -> Self {
487 match err {
488 crate::operation::get_telemetry_rule_for_organization::GetTelemetryRuleForOrganizationError::AccessDeniedException(inner) => {
489 Error::AccessDeniedException(inner)
490 }
491 crate::operation::get_telemetry_rule_for_organization::GetTelemetryRuleForOrganizationError::InternalServerException(inner) => {
492 Error::InternalServerException(inner)
493 }
494 crate::operation::get_telemetry_rule_for_organization::GetTelemetryRuleForOrganizationError::ResourceNotFoundException(inner) => {
495 Error::ResourceNotFoundException(inner)
496 }
497 crate::operation::get_telemetry_rule_for_organization::GetTelemetryRuleForOrganizationError::TooManyRequestsException(inner) => {
498 Error::TooManyRequestsException(inner)
499 }
500 crate::operation::get_telemetry_rule_for_organization::GetTelemetryRuleForOrganizationError::ValidationException(inner) => {
501 Error::ValidationException(inner)
502 }
503 crate::operation::get_telemetry_rule_for_organization::GetTelemetryRuleForOrganizationError::Unhandled(inner) => Error::Unhandled(inner),
504 }
505 }
506}
507impl<R>
508 From<
509 ::aws_smithy_runtime_api::client::result::SdkError<
510 crate::operation::list_centralization_rules_for_organization::ListCentralizationRulesForOrganizationError,
511 R,
512 >,
513 > for Error
514where
515 R: Send + Sync + std::fmt::Debug + 'static,
516{
517 fn from(
518 err: ::aws_smithy_runtime_api::client::result::SdkError<
519 crate::operation::list_centralization_rules_for_organization::ListCentralizationRulesForOrganizationError,
520 R,
521 >,
522 ) -> Self {
523 match err {
524 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
525 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
526 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
527 source: err.into(),
528 }),
529 }
530 }
531}
532impl From<crate::operation::list_centralization_rules_for_organization::ListCentralizationRulesForOrganizationError> for Error {
533 fn from(err: crate::operation::list_centralization_rules_for_organization::ListCentralizationRulesForOrganizationError) -> Self {
534 match err {
535 crate::operation::list_centralization_rules_for_organization::ListCentralizationRulesForOrganizationError::AccessDeniedException(
536 inner,
537 ) => Error::AccessDeniedException(inner),
538 crate::operation::list_centralization_rules_for_organization::ListCentralizationRulesForOrganizationError::InternalServerException(
539 inner,
540 ) => Error::InternalServerException(inner),
541 crate::operation::list_centralization_rules_for_organization::ListCentralizationRulesForOrganizationError::TooManyRequestsException(
542 inner,
543 ) => Error::TooManyRequestsException(inner),
544 crate::operation::list_centralization_rules_for_organization::ListCentralizationRulesForOrganizationError::ValidationException(inner) => {
545 Error::ValidationException(inner)
546 }
547 crate::operation::list_centralization_rules_for_organization::ListCentralizationRulesForOrganizationError::Unhandled(inner) => {
548 Error::Unhandled(inner)
549 }
550 }
551 }
552}
553impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_resource_telemetry::ListResourceTelemetryError, R>> for Error
554where
555 R: Send + Sync + std::fmt::Debug + 'static,
556{
557 fn from(
558 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_resource_telemetry::ListResourceTelemetryError, R>,
559 ) -> Self {
560 match err {
561 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
562 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
563 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
564 source: err.into(),
565 }),
566 }
567 }
568}
569impl From<crate::operation::list_resource_telemetry::ListResourceTelemetryError> for Error {
570 fn from(err: crate::operation::list_resource_telemetry::ListResourceTelemetryError) -> Self {
571 match err {
572 crate::operation::list_resource_telemetry::ListResourceTelemetryError::AccessDeniedException(inner) => {
573 Error::AccessDeniedException(inner)
574 }
575 crate::operation::list_resource_telemetry::ListResourceTelemetryError::InternalServerException(inner) => {
576 Error::InternalServerException(inner)
577 }
578 crate::operation::list_resource_telemetry::ListResourceTelemetryError::TooManyRequestsException(inner) => {
579 Error::TooManyRequestsException(inner)
580 }
581 crate::operation::list_resource_telemetry::ListResourceTelemetryError::ValidationException(inner) => Error::ValidationException(inner),
582 crate::operation::list_resource_telemetry::ListResourceTelemetryError::Unhandled(inner) => Error::Unhandled(inner),
583 }
584 }
585}
586impl<R>
587 From<
588 ::aws_smithy_runtime_api::client::result::SdkError<
589 crate::operation::list_resource_telemetry_for_organization::ListResourceTelemetryForOrganizationError,
590 R,
591 >,
592 > for Error
593where
594 R: Send + Sync + std::fmt::Debug + 'static,
595{
596 fn from(
597 err: ::aws_smithy_runtime_api::client::result::SdkError<
598 crate::operation::list_resource_telemetry_for_organization::ListResourceTelemetryForOrganizationError,
599 R,
600 >,
601 ) -> Self {
602 match err {
603 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
604 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
605 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
606 source: err.into(),
607 }),
608 }
609 }
610}
611impl From<crate::operation::list_resource_telemetry_for_organization::ListResourceTelemetryForOrganizationError> for Error {
612 fn from(err: crate::operation::list_resource_telemetry_for_organization::ListResourceTelemetryForOrganizationError) -> Self {
613 match err {
614 crate::operation::list_resource_telemetry_for_organization::ListResourceTelemetryForOrganizationError::AccessDeniedException(inner) => {
615 Error::AccessDeniedException(inner)
616 }
617 crate::operation::list_resource_telemetry_for_organization::ListResourceTelemetryForOrganizationError::InternalServerException(inner) => {
618 Error::InternalServerException(inner)
619 }
620 crate::operation::list_resource_telemetry_for_organization::ListResourceTelemetryForOrganizationError::TooManyRequestsException(
621 inner,
622 ) => Error::TooManyRequestsException(inner),
623 crate::operation::list_resource_telemetry_for_organization::ListResourceTelemetryForOrganizationError::ValidationException(inner) => {
624 Error::ValidationException(inner)
625 }
626 crate::operation::list_resource_telemetry_for_organization::ListResourceTelemetryForOrganizationError::Unhandled(inner) => {
627 Error::Unhandled(inner)
628 }
629 }
630 }
631}
632impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
633where
634 R: Send + Sync + std::fmt::Debug + 'static,
635{
636 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
637 match err {
638 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
639 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
640 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
641 source: err.into(),
642 }),
643 }
644 }
645}
646impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
647 fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
648 match err {
649 crate::operation::list_tags_for_resource::ListTagsForResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
650 crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
651 Error::InternalServerException(inner)
652 }
653 crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
654 Error::ResourceNotFoundException(inner)
655 }
656 crate::operation::list_tags_for_resource::ListTagsForResourceError::TooManyRequestsException(inner) => {
657 Error::TooManyRequestsException(inner)
658 }
659 crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
660 crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
661 }
662 }
663}
664impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_telemetry_rules::ListTelemetryRulesError, R>> for Error
665where
666 R: Send + Sync + std::fmt::Debug + 'static,
667{
668 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_telemetry_rules::ListTelemetryRulesError, R>) -> Self {
669 match err {
670 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
671 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
672 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
673 source: err.into(),
674 }),
675 }
676 }
677}
678impl From<crate::operation::list_telemetry_rules::ListTelemetryRulesError> for Error {
679 fn from(err: crate::operation::list_telemetry_rules::ListTelemetryRulesError) -> Self {
680 match err {
681 crate::operation::list_telemetry_rules::ListTelemetryRulesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
682 crate::operation::list_telemetry_rules::ListTelemetryRulesError::InternalServerException(inner) => Error::InternalServerException(inner),
683 crate::operation::list_telemetry_rules::ListTelemetryRulesError::TooManyRequestsException(inner) => {
684 Error::TooManyRequestsException(inner)
685 }
686 crate::operation::list_telemetry_rules::ListTelemetryRulesError::ValidationException(inner) => Error::ValidationException(inner),
687 crate::operation::list_telemetry_rules::ListTelemetryRulesError::Unhandled(inner) => Error::Unhandled(inner),
688 }
689 }
690}
691impl<R>
692 From<
693 ::aws_smithy_runtime_api::client::result::SdkError<
694 crate::operation::list_telemetry_rules_for_organization::ListTelemetryRulesForOrganizationError,
695 R,
696 >,
697 > for Error
698where
699 R: Send + Sync + std::fmt::Debug + 'static,
700{
701 fn from(
702 err: ::aws_smithy_runtime_api::client::result::SdkError<
703 crate::operation::list_telemetry_rules_for_organization::ListTelemetryRulesForOrganizationError,
704 R,
705 >,
706 ) -> Self {
707 match err {
708 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
709 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
710 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
711 source: err.into(),
712 }),
713 }
714 }
715}
716impl From<crate::operation::list_telemetry_rules_for_organization::ListTelemetryRulesForOrganizationError> for Error {
717 fn from(err: crate::operation::list_telemetry_rules_for_organization::ListTelemetryRulesForOrganizationError) -> Self {
718 match err {
719 crate::operation::list_telemetry_rules_for_organization::ListTelemetryRulesForOrganizationError::AccessDeniedException(inner) => {
720 Error::AccessDeniedException(inner)
721 }
722 crate::operation::list_telemetry_rules_for_organization::ListTelemetryRulesForOrganizationError::InternalServerException(inner) => {
723 Error::InternalServerException(inner)
724 }
725 crate::operation::list_telemetry_rules_for_organization::ListTelemetryRulesForOrganizationError::TooManyRequestsException(inner) => {
726 Error::TooManyRequestsException(inner)
727 }
728 crate::operation::list_telemetry_rules_for_organization::ListTelemetryRulesForOrganizationError::ValidationException(inner) => {
729 Error::ValidationException(inner)
730 }
731 crate::operation::list_telemetry_rules_for_organization::ListTelemetryRulesForOrganizationError::Unhandled(inner) => {
732 Error::Unhandled(inner)
733 }
734 }
735 }
736}
737impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_telemetry_evaluation::StartTelemetryEvaluationError, R>>
738 for Error
739where
740 R: Send + Sync + std::fmt::Debug + 'static,
741{
742 fn from(
743 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_telemetry_evaluation::StartTelemetryEvaluationError, R>,
744 ) -> Self {
745 match err {
746 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
747 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
748 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
749 source: err.into(),
750 }),
751 }
752 }
753}
754impl From<crate::operation::start_telemetry_evaluation::StartTelemetryEvaluationError> for Error {
755 fn from(err: crate::operation::start_telemetry_evaluation::StartTelemetryEvaluationError) -> Self {
756 match err {
757 crate::operation::start_telemetry_evaluation::StartTelemetryEvaluationError::AccessDeniedException(inner) => {
758 Error::AccessDeniedException(inner)
759 }
760 crate::operation::start_telemetry_evaluation::StartTelemetryEvaluationError::InternalServerException(inner) => {
761 Error::InternalServerException(inner)
762 }
763 crate::operation::start_telemetry_evaluation::StartTelemetryEvaluationError::TooManyRequestsException(inner) => {
764 Error::TooManyRequestsException(inner)
765 }
766 crate::operation::start_telemetry_evaluation::StartTelemetryEvaluationError::ValidationException(inner) => {
767 Error::ValidationException(inner)
768 }
769 crate::operation::start_telemetry_evaluation::StartTelemetryEvaluationError::Unhandled(inner) => Error::Unhandled(inner),
770 }
771 }
772}
773impl<R>
774 From<
775 ::aws_smithy_runtime_api::client::result::SdkError<
776 crate::operation::start_telemetry_evaluation_for_organization::StartTelemetryEvaluationForOrganizationError,
777 R,
778 >,
779 > for Error
780where
781 R: Send + Sync + std::fmt::Debug + 'static,
782{
783 fn from(
784 err: ::aws_smithy_runtime_api::client::result::SdkError<
785 crate::operation::start_telemetry_evaluation_for_organization::StartTelemetryEvaluationForOrganizationError,
786 R,
787 >,
788 ) -> 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::start_telemetry_evaluation_for_organization::StartTelemetryEvaluationForOrganizationError> for Error {
799 fn from(err: crate::operation::start_telemetry_evaluation_for_organization::StartTelemetryEvaluationForOrganizationError) -> Self {
800 match err {
801 crate::operation::start_telemetry_evaluation_for_organization::StartTelemetryEvaluationForOrganizationError::AccessDeniedException(
802 inner,
803 ) => Error::AccessDeniedException(inner),
804 crate::operation::start_telemetry_evaluation_for_organization::StartTelemetryEvaluationForOrganizationError::InternalServerException(
805 inner,
806 ) => Error::InternalServerException(inner),
807 crate::operation::start_telemetry_evaluation_for_organization::StartTelemetryEvaluationForOrganizationError::TooManyRequestsException(
808 inner,
809 ) => Error::TooManyRequestsException(inner),
810 crate::operation::start_telemetry_evaluation_for_organization::StartTelemetryEvaluationForOrganizationError::ValidationException(
811 inner,
812 ) => Error::ValidationException(inner),
813 crate::operation::start_telemetry_evaluation_for_organization::StartTelemetryEvaluationForOrganizationError::Unhandled(inner) => {
814 Error::Unhandled(inner)
815 }
816 }
817 }
818}
819impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_telemetry_evaluation::StopTelemetryEvaluationError, R>>
820 for Error
821where
822 R: Send + Sync + std::fmt::Debug + 'static,
823{
824 fn from(
825 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_telemetry_evaluation::StopTelemetryEvaluationError, R>,
826 ) -> Self {
827 match err {
828 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
829 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
830 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
831 source: err.into(),
832 }),
833 }
834 }
835}
836impl From<crate::operation::stop_telemetry_evaluation::StopTelemetryEvaluationError> for Error {
837 fn from(err: crate::operation::stop_telemetry_evaluation::StopTelemetryEvaluationError) -> Self {
838 match err {
839 crate::operation::stop_telemetry_evaluation::StopTelemetryEvaluationError::AccessDeniedException(inner) => {
840 Error::AccessDeniedException(inner)
841 }
842 crate::operation::stop_telemetry_evaluation::StopTelemetryEvaluationError::InternalServerException(inner) => {
843 Error::InternalServerException(inner)
844 }
845 crate::operation::stop_telemetry_evaluation::StopTelemetryEvaluationError::TooManyRequestsException(inner) => {
846 Error::TooManyRequestsException(inner)
847 }
848 crate::operation::stop_telemetry_evaluation::StopTelemetryEvaluationError::ValidationException(inner) => {
849 Error::ValidationException(inner)
850 }
851 crate::operation::stop_telemetry_evaluation::StopTelemetryEvaluationError::Unhandled(inner) => Error::Unhandled(inner),
852 }
853 }
854}
855impl<R>
856 From<
857 ::aws_smithy_runtime_api::client::result::SdkError<
858 crate::operation::stop_telemetry_evaluation_for_organization::StopTelemetryEvaluationForOrganizationError,
859 R,
860 >,
861 > for Error
862where
863 R: Send + Sync + std::fmt::Debug + 'static,
864{
865 fn from(
866 err: ::aws_smithy_runtime_api::client::result::SdkError<
867 crate::operation::stop_telemetry_evaluation_for_organization::StopTelemetryEvaluationForOrganizationError,
868 R,
869 >,
870 ) -> Self {
871 match err {
872 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
873 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
874 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
875 source: err.into(),
876 }),
877 }
878 }
879}
880impl From<crate::operation::stop_telemetry_evaluation_for_organization::StopTelemetryEvaluationForOrganizationError> for Error {
881 fn from(err: crate::operation::stop_telemetry_evaluation_for_organization::StopTelemetryEvaluationForOrganizationError) -> Self {
882 match err {
883 crate::operation::stop_telemetry_evaluation_for_organization::StopTelemetryEvaluationForOrganizationError::AccessDeniedException(
884 inner,
885 ) => Error::AccessDeniedException(inner),
886 crate::operation::stop_telemetry_evaluation_for_organization::StopTelemetryEvaluationForOrganizationError::InternalServerException(
887 inner,
888 ) => Error::InternalServerException(inner),
889 crate::operation::stop_telemetry_evaluation_for_organization::StopTelemetryEvaluationForOrganizationError::TooManyRequestsException(
890 inner,
891 ) => Error::TooManyRequestsException(inner),
892 crate::operation::stop_telemetry_evaluation_for_organization::StopTelemetryEvaluationForOrganizationError::ValidationException(inner) => {
893 Error::ValidationException(inner)
894 }
895 crate::operation::stop_telemetry_evaluation_for_organization::StopTelemetryEvaluationForOrganizationError::Unhandled(inner) => {
896 Error::Unhandled(inner)
897 }
898 }
899 }
900}
901impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
902where
903 R: Send + Sync + std::fmt::Debug + 'static,
904{
905 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
906 match err {
907 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
908 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
909 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
910 source: err.into(),
911 }),
912 }
913 }
914}
915impl From<crate::operation::tag_resource::TagResourceError> for Error {
916 fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
917 match err {
918 crate::operation::tag_resource::TagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
919 crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
920 crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
921 crate::operation::tag_resource::TagResourceError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
922 crate::operation::tag_resource::TagResourceError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
923 crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
924 crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
925 }
926 }
927}
928impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
929where
930 R: Send + Sync + std::fmt::Debug + 'static,
931{
932 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
933 match err {
934 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
935 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
936 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
937 source: err.into(),
938 }),
939 }
940 }
941}
942impl From<crate::operation::untag_resource::UntagResourceError> for Error {
943 fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
944 match err {
945 crate::operation::untag_resource::UntagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
946 crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
947 crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
948 crate::operation::untag_resource::UntagResourceError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
949 crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
950 crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
951 }
952 }
953}
954impl<R>
955 From<
956 ::aws_smithy_runtime_api::client::result::SdkError<
957 crate::operation::update_centralization_rule_for_organization::UpdateCentralizationRuleForOrganizationError,
958 R,
959 >,
960 > for Error
961where
962 R: Send + Sync + std::fmt::Debug + 'static,
963{
964 fn from(
965 err: ::aws_smithy_runtime_api::client::result::SdkError<
966 crate::operation::update_centralization_rule_for_organization::UpdateCentralizationRuleForOrganizationError,
967 R,
968 >,
969 ) -> Self {
970 match err {
971 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
972 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
973 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
974 source: err.into(),
975 }),
976 }
977 }
978}
979impl From<crate::operation::update_centralization_rule_for_organization::UpdateCentralizationRuleForOrganizationError> for Error {
980 fn from(err: crate::operation::update_centralization_rule_for_organization::UpdateCentralizationRuleForOrganizationError) -> Self {
981 match err {
982 crate::operation::update_centralization_rule_for_organization::UpdateCentralizationRuleForOrganizationError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
983 crate::operation::update_centralization_rule_for_organization::UpdateCentralizationRuleForOrganizationError::InternalServerException(inner) => Error::InternalServerException(inner),
984 crate::operation::update_centralization_rule_for_organization::UpdateCentralizationRuleForOrganizationError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
985 crate::operation::update_centralization_rule_for_organization::UpdateCentralizationRuleForOrganizationError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
986 crate::operation::update_centralization_rule_for_organization::UpdateCentralizationRuleForOrganizationError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
987 crate::operation::update_centralization_rule_for_organization::UpdateCentralizationRuleForOrganizationError::ValidationException(inner) => Error::ValidationException(inner),
988 crate::operation::update_centralization_rule_for_organization::UpdateCentralizationRuleForOrganizationError::Unhandled(inner) => Error::Unhandled(inner),
989 }
990 }
991}
992impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_telemetry_rule::UpdateTelemetryRuleError, R>> for Error
993where
994 R: Send + Sync + std::fmt::Debug + 'static,
995{
996 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_telemetry_rule::UpdateTelemetryRuleError, R>) -> Self {
997 match err {
998 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
999 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1000 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1001 source: err.into(),
1002 }),
1003 }
1004 }
1005}
1006impl From<crate::operation::update_telemetry_rule::UpdateTelemetryRuleError> for Error {
1007 fn from(err: crate::operation::update_telemetry_rule::UpdateTelemetryRuleError) -> Self {
1008 match err {
1009 crate::operation::update_telemetry_rule::UpdateTelemetryRuleError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1010 crate::operation::update_telemetry_rule::UpdateTelemetryRuleError::InternalServerException(inner) => {
1011 Error::InternalServerException(inner)
1012 }
1013 crate::operation::update_telemetry_rule::UpdateTelemetryRuleError::ResourceNotFoundException(inner) => {
1014 Error::ResourceNotFoundException(inner)
1015 }
1016 crate::operation::update_telemetry_rule::UpdateTelemetryRuleError::ServiceQuotaExceededException(inner) => {
1017 Error::ServiceQuotaExceededException(inner)
1018 }
1019 crate::operation::update_telemetry_rule::UpdateTelemetryRuleError::TooManyRequestsException(inner) => {
1020 Error::TooManyRequestsException(inner)
1021 }
1022 crate::operation::update_telemetry_rule::UpdateTelemetryRuleError::ValidationException(inner) => Error::ValidationException(inner),
1023 crate::operation::update_telemetry_rule::UpdateTelemetryRuleError::Unhandled(inner) => Error::Unhandled(inner),
1024 }
1025 }
1026}
1027impl<R>
1028 From<
1029 ::aws_smithy_runtime_api::client::result::SdkError<
1030 crate::operation::update_telemetry_rule_for_organization::UpdateTelemetryRuleForOrganizationError,
1031 R,
1032 >,
1033 > for Error
1034where
1035 R: Send + Sync + std::fmt::Debug + 'static,
1036{
1037 fn from(
1038 err: ::aws_smithy_runtime_api::client::result::SdkError<
1039 crate::operation::update_telemetry_rule_for_organization::UpdateTelemetryRuleForOrganizationError,
1040 R,
1041 >,
1042 ) -> Self {
1043 match err {
1044 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1045 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1046 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1047 source: err.into(),
1048 }),
1049 }
1050 }
1051}
1052impl From<crate::operation::update_telemetry_rule_for_organization::UpdateTelemetryRuleForOrganizationError> for Error {
1053 fn from(err: crate::operation::update_telemetry_rule_for_organization::UpdateTelemetryRuleForOrganizationError) -> Self {
1054 match err {
1055 crate::operation::update_telemetry_rule_for_organization::UpdateTelemetryRuleForOrganizationError::AccessDeniedException(inner) => {
1056 Error::AccessDeniedException(inner)
1057 }
1058 crate::operation::update_telemetry_rule_for_organization::UpdateTelemetryRuleForOrganizationError::InternalServerException(inner) => {
1059 Error::InternalServerException(inner)
1060 }
1061 crate::operation::update_telemetry_rule_for_organization::UpdateTelemetryRuleForOrganizationError::ResourceNotFoundException(inner) => {
1062 Error::ResourceNotFoundException(inner)
1063 }
1064 crate::operation::update_telemetry_rule_for_organization::UpdateTelemetryRuleForOrganizationError::ServiceQuotaExceededException(
1065 inner,
1066 ) => Error::ServiceQuotaExceededException(inner),
1067 crate::operation::update_telemetry_rule_for_organization::UpdateTelemetryRuleForOrganizationError::TooManyRequestsException(inner) => {
1068 Error::TooManyRequestsException(inner)
1069 }
1070 crate::operation::update_telemetry_rule_for_organization::UpdateTelemetryRuleForOrganizationError::ValidationException(inner) => {
1071 Error::ValidationException(inner)
1072 }
1073 crate::operation::update_telemetry_rule_for_organization::UpdateTelemetryRuleForOrganizationError::Unhandled(inner) => {
1074 Error::Unhandled(inner)
1075 }
1076 }
1077 }
1078}
1079impl ::std::error::Error for Error {
1080 fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
1081 match self {
1082 Error::AccessDeniedException(inner) => inner.source(),
1083 Error::ConflictException(inner) => inner.source(),
1084 Error::InternalServerException(inner) => inner.source(),
1085 Error::ResourceNotFoundException(inner) => inner.source(),
1086 Error::ServiceQuotaExceededException(inner) => inner.source(),
1087 Error::TooManyRequestsException(inner) => inner.source(),
1088 Error::ValidationException(inner) => inner.source(),
1089 Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
1090 }
1091 }
1092}
1093impl ::aws_types::request_id::RequestId for Error {
1094 fn request_id(&self) -> Option<&str> {
1095 match self {
1096 Self::AccessDeniedException(e) => e.request_id(),
1097 Self::ConflictException(e) => e.request_id(),
1098 Self::InternalServerException(e) => e.request_id(),
1099 Self::ResourceNotFoundException(e) => e.request_id(),
1100 Self::ServiceQuotaExceededException(e) => e.request_id(),
1101 Self::TooManyRequestsException(e) => e.request_id(),
1102 Self::ValidationException(e) => e.request_id(),
1103 Self::Unhandled(e) => e.meta.request_id(),
1104 }
1105 }
1106}