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