1#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6 AccessDeniedException(crate::types::error::AccessDeniedException),
8 ConflictException(crate::types::error::ConflictException),
10 InternalServerException(crate::types::error::InternalServerException),
12 ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
14 ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
16 ThrottlingException(crate::types::error::ThrottlingException),
18 ValidationException(crate::types::error::ValidationException),
20 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
22 variable wildcard pattern and check `.code()`:
23 \
24 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
25 \
26 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
27 Unhandled(crate::error::sealed_unhandled::Unhandled),
28}
29impl ::std::fmt::Display for Error {
30 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
31 match self {
32 Error::AccessDeniedException(inner) => inner.fmt(f),
33 Error::ConflictException(inner) => inner.fmt(f),
34 Error::InternalServerException(inner) => inner.fmt(f),
35 Error::ResourceNotFoundException(inner) => inner.fmt(f),
36 Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
37 Error::ThrottlingException(inner) => inner.fmt(f),
38 Error::ValidationException(inner) => inner.fmt(f),
39 Error::Unhandled(_) => {
40 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
41 write!(f, "unhandled error ({code})")
42 } else {
43 f.write_str("unhandled error")
44 }
45 }
46 }
47 }
48}
49impl From<::aws_smithy_types::error::operation::BuildError> for Error {
50 fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
51 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
52 source: value.into(),
53 meta: ::std::default::Default::default(),
54 })
55 }
56}
57impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
58 fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
59 match self {
60 Self::AccessDeniedException(inner) => inner.meta(),
61 Self::ConflictException(inner) => inner.meta(),
62 Self::InternalServerException(inner) => inner.meta(),
63 Self::ResourceNotFoundException(inner) => inner.meta(),
64 Self::ServiceQuotaExceededException(inner) => inner.meta(),
65 Self::ThrottlingException(inner) => inner.meta(),
66 Self::ValidationException(inner) => inner.meta(),
67 Self::Unhandled(inner) => &inner.meta,
68 }
69 }
70}
71impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_cluster::CreateClusterError, R>> for Error
72where
73 R: Send + Sync + std::fmt::Debug + 'static,
74{
75 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_cluster::CreateClusterError, R>) -> Self {
76 match err {
77 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
78 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
79 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
80 source: err.into(),
81 }),
82 }
83 }
84}
85impl From<crate::operation::create_cluster::CreateClusterError> for Error {
86 fn from(err: crate::operation::create_cluster::CreateClusterError) -> Self {
87 match err {
88 crate::operation::create_cluster::CreateClusterError::ConflictException(inner) => Error::ConflictException(inner),
89 crate::operation::create_cluster::CreateClusterError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
90 crate::operation::create_cluster::CreateClusterError::ValidationException(inner) => Error::ValidationException(inner),
91 crate::operation::create_cluster::CreateClusterError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
92 crate::operation::create_cluster::CreateClusterError::InternalServerException(inner) => Error::InternalServerException(inner),
93 crate::operation::create_cluster::CreateClusterError::ThrottlingException(inner) => Error::ThrottlingException(inner),
94 crate::operation::create_cluster::CreateClusterError::Unhandled(inner) => Error::Unhandled(inner),
95 }
96 }
97}
98impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_multi_region_clusters::CreateMultiRegionClustersError, R>>
99 for Error
100where
101 R: Send + Sync + std::fmt::Debug + 'static,
102{
103 fn from(
104 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_multi_region_clusters::CreateMultiRegionClustersError, R>,
105 ) -> Self {
106 match err {
107 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
108 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
109 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
110 source: err.into(),
111 }),
112 }
113 }
114}
115impl From<crate::operation::create_multi_region_clusters::CreateMultiRegionClustersError> for Error {
116 fn from(err: crate::operation::create_multi_region_clusters::CreateMultiRegionClustersError) -> Self {
117 match err {
118 crate::operation::create_multi_region_clusters::CreateMultiRegionClustersError::ConflictException(inner) => {
119 Error::ConflictException(inner)
120 }
121 crate::operation::create_multi_region_clusters::CreateMultiRegionClustersError::ServiceQuotaExceededException(inner) => {
122 Error::ServiceQuotaExceededException(inner)
123 }
124 crate::operation::create_multi_region_clusters::CreateMultiRegionClustersError::AccessDeniedException(inner) => {
125 Error::AccessDeniedException(inner)
126 }
127 crate::operation::create_multi_region_clusters::CreateMultiRegionClustersError::InternalServerException(inner) => {
128 Error::InternalServerException(inner)
129 }
130 crate::operation::create_multi_region_clusters::CreateMultiRegionClustersError::ThrottlingException(inner) => {
131 Error::ThrottlingException(inner)
132 }
133 crate::operation::create_multi_region_clusters::CreateMultiRegionClustersError::ValidationException(inner) => {
134 Error::ValidationException(inner)
135 }
136 crate::operation::create_multi_region_clusters::CreateMultiRegionClustersError::Unhandled(inner) => Error::Unhandled(inner),
137 }
138 }
139}
140impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_cluster::DeleteClusterError, R>> for Error
141where
142 R: Send + Sync + std::fmt::Debug + 'static,
143{
144 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_cluster::DeleteClusterError, R>) -> Self {
145 match err {
146 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
147 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
148 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
149 source: err.into(),
150 }),
151 }
152 }
153}
154impl From<crate::operation::delete_cluster::DeleteClusterError> for Error {
155 fn from(err: crate::operation::delete_cluster::DeleteClusterError) -> Self {
156 match err {
157 crate::operation::delete_cluster::DeleteClusterError::ConflictException(inner) => Error::ConflictException(inner),
158 crate::operation::delete_cluster::DeleteClusterError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
159 crate::operation::delete_cluster::DeleteClusterError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
160 crate::operation::delete_cluster::DeleteClusterError::InternalServerException(inner) => Error::InternalServerException(inner),
161 crate::operation::delete_cluster::DeleteClusterError::ThrottlingException(inner) => Error::ThrottlingException(inner),
162 crate::operation::delete_cluster::DeleteClusterError::ValidationException(inner) => Error::ValidationException(inner),
163 crate::operation::delete_cluster::DeleteClusterError::Unhandled(inner) => Error::Unhandled(inner),
164 }
165 }
166}
167impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_multi_region_clusters::DeleteMultiRegionClustersError, R>>
168 for Error
169where
170 R: Send + Sync + std::fmt::Debug + 'static,
171{
172 fn from(
173 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_multi_region_clusters::DeleteMultiRegionClustersError, R>,
174 ) -> Self {
175 match err {
176 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
177 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
178 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
179 source: err.into(),
180 }),
181 }
182 }
183}
184impl From<crate::operation::delete_multi_region_clusters::DeleteMultiRegionClustersError> for Error {
185 fn from(err: crate::operation::delete_multi_region_clusters::DeleteMultiRegionClustersError) -> Self {
186 match err {
187 crate::operation::delete_multi_region_clusters::DeleteMultiRegionClustersError::ConflictException(inner) => {
188 Error::ConflictException(inner)
189 }
190 crate::operation::delete_multi_region_clusters::DeleteMultiRegionClustersError::ResourceNotFoundException(inner) => {
191 Error::ResourceNotFoundException(inner)
192 }
193 crate::operation::delete_multi_region_clusters::DeleteMultiRegionClustersError::AccessDeniedException(inner) => {
194 Error::AccessDeniedException(inner)
195 }
196 crate::operation::delete_multi_region_clusters::DeleteMultiRegionClustersError::InternalServerException(inner) => {
197 Error::InternalServerException(inner)
198 }
199 crate::operation::delete_multi_region_clusters::DeleteMultiRegionClustersError::ThrottlingException(inner) => {
200 Error::ThrottlingException(inner)
201 }
202 crate::operation::delete_multi_region_clusters::DeleteMultiRegionClustersError::ValidationException(inner) => {
203 Error::ValidationException(inner)
204 }
205 crate::operation::delete_multi_region_clusters::DeleteMultiRegionClustersError::Unhandled(inner) => Error::Unhandled(inner),
206 }
207 }
208}
209impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_cluster::GetClusterError, R>> for Error
210where
211 R: Send + Sync + std::fmt::Debug + 'static,
212{
213 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_cluster::GetClusterError, R>) -> Self {
214 match err {
215 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
216 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
217 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
218 source: err.into(),
219 }),
220 }
221 }
222}
223impl From<crate::operation::get_cluster::GetClusterError> for Error {
224 fn from(err: crate::operation::get_cluster::GetClusterError) -> Self {
225 match err {
226 crate::operation::get_cluster::GetClusterError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
227 crate::operation::get_cluster::GetClusterError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
228 crate::operation::get_cluster::GetClusterError::InternalServerException(inner) => Error::InternalServerException(inner),
229 crate::operation::get_cluster::GetClusterError::ThrottlingException(inner) => Error::ThrottlingException(inner),
230 crate::operation::get_cluster::GetClusterError::ValidationException(inner) => Error::ValidationException(inner),
231 crate::operation::get_cluster::GetClusterError::Unhandled(inner) => Error::Unhandled(inner),
232 }
233 }
234}
235impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_vpc_endpoint_service_name::GetVpcEndpointServiceNameError, 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::get_vpc_endpoint_service_name::GetVpcEndpointServiceNameError, 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::get_vpc_endpoint_service_name::GetVpcEndpointServiceNameError> for Error {
253 fn from(err: crate::operation::get_vpc_endpoint_service_name::GetVpcEndpointServiceNameError) -> Self {
254 match err {
255 crate::operation::get_vpc_endpoint_service_name::GetVpcEndpointServiceNameError::InternalServerException(inner) => {
256 Error::InternalServerException(inner)
257 }
258 crate::operation::get_vpc_endpoint_service_name::GetVpcEndpointServiceNameError::ResourceNotFoundException(inner) => {
259 Error::ResourceNotFoundException(inner)
260 }
261 crate::operation::get_vpc_endpoint_service_name::GetVpcEndpointServiceNameError::ThrottlingException(inner) => {
262 Error::ThrottlingException(inner)
263 }
264 crate::operation::get_vpc_endpoint_service_name::GetVpcEndpointServiceNameError::ValidationException(inner) => {
265 Error::ValidationException(inner)
266 }
267 crate::operation::get_vpc_endpoint_service_name::GetVpcEndpointServiceNameError::AccessDeniedException(inner) => {
268 Error::AccessDeniedException(inner)
269 }
270 crate::operation::get_vpc_endpoint_service_name::GetVpcEndpointServiceNameError::Unhandled(inner) => Error::Unhandled(inner),
271 }
272 }
273}
274impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_clusters::ListClustersError, R>> for Error
275where
276 R: Send + Sync + std::fmt::Debug + 'static,
277{
278 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_clusters::ListClustersError, R>) -> Self {
279 match err {
280 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
281 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
282 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
283 source: err.into(),
284 }),
285 }
286 }
287}
288impl From<crate::operation::list_clusters::ListClustersError> for Error {
289 fn from(err: crate::operation::list_clusters::ListClustersError) -> Self {
290 match err {
291 crate::operation::list_clusters::ListClustersError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
292 crate::operation::list_clusters::ListClustersError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
293 crate::operation::list_clusters::ListClustersError::InternalServerException(inner) => Error::InternalServerException(inner),
294 crate::operation::list_clusters::ListClustersError::ThrottlingException(inner) => Error::ThrottlingException(inner),
295 crate::operation::list_clusters::ListClustersError::ValidationException(inner) => Error::ValidationException(inner),
296 crate::operation::list_clusters::ListClustersError::Unhandled(inner) => Error::Unhandled(inner),
297 }
298 }
299}
300impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
301where
302 R: Send + Sync + std::fmt::Debug + 'static,
303{
304 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
305 match err {
306 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
307 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
308 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
309 source: err.into(),
310 }),
311 }
312 }
313}
314impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
315 fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
316 match err {
317 crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
318 Error::ResourceNotFoundException(inner)
319 }
320 crate::operation::list_tags_for_resource::ListTagsForResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
321 crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
322 Error::InternalServerException(inner)
323 }
324 crate::operation::list_tags_for_resource::ListTagsForResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
325 crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
326 crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
327 }
328 }
329}
330impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
331where
332 R: Send + Sync + std::fmt::Debug + 'static,
333{
334 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
335 match err {
336 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
337 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
338 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
339 source: err.into(),
340 }),
341 }
342 }
343}
344impl From<crate::operation::tag_resource::TagResourceError> for Error {
345 fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
346 match err {
347 crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
348 crate::operation::tag_resource::TagResourceError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
349 crate::operation::tag_resource::TagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
350 crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
351 crate::operation::tag_resource::TagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
352 crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
353 crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
354 }
355 }
356}
357impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
358where
359 R: Send + Sync + std::fmt::Debug + 'static,
360{
361 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
362 match err {
363 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
364 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
365 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
366 source: err.into(),
367 }),
368 }
369 }
370}
371impl From<crate::operation::untag_resource::UntagResourceError> for Error {
372 fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
373 match err {
374 crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
375 crate::operation::untag_resource::UntagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
376 crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
377 crate::operation::untag_resource::UntagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
378 crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
379 crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
380 }
381 }
382}
383impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_cluster::UpdateClusterError, 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::update_cluster::UpdateClusterError, 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::update_cluster::UpdateClusterError> for Error {
398 fn from(err: crate::operation::update_cluster::UpdateClusterError) -> Self {
399 match err {
400 crate::operation::update_cluster::UpdateClusterError::ConflictException(inner) => Error::ConflictException(inner),
401 crate::operation::update_cluster::UpdateClusterError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
402 crate::operation::update_cluster::UpdateClusterError::ValidationException(inner) => Error::ValidationException(inner),
403 crate::operation::update_cluster::UpdateClusterError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
404 crate::operation::update_cluster::UpdateClusterError::InternalServerException(inner) => Error::InternalServerException(inner),
405 crate::operation::update_cluster::UpdateClusterError::ThrottlingException(inner) => Error::ThrottlingException(inner),
406 crate::operation::update_cluster::UpdateClusterError::Unhandled(inner) => Error::Unhandled(inner),
407 }
408 }
409}
410impl<O, E> ::std::convert::From<::aws_smithy_runtime_api::client::waiters::error::WaiterError<O, E>> for Error
411where
412 O: ::std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
413 E: ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static,
414{
415 fn from(err: ::aws_smithy_runtime_api::client::waiters::error::WaiterError<O, E>) -> Self {
416 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
417 meta: ::std::default::Default::default(),
418 source: err.into(),
419 })
420 }
421}
422impl ::std::error::Error for Error {
423 fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
424 match self {
425 Error::AccessDeniedException(inner) => inner.source(),
426 Error::ConflictException(inner) => inner.source(),
427 Error::InternalServerException(inner) => inner.source(),
428 Error::ResourceNotFoundException(inner) => inner.source(),
429 Error::ServiceQuotaExceededException(inner) => inner.source(),
430 Error::ThrottlingException(inner) => inner.source(),
431 Error::ValidationException(inner) => inner.source(),
432 Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
433 }
434 }
435}
436impl ::aws_types::request_id::RequestId for Error {
437 fn request_id(&self) -> Option<&str> {
438 match self {
439 Self::AccessDeniedException(e) => e.request_id(),
440 Self::ConflictException(e) => e.request_id(),
441 Self::InternalServerException(e) => e.request_id(),
442 Self::ResourceNotFoundException(e) => e.request_id(),
443 Self::ServiceQuotaExceededException(e) => e.request_id(),
444 Self::ThrottlingException(e) => e.request_id(),
445 Self::ValidationException(e) => e.request_id(),
446 Self::Unhandled(e) => e.meta.request_id(),
447 }
448 }
449}