aws_sdk_pcs/
error_meta.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// All possible error types for this service.
3#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6    /// <p>You don't have permission to perform the action.</p>
7    /// <p><u>Examples</u></p>
8    /// <ul>
9    /// <li>
10    /// <p>The launch template instance profile doesn't pass <code>iam:PassRole</code> verification.</p></li>
11    /// <li>
12    /// <p>There is a mismatch between the account ID and cluster ID.</p></li>
13    /// <li>
14    /// <p>The cluster ID doesn't exist.</p></li>
15    /// <li>
16    /// <p>The EC2 instance isn't present.</p></li>
17    /// </ul>
18    AccessDeniedException(crate::types::error::AccessDeniedException),
19    /// <p>Your request has conflicting operations. This can occur if you're trying to perform more than 1 operation on the same resource at the same time.</p>
20    /// <p><u>Examples</u></p>
21    /// <ul>
22    /// <li>
23    /// <p>A cluster with the same name already exists.</p></li>
24    /// <li>
25    /// <p>A cluster isn't in <code>ACTIVE</code> status.</p></li>
26    /// <li>
27    /// <p>A cluster to delete is in an unstable state. For example, because it still has <code>ACTIVE</code> node groups or queues.</p></li>
28    /// <li>
29    /// <p>A queue already exists in a cluster.</p></li>
30    /// </ul>
31    ConflictException(crate::types::error::ConflictException),
32    /// <p>PCS can't process your request right now. Try again later.</p>
33    InternalServerException(crate::types::error::InternalServerException),
34    /// <p>The requested resource can't be found. The cluster, node group, or queue you're attempting to get, update, list, or delete doesn't exist.</p>
35    /// <p><u>Examples</u></p>
36    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
37    /// <p>You exceeded your service quota. Service quotas, also referred to as limits, are the maximum number of service resources or operations for your Amazon Web Services account. To learn how to increase your service quota, see <a href="https://docs.aws.amazon.com/servicequotas/latest/userguide/request-quota-increase.html">Requesting a quota increase</a> in the <i>Service Quotas User Guide</i></p>
38    /// <p><u>Examples</u></p>
39    /// <ul>
40    /// <li>
41    /// <p>The max number of clusters or queues has been reached for the account.</p></li>
42    /// <li>
43    /// <p>The max number of compute node groups has been reached for the associated cluster.</p></li>
44    /// <li>
45    /// <p>The total of <code>maxInstances</code> across all compute node groups has been reached for associated cluster.</p></li>
46    /// </ul>
47    ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
48    /// <p>Your request exceeded a request rate quota. Check the resource's request rate quota and try again.</p>
49    ThrottlingException(crate::types::error::ThrottlingException),
50    /// <p>The request isn't valid.</p>
51    /// <p><u>Examples</u></p>
52    /// <ul>
53    /// <li>
54    /// <p>Your request contains malformed JSON or unsupported characters.</p></li>
55    /// <li>
56    /// <p>The scheduler version isn't supported.</p></li>
57    /// <li>
58    /// <p>There are networking related errors, such as network validation failure.</p></li>
59    /// <li>
60    /// <p>AMI type is <code>CUSTOM</code> and the launch template doesn't define the AMI ID, or the AMI type is AL2 and the launch template defines the AMI.</p></li>
61    /// </ul>
62    ValidationException(crate::types::error::ValidationException),
63    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
64    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
65    variable wildcard pattern and check `.code()`:
66     \
67    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
68     \
69    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
70    Unhandled(crate::error::sealed_unhandled::Unhandled),
71}
72impl ::std::fmt::Display for Error {
73    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
74        match self {
75            Error::AccessDeniedException(inner) => inner.fmt(f),
76            Error::ConflictException(inner) => inner.fmt(f),
77            Error::InternalServerException(inner) => inner.fmt(f),
78            Error::ResourceNotFoundException(inner) => inner.fmt(f),
79            Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
80            Error::ThrottlingException(inner) => inner.fmt(f),
81            Error::ValidationException(inner) => inner.fmt(f),
82            Error::Unhandled(_) => {
83                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
84                    write!(f, "unhandled error ({code})")
85                } else {
86                    f.write_str("unhandled error")
87                }
88            }
89        }
90    }
91}
92impl From<::aws_smithy_types::error::operation::BuildError> for Error {
93    fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
94        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
95            source: value.into(),
96            meta: ::std::default::Default::default(),
97        })
98    }
99}
100impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
101    fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
102        match self {
103            Self::AccessDeniedException(inner) => inner.meta(),
104            Self::ConflictException(inner) => inner.meta(),
105            Self::InternalServerException(inner) => inner.meta(),
106            Self::ResourceNotFoundException(inner) => inner.meta(),
107            Self::ServiceQuotaExceededException(inner) => inner.meta(),
108            Self::ThrottlingException(inner) => inner.meta(),
109            Self::ValidationException(inner) => inner.meta(),
110            Self::Unhandled(inner) => &inner.meta,
111        }
112    }
113}
114impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_cluster::CreateClusterError, R>> for Error
115where
116    R: Send + Sync + std::fmt::Debug + 'static,
117{
118    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_cluster::CreateClusterError, R>) -> Self {
119        match err {
120            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
121            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
122                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
123                source: err.into(),
124            }),
125        }
126    }
127}
128impl From<crate::operation::create_cluster::CreateClusterError> for Error {
129    fn from(err: crate::operation::create_cluster::CreateClusterError) -> Self {
130        match err {
131            crate::operation::create_cluster::CreateClusterError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
132            crate::operation::create_cluster::CreateClusterError::ConflictException(inner) => Error::ConflictException(inner),
133            crate::operation::create_cluster::CreateClusterError::InternalServerException(inner) => Error::InternalServerException(inner),
134            crate::operation::create_cluster::CreateClusterError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
135            crate::operation::create_cluster::CreateClusterError::ThrottlingException(inner) => Error::ThrottlingException(inner),
136            crate::operation::create_cluster::CreateClusterError::ValidationException(inner) => Error::ValidationException(inner),
137            crate::operation::create_cluster::CreateClusterError::Unhandled(inner) => Error::Unhandled(inner),
138        }
139    }
140}
141impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_compute_node_group::CreateComputeNodeGroupError, R>>
142    for Error
143where
144    R: Send + Sync + std::fmt::Debug + 'static,
145{
146    fn from(
147        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_compute_node_group::CreateComputeNodeGroupError, R>,
148    ) -> Self {
149        match err {
150            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
151            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
152                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
153                source: err.into(),
154            }),
155        }
156    }
157}
158impl From<crate::operation::create_compute_node_group::CreateComputeNodeGroupError> for Error {
159    fn from(err: crate::operation::create_compute_node_group::CreateComputeNodeGroupError) -> Self {
160        match err {
161            crate::operation::create_compute_node_group::CreateComputeNodeGroupError::AccessDeniedException(inner) => {
162                Error::AccessDeniedException(inner)
163            }
164            crate::operation::create_compute_node_group::CreateComputeNodeGroupError::ConflictException(inner) => Error::ConflictException(inner),
165            crate::operation::create_compute_node_group::CreateComputeNodeGroupError::InternalServerException(inner) => {
166                Error::InternalServerException(inner)
167            }
168            crate::operation::create_compute_node_group::CreateComputeNodeGroupError::ResourceNotFoundException(inner) => {
169                Error::ResourceNotFoundException(inner)
170            }
171            crate::operation::create_compute_node_group::CreateComputeNodeGroupError::ServiceQuotaExceededException(inner) => {
172                Error::ServiceQuotaExceededException(inner)
173            }
174            crate::operation::create_compute_node_group::CreateComputeNodeGroupError::ThrottlingException(inner) => Error::ThrottlingException(inner),
175            crate::operation::create_compute_node_group::CreateComputeNodeGroupError::ValidationException(inner) => Error::ValidationException(inner),
176            crate::operation::create_compute_node_group::CreateComputeNodeGroupError::Unhandled(inner) => Error::Unhandled(inner),
177        }
178    }
179}
180impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_queue::CreateQueueError, R>> for Error
181where
182    R: Send + Sync + std::fmt::Debug + 'static,
183{
184    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_queue::CreateQueueError, R>) -> Self {
185        match err {
186            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
187            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
188                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
189                source: err.into(),
190            }),
191        }
192    }
193}
194impl From<crate::operation::create_queue::CreateQueueError> for Error {
195    fn from(err: crate::operation::create_queue::CreateQueueError) -> Self {
196        match err {
197            crate::operation::create_queue::CreateQueueError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
198            crate::operation::create_queue::CreateQueueError::ConflictException(inner) => Error::ConflictException(inner),
199            crate::operation::create_queue::CreateQueueError::InternalServerException(inner) => Error::InternalServerException(inner),
200            crate::operation::create_queue::CreateQueueError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
201            crate::operation::create_queue::CreateQueueError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
202            crate::operation::create_queue::CreateQueueError::ThrottlingException(inner) => Error::ThrottlingException(inner),
203            crate::operation::create_queue::CreateQueueError::ValidationException(inner) => Error::ValidationException(inner),
204            crate::operation::create_queue::CreateQueueError::Unhandled(inner) => Error::Unhandled(inner),
205        }
206    }
207}
208impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_cluster::DeleteClusterError, 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::delete_cluster::DeleteClusterError, 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::delete_cluster::DeleteClusterError> for Error {
223    fn from(err: crate::operation::delete_cluster::DeleteClusterError) -> Self {
224        match err {
225            crate::operation::delete_cluster::DeleteClusterError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
226            crate::operation::delete_cluster::DeleteClusterError::ConflictException(inner) => Error::ConflictException(inner),
227            crate::operation::delete_cluster::DeleteClusterError::InternalServerException(inner) => Error::InternalServerException(inner),
228            crate::operation::delete_cluster::DeleteClusterError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
229            crate::operation::delete_cluster::DeleteClusterError::ThrottlingException(inner) => Error::ThrottlingException(inner),
230            crate::operation::delete_cluster::DeleteClusterError::ValidationException(inner) => Error::ValidationException(inner),
231            crate::operation::delete_cluster::DeleteClusterError::Unhandled(inner) => Error::Unhandled(inner),
232        }
233    }
234}
235impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_compute_node_group::DeleteComputeNodeGroupError, R>>
236    for Error
237where
238    R: Send + Sync + std::fmt::Debug + 'static,
239{
240    fn from(
241        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_compute_node_group::DeleteComputeNodeGroupError, R>,
242    ) -> Self {
243        match err {
244            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
245            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
246                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
247                source: err.into(),
248            }),
249        }
250    }
251}
252impl From<crate::operation::delete_compute_node_group::DeleteComputeNodeGroupError> for Error {
253    fn from(err: crate::operation::delete_compute_node_group::DeleteComputeNodeGroupError) -> Self {
254        match err {
255            crate::operation::delete_compute_node_group::DeleteComputeNodeGroupError::AccessDeniedException(inner) => {
256                Error::AccessDeniedException(inner)
257            }
258            crate::operation::delete_compute_node_group::DeleteComputeNodeGroupError::ConflictException(inner) => Error::ConflictException(inner),
259            crate::operation::delete_compute_node_group::DeleteComputeNodeGroupError::InternalServerException(inner) => {
260                Error::InternalServerException(inner)
261            }
262            crate::operation::delete_compute_node_group::DeleteComputeNodeGroupError::ResourceNotFoundException(inner) => {
263                Error::ResourceNotFoundException(inner)
264            }
265            crate::operation::delete_compute_node_group::DeleteComputeNodeGroupError::ThrottlingException(inner) => Error::ThrottlingException(inner),
266            crate::operation::delete_compute_node_group::DeleteComputeNodeGroupError::ValidationException(inner) => Error::ValidationException(inner),
267            crate::operation::delete_compute_node_group::DeleteComputeNodeGroupError::Unhandled(inner) => Error::Unhandled(inner),
268        }
269    }
270}
271impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_queue::DeleteQueueError, R>> for Error
272where
273    R: Send + Sync + std::fmt::Debug + 'static,
274{
275    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_queue::DeleteQueueError, R>) -> 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::delete_queue::DeleteQueueError> for Error {
286    fn from(err: crate::operation::delete_queue::DeleteQueueError) -> Self {
287        match err {
288            crate::operation::delete_queue::DeleteQueueError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
289            crate::operation::delete_queue::DeleteQueueError::ConflictException(inner) => Error::ConflictException(inner),
290            crate::operation::delete_queue::DeleteQueueError::InternalServerException(inner) => Error::InternalServerException(inner),
291            crate::operation::delete_queue::DeleteQueueError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
292            crate::operation::delete_queue::DeleteQueueError::ThrottlingException(inner) => Error::ThrottlingException(inner),
293            crate::operation::delete_queue::DeleteQueueError::ValidationException(inner) => Error::ValidationException(inner),
294            crate::operation::delete_queue::DeleteQueueError::Unhandled(inner) => Error::Unhandled(inner),
295        }
296    }
297}
298impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_cluster::GetClusterError, R>> for Error
299where
300    R: Send + Sync + std::fmt::Debug + 'static,
301{
302    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_cluster::GetClusterError, R>) -> Self {
303        match err {
304            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
305            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
306                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
307                source: err.into(),
308            }),
309        }
310    }
311}
312impl From<crate::operation::get_cluster::GetClusterError> for Error {
313    fn from(err: crate::operation::get_cluster::GetClusterError) -> Self {
314        match err {
315            crate::operation::get_cluster::GetClusterError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
316            crate::operation::get_cluster::GetClusterError::ConflictException(inner) => Error::ConflictException(inner),
317            crate::operation::get_cluster::GetClusterError::InternalServerException(inner) => Error::InternalServerException(inner),
318            crate::operation::get_cluster::GetClusterError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
319            crate::operation::get_cluster::GetClusterError::ThrottlingException(inner) => Error::ThrottlingException(inner),
320            crate::operation::get_cluster::GetClusterError::ValidationException(inner) => Error::ValidationException(inner),
321            crate::operation::get_cluster::GetClusterError::Unhandled(inner) => Error::Unhandled(inner),
322        }
323    }
324}
325impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_compute_node_group::GetComputeNodeGroupError, R>> for Error
326where
327    R: Send + Sync + std::fmt::Debug + 'static,
328{
329    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_compute_node_group::GetComputeNodeGroupError, R>) -> Self {
330        match err {
331            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
332            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
333                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
334                source: err.into(),
335            }),
336        }
337    }
338}
339impl From<crate::operation::get_compute_node_group::GetComputeNodeGroupError> for Error {
340    fn from(err: crate::operation::get_compute_node_group::GetComputeNodeGroupError) -> Self {
341        match err {
342            crate::operation::get_compute_node_group::GetComputeNodeGroupError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
343            crate::operation::get_compute_node_group::GetComputeNodeGroupError::ConflictException(inner) => Error::ConflictException(inner),
344            crate::operation::get_compute_node_group::GetComputeNodeGroupError::InternalServerException(inner) => {
345                Error::InternalServerException(inner)
346            }
347            crate::operation::get_compute_node_group::GetComputeNodeGroupError::ResourceNotFoundException(inner) => {
348                Error::ResourceNotFoundException(inner)
349            }
350            crate::operation::get_compute_node_group::GetComputeNodeGroupError::ThrottlingException(inner) => Error::ThrottlingException(inner),
351            crate::operation::get_compute_node_group::GetComputeNodeGroupError::ValidationException(inner) => Error::ValidationException(inner),
352            crate::operation::get_compute_node_group::GetComputeNodeGroupError::Unhandled(inner) => Error::Unhandled(inner),
353        }
354    }
355}
356impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_queue::GetQueueError, R>> for Error
357where
358    R: Send + Sync + std::fmt::Debug + 'static,
359{
360    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_queue::GetQueueError, R>) -> Self {
361        match err {
362            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
363            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
364                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
365                source: err.into(),
366            }),
367        }
368    }
369}
370impl From<crate::operation::get_queue::GetQueueError> for Error {
371    fn from(err: crate::operation::get_queue::GetQueueError) -> Self {
372        match err {
373            crate::operation::get_queue::GetQueueError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
374            crate::operation::get_queue::GetQueueError::ConflictException(inner) => Error::ConflictException(inner),
375            crate::operation::get_queue::GetQueueError::InternalServerException(inner) => Error::InternalServerException(inner),
376            crate::operation::get_queue::GetQueueError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
377            crate::operation::get_queue::GetQueueError::ThrottlingException(inner) => Error::ThrottlingException(inner),
378            crate::operation::get_queue::GetQueueError::ValidationException(inner) => Error::ValidationException(inner),
379            crate::operation::get_queue::GetQueueError::Unhandled(inner) => Error::Unhandled(inner),
380        }
381    }
382}
383impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_clusters::ListClustersError, R>> for Error
384where
385    R: Send + Sync + std::fmt::Debug + 'static,
386{
387    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_clusters::ListClustersError, R>) -> Self {
388        match err {
389            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
390            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
391                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
392                source: err.into(),
393            }),
394        }
395    }
396}
397impl From<crate::operation::list_clusters::ListClustersError> for Error {
398    fn from(err: crate::operation::list_clusters::ListClustersError) -> Self {
399        match err {
400            crate::operation::list_clusters::ListClustersError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
401            crate::operation::list_clusters::ListClustersError::ConflictException(inner) => Error::ConflictException(inner),
402            crate::operation::list_clusters::ListClustersError::InternalServerException(inner) => Error::InternalServerException(inner),
403            crate::operation::list_clusters::ListClustersError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
404            crate::operation::list_clusters::ListClustersError::ThrottlingException(inner) => Error::ThrottlingException(inner),
405            crate::operation::list_clusters::ListClustersError::ValidationException(inner) => Error::ValidationException(inner),
406            crate::operation::list_clusters::ListClustersError::Unhandled(inner) => Error::Unhandled(inner),
407        }
408    }
409}
410impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_compute_node_groups::ListComputeNodeGroupsError, R>> for Error
411where
412    R: Send + Sync + std::fmt::Debug + 'static,
413{
414    fn from(
415        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_compute_node_groups::ListComputeNodeGroupsError, R>,
416    ) -> Self {
417        match err {
418            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
419            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
420                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
421                source: err.into(),
422            }),
423        }
424    }
425}
426impl From<crate::operation::list_compute_node_groups::ListComputeNodeGroupsError> for Error {
427    fn from(err: crate::operation::list_compute_node_groups::ListComputeNodeGroupsError) -> Self {
428        match err {
429            crate::operation::list_compute_node_groups::ListComputeNodeGroupsError::AccessDeniedException(inner) => {
430                Error::AccessDeniedException(inner)
431            }
432            crate::operation::list_compute_node_groups::ListComputeNodeGroupsError::ConflictException(inner) => Error::ConflictException(inner),
433            crate::operation::list_compute_node_groups::ListComputeNodeGroupsError::InternalServerException(inner) => {
434                Error::InternalServerException(inner)
435            }
436            crate::operation::list_compute_node_groups::ListComputeNodeGroupsError::ResourceNotFoundException(inner) => {
437                Error::ResourceNotFoundException(inner)
438            }
439            crate::operation::list_compute_node_groups::ListComputeNodeGroupsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
440            crate::operation::list_compute_node_groups::ListComputeNodeGroupsError::ValidationException(inner) => Error::ValidationException(inner),
441            crate::operation::list_compute_node_groups::ListComputeNodeGroupsError::Unhandled(inner) => Error::Unhandled(inner),
442        }
443    }
444}
445impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_queues::ListQueuesError, 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::list_queues::ListQueuesError, 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::list_queues::ListQueuesError> for Error {
460    fn from(err: crate::operation::list_queues::ListQueuesError) -> Self {
461        match err {
462            crate::operation::list_queues::ListQueuesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
463            crate::operation::list_queues::ListQueuesError::ConflictException(inner) => Error::ConflictException(inner),
464            crate::operation::list_queues::ListQueuesError::InternalServerException(inner) => Error::InternalServerException(inner),
465            crate::operation::list_queues::ListQueuesError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
466            crate::operation::list_queues::ListQueuesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
467            crate::operation::list_queues::ListQueuesError::ValidationException(inner) => Error::ValidationException(inner),
468            crate::operation::list_queues::ListQueuesError::Unhandled(inner) => Error::Unhandled(inner),
469        }
470    }
471}
472impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
473where
474    R: Send + Sync + std::fmt::Debug + 'static,
475{
476    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> 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::list_tags_for_resource::ListTagsForResourceError> for Error {
487    fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
488        match err {
489            crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
490                Error::ResourceNotFoundException(inner)
491            }
492            crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
493        }
494    }
495}
496impl<R>
497    From<
498        ::aws_smithy_runtime_api::client::result::SdkError<
499            crate::operation::register_compute_node_group_instance::RegisterComputeNodeGroupInstanceError,
500            R,
501        >,
502    > for Error
503where
504    R: Send + Sync + std::fmt::Debug + 'static,
505{
506    fn from(
507        err: ::aws_smithy_runtime_api::client::result::SdkError<
508            crate::operation::register_compute_node_group_instance::RegisterComputeNodeGroupInstanceError,
509            R,
510        >,
511    ) -> Self {
512        match err {
513            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
514            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
515                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
516                source: err.into(),
517            }),
518        }
519    }
520}
521impl From<crate::operation::register_compute_node_group_instance::RegisterComputeNodeGroupInstanceError> for Error {
522    fn from(err: crate::operation::register_compute_node_group_instance::RegisterComputeNodeGroupInstanceError) -> Self {
523        match err {
524            crate::operation::register_compute_node_group_instance::RegisterComputeNodeGroupInstanceError::AccessDeniedException(inner) => {
525                Error::AccessDeniedException(inner)
526            }
527            crate::operation::register_compute_node_group_instance::RegisterComputeNodeGroupInstanceError::InternalServerException(inner) => {
528                Error::InternalServerException(inner)
529            }
530            crate::operation::register_compute_node_group_instance::RegisterComputeNodeGroupInstanceError::Unhandled(inner) => {
531                Error::Unhandled(inner)
532            }
533        }
534    }
535}
536impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
537where
538    R: Send + Sync + std::fmt::Debug + 'static,
539{
540    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
541        match err {
542            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
543            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
544                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
545                source: err.into(),
546            }),
547        }
548    }
549}
550impl From<crate::operation::tag_resource::TagResourceError> for Error {
551    fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
552        match err {
553            crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
554            crate::operation::tag_resource::TagResourceError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
555            crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
556        }
557    }
558}
559impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
560where
561    R: Send + Sync + std::fmt::Debug + 'static,
562{
563    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
564        match err {
565            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
566            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
567                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
568                source: err.into(),
569            }),
570        }
571    }
572}
573impl From<crate::operation::untag_resource::UntagResourceError> for Error {
574    fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
575        match err {
576            crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
577            crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
578        }
579    }
580}
581impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_cluster::UpdateClusterError, R>> for Error
582where
583    R: Send + Sync + std::fmt::Debug + 'static,
584{
585    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_cluster::UpdateClusterError, R>) -> Self {
586        match err {
587            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
588            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
589                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
590                source: err.into(),
591            }),
592        }
593    }
594}
595impl From<crate::operation::update_cluster::UpdateClusterError> for Error {
596    fn from(err: crate::operation::update_cluster::UpdateClusterError) -> Self {
597        match err {
598            crate::operation::update_cluster::UpdateClusterError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
599            crate::operation::update_cluster::UpdateClusterError::ConflictException(inner) => Error::ConflictException(inner),
600            crate::operation::update_cluster::UpdateClusterError::InternalServerException(inner) => Error::InternalServerException(inner),
601            crate::operation::update_cluster::UpdateClusterError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
602            crate::operation::update_cluster::UpdateClusterError::ThrottlingException(inner) => Error::ThrottlingException(inner),
603            crate::operation::update_cluster::UpdateClusterError::ValidationException(inner) => Error::ValidationException(inner),
604            crate::operation::update_cluster::UpdateClusterError::Unhandled(inner) => Error::Unhandled(inner),
605        }
606    }
607}
608impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_compute_node_group::UpdateComputeNodeGroupError, R>>
609    for Error
610where
611    R: Send + Sync + std::fmt::Debug + 'static,
612{
613    fn from(
614        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_compute_node_group::UpdateComputeNodeGroupError, R>,
615    ) -> Self {
616        match err {
617            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
618            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
619                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
620                source: err.into(),
621            }),
622        }
623    }
624}
625impl From<crate::operation::update_compute_node_group::UpdateComputeNodeGroupError> for Error {
626    fn from(err: crate::operation::update_compute_node_group::UpdateComputeNodeGroupError) -> Self {
627        match err {
628            crate::operation::update_compute_node_group::UpdateComputeNodeGroupError::AccessDeniedException(inner) => {
629                Error::AccessDeniedException(inner)
630            }
631            crate::operation::update_compute_node_group::UpdateComputeNodeGroupError::ConflictException(inner) => Error::ConflictException(inner),
632            crate::operation::update_compute_node_group::UpdateComputeNodeGroupError::InternalServerException(inner) => {
633                Error::InternalServerException(inner)
634            }
635            crate::operation::update_compute_node_group::UpdateComputeNodeGroupError::ResourceNotFoundException(inner) => {
636                Error::ResourceNotFoundException(inner)
637            }
638            crate::operation::update_compute_node_group::UpdateComputeNodeGroupError::ServiceQuotaExceededException(inner) => {
639                Error::ServiceQuotaExceededException(inner)
640            }
641            crate::operation::update_compute_node_group::UpdateComputeNodeGroupError::ThrottlingException(inner) => Error::ThrottlingException(inner),
642            crate::operation::update_compute_node_group::UpdateComputeNodeGroupError::ValidationException(inner) => Error::ValidationException(inner),
643            crate::operation::update_compute_node_group::UpdateComputeNodeGroupError::Unhandled(inner) => Error::Unhandled(inner),
644        }
645    }
646}
647impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_queue::UpdateQueueError, R>> for Error
648where
649    R: Send + Sync + std::fmt::Debug + 'static,
650{
651    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_queue::UpdateQueueError, R>) -> Self {
652        match err {
653            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
654            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
655                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
656                source: err.into(),
657            }),
658        }
659    }
660}
661impl From<crate::operation::update_queue::UpdateQueueError> for Error {
662    fn from(err: crate::operation::update_queue::UpdateQueueError) -> Self {
663        match err {
664            crate::operation::update_queue::UpdateQueueError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
665            crate::operation::update_queue::UpdateQueueError::ConflictException(inner) => Error::ConflictException(inner),
666            crate::operation::update_queue::UpdateQueueError::InternalServerException(inner) => Error::InternalServerException(inner),
667            crate::operation::update_queue::UpdateQueueError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
668            crate::operation::update_queue::UpdateQueueError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
669            crate::operation::update_queue::UpdateQueueError::ThrottlingException(inner) => Error::ThrottlingException(inner),
670            crate::operation::update_queue::UpdateQueueError::ValidationException(inner) => Error::ValidationException(inner),
671            crate::operation::update_queue::UpdateQueueError::Unhandled(inner) => Error::Unhandled(inner),
672        }
673    }
674}
675impl ::std::error::Error for Error {
676    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
677        match self {
678            Error::AccessDeniedException(inner) => inner.source(),
679            Error::ConflictException(inner) => inner.source(),
680            Error::InternalServerException(inner) => inner.source(),
681            Error::ResourceNotFoundException(inner) => inner.source(),
682            Error::ServiceQuotaExceededException(inner) => inner.source(),
683            Error::ThrottlingException(inner) => inner.source(),
684            Error::ValidationException(inner) => inner.source(),
685            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
686        }
687    }
688}
689impl ::aws_types::request_id::RequestId for Error {
690    fn request_id(&self) -> Option<&str> {
691        match self {
692            Self::AccessDeniedException(e) => e.request_id(),
693            Self::ConflictException(e) => e.request_id(),
694            Self::InternalServerException(e) => e.request_id(),
695            Self::ResourceNotFoundException(e) => e.request_id(),
696            Self::ServiceQuotaExceededException(e) => e.request_id(),
697            Self::ThrottlingException(e) => e.request_id(),
698            Self::ValidationException(e) => e.request_id(),
699            Self::Unhandled(e) => e.meta.request_id(),
700        }
701    }
702}