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 ThrottlingException(crate::types::error::ThrottlingException),
16 ValidationException(crate::types::error::ValidationException),
18 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
20 variable wildcard pattern and check `.code()`:
21 \
22 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
23 \
24 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
25 Unhandled(crate::error::sealed_unhandled::Unhandled),
26}
27impl ::std::fmt::Display for Error {
28 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
29 match self {
30 Error::AccessDeniedException(inner) => inner.fmt(f),
31 Error::ConflictException(inner) => inner.fmt(f),
32 Error::InternalServerException(inner) => inner.fmt(f),
33 Error::ResourceNotFoundException(inner) => inner.fmt(f),
34 Error::ThrottlingException(inner) => inner.fmt(f),
35 Error::ValidationException(inner) => inner.fmt(f),
36 Error::Unhandled(_) => {
37 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
38 write!(f, "unhandled error ({code})")
39 } else {
40 f.write_str("unhandled error")
41 }
42 }
43 }
44 }
45}
46impl From<::aws_smithy_types::error::operation::BuildError> for Error {
47 fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
48 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
49 source: value.into(),
50 meta: ::std::default::Default::default(),
51 })
52 }
53}
54impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
55 fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
56 match self {
57 Self::AccessDeniedException(inner) => inner.meta(),
58 Self::ConflictException(inner) => inner.meta(),
59 Self::InternalServerException(inner) => inner.meta(),
60 Self::ResourceNotFoundException(inner) => inner.meta(),
61 Self::ThrottlingException(inner) => inner.meta(),
62 Self::ValidationException(inner) => inner.meta(),
63 Self::Unhandled(inner) => &inner.meta,
64 }
65 }
66}
67impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_configuration_manager::CreateConfigurationManagerError, R>>
68 for Error
69where
70 R: Send + Sync + std::fmt::Debug + 'static,
71{
72 fn from(
73 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_configuration_manager::CreateConfigurationManagerError, R>,
74 ) -> Self {
75 match err {
76 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
77 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
78 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
79 source: err.into(),
80 }),
81 }
82 }
83}
84impl From<crate::operation::create_configuration_manager::CreateConfigurationManagerError> for Error {
85 fn from(err: crate::operation::create_configuration_manager::CreateConfigurationManagerError) -> Self {
86 match err {
87 crate::operation::create_configuration_manager::CreateConfigurationManagerError::AccessDeniedException(inner) => {
88 Error::AccessDeniedException(inner)
89 }
90 crate::operation::create_configuration_manager::CreateConfigurationManagerError::ConflictException(inner) => {
91 Error::ConflictException(inner)
92 }
93 crate::operation::create_configuration_manager::CreateConfigurationManagerError::InternalServerException(inner) => {
94 Error::InternalServerException(inner)
95 }
96 crate::operation::create_configuration_manager::CreateConfigurationManagerError::ThrottlingException(inner) => {
97 Error::ThrottlingException(inner)
98 }
99 crate::operation::create_configuration_manager::CreateConfigurationManagerError::ValidationException(inner) => {
100 Error::ValidationException(inner)
101 }
102 crate::operation::create_configuration_manager::CreateConfigurationManagerError::Unhandled(inner) => Error::Unhandled(inner),
103 }
104 }
105}
106impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_configuration_manager::DeleteConfigurationManagerError, R>>
107 for Error
108where
109 R: Send + Sync + std::fmt::Debug + 'static,
110{
111 fn from(
112 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_configuration_manager::DeleteConfigurationManagerError, R>,
113 ) -> 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::delete_configuration_manager::DeleteConfigurationManagerError> for Error {
124 fn from(err: crate::operation::delete_configuration_manager::DeleteConfigurationManagerError) -> Self {
125 match err {
126 crate::operation::delete_configuration_manager::DeleteConfigurationManagerError::AccessDeniedException(inner) => {
127 Error::AccessDeniedException(inner)
128 }
129 crate::operation::delete_configuration_manager::DeleteConfigurationManagerError::ConflictException(inner) => {
130 Error::ConflictException(inner)
131 }
132 crate::operation::delete_configuration_manager::DeleteConfigurationManagerError::InternalServerException(inner) => {
133 Error::InternalServerException(inner)
134 }
135 crate::operation::delete_configuration_manager::DeleteConfigurationManagerError::ResourceNotFoundException(inner) => {
136 Error::ResourceNotFoundException(inner)
137 }
138 crate::operation::delete_configuration_manager::DeleteConfigurationManagerError::ThrottlingException(inner) => {
139 Error::ThrottlingException(inner)
140 }
141 crate::operation::delete_configuration_manager::DeleteConfigurationManagerError::ValidationException(inner) => {
142 Error::ValidationException(inner)
143 }
144 crate::operation::delete_configuration_manager::DeleteConfigurationManagerError::Unhandled(inner) => Error::Unhandled(inner),
145 }
146 }
147}
148impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_configuration::GetConfigurationError, R>> for Error
149where
150 R: Send + Sync + std::fmt::Debug + 'static,
151{
152 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_configuration::GetConfigurationError, R>) -> Self {
153 match err {
154 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
155 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
156 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
157 source: err.into(),
158 }),
159 }
160 }
161}
162impl From<crate::operation::get_configuration::GetConfigurationError> for Error {
163 fn from(err: crate::operation::get_configuration::GetConfigurationError) -> Self {
164 match err {
165 crate::operation::get_configuration::GetConfigurationError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
166 crate::operation::get_configuration::GetConfigurationError::ConflictException(inner) => Error::ConflictException(inner),
167 crate::operation::get_configuration::GetConfigurationError::InternalServerException(inner) => Error::InternalServerException(inner),
168 crate::operation::get_configuration::GetConfigurationError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
169 crate::operation::get_configuration::GetConfigurationError::ThrottlingException(inner) => Error::ThrottlingException(inner),
170 crate::operation::get_configuration::GetConfigurationError::ValidationException(inner) => Error::ValidationException(inner),
171 crate::operation::get_configuration::GetConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
172 }
173 }
174}
175impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_configuration_manager::GetConfigurationManagerError, R>>
176 for Error
177where
178 R: Send + Sync + std::fmt::Debug + 'static,
179{
180 fn from(
181 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_configuration_manager::GetConfigurationManagerError, R>,
182 ) -> Self {
183 match err {
184 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
185 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
186 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
187 source: err.into(),
188 }),
189 }
190 }
191}
192impl From<crate::operation::get_configuration_manager::GetConfigurationManagerError> for Error {
193 fn from(err: crate::operation::get_configuration_manager::GetConfigurationManagerError) -> Self {
194 match err {
195 crate::operation::get_configuration_manager::GetConfigurationManagerError::AccessDeniedException(inner) => {
196 Error::AccessDeniedException(inner)
197 }
198 crate::operation::get_configuration_manager::GetConfigurationManagerError::ConflictException(inner) => Error::ConflictException(inner),
199 crate::operation::get_configuration_manager::GetConfigurationManagerError::InternalServerException(inner) => {
200 Error::InternalServerException(inner)
201 }
202 crate::operation::get_configuration_manager::GetConfigurationManagerError::ResourceNotFoundException(inner) => {
203 Error::ResourceNotFoundException(inner)
204 }
205 crate::operation::get_configuration_manager::GetConfigurationManagerError::ThrottlingException(inner) => {
206 Error::ThrottlingException(inner)
207 }
208 crate::operation::get_configuration_manager::GetConfigurationManagerError::ValidationException(inner) => {
209 Error::ValidationException(inner)
210 }
211 crate::operation::get_configuration_manager::GetConfigurationManagerError::Unhandled(inner) => Error::Unhandled(inner),
212 }
213 }
214}
215impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_service_settings::GetServiceSettingsError, R>> for Error
216where
217 R: Send + Sync + std::fmt::Debug + 'static,
218{
219 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_service_settings::GetServiceSettingsError, R>) -> Self {
220 match err {
221 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
222 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
223 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
224 source: err.into(),
225 }),
226 }
227 }
228}
229impl From<crate::operation::get_service_settings::GetServiceSettingsError> for Error {
230 fn from(err: crate::operation::get_service_settings::GetServiceSettingsError) -> Self {
231 match err {
232 crate::operation::get_service_settings::GetServiceSettingsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
233 crate::operation::get_service_settings::GetServiceSettingsError::ConflictException(inner) => Error::ConflictException(inner),
234 crate::operation::get_service_settings::GetServiceSettingsError::InternalServerException(inner) => Error::InternalServerException(inner),
235 crate::operation::get_service_settings::GetServiceSettingsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
236 crate::operation::get_service_settings::GetServiceSettingsError::Unhandled(inner) => Error::Unhandled(inner),
237 }
238 }
239}
240impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_configuration_managers::ListConfigurationManagersError, R>>
241 for Error
242where
243 R: Send + Sync + std::fmt::Debug + 'static,
244{
245 fn from(
246 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_configuration_managers::ListConfigurationManagersError, R>,
247 ) -> Self {
248 match err {
249 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
250 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
251 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
252 source: err.into(),
253 }),
254 }
255 }
256}
257impl From<crate::operation::list_configuration_managers::ListConfigurationManagersError> for Error {
258 fn from(err: crate::operation::list_configuration_managers::ListConfigurationManagersError) -> Self {
259 match err {
260 crate::operation::list_configuration_managers::ListConfigurationManagersError::AccessDeniedException(inner) => {
261 Error::AccessDeniedException(inner)
262 }
263 crate::operation::list_configuration_managers::ListConfigurationManagersError::ConflictException(inner) => {
264 Error::ConflictException(inner)
265 }
266 crate::operation::list_configuration_managers::ListConfigurationManagersError::InternalServerException(inner) => {
267 Error::InternalServerException(inner)
268 }
269 crate::operation::list_configuration_managers::ListConfigurationManagersError::ThrottlingException(inner) => {
270 Error::ThrottlingException(inner)
271 }
272 crate::operation::list_configuration_managers::ListConfigurationManagersError::ValidationException(inner) => {
273 Error::ValidationException(inner)
274 }
275 crate::operation::list_configuration_managers::ListConfigurationManagersError::Unhandled(inner) => Error::Unhandled(inner),
276 }
277 }
278}
279impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_configurations::ListConfigurationsError, R>> for Error
280where
281 R: Send + Sync + std::fmt::Debug + 'static,
282{
283 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_configurations::ListConfigurationsError, R>) -> Self {
284 match err {
285 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
286 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
287 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
288 source: err.into(),
289 }),
290 }
291 }
292}
293impl From<crate::operation::list_configurations::ListConfigurationsError> for Error {
294 fn from(err: crate::operation::list_configurations::ListConfigurationsError) -> Self {
295 match err {
296 crate::operation::list_configurations::ListConfigurationsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
297 crate::operation::list_configurations::ListConfigurationsError::InternalServerException(inner) => Error::InternalServerException(inner),
298 crate::operation::list_configurations::ListConfigurationsError::ResourceNotFoundException(inner) => {
299 Error::ResourceNotFoundException(inner)
300 }
301 crate::operation::list_configurations::ListConfigurationsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
302 crate::operation::list_configurations::ListConfigurationsError::ValidationException(inner) => Error::ValidationException(inner),
303 crate::operation::list_configurations::ListConfigurationsError::Unhandled(inner) => Error::Unhandled(inner),
304 }
305 }
306}
307impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_quick_setup_types::ListQuickSetupTypesError, R>> for Error
308where
309 R: Send + Sync + std::fmt::Debug + 'static,
310{
311 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_quick_setup_types::ListQuickSetupTypesError, R>) -> Self {
312 match err {
313 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
314 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
315 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
316 source: err.into(),
317 }),
318 }
319 }
320}
321impl From<crate::operation::list_quick_setup_types::ListQuickSetupTypesError> for Error {
322 fn from(err: crate::operation::list_quick_setup_types::ListQuickSetupTypesError) -> Self {
323 match err {
324 crate::operation::list_quick_setup_types::ListQuickSetupTypesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
325 crate::operation::list_quick_setup_types::ListQuickSetupTypesError::ConflictException(inner) => Error::ConflictException(inner),
326 crate::operation::list_quick_setup_types::ListQuickSetupTypesError::InternalServerException(inner) => {
327 Error::InternalServerException(inner)
328 }
329 crate::operation::list_quick_setup_types::ListQuickSetupTypesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
330 crate::operation::list_quick_setup_types::ListQuickSetupTypesError::Unhandled(inner) => Error::Unhandled(inner),
331 }
332 }
333}
334impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
335where
336 R: Send + Sync + std::fmt::Debug + 'static,
337{
338 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
339 match err {
340 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
341 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
342 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
343 source: err.into(),
344 }),
345 }
346 }
347}
348impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
349 fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
350 match err {
351 crate::operation::list_tags_for_resource::ListTagsForResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
352 crate::operation::list_tags_for_resource::ListTagsForResourceError::ConflictException(inner) => Error::ConflictException(inner),
353 crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
354 Error::InternalServerException(inner)
355 }
356 crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
357 Error::ResourceNotFoundException(inner)
358 }
359 crate::operation::list_tags_for_resource::ListTagsForResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
360 crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
361 crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
362 }
363 }
364}
365impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
366where
367 R: Send + Sync + std::fmt::Debug + 'static,
368{
369 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
370 match err {
371 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
372 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
373 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
374 source: err.into(),
375 }),
376 }
377 }
378}
379impl From<crate::operation::tag_resource::TagResourceError> for Error {
380 fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
381 match err {
382 crate::operation::tag_resource::TagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
383 crate::operation::tag_resource::TagResourceError::ConflictException(inner) => Error::ConflictException(inner),
384 crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
385 crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
386 crate::operation::tag_resource::TagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
387 crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
388 crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
389 }
390 }
391}
392impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
393where
394 R: Send + Sync + std::fmt::Debug + 'static,
395{
396 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
397 match err {
398 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
399 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
400 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
401 source: err.into(),
402 }),
403 }
404 }
405}
406impl From<crate::operation::untag_resource::UntagResourceError> for Error {
407 fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
408 match err {
409 crate::operation::untag_resource::UntagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
410 crate::operation::untag_resource::UntagResourceError::ConflictException(inner) => Error::ConflictException(inner),
411 crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
412 crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
413 crate::operation::untag_resource::UntagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
414 crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
415 crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
416 }
417 }
418}
419impl<R>
420 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_configuration_definition::UpdateConfigurationDefinitionError, R>>
421 for Error
422where
423 R: Send + Sync + std::fmt::Debug + 'static,
424{
425 fn from(
426 err: ::aws_smithy_runtime_api::client::result::SdkError<
427 crate::operation::update_configuration_definition::UpdateConfigurationDefinitionError,
428 R,
429 >,
430 ) -> Self {
431 match err {
432 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
433 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
434 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
435 source: err.into(),
436 }),
437 }
438 }
439}
440impl From<crate::operation::update_configuration_definition::UpdateConfigurationDefinitionError> for Error {
441 fn from(err: crate::operation::update_configuration_definition::UpdateConfigurationDefinitionError) -> Self {
442 match err {
443 crate::operation::update_configuration_definition::UpdateConfigurationDefinitionError::AccessDeniedException(inner) => {
444 Error::AccessDeniedException(inner)
445 }
446 crate::operation::update_configuration_definition::UpdateConfigurationDefinitionError::ConflictException(inner) => {
447 Error::ConflictException(inner)
448 }
449 crate::operation::update_configuration_definition::UpdateConfigurationDefinitionError::InternalServerException(inner) => {
450 Error::InternalServerException(inner)
451 }
452 crate::operation::update_configuration_definition::UpdateConfigurationDefinitionError::ResourceNotFoundException(inner) => {
453 Error::ResourceNotFoundException(inner)
454 }
455 crate::operation::update_configuration_definition::UpdateConfigurationDefinitionError::ThrottlingException(inner) => {
456 Error::ThrottlingException(inner)
457 }
458 crate::operation::update_configuration_definition::UpdateConfigurationDefinitionError::ValidationException(inner) => {
459 Error::ValidationException(inner)
460 }
461 crate::operation::update_configuration_definition::UpdateConfigurationDefinitionError::Unhandled(inner) => Error::Unhandled(inner),
462 }
463 }
464}
465impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_configuration_manager::UpdateConfigurationManagerError, R>>
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<crate::operation::update_configuration_manager::UpdateConfigurationManagerError, R>,
472 ) -> Self {
473 match err {
474 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
475 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
476 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
477 source: err.into(),
478 }),
479 }
480 }
481}
482impl From<crate::operation::update_configuration_manager::UpdateConfigurationManagerError> for Error {
483 fn from(err: crate::operation::update_configuration_manager::UpdateConfigurationManagerError) -> Self {
484 match err {
485 crate::operation::update_configuration_manager::UpdateConfigurationManagerError::AccessDeniedException(inner) => {
486 Error::AccessDeniedException(inner)
487 }
488 crate::operation::update_configuration_manager::UpdateConfigurationManagerError::ConflictException(inner) => {
489 Error::ConflictException(inner)
490 }
491 crate::operation::update_configuration_manager::UpdateConfigurationManagerError::InternalServerException(inner) => {
492 Error::InternalServerException(inner)
493 }
494 crate::operation::update_configuration_manager::UpdateConfigurationManagerError::ResourceNotFoundException(inner) => {
495 Error::ResourceNotFoundException(inner)
496 }
497 crate::operation::update_configuration_manager::UpdateConfigurationManagerError::ThrottlingException(inner) => {
498 Error::ThrottlingException(inner)
499 }
500 crate::operation::update_configuration_manager::UpdateConfigurationManagerError::ValidationException(inner) => {
501 Error::ValidationException(inner)
502 }
503 crate::operation::update_configuration_manager::UpdateConfigurationManagerError::Unhandled(inner) => Error::Unhandled(inner),
504 }
505 }
506}
507impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_service_settings::UpdateServiceSettingsError, R>> for Error
508where
509 R: Send + Sync + std::fmt::Debug + 'static,
510{
511 fn from(
512 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_service_settings::UpdateServiceSettingsError, R>,
513 ) -> Self {
514 match err {
515 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
516 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
517 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
518 source: err.into(),
519 }),
520 }
521 }
522}
523impl From<crate::operation::update_service_settings::UpdateServiceSettingsError> for Error {
524 fn from(err: crate::operation::update_service_settings::UpdateServiceSettingsError) -> Self {
525 match err {
526 crate::operation::update_service_settings::UpdateServiceSettingsError::AccessDeniedException(inner) => {
527 Error::AccessDeniedException(inner)
528 }
529 crate::operation::update_service_settings::UpdateServiceSettingsError::ConflictException(inner) => Error::ConflictException(inner),
530 crate::operation::update_service_settings::UpdateServiceSettingsError::InternalServerException(inner) => {
531 Error::InternalServerException(inner)
532 }
533 crate::operation::update_service_settings::UpdateServiceSettingsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
534 crate::operation::update_service_settings::UpdateServiceSettingsError::ValidationException(inner) => Error::ValidationException(inner),
535 crate::operation::update_service_settings::UpdateServiceSettingsError::Unhandled(inner) => Error::Unhandled(inner),
536 }
537 }
538}
539impl ::std::error::Error for Error {
540 fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
541 match self {
542 Error::AccessDeniedException(inner) => inner.source(),
543 Error::ConflictException(inner) => inner.source(),
544 Error::InternalServerException(inner) => inner.source(),
545 Error::ResourceNotFoundException(inner) => inner.source(),
546 Error::ThrottlingException(inner) => inner.source(),
547 Error::ValidationException(inner) => inner.source(),
548 Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
549 }
550 }
551}
552impl ::aws_types::request_id::RequestId for Error {
553 fn request_id(&self) -> Option<&str> {
554 match self {
555 Self::AccessDeniedException(e) => e.request_id(),
556 Self::ConflictException(e) => e.request_id(),
557 Self::InternalServerException(e) => e.request_id(),
558 Self::ResourceNotFoundException(e) => e.request_id(),
559 Self::ThrottlingException(e) => e.request_id(),
560 Self::ValidationException(e) => e.request_id(),
561 Self::Unhandled(e) => e.meta.request_id(),
562 }
563 }
564}