1#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6 AnalysisNotFoundException(crate::types::error::AnalysisNotFoundException),
8 BackfillLimitExceededException(crate::types::error::BackfillLimitExceededException),
10 BillExpirationException(crate::types::error::BillExpirationException),
12 BillingViewHealthStatusException(crate::types::error::BillingViewHealthStatusException),
14 DataUnavailableException(crate::types::error::DataUnavailableException),
16 GenerationExistsException(crate::types::error::GenerationExistsException),
18 InvalidNextTokenException(crate::types::error::InvalidNextTokenException),
20 LimitExceededException(crate::types::error::LimitExceededException),
22 RequestChangedException(crate::types::error::RequestChangedException),
24 ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
26 ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
28 TooManyTagsException(crate::types::error::TooManyTagsException),
30 UnknownMonitorException(crate::types::error::UnknownMonitorException),
32 UnknownSubscriptionException(crate::types::error::UnknownSubscriptionException),
34 UnresolvableUsageUnitException(crate::types::error::UnresolvableUsageUnitException),
36 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
38 variable wildcard pattern and check `.code()`:
39 \
40 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
41 \
42 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
43 Unhandled(crate::error::sealed_unhandled::Unhandled),
44}
45impl ::std::fmt::Display for Error {
46 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
47 match self {
48 Error::AnalysisNotFoundException(inner) => inner.fmt(f),
49 Error::BackfillLimitExceededException(inner) => inner.fmt(f),
50 Error::BillExpirationException(inner) => inner.fmt(f),
51 Error::BillingViewHealthStatusException(inner) => inner.fmt(f),
52 Error::DataUnavailableException(inner) => inner.fmt(f),
53 Error::GenerationExistsException(inner) => inner.fmt(f),
54 Error::InvalidNextTokenException(inner) => inner.fmt(f),
55 Error::LimitExceededException(inner) => inner.fmt(f),
56 Error::RequestChangedException(inner) => inner.fmt(f),
57 Error::ResourceNotFoundException(inner) => inner.fmt(f),
58 Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
59 Error::TooManyTagsException(inner) => inner.fmt(f),
60 Error::UnknownMonitorException(inner) => inner.fmt(f),
61 Error::UnknownSubscriptionException(inner) => inner.fmt(f),
62 Error::UnresolvableUsageUnitException(inner) => inner.fmt(f),
63 Error::Unhandled(_) => {
64 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
65 write!(f, "unhandled error ({code})")
66 } else {
67 f.write_str("unhandled error")
68 }
69 }
70 }
71 }
72}
73impl From<::aws_smithy_types::error::operation::BuildError> for Error {
74 fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
75 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
76 source: value.into(),
77 meta: ::std::default::Default::default(),
78 })
79 }
80}
81impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
82 fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
83 match self {
84 Self::AnalysisNotFoundException(inner) => inner.meta(),
85 Self::BackfillLimitExceededException(inner) => inner.meta(),
86 Self::BillExpirationException(inner) => inner.meta(),
87 Self::BillingViewHealthStatusException(inner) => inner.meta(),
88 Self::DataUnavailableException(inner) => inner.meta(),
89 Self::GenerationExistsException(inner) => inner.meta(),
90 Self::InvalidNextTokenException(inner) => inner.meta(),
91 Self::LimitExceededException(inner) => inner.meta(),
92 Self::RequestChangedException(inner) => inner.meta(),
93 Self::ResourceNotFoundException(inner) => inner.meta(),
94 Self::ServiceQuotaExceededException(inner) => inner.meta(),
95 Self::TooManyTagsException(inner) => inner.meta(),
96 Self::UnknownMonitorException(inner) => inner.meta(),
97 Self::UnknownSubscriptionException(inner) => inner.meta(),
98 Self::UnresolvableUsageUnitException(inner) => inner.meta(),
99 Self::Unhandled(inner) => &inner.meta,
100 }
101 }
102}
103impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_anomaly_monitor::CreateAnomalyMonitorError, R>> for Error
104where
105 R: Send + Sync + std::fmt::Debug + 'static,
106{
107 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_anomaly_monitor::CreateAnomalyMonitorError, R>) -> Self {
108 match err {
109 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
110 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
111 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
112 source: err.into(),
113 }),
114 }
115 }
116}
117impl From<crate::operation::create_anomaly_monitor::CreateAnomalyMonitorError> for Error {
118 fn from(err: crate::operation::create_anomaly_monitor::CreateAnomalyMonitorError) -> Self {
119 match err {
120 crate::operation::create_anomaly_monitor::CreateAnomalyMonitorError::LimitExceededException(inner) => {
121 Error::LimitExceededException(inner)
122 }
123 crate::operation::create_anomaly_monitor::CreateAnomalyMonitorError::Unhandled(inner) => Error::Unhandled(inner),
124 }
125 }
126}
127impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_anomaly_subscription::CreateAnomalySubscriptionError, R>>
128 for Error
129where
130 R: Send + Sync + std::fmt::Debug + 'static,
131{
132 fn from(
133 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_anomaly_subscription::CreateAnomalySubscriptionError, R>,
134 ) -> Self {
135 match err {
136 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
137 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
138 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
139 source: err.into(),
140 }),
141 }
142 }
143}
144impl From<crate::operation::create_anomaly_subscription::CreateAnomalySubscriptionError> for Error {
145 fn from(err: crate::operation::create_anomaly_subscription::CreateAnomalySubscriptionError) -> Self {
146 match err {
147 crate::operation::create_anomaly_subscription::CreateAnomalySubscriptionError::LimitExceededException(inner) => {
148 Error::LimitExceededException(inner)
149 }
150 crate::operation::create_anomaly_subscription::CreateAnomalySubscriptionError::UnknownMonitorException(inner) => {
151 Error::UnknownMonitorException(inner)
152 }
153 crate::operation::create_anomaly_subscription::CreateAnomalySubscriptionError::Unhandled(inner) => Error::Unhandled(inner),
154 }
155 }
156}
157impl<R>
158 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_cost_category_definition::CreateCostCategoryDefinitionError, R>>
159 for Error
160where
161 R: Send + Sync + std::fmt::Debug + 'static,
162{
163 fn from(
164 err: ::aws_smithy_runtime_api::client::result::SdkError<
165 crate::operation::create_cost_category_definition::CreateCostCategoryDefinitionError,
166 R,
167 >,
168 ) -> Self {
169 match err {
170 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
171 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
172 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
173 source: err.into(),
174 }),
175 }
176 }
177}
178impl From<crate::operation::create_cost_category_definition::CreateCostCategoryDefinitionError> for Error {
179 fn from(err: crate::operation::create_cost_category_definition::CreateCostCategoryDefinitionError) -> Self {
180 match err {
181 crate::operation::create_cost_category_definition::CreateCostCategoryDefinitionError::LimitExceededException(inner) => {
182 Error::LimitExceededException(inner)
183 }
184 crate::operation::create_cost_category_definition::CreateCostCategoryDefinitionError::ServiceQuotaExceededException(inner) => {
185 Error::ServiceQuotaExceededException(inner)
186 }
187 crate::operation::create_cost_category_definition::CreateCostCategoryDefinitionError::Unhandled(inner) => Error::Unhandled(inner),
188 }
189 }
190}
191impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_anomaly_monitor::DeleteAnomalyMonitorError, R>> for Error
192where
193 R: Send + Sync + std::fmt::Debug + 'static,
194{
195 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_anomaly_monitor::DeleteAnomalyMonitorError, R>) -> Self {
196 match err {
197 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
198 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
199 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
200 source: err.into(),
201 }),
202 }
203 }
204}
205impl From<crate::operation::delete_anomaly_monitor::DeleteAnomalyMonitorError> for Error {
206 fn from(err: crate::operation::delete_anomaly_monitor::DeleteAnomalyMonitorError) -> Self {
207 match err {
208 crate::operation::delete_anomaly_monitor::DeleteAnomalyMonitorError::LimitExceededException(inner) => {
209 Error::LimitExceededException(inner)
210 }
211 crate::operation::delete_anomaly_monitor::DeleteAnomalyMonitorError::UnknownMonitorException(inner) => {
212 Error::UnknownMonitorException(inner)
213 }
214 crate::operation::delete_anomaly_monitor::DeleteAnomalyMonitorError::Unhandled(inner) => Error::Unhandled(inner),
215 }
216 }
217}
218impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_anomaly_subscription::DeleteAnomalySubscriptionError, R>>
219 for Error
220where
221 R: Send + Sync + std::fmt::Debug + 'static,
222{
223 fn from(
224 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_anomaly_subscription::DeleteAnomalySubscriptionError, R>,
225 ) -> Self {
226 match err {
227 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
228 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
229 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
230 source: err.into(),
231 }),
232 }
233 }
234}
235impl From<crate::operation::delete_anomaly_subscription::DeleteAnomalySubscriptionError> for Error {
236 fn from(err: crate::operation::delete_anomaly_subscription::DeleteAnomalySubscriptionError) -> Self {
237 match err {
238 crate::operation::delete_anomaly_subscription::DeleteAnomalySubscriptionError::LimitExceededException(inner) => {
239 Error::LimitExceededException(inner)
240 }
241 crate::operation::delete_anomaly_subscription::DeleteAnomalySubscriptionError::UnknownSubscriptionException(inner) => {
242 Error::UnknownSubscriptionException(inner)
243 }
244 crate::operation::delete_anomaly_subscription::DeleteAnomalySubscriptionError::Unhandled(inner) => Error::Unhandled(inner),
245 }
246 }
247}
248impl<R>
249 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_cost_category_definition::DeleteCostCategoryDefinitionError, R>>
250 for Error
251where
252 R: Send + Sync + std::fmt::Debug + 'static,
253{
254 fn from(
255 err: ::aws_smithy_runtime_api::client::result::SdkError<
256 crate::operation::delete_cost_category_definition::DeleteCostCategoryDefinitionError,
257 R,
258 >,
259 ) -> Self {
260 match err {
261 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
262 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
263 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
264 source: err.into(),
265 }),
266 }
267 }
268}
269impl From<crate::operation::delete_cost_category_definition::DeleteCostCategoryDefinitionError> for Error {
270 fn from(err: crate::operation::delete_cost_category_definition::DeleteCostCategoryDefinitionError) -> Self {
271 match err {
272 crate::operation::delete_cost_category_definition::DeleteCostCategoryDefinitionError::LimitExceededException(inner) => {
273 Error::LimitExceededException(inner)
274 }
275 crate::operation::delete_cost_category_definition::DeleteCostCategoryDefinitionError::ResourceNotFoundException(inner) => {
276 Error::ResourceNotFoundException(inner)
277 }
278 crate::operation::delete_cost_category_definition::DeleteCostCategoryDefinitionError::Unhandled(inner) => Error::Unhandled(inner),
279 }
280 }
281}
282impl<R>
283 From<
284 ::aws_smithy_runtime_api::client::result::SdkError<
285 crate::operation::describe_cost_category_definition::DescribeCostCategoryDefinitionError,
286 R,
287 >,
288 > for Error
289where
290 R: Send + Sync + std::fmt::Debug + 'static,
291{
292 fn from(
293 err: ::aws_smithy_runtime_api::client::result::SdkError<
294 crate::operation::describe_cost_category_definition::DescribeCostCategoryDefinitionError,
295 R,
296 >,
297 ) -> Self {
298 match err {
299 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
300 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
301 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
302 source: err.into(),
303 }),
304 }
305 }
306}
307impl From<crate::operation::describe_cost_category_definition::DescribeCostCategoryDefinitionError> for Error {
308 fn from(err: crate::operation::describe_cost_category_definition::DescribeCostCategoryDefinitionError) -> Self {
309 match err {
310 crate::operation::describe_cost_category_definition::DescribeCostCategoryDefinitionError::LimitExceededException(inner) => {
311 Error::LimitExceededException(inner)
312 }
313 crate::operation::describe_cost_category_definition::DescribeCostCategoryDefinitionError::ResourceNotFoundException(inner) => {
314 Error::ResourceNotFoundException(inner)
315 }
316 crate::operation::describe_cost_category_definition::DescribeCostCategoryDefinitionError::Unhandled(inner) => Error::Unhandled(inner),
317 }
318 }
319}
320impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_anomalies::GetAnomaliesError, R>> for Error
321where
322 R: Send + Sync + std::fmt::Debug + 'static,
323{
324 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_anomalies::GetAnomaliesError, R>) -> Self {
325 match err {
326 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
327 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
328 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
329 source: err.into(),
330 }),
331 }
332 }
333}
334impl From<crate::operation::get_anomalies::GetAnomaliesError> for Error {
335 fn from(err: crate::operation::get_anomalies::GetAnomaliesError) -> Self {
336 match err {
337 crate::operation::get_anomalies::GetAnomaliesError::InvalidNextTokenException(inner) => Error::InvalidNextTokenException(inner),
338 crate::operation::get_anomalies::GetAnomaliesError::LimitExceededException(inner) => Error::LimitExceededException(inner),
339 crate::operation::get_anomalies::GetAnomaliesError::Unhandled(inner) => Error::Unhandled(inner),
340 }
341 }
342}
343impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_anomaly_monitors::GetAnomalyMonitorsError, R>> for Error
344where
345 R: Send + Sync + std::fmt::Debug + 'static,
346{
347 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_anomaly_monitors::GetAnomalyMonitorsError, R>) -> Self {
348 match err {
349 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
350 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
351 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
352 source: err.into(),
353 }),
354 }
355 }
356}
357impl From<crate::operation::get_anomaly_monitors::GetAnomalyMonitorsError> for Error {
358 fn from(err: crate::operation::get_anomaly_monitors::GetAnomalyMonitorsError) -> Self {
359 match err {
360 crate::operation::get_anomaly_monitors::GetAnomalyMonitorsError::InvalidNextTokenException(inner) => {
361 Error::InvalidNextTokenException(inner)
362 }
363 crate::operation::get_anomaly_monitors::GetAnomalyMonitorsError::LimitExceededException(inner) => Error::LimitExceededException(inner),
364 crate::operation::get_anomaly_monitors::GetAnomalyMonitorsError::UnknownMonitorException(inner) => Error::UnknownMonitorException(inner),
365 crate::operation::get_anomaly_monitors::GetAnomalyMonitorsError::Unhandled(inner) => Error::Unhandled(inner),
366 }
367 }
368}
369impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_anomaly_subscriptions::GetAnomalySubscriptionsError, R>>
370 for Error
371where
372 R: Send + Sync + std::fmt::Debug + 'static,
373{
374 fn from(
375 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_anomaly_subscriptions::GetAnomalySubscriptionsError, R>,
376 ) -> Self {
377 match err {
378 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
379 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
380 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
381 source: err.into(),
382 }),
383 }
384 }
385}
386impl From<crate::operation::get_anomaly_subscriptions::GetAnomalySubscriptionsError> for Error {
387 fn from(err: crate::operation::get_anomaly_subscriptions::GetAnomalySubscriptionsError) -> Self {
388 match err {
389 crate::operation::get_anomaly_subscriptions::GetAnomalySubscriptionsError::InvalidNextTokenException(inner) => {
390 Error::InvalidNextTokenException(inner)
391 }
392 crate::operation::get_anomaly_subscriptions::GetAnomalySubscriptionsError::LimitExceededException(inner) => {
393 Error::LimitExceededException(inner)
394 }
395 crate::operation::get_anomaly_subscriptions::GetAnomalySubscriptionsError::UnknownSubscriptionException(inner) => {
396 Error::UnknownSubscriptionException(inner)
397 }
398 crate::operation::get_anomaly_subscriptions::GetAnomalySubscriptionsError::Unhandled(inner) => Error::Unhandled(inner),
399 }
400 }
401}
402impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_approximate_usage_records::GetApproximateUsageRecordsError, R>>
403 for Error
404where
405 R: Send + Sync + std::fmt::Debug + 'static,
406{
407 fn from(
408 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_approximate_usage_records::GetApproximateUsageRecordsError, R>,
409 ) -> Self {
410 match err {
411 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
412 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
413 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
414 source: err.into(),
415 }),
416 }
417 }
418}
419impl From<crate::operation::get_approximate_usage_records::GetApproximateUsageRecordsError> for Error {
420 fn from(err: crate::operation::get_approximate_usage_records::GetApproximateUsageRecordsError) -> Self {
421 match err {
422 crate::operation::get_approximate_usage_records::GetApproximateUsageRecordsError::DataUnavailableException(inner) => {
423 Error::DataUnavailableException(inner)
424 }
425 crate::operation::get_approximate_usage_records::GetApproximateUsageRecordsError::LimitExceededException(inner) => {
426 Error::LimitExceededException(inner)
427 }
428 crate::operation::get_approximate_usage_records::GetApproximateUsageRecordsError::Unhandled(inner) => Error::Unhandled(inner),
429 }
430 }
431}
432impl<R>
433 From<
434 ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_commitment_purchase_analysis::GetCommitmentPurchaseAnalysisError, R>,
435 > for Error
436where
437 R: Send + Sync + std::fmt::Debug + 'static,
438{
439 fn from(
440 err: ::aws_smithy_runtime_api::client::result::SdkError<
441 crate::operation::get_commitment_purchase_analysis::GetCommitmentPurchaseAnalysisError,
442 R,
443 >,
444 ) -> Self {
445 match err {
446 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
447 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
448 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
449 source: err.into(),
450 }),
451 }
452 }
453}
454impl From<crate::operation::get_commitment_purchase_analysis::GetCommitmentPurchaseAnalysisError> for Error {
455 fn from(err: crate::operation::get_commitment_purchase_analysis::GetCommitmentPurchaseAnalysisError) -> Self {
456 match err {
457 crate::operation::get_commitment_purchase_analysis::GetCommitmentPurchaseAnalysisError::AnalysisNotFoundException(inner) => {
458 Error::AnalysisNotFoundException(inner)
459 }
460 crate::operation::get_commitment_purchase_analysis::GetCommitmentPurchaseAnalysisError::DataUnavailableException(inner) => {
461 Error::DataUnavailableException(inner)
462 }
463 crate::operation::get_commitment_purchase_analysis::GetCommitmentPurchaseAnalysisError::LimitExceededException(inner) => {
464 Error::LimitExceededException(inner)
465 }
466 crate::operation::get_commitment_purchase_analysis::GetCommitmentPurchaseAnalysisError::Unhandled(inner) => Error::Unhandled(inner),
467 }
468 }
469}
470impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_cost_and_usage::GetCostAndUsageError, R>> for Error
471where
472 R: Send + Sync + std::fmt::Debug + 'static,
473{
474 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_cost_and_usage::GetCostAndUsageError, R>) -> Self {
475 match err {
476 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
477 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
478 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
479 source: err.into(),
480 }),
481 }
482 }
483}
484impl From<crate::operation::get_cost_and_usage::GetCostAndUsageError> for Error {
485 fn from(err: crate::operation::get_cost_and_usage::GetCostAndUsageError) -> Self {
486 match err {
487 crate::operation::get_cost_and_usage::GetCostAndUsageError::BillExpirationException(inner) => Error::BillExpirationException(inner),
488 crate::operation::get_cost_and_usage::GetCostAndUsageError::BillingViewHealthStatusException(inner) => {
489 Error::BillingViewHealthStatusException(inner)
490 }
491 crate::operation::get_cost_and_usage::GetCostAndUsageError::DataUnavailableException(inner) => Error::DataUnavailableException(inner),
492 crate::operation::get_cost_and_usage::GetCostAndUsageError::InvalidNextTokenException(inner) => Error::InvalidNextTokenException(inner),
493 crate::operation::get_cost_and_usage::GetCostAndUsageError::LimitExceededException(inner) => Error::LimitExceededException(inner),
494 crate::operation::get_cost_and_usage::GetCostAndUsageError::RequestChangedException(inner) => Error::RequestChangedException(inner),
495 crate::operation::get_cost_and_usage::GetCostAndUsageError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
496 crate::operation::get_cost_and_usage::GetCostAndUsageError::Unhandled(inner) => Error::Unhandled(inner),
497 }
498 }
499}
500impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_cost_and_usage_comparisons::GetCostAndUsageComparisonsError, R>>
501 for Error
502where
503 R: Send + Sync + std::fmt::Debug + 'static,
504{
505 fn from(
506 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_cost_and_usage_comparisons::GetCostAndUsageComparisonsError, R>,
507 ) -> Self {
508 match err {
509 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
510 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
511 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
512 source: err.into(),
513 }),
514 }
515 }
516}
517impl From<crate::operation::get_cost_and_usage_comparisons::GetCostAndUsageComparisonsError> for Error {
518 fn from(err: crate::operation::get_cost_and_usage_comparisons::GetCostAndUsageComparisonsError) -> Self {
519 match err {
520 crate::operation::get_cost_and_usage_comparisons::GetCostAndUsageComparisonsError::BillingViewHealthStatusException(inner) => {
521 Error::BillingViewHealthStatusException(inner)
522 }
523 crate::operation::get_cost_and_usage_comparisons::GetCostAndUsageComparisonsError::DataUnavailableException(inner) => {
524 Error::DataUnavailableException(inner)
525 }
526 crate::operation::get_cost_and_usage_comparisons::GetCostAndUsageComparisonsError::InvalidNextTokenException(inner) => {
527 Error::InvalidNextTokenException(inner)
528 }
529 crate::operation::get_cost_and_usage_comparisons::GetCostAndUsageComparisonsError::LimitExceededException(inner) => {
530 Error::LimitExceededException(inner)
531 }
532 crate::operation::get_cost_and_usage_comparisons::GetCostAndUsageComparisonsError::ResourceNotFoundException(inner) => {
533 Error::ResourceNotFoundException(inner)
534 }
535 crate::operation::get_cost_and_usage_comparisons::GetCostAndUsageComparisonsError::Unhandled(inner) => Error::Unhandled(inner),
536 }
537 }
538}
539impl<R>
540 From<
541 ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_cost_and_usage_with_resources::GetCostAndUsageWithResourcesError, R>,
542 > for Error
543where
544 R: Send + Sync + std::fmt::Debug + 'static,
545{
546 fn from(
547 err: ::aws_smithy_runtime_api::client::result::SdkError<
548 crate::operation::get_cost_and_usage_with_resources::GetCostAndUsageWithResourcesError,
549 R,
550 >,
551 ) -> Self {
552 match err {
553 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
554 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
555 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
556 source: err.into(),
557 }),
558 }
559 }
560}
561impl From<crate::operation::get_cost_and_usage_with_resources::GetCostAndUsageWithResourcesError> for Error {
562 fn from(err: crate::operation::get_cost_and_usage_with_resources::GetCostAndUsageWithResourcesError) -> Self {
563 match err {
564 crate::operation::get_cost_and_usage_with_resources::GetCostAndUsageWithResourcesError::BillExpirationException(inner) => {
565 Error::BillExpirationException(inner)
566 }
567 crate::operation::get_cost_and_usage_with_resources::GetCostAndUsageWithResourcesError::BillingViewHealthStatusException(inner) => {
568 Error::BillingViewHealthStatusException(inner)
569 }
570 crate::operation::get_cost_and_usage_with_resources::GetCostAndUsageWithResourcesError::DataUnavailableException(inner) => {
571 Error::DataUnavailableException(inner)
572 }
573 crate::operation::get_cost_and_usage_with_resources::GetCostAndUsageWithResourcesError::InvalidNextTokenException(inner) => {
574 Error::InvalidNextTokenException(inner)
575 }
576 crate::operation::get_cost_and_usage_with_resources::GetCostAndUsageWithResourcesError::LimitExceededException(inner) => {
577 Error::LimitExceededException(inner)
578 }
579 crate::operation::get_cost_and_usage_with_resources::GetCostAndUsageWithResourcesError::RequestChangedException(inner) => {
580 Error::RequestChangedException(inner)
581 }
582 crate::operation::get_cost_and_usage_with_resources::GetCostAndUsageWithResourcesError::ResourceNotFoundException(inner) => {
583 Error::ResourceNotFoundException(inner)
584 }
585 crate::operation::get_cost_and_usage_with_resources::GetCostAndUsageWithResourcesError::Unhandled(inner) => Error::Unhandled(inner),
586 }
587 }
588}
589impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_cost_categories::GetCostCategoriesError, R>> for Error
590where
591 R: Send + Sync + std::fmt::Debug + 'static,
592{
593 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_cost_categories::GetCostCategoriesError, R>) -> Self {
594 match err {
595 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
596 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
597 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
598 source: err.into(),
599 }),
600 }
601 }
602}
603impl From<crate::operation::get_cost_categories::GetCostCategoriesError> for Error {
604 fn from(err: crate::operation::get_cost_categories::GetCostCategoriesError) -> Self {
605 match err {
606 crate::operation::get_cost_categories::GetCostCategoriesError::BillExpirationException(inner) => Error::BillExpirationException(inner),
607 crate::operation::get_cost_categories::GetCostCategoriesError::BillingViewHealthStatusException(inner) => {
608 Error::BillingViewHealthStatusException(inner)
609 }
610 crate::operation::get_cost_categories::GetCostCategoriesError::DataUnavailableException(inner) => Error::DataUnavailableException(inner),
611 crate::operation::get_cost_categories::GetCostCategoriesError::InvalidNextTokenException(inner) => {
612 Error::InvalidNextTokenException(inner)
613 }
614 crate::operation::get_cost_categories::GetCostCategoriesError::LimitExceededException(inner) => Error::LimitExceededException(inner),
615 crate::operation::get_cost_categories::GetCostCategoriesError::RequestChangedException(inner) => Error::RequestChangedException(inner),
616 crate::operation::get_cost_categories::GetCostCategoriesError::ResourceNotFoundException(inner) => {
617 Error::ResourceNotFoundException(inner)
618 }
619 crate::operation::get_cost_categories::GetCostCategoriesError::Unhandled(inner) => Error::Unhandled(inner),
620 }
621 }
622}
623impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_cost_comparison_drivers::GetCostComparisonDriversError, R>>
624 for Error
625where
626 R: Send + Sync + std::fmt::Debug + 'static,
627{
628 fn from(
629 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_cost_comparison_drivers::GetCostComparisonDriversError, R>,
630 ) -> Self {
631 match err {
632 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
633 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
634 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
635 source: err.into(),
636 }),
637 }
638 }
639}
640impl From<crate::operation::get_cost_comparison_drivers::GetCostComparisonDriversError> for Error {
641 fn from(err: crate::operation::get_cost_comparison_drivers::GetCostComparisonDriversError) -> Self {
642 match err {
643 crate::operation::get_cost_comparison_drivers::GetCostComparisonDriversError::BillingViewHealthStatusException(inner) => {
644 Error::BillingViewHealthStatusException(inner)
645 }
646 crate::operation::get_cost_comparison_drivers::GetCostComparisonDriversError::DataUnavailableException(inner) => {
647 Error::DataUnavailableException(inner)
648 }
649 crate::operation::get_cost_comparison_drivers::GetCostComparisonDriversError::InvalidNextTokenException(inner) => {
650 Error::InvalidNextTokenException(inner)
651 }
652 crate::operation::get_cost_comparison_drivers::GetCostComparisonDriversError::LimitExceededException(inner) => {
653 Error::LimitExceededException(inner)
654 }
655 crate::operation::get_cost_comparison_drivers::GetCostComparisonDriversError::ResourceNotFoundException(inner) => {
656 Error::ResourceNotFoundException(inner)
657 }
658 crate::operation::get_cost_comparison_drivers::GetCostComparisonDriversError::Unhandled(inner) => Error::Unhandled(inner),
659 }
660 }
661}
662impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_cost_forecast::GetCostForecastError, R>> for Error
663where
664 R: Send + Sync + std::fmt::Debug + 'static,
665{
666 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_cost_forecast::GetCostForecastError, R>) -> Self {
667 match err {
668 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
669 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
670 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
671 source: err.into(),
672 }),
673 }
674 }
675}
676impl From<crate::operation::get_cost_forecast::GetCostForecastError> for Error {
677 fn from(err: crate::operation::get_cost_forecast::GetCostForecastError) -> Self {
678 match err {
679 crate::operation::get_cost_forecast::GetCostForecastError::BillingViewHealthStatusException(inner) => {
680 Error::BillingViewHealthStatusException(inner)
681 }
682 crate::operation::get_cost_forecast::GetCostForecastError::DataUnavailableException(inner) => Error::DataUnavailableException(inner),
683 crate::operation::get_cost_forecast::GetCostForecastError::LimitExceededException(inner) => Error::LimitExceededException(inner),
684 crate::operation::get_cost_forecast::GetCostForecastError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
685 crate::operation::get_cost_forecast::GetCostForecastError::Unhandled(inner) => Error::Unhandled(inner),
686 }
687 }
688}
689impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_dimension_values::GetDimensionValuesError, R>> for Error
690where
691 R: Send + Sync + std::fmt::Debug + 'static,
692{
693 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_dimension_values::GetDimensionValuesError, R>) -> Self {
694 match err {
695 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
696 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
697 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
698 source: err.into(),
699 }),
700 }
701 }
702}
703impl From<crate::operation::get_dimension_values::GetDimensionValuesError> for Error {
704 fn from(err: crate::operation::get_dimension_values::GetDimensionValuesError) -> Self {
705 match err {
706 crate::operation::get_dimension_values::GetDimensionValuesError::BillExpirationException(inner) => Error::BillExpirationException(inner),
707 crate::operation::get_dimension_values::GetDimensionValuesError::BillingViewHealthStatusException(inner) => {
708 Error::BillingViewHealthStatusException(inner)
709 }
710 crate::operation::get_dimension_values::GetDimensionValuesError::DataUnavailableException(inner) => {
711 Error::DataUnavailableException(inner)
712 }
713 crate::operation::get_dimension_values::GetDimensionValuesError::InvalidNextTokenException(inner) => {
714 Error::InvalidNextTokenException(inner)
715 }
716 crate::operation::get_dimension_values::GetDimensionValuesError::LimitExceededException(inner) => Error::LimitExceededException(inner),
717 crate::operation::get_dimension_values::GetDimensionValuesError::RequestChangedException(inner) => Error::RequestChangedException(inner),
718 crate::operation::get_dimension_values::GetDimensionValuesError::ResourceNotFoundException(inner) => {
719 Error::ResourceNotFoundException(inner)
720 }
721 crate::operation::get_dimension_values::GetDimensionValuesError::Unhandled(inner) => Error::Unhandled(inner),
722 }
723 }
724}
725impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_reservation_coverage::GetReservationCoverageError, R>> for Error
726where
727 R: Send + Sync + std::fmt::Debug + 'static,
728{
729 fn from(
730 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_reservation_coverage::GetReservationCoverageError, R>,
731 ) -> Self {
732 match err {
733 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
734 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
735 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
736 source: err.into(),
737 }),
738 }
739 }
740}
741impl From<crate::operation::get_reservation_coverage::GetReservationCoverageError> for Error {
742 fn from(err: crate::operation::get_reservation_coverage::GetReservationCoverageError) -> Self {
743 match err {
744 crate::operation::get_reservation_coverage::GetReservationCoverageError::DataUnavailableException(inner) => {
745 Error::DataUnavailableException(inner)
746 }
747 crate::operation::get_reservation_coverage::GetReservationCoverageError::InvalidNextTokenException(inner) => {
748 Error::InvalidNextTokenException(inner)
749 }
750 crate::operation::get_reservation_coverage::GetReservationCoverageError::LimitExceededException(inner) => {
751 Error::LimitExceededException(inner)
752 }
753 crate::operation::get_reservation_coverage::GetReservationCoverageError::Unhandled(inner) => Error::Unhandled(inner),
754 }
755 }
756}
757impl<R>
758 From<
759 ::aws_smithy_runtime_api::client::result::SdkError<
760 crate::operation::get_reservation_purchase_recommendation::GetReservationPurchaseRecommendationError,
761 R,
762 >,
763 > for Error
764where
765 R: Send + Sync + std::fmt::Debug + 'static,
766{
767 fn from(
768 err: ::aws_smithy_runtime_api::client::result::SdkError<
769 crate::operation::get_reservation_purchase_recommendation::GetReservationPurchaseRecommendationError,
770 R,
771 >,
772 ) -> Self {
773 match err {
774 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
775 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
776 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
777 source: err.into(),
778 }),
779 }
780 }
781}
782impl From<crate::operation::get_reservation_purchase_recommendation::GetReservationPurchaseRecommendationError> for Error {
783 fn from(err: crate::operation::get_reservation_purchase_recommendation::GetReservationPurchaseRecommendationError) -> Self {
784 match err {
785 crate::operation::get_reservation_purchase_recommendation::GetReservationPurchaseRecommendationError::DataUnavailableException(inner) => {
786 Error::DataUnavailableException(inner)
787 }
788 crate::operation::get_reservation_purchase_recommendation::GetReservationPurchaseRecommendationError::InvalidNextTokenException(
789 inner,
790 ) => Error::InvalidNextTokenException(inner),
791 crate::operation::get_reservation_purchase_recommendation::GetReservationPurchaseRecommendationError::LimitExceededException(inner) => {
792 Error::LimitExceededException(inner)
793 }
794 crate::operation::get_reservation_purchase_recommendation::GetReservationPurchaseRecommendationError::Unhandled(inner) => {
795 Error::Unhandled(inner)
796 }
797 }
798 }
799}
800impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_reservation_utilization::GetReservationUtilizationError, R>>
801 for Error
802where
803 R: Send + Sync + std::fmt::Debug + 'static,
804{
805 fn from(
806 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_reservation_utilization::GetReservationUtilizationError, R>,
807 ) -> Self {
808 match err {
809 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
810 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
811 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
812 source: err.into(),
813 }),
814 }
815 }
816}
817impl From<crate::operation::get_reservation_utilization::GetReservationUtilizationError> for Error {
818 fn from(err: crate::operation::get_reservation_utilization::GetReservationUtilizationError) -> Self {
819 match err {
820 crate::operation::get_reservation_utilization::GetReservationUtilizationError::DataUnavailableException(inner) => {
821 Error::DataUnavailableException(inner)
822 }
823 crate::operation::get_reservation_utilization::GetReservationUtilizationError::InvalidNextTokenException(inner) => {
824 Error::InvalidNextTokenException(inner)
825 }
826 crate::operation::get_reservation_utilization::GetReservationUtilizationError::LimitExceededException(inner) => {
827 Error::LimitExceededException(inner)
828 }
829 crate::operation::get_reservation_utilization::GetReservationUtilizationError::Unhandled(inner) => Error::Unhandled(inner),
830 }
831 }
832}
833impl<R>
834 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_rightsizing_recommendation::GetRightsizingRecommendationError, R>>
835 for Error
836where
837 R: Send + Sync + std::fmt::Debug + 'static,
838{
839 fn from(
840 err: ::aws_smithy_runtime_api::client::result::SdkError<
841 crate::operation::get_rightsizing_recommendation::GetRightsizingRecommendationError,
842 R,
843 >,
844 ) -> Self {
845 match err {
846 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
847 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
848 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
849 source: err.into(),
850 }),
851 }
852 }
853}
854impl From<crate::operation::get_rightsizing_recommendation::GetRightsizingRecommendationError> for Error {
855 fn from(err: crate::operation::get_rightsizing_recommendation::GetRightsizingRecommendationError) -> Self {
856 match err {
857 crate::operation::get_rightsizing_recommendation::GetRightsizingRecommendationError::InvalidNextTokenException(inner) => {
858 Error::InvalidNextTokenException(inner)
859 }
860 crate::operation::get_rightsizing_recommendation::GetRightsizingRecommendationError::LimitExceededException(inner) => {
861 Error::LimitExceededException(inner)
862 }
863 crate::operation::get_rightsizing_recommendation::GetRightsizingRecommendationError::Unhandled(inner) => Error::Unhandled(inner),
864 }
865 }
866}
867impl<R>
868 From<
869 ::aws_smithy_runtime_api::client::result::SdkError<
870 crate::operation::get_savings_plan_purchase_recommendation_details::GetSavingsPlanPurchaseRecommendationDetailsError,
871 R,
872 >,
873 > for Error
874where
875 R: Send + Sync + std::fmt::Debug + 'static,
876{
877 fn from(
878 err: ::aws_smithy_runtime_api::client::result::SdkError<
879 crate::operation::get_savings_plan_purchase_recommendation_details::GetSavingsPlanPurchaseRecommendationDetailsError,
880 R,
881 >,
882 ) -> Self {
883 match err {
884 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
885 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
886 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
887 source: err.into(),
888 }),
889 }
890 }
891}
892impl From<crate::operation::get_savings_plan_purchase_recommendation_details::GetSavingsPlanPurchaseRecommendationDetailsError> for Error {
893 fn from(err: crate::operation::get_savings_plan_purchase_recommendation_details::GetSavingsPlanPurchaseRecommendationDetailsError) -> Self {
894 match err {
895 crate::operation::get_savings_plan_purchase_recommendation_details::GetSavingsPlanPurchaseRecommendationDetailsError::DataUnavailableException(inner) => Error::DataUnavailableException(inner),
896 crate::operation::get_savings_plan_purchase_recommendation_details::GetSavingsPlanPurchaseRecommendationDetailsError::LimitExceededException(inner) => Error::LimitExceededException(inner),
897 crate::operation::get_savings_plan_purchase_recommendation_details::GetSavingsPlanPurchaseRecommendationDetailsError::Unhandled(inner) => Error::Unhandled(inner),
898 }
899 }
900}
901impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_savings_plans_coverage::GetSavingsPlansCoverageError, R>>
902 for Error
903where
904 R: Send + Sync + std::fmt::Debug + 'static,
905{
906 fn from(
907 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_savings_plans_coverage::GetSavingsPlansCoverageError, R>,
908 ) -> Self {
909 match err {
910 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
911 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
912 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
913 source: err.into(),
914 }),
915 }
916 }
917}
918impl From<crate::operation::get_savings_plans_coverage::GetSavingsPlansCoverageError> for Error {
919 fn from(err: crate::operation::get_savings_plans_coverage::GetSavingsPlansCoverageError) -> Self {
920 match err {
921 crate::operation::get_savings_plans_coverage::GetSavingsPlansCoverageError::DataUnavailableException(inner) => {
922 Error::DataUnavailableException(inner)
923 }
924 crate::operation::get_savings_plans_coverage::GetSavingsPlansCoverageError::InvalidNextTokenException(inner) => {
925 Error::InvalidNextTokenException(inner)
926 }
927 crate::operation::get_savings_plans_coverage::GetSavingsPlansCoverageError::LimitExceededException(inner) => {
928 Error::LimitExceededException(inner)
929 }
930 crate::operation::get_savings_plans_coverage::GetSavingsPlansCoverageError::Unhandled(inner) => Error::Unhandled(inner),
931 }
932 }
933}
934impl<R>
935 From<
936 ::aws_smithy_runtime_api::client::result::SdkError<
937 crate::operation::get_savings_plans_purchase_recommendation::GetSavingsPlansPurchaseRecommendationError,
938 R,
939 >,
940 > for Error
941where
942 R: Send + Sync + std::fmt::Debug + 'static,
943{
944 fn from(
945 err: ::aws_smithy_runtime_api::client::result::SdkError<
946 crate::operation::get_savings_plans_purchase_recommendation::GetSavingsPlansPurchaseRecommendationError,
947 R,
948 >,
949 ) -> Self {
950 match err {
951 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
952 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
953 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
954 source: err.into(),
955 }),
956 }
957 }
958}
959impl From<crate::operation::get_savings_plans_purchase_recommendation::GetSavingsPlansPurchaseRecommendationError> for Error {
960 fn from(err: crate::operation::get_savings_plans_purchase_recommendation::GetSavingsPlansPurchaseRecommendationError) -> Self {
961 match err {
962 crate::operation::get_savings_plans_purchase_recommendation::GetSavingsPlansPurchaseRecommendationError::InvalidNextTokenException(
963 inner,
964 ) => Error::InvalidNextTokenException(inner),
965 crate::operation::get_savings_plans_purchase_recommendation::GetSavingsPlansPurchaseRecommendationError::LimitExceededException(
966 inner,
967 ) => Error::LimitExceededException(inner),
968 crate::operation::get_savings_plans_purchase_recommendation::GetSavingsPlansPurchaseRecommendationError::Unhandled(inner) => {
969 Error::Unhandled(inner)
970 }
971 }
972 }
973}
974impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_savings_plans_utilization::GetSavingsPlansUtilizationError, R>>
975 for Error
976where
977 R: Send + Sync + std::fmt::Debug + 'static,
978{
979 fn from(
980 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_savings_plans_utilization::GetSavingsPlansUtilizationError, R>,
981 ) -> Self {
982 match err {
983 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
984 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
985 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
986 source: err.into(),
987 }),
988 }
989 }
990}
991impl From<crate::operation::get_savings_plans_utilization::GetSavingsPlansUtilizationError> for Error {
992 fn from(err: crate::operation::get_savings_plans_utilization::GetSavingsPlansUtilizationError) -> Self {
993 match err {
994 crate::operation::get_savings_plans_utilization::GetSavingsPlansUtilizationError::DataUnavailableException(inner) => {
995 Error::DataUnavailableException(inner)
996 }
997 crate::operation::get_savings_plans_utilization::GetSavingsPlansUtilizationError::LimitExceededException(inner) => {
998 Error::LimitExceededException(inner)
999 }
1000 crate::operation::get_savings_plans_utilization::GetSavingsPlansUtilizationError::Unhandled(inner) => Error::Unhandled(inner),
1001 }
1002 }
1003}
1004impl<R>
1005 From<
1006 ::aws_smithy_runtime_api::client::result::SdkError<
1007 crate::operation::get_savings_plans_utilization_details::GetSavingsPlansUtilizationDetailsError,
1008 R,
1009 >,
1010 > for Error
1011where
1012 R: Send + Sync + std::fmt::Debug + 'static,
1013{
1014 fn from(
1015 err: ::aws_smithy_runtime_api::client::result::SdkError<
1016 crate::operation::get_savings_plans_utilization_details::GetSavingsPlansUtilizationDetailsError,
1017 R,
1018 >,
1019 ) -> Self {
1020 match err {
1021 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1022 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1023 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1024 source: err.into(),
1025 }),
1026 }
1027 }
1028}
1029impl From<crate::operation::get_savings_plans_utilization_details::GetSavingsPlansUtilizationDetailsError> for Error {
1030 fn from(err: crate::operation::get_savings_plans_utilization_details::GetSavingsPlansUtilizationDetailsError) -> Self {
1031 match err {
1032 crate::operation::get_savings_plans_utilization_details::GetSavingsPlansUtilizationDetailsError::DataUnavailableException(inner) => {
1033 Error::DataUnavailableException(inner)
1034 }
1035 crate::operation::get_savings_plans_utilization_details::GetSavingsPlansUtilizationDetailsError::InvalidNextTokenException(inner) => {
1036 Error::InvalidNextTokenException(inner)
1037 }
1038 crate::operation::get_savings_plans_utilization_details::GetSavingsPlansUtilizationDetailsError::LimitExceededException(inner) => {
1039 Error::LimitExceededException(inner)
1040 }
1041 crate::operation::get_savings_plans_utilization_details::GetSavingsPlansUtilizationDetailsError::Unhandled(inner) => {
1042 Error::Unhandled(inner)
1043 }
1044 }
1045 }
1046}
1047impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_tags::GetTagsError, R>> for Error
1048where
1049 R: Send + Sync + std::fmt::Debug + 'static,
1050{
1051 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_tags::GetTagsError, R>) -> Self {
1052 match err {
1053 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1054 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1055 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1056 source: err.into(),
1057 }),
1058 }
1059 }
1060}
1061impl From<crate::operation::get_tags::GetTagsError> for Error {
1062 fn from(err: crate::operation::get_tags::GetTagsError) -> Self {
1063 match err {
1064 crate::operation::get_tags::GetTagsError::BillExpirationException(inner) => Error::BillExpirationException(inner),
1065 crate::operation::get_tags::GetTagsError::BillingViewHealthStatusException(inner) => Error::BillingViewHealthStatusException(inner),
1066 crate::operation::get_tags::GetTagsError::DataUnavailableException(inner) => Error::DataUnavailableException(inner),
1067 crate::operation::get_tags::GetTagsError::InvalidNextTokenException(inner) => Error::InvalidNextTokenException(inner),
1068 crate::operation::get_tags::GetTagsError::LimitExceededException(inner) => Error::LimitExceededException(inner),
1069 crate::operation::get_tags::GetTagsError::RequestChangedException(inner) => Error::RequestChangedException(inner),
1070 crate::operation::get_tags::GetTagsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1071 crate::operation::get_tags::GetTagsError::Unhandled(inner) => Error::Unhandled(inner),
1072 }
1073 }
1074}
1075impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_usage_forecast::GetUsageForecastError, R>> for Error
1076where
1077 R: Send + Sync + std::fmt::Debug + 'static,
1078{
1079 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_usage_forecast::GetUsageForecastError, R>) -> Self {
1080 match err {
1081 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1082 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1083 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1084 source: err.into(),
1085 }),
1086 }
1087 }
1088}
1089impl From<crate::operation::get_usage_forecast::GetUsageForecastError> for Error {
1090 fn from(err: crate::operation::get_usage_forecast::GetUsageForecastError) -> Self {
1091 match err {
1092 crate::operation::get_usage_forecast::GetUsageForecastError::BillingViewHealthStatusException(inner) => {
1093 Error::BillingViewHealthStatusException(inner)
1094 }
1095 crate::operation::get_usage_forecast::GetUsageForecastError::DataUnavailableException(inner) => Error::DataUnavailableException(inner),
1096 crate::operation::get_usage_forecast::GetUsageForecastError::LimitExceededException(inner) => Error::LimitExceededException(inner),
1097 crate::operation::get_usage_forecast::GetUsageForecastError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1098 crate::operation::get_usage_forecast::GetUsageForecastError::UnresolvableUsageUnitException(inner) => {
1099 Error::UnresolvableUsageUnitException(inner)
1100 }
1101 crate::operation::get_usage_forecast::GetUsageForecastError::Unhandled(inner) => Error::Unhandled(inner),
1102 }
1103 }
1104}
1105impl<R>
1106 From<
1107 ::aws_smithy_runtime_api::client::result::SdkError<
1108 crate::operation::list_commitment_purchase_analyses::ListCommitmentPurchaseAnalysesError,
1109 R,
1110 >,
1111 > for Error
1112where
1113 R: Send + Sync + std::fmt::Debug + 'static,
1114{
1115 fn from(
1116 err: ::aws_smithy_runtime_api::client::result::SdkError<
1117 crate::operation::list_commitment_purchase_analyses::ListCommitmentPurchaseAnalysesError,
1118 R,
1119 >,
1120 ) -> Self {
1121 match err {
1122 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1123 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1124 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1125 source: err.into(),
1126 }),
1127 }
1128 }
1129}
1130impl From<crate::operation::list_commitment_purchase_analyses::ListCommitmentPurchaseAnalysesError> for Error {
1131 fn from(err: crate::operation::list_commitment_purchase_analyses::ListCommitmentPurchaseAnalysesError) -> Self {
1132 match err {
1133 crate::operation::list_commitment_purchase_analyses::ListCommitmentPurchaseAnalysesError::DataUnavailableException(inner) => {
1134 Error::DataUnavailableException(inner)
1135 }
1136 crate::operation::list_commitment_purchase_analyses::ListCommitmentPurchaseAnalysesError::InvalidNextTokenException(inner) => {
1137 Error::InvalidNextTokenException(inner)
1138 }
1139 crate::operation::list_commitment_purchase_analyses::ListCommitmentPurchaseAnalysesError::LimitExceededException(inner) => {
1140 Error::LimitExceededException(inner)
1141 }
1142 crate::operation::list_commitment_purchase_analyses::ListCommitmentPurchaseAnalysesError::Unhandled(inner) => Error::Unhandled(inner),
1143 }
1144 }
1145}
1146impl<R>
1147 From<
1148 ::aws_smithy_runtime_api::client::result::SdkError<
1149 crate::operation::list_cost_allocation_tag_backfill_history::ListCostAllocationTagBackfillHistoryError,
1150 R,
1151 >,
1152 > for Error
1153where
1154 R: Send + Sync + std::fmt::Debug + 'static,
1155{
1156 fn from(
1157 err: ::aws_smithy_runtime_api::client::result::SdkError<
1158 crate::operation::list_cost_allocation_tag_backfill_history::ListCostAllocationTagBackfillHistoryError,
1159 R,
1160 >,
1161 ) -> Self {
1162 match err {
1163 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1164 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1165 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1166 source: err.into(),
1167 }),
1168 }
1169 }
1170}
1171impl From<crate::operation::list_cost_allocation_tag_backfill_history::ListCostAllocationTagBackfillHistoryError> for Error {
1172 fn from(err: crate::operation::list_cost_allocation_tag_backfill_history::ListCostAllocationTagBackfillHistoryError) -> Self {
1173 match err {
1174 crate::operation::list_cost_allocation_tag_backfill_history::ListCostAllocationTagBackfillHistoryError::InvalidNextTokenException(
1175 inner,
1176 ) => Error::InvalidNextTokenException(inner),
1177 crate::operation::list_cost_allocation_tag_backfill_history::ListCostAllocationTagBackfillHistoryError::LimitExceededException(inner) => {
1178 Error::LimitExceededException(inner)
1179 }
1180 crate::operation::list_cost_allocation_tag_backfill_history::ListCostAllocationTagBackfillHistoryError::Unhandled(inner) => {
1181 Error::Unhandled(inner)
1182 }
1183 }
1184 }
1185}
1186impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_cost_allocation_tags::ListCostAllocationTagsError, R>>
1187 for Error
1188where
1189 R: Send + Sync + std::fmt::Debug + 'static,
1190{
1191 fn from(
1192 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_cost_allocation_tags::ListCostAllocationTagsError, R>,
1193 ) -> Self {
1194 match err {
1195 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1196 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1197 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1198 source: err.into(),
1199 }),
1200 }
1201 }
1202}
1203impl From<crate::operation::list_cost_allocation_tags::ListCostAllocationTagsError> for Error {
1204 fn from(err: crate::operation::list_cost_allocation_tags::ListCostAllocationTagsError) -> Self {
1205 match err {
1206 crate::operation::list_cost_allocation_tags::ListCostAllocationTagsError::InvalidNextTokenException(inner) => {
1207 Error::InvalidNextTokenException(inner)
1208 }
1209 crate::operation::list_cost_allocation_tags::ListCostAllocationTagsError::LimitExceededException(inner) => {
1210 Error::LimitExceededException(inner)
1211 }
1212 crate::operation::list_cost_allocation_tags::ListCostAllocationTagsError::Unhandled(inner) => Error::Unhandled(inner),
1213 }
1214 }
1215}
1216impl<R>
1217 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_cost_category_definitions::ListCostCategoryDefinitionsError, R>>
1218 for Error
1219where
1220 R: Send + Sync + std::fmt::Debug + 'static,
1221{
1222 fn from(
1223 err: ::aws_smithy_runtime_api::client::result::SdkError<
1224 crate::operation::list_cost_category_definitions::ListCostCategoryDefinitionsError,
1225 R,
1226 >,
1227 ) -> Self {
1228 match err {
1229 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1230 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1231 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1232 source: err.into(),
1233 }),
1234 }
1235 }
1236}
1237impl From<crate::operation::list_cost_category_definitions::ListCostCategoryDefinitionsError> for Error {
1238 fn from(err: crate::operation::list_cost_category_definitions::ListCostCategoryDefinitionsError) -> Self {
1239 match err {
1240 crate::operation::list_cost_category_definitions::ListCostCategoryDefinitionsError::LimitExceededException(inner) => {
1241 Error::LimitExceededException(inner)
1242 }
1243 crate::operation::list_cost_category_definitions::ListCostCategoryDefinitionsError::Unhandled(inner) => Error::Unhandled(inner),
1244 }
1245 }
1246}
1247impl<R>
1248 From<
1249 ::aws_smithy_runtime_api::client::result::SdkError<
1250 crate::operation::list_cost_category_resource_associations::ListCostCategoryResourceAssociationsError,
1251 R,
1252 >,
1253 > for Error
1254where
1255 R: Send + Sync + std::fmt::Debug + 'static,
1256{
1257 fn from(
1258 err: ::aws_smithy_runtime_api::client::result::SdkError<
1259 crate::operation::list_cost_category_resource_associations::ListCostCategoryResourceAssociationsError,
1260 R,
1261 >,
1262 ) -> Self {
1263 match err {
1264 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1265 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1266 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1267 source: err.into(),
1268 }),
1269 }
1270 }
1271}
1272impl From<crate::operation::list_cost_category_resource_associations::ListCostCategoryResourceAssociationsError> for Error {
1273 fn from(err: crate::operation::list_cost_category_resource_associations::ListCostCategoryResourceAssociationsError) -> Self {
1274 match err {
1275 crate::operation::list_cost_category_resource_associations::ListCostCategoryResourceAssociationsError::LimitExceededException(inner) => {
1276 Error::LimitExceededException(inner)
1277 }
1278 crate::operation::list_cost_category_resource_associations::ListCostCategoryResourceAssociationsError::ResourceNotFoundException(
1279 inner,
1280 ) => Error::ResourceNotFoundException(inner),
1281 crate::operation::list_cost_category_resource_associations::ListCostCategoryResourceAssociationsError::Unhandled(inner) => {
1282 Error::Unhandled(inner)
1283 }
1284 }
1285 }
1286}
1287impl<R>
1288 From<
1289 ::aws_smithy_runtime_api::client::result::SdkError<
1290 crate::operation::list_savings_plans_purchase_recommendation_generation::ListSavingsPlansPurchaseRecommendationGenerationError,
1291 R,
1292 >,
1293 > for Error
1294where
1295 R: Send + Sync + std::fmt::Debug + 'static,
1296{
1297 fn from(
1298 err: ::aws_smithy_runtime_api::client::result::SdkError<
1299 crate::operation::list_savings_plans_purchase_recommendation_generation::ListSavingsPlansPurchaseRecommendationGenerationError,
1300 R,
1301 >,
1302 ) -> Self {
1303 match err {
1304 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1305 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1306 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1307 source: err.into(),
1308 }),
1309 }
1310 }
1311}
1312impl From<crate::operation::list_savings_plans_purchase_recommendation_generation::ListSavingsPlansPurchaseRecommendationGenerationError> for Error {
1313 fn from(
1314 err: crate::operation::list_savings_plans_purchase_recommendation_generation::ListSavingsPlansPurchaseRecommendationGenerationError,
1315 ) -> Self {
1316 match err {
1317 crate::operation::list_savings_plans_purchase_recommendation_generation::ListSavingsPlansPurchaseRecommendationGenerationError::DataUnavailableException(inner) => Error::DataUnavailableException(inner),
1318 crate::operation::list_savings_plans_purchase_recommendation_generation::ListSavingsPlansPurchaseRecommendationGenerationError::InvalidNextTokenException(inner) => Error::InvalidNextTokenException(inner),
1319 crate::operation::list_savings_plans_purchase_recommendation_generation::ListSavingsPlansPurchaseRecommendationGenerationError::LimitExceededException(inner) => Error::LimitExceededException(inner),
1320 crate::operation::list_savings_plans_purchase_recommendation_generation::ListSavingsPlansPurchaseRecommendationGenerationError::Unhandled(inner) => Error::Unhandled(inner),
1321 }
1322 }
1323}
1324impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
1325where
1326 R: Send + Sync + std::fmt::Debug + 'static,
1327{
1328 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
1329 match err {
1330 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1331 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1332 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1333 source: err.into(),
1334 }),
1335 }
1336 }
1337}
1338impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
1339 fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
1340 match err {
1341 crate::operation::list_tags_for_resource::ListTagsForResourceError::LimitExceededException(inner) => Error::LimitExceededException(inner),
1342 crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
1343 Error::ResourceNotFoundException(inner)
1344 }
1345 crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
1346 }
1347 }
1348}
1349impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::provide_anomaly_feedback::ProvideAnomalyFeedbackError, R>> for Error
1350where
1351 R: Send + Sync + std::fmt::Debug + 'static,
1352{
1353 fn from(
1354 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::provide_anomaly_feedback::ProvideAnomalyFeedbackError, R>,
1355 ) -> Self {
1356 match err {
1357 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1358 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1359 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1360 source: err.into(),
1361 }),
1362 }
1363 }
1364}
1365impl From<crate::operation::provide_anomaly_feedback::ProvideAnomalyFeedbackError> for Error {
1366 fn from(err: crate::operation::provide_anomaly_feedback::ProvideAnomalyFeedbackError) -> Self {
1367 match err {
1368 crate::operation::provide_anomaly_feedback::ProvideAnomalyFeedbackError::LimitExceededException(inner) => {
1369 Error::LimitExceededException(inner)
1370 }
1371 crate::operation::provide_anomaly_feedback::ProvideAnomalyFeedbackError::Unhandled(inner) => Error::Unhandled(inner),
1372 }
1373 }
1374}
1375impl<R>
1376 From<
1377 ::aws_smithy_runtime_api::client::result::SdkError<
1378 crate::operation::start_commitment_purchase_analysis::StartCommitmentPurchaseAnalysisError,
1379 R,
1380 >,
1381 > for Error
1382where
1383 R: Send + Sync + std::fmt::Debug + 'static,
1384{
1385 fn from(
1386 err: ::aws_smithy_runtime_api::client::result::SdkError<
1387 crate::operation::start_commitment_purchase_analysis::StartCommitmentPurchaseAnalysisError,
1388 R,
1389 >,
1390 ) -> Self {
1391 match err {
1392 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1393 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1394 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1395 source: err.into(),
1396 }),
1397 }
1398 }
1399}
1400impl From<crate::operation::start_commitment_purchase_analysis::StartCommitmentPurchaseAnalysisError> for Error {
1401 fn from(err: crate::operation::start_commitment_purchase_analysis::StartCommitmentPurchaseAnalysisError) -> Self {
1402 match err {
1403 crate::operation::start_commitment_purchase_analysis::StartCommitmentPurchaseAnalysisError::DataUnavailableException(inner) => {
1404 Error::DataUnavailableException(inner)
1405 }
1406 crate::operation::start_commitment_purchase_analysis::StartCommitmentPurchaseAnalysisError::GenerationExistsException(inner) => {
1407 Error::GenerationExistsException(inner)
1408 }
1409 crate::operation::start_commitment_purchase_analysis::StartCommitmentPurchaseAnalysisError::LimitExceededException(inner) => {
1410 Error::LimitExceededException(inner)
1411 }
1412 crate::operation::start_commitment_purchase_analysis::StartCommitmentPurchaseAnalysisError::ServiceQuotaExceededException(inner) => {
1413 Error::ServiceQuotaExceededException(inner)
1414 }
1415 crate::operation::start_commitment_purchase_analysis::StartCommitmentPurchaseAnalysisError::Unhandled(inner) => Error::Unhandled(inner),
1416 }
1417 }
1418}
1419impl<R>
1420 From<
1421 ::aws_smithy_runtime_api::client::result::SdkError<
1422 crate::operation::start_cost_allocation_tag_backfill::StartCostAllocationTagBackfillError,
1423 R,
1424 >,
1425 > for Error
1426where
1427 R: Send + Sync + std::fmt::Debug + 'static,
1428{
1429 fn from(
1430 err: ::aws_smithy_runtime_api::client::result::SdkError<
1431 crate::operation::start_cost_allocation_tag_backfill::StartCostAllocationTagBackfillError,
1432 R,
1433 >,
1434 ) -> Self {
1435 match err {
1436 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1437 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1438 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1439 source: err.into(),
1440 }),
1441 }
1442 }
1443}
1444impl From<crate::operation::start_cost_allocation_tag_backfill::StartCostAllocationTagBackfillError> for Error {
1445 fn from(err: crate::operation::start_cost_allocation_tag_backfill::StartCostAllocationTagBackfillError) -> Self {
1446 match err {
1447 crate::operation::start_cost_allocation_tag_backfill::StartCostAllocationTagBackfillError::BackfillLimitExceededException(inner) => {
1448 Error::BackfillLimitExceededException(inner)
1449 }
1450 crate::operation::start_cost_allocation_tag_backfill::StartCostAllocationTagBackfillError::LimitExceededException(inner) => {
1451 Error::LimitExceededException(inner)
1452 }
1453 crate::operation::start_cost_allocation_tag_backfill::StartCostAllocationTagBackfillError::Unhandled(inner) => Error::Unhandled(inner),
1454 }
1455 }
1456}
1457impl<R>
1458 From<
1459 ::aws_smithy_runtime_api::client::result::SdkError<
1460 crate::operation::start_savings_plans_purchase_recommendation_generation::StartSavingsPlansPurchaseRecommendationGenerationError,
1461 R,
1462 >,
1463 > for Error
1464where
1465 R: Send + Sync + std::fmt::Debug + 'static,
1466{
1467 fn from(
1468 err: ::aws_smithy_runtime_api::client::result::SdkError<
1469 crate::operation::start_savings_plans_purchase_recommendation_generation::StartSavingsPlansPurchaseRecommendationGenerationError,
1470 R,
1471 >,
1472 ) -> Self {
1473 match err {
1474 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1475 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1476 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1477 source: err.into(),
1478 }),
1479 }
1480 }
1481}
1482impl From<crate::operation::start_savings_plans_purchase_recommendation_generation::StartSavingsPlansPurchaseRecommendationGenerationError>
1483 for Error
1484{
1485 fn from(
1486 err: crate::operation::start_savings_plans_purchase_recommendation_generation::StartSavingsPlansPurchaseRecommendationGenerationError,
1487 ) -> Self {
1488 match err {
1489 crate::operation::start_savings_plans_purchase_recommendation_generation::StartSavingsPlansPurchaseRecommendationGenerationError::DataUnavailableException(inner) => Error::DataUnavailableException(inner),
1490 crate::operation::start_savings_plans_purchase_recommendation_generation::StartSavingsPlansPurchaseRecommendationGenerationError::GenerationExistsException(inner) => Error::GenerationExistsException(inner),
1491 crate::operation::start_savings_plans_purchase_recommendation_generation::StartSavingsPlansPurchaseRecommendationGenerationError::LimitExceededException(inner) => Error::LimitExceededException(inner),
1492 crate::operation::start_savings_plans_purchase_recommendation_generation::StartSavingsPlansPurchaseRecommendationGenerationError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
1493 crate::operation::start_savings_plans_purchase_recommendation_generation::StartSavingsPlansPurchaseRecommendationGenerationError::Unhandled(inner) => Error::Unhandled(inner),
1494 }
1495 }
1496}
1497impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
1498where
1499 R: Send + Sync + std::fmt::Debug + 'static,
1500{
1501 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
1502 match err {
1503 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1504 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1505 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1506 source: err.into(),
1507 }),
1508 }
1509 }
1510}
1511impl From<crate::operation::tag_resource::TagResourceError> for Error {
1512 fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
1513 match err {
1514 crate::operation::tag_resource::TagResourceError::LimitExceededException(inner) => Error::LimitExceededException(inner),
1515 crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1516 crate::operation::tag_resource::TagResourceError::TooManyTagsException(inner) => Error::TooManyTagsException(inner),
1517 crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
1518 }
1519 }
1520}
1521impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
1522where
1523 R: Send + Sync + std::fmt::Debug + 'static,
1524{
1525 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
1526 match err {
1527 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1528 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1529 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1530 source: err.into(),
1531 }),
1532 }
1533 }
1534}
1535impl From<crate::operation::untag_resource::UntagResourceError> for Error {
1536 fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
1537 match err {
1538 crate::operation::untag_resource::UntagResourceError::LimitExceededException(inner) => Error::LimitExceededException(inner),
1539 crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1540 crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
1541 }
1542 }
1543}
1544impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_anomaly_monitor::UpdateAnomalyMonitorError, R>> for Error
1545where
1546 R: Send + Sync + std::fmt::Debug + 'static,
1547{
1548 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_anomaly_monitor::UpdateAnomalyMonitorError, R>) -> Self {
1549 match err {
1550 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1551 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1552 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1553 source: err.into(),
1554 }),
1555 }
1556 }
1557}
1558impl From<crate::operation::update_anomaly_monitor::UpdateAnomalyMonitorError> for Error {
1559 fn from(err: crate::operation::update_anomaly_monitor::UpdateAnomalyMonitorError) -> Self {
1560 match err {
1561 crate::operation::update_anomaly_monitor::UpdateAnomalyMonitorError::LimitExceededException(inner) => {
1562 Error::LimitExceededException(inner)
1563 }
1564 crate::operation::update_anomaly_monitor::UpdateAnomalyMonitorError::UnknownMonitorException(inner) => {
1565 Error::UnknownMonitorException(inner)
1566 }
1567 crate::operation::update_anomaly_monitor::UpdateAnomalyMonitorError::Unhandled(inner) => Error::Unhandled(inner),
1568 }
1569 }
1570}
1571impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_anomaly_subscription::UpdateAnomalySubscriptionError, R>>
1572 for Error
1573where
1574 R: Send + Sync + std::fmt::Debug + 'static,
1575{
1576 fn from(
1577 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_anomaly_subscription::UpdateAnomalySubscriptionError, R>,
1578 ) -> Self {
1579 match err {
1580 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1581 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1582 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1583 source: err.into(),
1584 }),
1585 }
1586 }
1587}
1588impl From<crate::operation::update_anomaly_subscription::UpdateAnomalySubscriptionError> for Error {
1589 fn from(err: crate::operation::update_anomaly_subscription::UpdateAnomalySubscriptionError) -> Self {
1590 match err {
1591 crate::operation::update_anomaly_subscription::UpdateAnomalySubscriptionError::LimitExceededException(inner) => {
1592 Error::LimitExceededException(inner)
1593 }
1594 crate::operation::update_anomaly_subscription::UpdateAnomalySubscriptionError::UnknownMonitorException(inner) => {
1595 Error::UnknownMonitorException(inner)
1596 }
1597 crate::operation::update_anomaly_subscription::UpdateAnomalySubscriptionError::UnknownSubscriptionException(inner) => {
1598 Error::UnknownSubscriptionException(inner)
1599 }
1600 crate::operation::update_anomaly_subscription::UpdateAnomalySubscriptionError::Unhandled(inner) => Error::Unhandled(inner),
1601 }
1602 }
1603}
1604impl<R>
1605 From<
1606 ::aws_smithy_runtime_api::client::result::SdkError<
1607 crate::operation::update_cost_allocation_tags_status::UpdateCostAllocationTagsStatusError,
1608 R,
1609 >,
1610 > for Error
1611where
1612 R: Send + Sync + std::fmt::Debug + 'static,
1613{
1614 fn from(
1615 err: ::aws_smithy_runtime_api::client::result::SdkError<
1616 crate::operation::update_cost_allocation_tags_status::UpdateCostAllocationTagsStatusError,
1617 R,
1618 >,
1619 ) -> Self {
1620 match err {
1621 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1622 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1623 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1624 source: err.into(),
1625 }),
1626 }
1627 }
1628}
1629impl From<crate::operation::update_cost_allocation_tags_status::UpdateCostAllocationTagsStatusError> for Error {
1630 fn from(err: crate::operation::update_cost_allocation_tags_status::UpdateCostAllocationTagsStatusError) -> Self {
1631 match err {
1632 crate::operation::update_cost_allocation_tags_status::UpdateCostAllocationTagsStatusError::LimitExceededException(inner) => {
1633 Error::LimitExceededException(inner)
1634 }
1635 crate::operation::update_cost_allocation_tags_status::UpdateCostAllocationTagsStatusError::Unhandled(inner) => Error::Unhandled(inner),
1636 }
1637 }
1638}
1639impl<R>
1640 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_cost_category_definition::UpdateCostCategoryDefinitionError, R>>
1641 for Error
1642where
1643 R: Send + Sync + std::fmt::Debug + 'static,
1644{
1645 fn from(
1646 err: ::aws_smithy_runtime_api::client::result::SdkError<
1647 crate::operation::update_cost_category_definition::UpdateCostCategoryDefinitionError,
1648 R,
1649 >,
1650 ) -> Self {
1651 match err {
1652 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1653 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1654 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1655 source: err.into(),
1656 }),
1657 }
1658 }
1659}
1660impl From<crate::operation::update_cost_category_definition::UpdateCostCategoryDefinitionError> for Error {
1661 fn from(err: crate::operation::update_cost_category_definition::UpdateCostCategoryDefinitionError) -> Self {
1662 match err {
1663 crate::operation::update_cost_category_definition::UpdateCostCategoryDefinitionError::LimitExceededException(inner) => {
1664 Error::LimitExceededException(inner)
1665 }
1666 crate::operation::update_cost_category_definition::UpdateCostCategoryDefinitionError::ResourceNotFoundException(inner) => {
1667 Error::ResourceNotFoundException(inner)
1668 }
1669 crate::operation::update_cost_category_definition::UpdateCostCategoryDefinitionError::ServiceQuotaExceededException(inner) => {
1670 Error::ServiceQuotaExceededException(inner)
1671 }
1672 crate::operation::update_cost_category_definition::UpdateCostCategoryDefinitionError::Unhandled(inner) => Error::Unhandled(inner),
1673 }
1674 }
1675}
1676impl ::std::error::Error for Error {
1677 fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
1678 match self {
1679 Error::AnalysisNotFoundException(inner) => inner.source(),
1680 Error::BackfillLimitExceededException(inner) => inner.source(),
1681 Error::BillExpirationException(inner) => inner.source(),
1682 Error::BillingViewHealthStatusException(inner) => inner.source(),
1683 Error::DataUnavailableException(inner) => inner.source(),
1684 Error::GenerationExistsException(inner) => inner.source(),
1685 Error::InvalidNextTokenException(inner) => inner.source(),
1686 Error::LimitExceededException(inner) => inner.source(),
1687 Error::RequestChangedException(inner) => inner.source(),
1688 Error::ResourceNotFoundException(inner) => inner.source(),
1689 Error::ServiceQuotaExceededException(inner) => inner.source(),
1690 Error::TooManyTagsException(inner) => inner.source(),
1691 Error::UnknownMonitorException(inner) => inner.source(),
1692 Error::UnknownSubscriptionException(inner) => inner.source(),
1693 Error::UnresolvableUsageUnitException(inner) => inner.source(),
1694 Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
1695 }
1696 }
1697}
1698impl ::aws_types::request_id::RequestId for Error {
1699 fn request_id(&self) -> Option<&str> {
1700 match self {
1701 Self::AnalysisNotFoundException(e) => e.request_id(),
1702 Self::BackfillLimitExceededException(e) => e.request_id(),
1703 Self::BillExpirationException(e) => e.request_id(),
1704 Self::BillingViewHealthStatusException(e) => e.request_id(),
1705 Self::DataUnavailableException(e) => e.request_id(),
1706 Self::GenerationExistsException(e) => e.request_id(),
1707 Self::InvalidNextTokenException(e) => e.request_id(),
1708 Self::LimitExceededException(e) => e.request_id(),
1709 Self::RequestChangedException(e) => e.request_id(),
1710 Self::ResourceNotFoundException(e) => e.request_id(),
1711 Self::ServiceQuotaExceededException(e) => e.request_id(),
1712 Self::TooManyTagsException(e) => e.request_id(),
1713 Self::UnknownMonitorException(e) => e.request_id(),
1714 Self::UnknownSubscriptionException(e) => e.request_id(),
1715 Self::UnresolvableUsageUnitException(e) => e.request_id(),
1716 Self::Unhandled(e) => e.meta.request_id(),
1717 }
1718 }
1719}