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 InvalidStateException(crate::types::error::InvalidStateException),
14 ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
16 ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
18 ThrottlingException(crate::types::error::ThrottlingException),
20 TooManyTagsException(crate::types::error::TooManyTagsException),
22 ValidationException(crate::types::error::ValidationException),
57 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
59 variable wildcard pattern and check `.code()`:
60 \
61 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
62 \
63 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
64 Unhandled(crate::error::sealed_unhandled::Unhandled),
65}
66impl ::std::fmt::Display for Error {
67 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
68 match self {
69 Error::AccessDeniedException(inner) => inner.fmt(f),
70 Error::ConflictException(inner) => inner.fmt(f),
71 Error::InternalServerException(inner) => inner.fmt(f),
72 Error::InvalidStateException(inner) => inner.fmt(f),
73 Error::ResourceNotFoundException(inner) => inner.fmt(f),
74 Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
75 Error::ThrottlingException(inner) => inner.fmt(f),
76 Error::TooManyTagsException(inner) => inner.fmt(f),
77 Error::ValidationException(inner) => inner.fmt(f),
78 Error::Unhandled(_) => {
79 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
80 write!(f, "unhandled error ({code})")
81 } else {
82 f.write_str("unhandled error")
83 }
84 }
85 }
86 }
87}
88impl From<::aws_smithy_types::error::operation::BuildError> for Error {
89 fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
90 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
91 source: value.into(),
92 meta: ::std::default::Default::default(),
93 })
94 }
95}
96impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
97 fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
98 match self {
99 Self::AccessDeniedException(inner) => inner.meta(),
100 Self::ConflictException(inner) => inner.meta(),
101 Self::InternalServerException(inner) => inner.meta(),
102 Self::InvalidStateException(inner) => inner.meta(),
103 Self::ResourceNotFoundException(inner) => inner.meta(),
104 Self::ServiceQuotaExceededException(inner) => inner.meta(),
105 Self::ThrottlingException(inner) => inner.meta(),
106 Self::TooManyTagsException(inner) => inner.meta(),
107 Self::ValidationException(inner) => inner.meta(),
108 Self::Unhandled(inner) => &inner.meta,
109 }
110 }
111}
112impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_policy::BatchGetPolicyError, R>> for Error
113where
114 R: Send + Sync + std::fmt::Debug + 'static,
115{
116 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_policy::BatchGetPolicyError, R>) -> Self {
117 match err {
118 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
119 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
120 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
121 source: err.into(),
122 }),
123 }
124 }
125}
126impl From<crate::operation::batch_get_policy::BatchGetPolicyError> for Error {
127 fn from(err: crate::operation::batch_get_policy::BatchGetPolicyError) -> Self {
128 match err {
129 crate::operation::batch_get_policy::BatchGetPolicyError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
130 crate::operation::batch_get_policy::BatchGetPolicyError::InternalServerException(inner) => Error::InternalServerException(inner),
131 crate::operation::batch_get_policy::BatchGetPolicyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
132 crate::operation::batch_get_policy::BatchGetPolicyError::ValidationException(inner) => Error::ValidationException(inner),
133 crate::operation::batch_get_policy::BatchGetPolicyError::Unhandled(inner) => Error::Unhandled(inner),
134 }
135 }
136}
137impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_is_authorized::BatchIsAuthorizedError, R>> for Error
138where
139 R: Send + Sync + std::fmt::Debug + 'static,
140{
141 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_is_authorized::BatchIsAuthorizedError, R>) -> Self {
142 match err {
143 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
144 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
145 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
146 source: err.into(),
147 }),
148 }
149 }
150}
151impl From<crate::operation::batch_is_authorized::BatchIsAuthorizedError> for Error {
152 fn from(err: crate::operation::batch_is_authorized::BatchIsAuthorizedError) -> Self {
153 match err {
154 crate::operation::batch_is_authorized::BatchIsAuthorizedError::ResourceNotFoundException(inner) => {
155 Error::ResourceNotFoundException(inner)
156 }
157 crate::operation::batch_is_authorized::BatchIsAuthorizedError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
158 crate::operation::batch_is_authorized::BatchIsAuthorizedError::InternalServerException(inner) => Error::InternalServerException(inner),
159 crate::operation::batch_is_authorized::BatchIsAuthorizedError::ThrottlingException(inner) => Error::ThrottlingException(inner),
160 crate::operation::batch_is_authorized::BatchIsAuthorizedError::ValidationException(inner) => Error::ValidationException(inner),
161 crate::operation::batch_is_authorized::BatchIsAuthorizedError::Unhandled(inner) => Error::Unhandled(inner),
162 }
163 }
164}
165impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_is_authorized_with_token::BatchIsAuthorizedWithTokenError, R>>
166 for Error
167where
168 R: Send + Sync + std::fmt::Debug + 'static,
169{
170 fn from(
171 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_is_authorized_with_token::BatchIsAuthorizedWithTokenError, R>,
172 ) -> Self {
173 match err {
174 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
175 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
176 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
177 source: err.into(),
178 }),
179 }
180 }
181}
182impl From<crate::operation::batch_is_authorized_with_token::BatchIsAuthorizedWithTokenError> for Error {
183 fn from(err: crate::operation::batch_is_authorized_with_token::BatchIsAuthorizedWithTokenError) -> Self {
184 match err {
185 crate::operation::batch_is_authorized_with_token::BatchIsAuthorizedWithTokenError::ResourceNotFoundException(inner) => {
186 Error::ResourceNotFoundException(inner)
187 }
188 crate::operation::batch_is_authorized_with_token::BatchIsAuthorizedWithTokenError::AccessDeniedException(inner) => {
189 Error::AccessDeniedException(inner)
190 }
191 crate::operation::batch_is_authorized_with_token::BatchIsAuthorizedWithTokenError::InternalServerException(inner) => {
192 Error::InternalServerException(inner)
193 }
194 crate::operation::batch_is_authorized_with_token::BatchIsAuthorizedWithTokenError::ThrottlingException(inner) => {
195 Error::ThrottlingException(inner)
196 }
197 crate::operation::batch_is_authorized_with_token::BatchIsAuthorizedWithTokenError::ValidationException(inner) => {
198 Error::ValidationException(inner)
199 }
200 crate::operation::batch_is_authorized_with_token::BatchIsAuthorizedWithTokenError::Unhandled(inner) => Error::Unhandled(inner),
201 }
202 }
203}
204impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_identity_source::CreateIdentitySourceError, R>> for Error
205where
206 R: Send + Sync + std::fmt::Debug + 'static,
207{
208 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_identity_source::CreateIdentitySourceError, R>) -> Self {
209 match err {
210 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
211 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
212 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
213 source: err.into(),
214 }),
215 }
216 }
217}
218impl From<crate::operation::create_identity_source::CreateIdentitySourceError> for Error {
219 fn from(err: crate::operation::create_identity_source::CreateIdentitySourceError) -> Self {
220 match err {
221 crate::operation::create_identity_source::CreateIdentitySourceError::ConflictException(inner) => Error::ConflictException(inner),
222 crate::operation::create_identity_source::CreateIdentitySourceError::ResourceNotFoundException(inner) => {
223 Error::ResourceNotFoundException(inner)
224 }
225 crate::operation::create_identity_source::CreateIdentitySourceError::ServiceQuotaExceededException(inner) => {
226 Error::ServiceQuotaExceededException(inner)
227 }
228 crate::operation::create_identity_source::CreateIdentitySourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
229 crate::operation::create_identity_source::CreateIdentitySourceError::InternalServerException(inner) => {
230 Error::InternalServerException(inner)
231 }
232 crate::operation::create_identity_source::CreateIdentitySourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
233 crate::operation::create_identity_source::CreateIdentitySourceError::ValidationException(inner) => Error::ValidationException(inner),
234 crate::operation::create_identity_source::CreateIdentitySourceError::Unhandled(inner) => Error::Unhandled(inner),
235 }
236 }
237}
238impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_policy::CreatePolicyError, R>> for Error
239where
240 R: Send + Sync + std::fmt::Debug + 'static,
241{
242 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_policy::CreatePolicyError, R>) -> 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::create_policy::CreatePolicyError> for Error {
253 fn from(err: crate::operation::create_policy::CreatePolicyError) -> Self {
254 match err {
255 crate::operation::create_policy::CreatePolicyError::ConflictException(inner) => Error::ConflictException(inner),
256 crate::operation::create_policy::CreatePolicyError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
257 crate::operation::create_policy::CreatePolicyError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
258 crate::operation::create_policy::CreatePolicyError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
259 crate::operation::create_policy::CreatePolicyError::InternalServerException(inner) => Error::InternalServerException(inner),
260 crate::operation::create_policy::CreatePolicyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
261 crate::operation::create_policy::CreatePolicyError::ValidationException(inner) => Error::ValidationException(inner),
262 crate::operation::create_policy::CreatePolicyError::Unhandled(inner) => Error::Unhandled(inner),
263 }
264 }
265}
266impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_policy_store::CreatePolicyStoreError, R>> for Error
267where
268 R: Send + Sync + std::fmt::Debug + 'static,
269{
270 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_policy_store::CreatePolicyStoreError, R>) -> Self {
271 match err {
272 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
273 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
274 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
275 source: err.into(),
276 }),
277 }
278 }
279}
280impl From<crate::operation::create_policy_store::CreatePolicyStoreError> for Error {
281 fn from(err: crate::operation::create_policy_store::CreatePolicyStoreError) -> Self {
282 match err {
283 crate::operation::create_policy_store::CreatePolicyStoreError::ConflictException(inner) => Error::ConflictException(inner),
284 crate::operation::create_policy_store::CreatePolicyStoreError::ServiceQuotaExceededException(inner) => {
285 Error::ServiceQuotaExceededException(inner)
286 }
287 crate::operation::create_policy_store::CreatePolicyStoreError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
288 crate::operation::create_policy_store::CreatePolicyStoreError::InternalServerException(inner) => Error::InternalServerException(inner),
289 crate::operation::create_policy_store::CreatePolicyStoreError::ThrottlingException(inner) => Error::ThrottlingException(inner),
290 crate::operation::create_policy_store::CreatePolicyStoreError::ValidationException(inner) => Error::ValidationException(inner),
291 crate::operation::create_policy_store::CreatePolicyStoreError::Unhandled(inner) => Error::Unhandled(inner),
292 }
293 }
294}
295impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_policy_template::CreatePolicyTemplateError, R>> for Error
296where
297 R: Send + Sync + std::fmt::Debug + 'static,
298{
299 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_policy_template::CreatePolicyTemplateError, R>) -> Self {
300 match err {
301 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
302 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
303 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
304 source: err.into(),
305 }),
306 }
307 }
308}
309impl From<crate::operation::create_policy_template::CreatePolicyTemplateError> for Error {
310 fn from(err: crate::operation::create_policy_template::CreatePolicyTemplateError) -> Self {
311 match err {
312 crate::operation::create_policy_template::CreatePolicyTemplateError::ConflictException(inner) => Error::ConflictException(inner),
313 crate::operation::create_policy_template::CreatePolicyTemplateError::ResourceNotFoundException(inner) => {
314 Error::ResourceNotFoundException(inner)
315 }
316 crate::operation::create_policy_template::CreatePolicyTemplateError::ServiceQuotaExceededException(inner) => {
317 Error::ServiceQuotaExceededException(inner)
318 }
319 crate::operation::create_policy_template::CreatePolicyTemplateError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
320 crate::operation::create_policy_template::CreatePolicyTemplateError::InternalServerException(inner) => {
321 Error::InternalServerException(inner)
322 }
323 crate::operation::create_policy_template::CreatePolicyTemplateError::ThrottlingException(inner) => Error::ThrottlingException(inner),
324 crate::operation::create_policy_template::CreatePolicyTemplateError::ValidationException(inner) => Error::ValidationException(inner),
325 crate::operation::create_policy_template::CreatePolicyTemplateError::Unhandled(inner) => Error::Unhandled(inner),
326 }
327 }
328}
329impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_identity_source::DeleteIdentitySourceError, R>> for Error
330where
331 R: Send + Sync + std::fmt::Debug + 'static,
332{
333 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_identity_source::DeleteIdentitySourceError, R>) -> Self {
334 match err {
335 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
336 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
337 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
338 source: err.into(),
339 }),
340 }
341 }
342}
343impl From<crate::operation::delete_identity_source::DeleteIdentitySourceError> for Error {
344 fn from(err: crate::operation::delete_identity_source::DeleteIdentitySourceError) -> Self {
345 match err {
346 crate::operation::delete_identity_source::DeleteIdentitySourceError::ConflictException(inner) => Error::ConflictException(inner),
347 crate::operation::delete_identity_source::DeleteIdentitySourceError::ResourceNotFoundException(inner) => {
348 Error::ResourceNotFoundException(inner)
349 }
350 crate::operation::delete_identity_source::DeleteIdentitySourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
351 crate::operation::delete_identity_source::DeleteIdentitySourceError::InternalServerException(inner) => {
352 Error::InternalServerException(inner)
353 }
354 crate::operation::delete_identity_source::DeleteIdentitySourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
355 crate::operation::delete_identity_source::DeleteIdentitySourceError::ValidationException(inner) => Error::ValidationException(inner),
356 crate::operation::delete_identity_source::DeleteIdentitySourceError::Unhandled(inner) => Error::Unhandled(inner),
357 }
358 }
359}
360impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_policy::DeletePolicyError, R>> for Error
361where
362 R: Send + Sync + std::fmt::Debug + 'static,
363{
364 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_policy::DeletePolicyError, R>) -> Self {
365 match err {
366 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
367 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
368 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
369 source: err.into(),
370 }),
371 }
372 }
373}
374impl From<crate::operation::delete_policy::DeletePolicyError> for Error {
375 fn from(err: crate::operation::delete_policy::DeletePolicyError) -> Self {
376 match err {
377 crate::operation::delete_policy::DeletePolicyError::ConflictException(inner) => Error::ConflictException(inner),
378 crate::operation::delete_policy::DeletePolicyError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
379 crate::operation::delete_policy::DeletePolicyError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
380 crate::operation::delete_policy::DeletePolicyError::InternalServerException(inner) => Error::InternalServerException(inner),
381 crate::operation::delete_policy::DeletePolicyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
382 crate::operation::delete_policy::DeletePolicyError::ValidationException(inner) => Error::ValidationException(inner),
383 crate::operation::delete_policy::DeletePolicyError::Unhandled(inner) => Error::Unhandled(inner),
384 }
385 }
386}
387impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_policy_store::DeletePolicyStoreError, R>> for Error
388where
389 R: Send + Sync + std::fmt::Debug + 'static,
390{
391 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_policy_store::DeletePolicyStoreError, R>) -> Self {
392 match err {
393 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
394 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
395 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
396 source: err.into(),
397 }),
398 }
399 }
400}
401impl From<crate::operation::delete_policy_store::DeletePolicyStoreError> for Error {
402 fn from(err: crate::operation::delete_policy_store::DeletePolicyStoreError) -> Self {
403 match err {
404 crate::operation::delete_policy_store::DeletePolicyStoreError::InvalidStateException(inner) => Error::InvalidStateException(inner),
405 crate::operation::delete_policy_store::DeletePolicyStoreError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
406 crate::operation::delete_policy_store::DeletePolicyStoreError::InternalServerException(inner) => Error::InternalServerException(inner),
407 crate::operation::delete_policy_store::DeletePolicyStoreError::ThrottlingException(inner) => Error::ThrottlingException(inner),
408 crate::operation::delete_policy_store::DeletePolicyStoreError::ValidationException(inner) => Error::ValidationException(inner),
409 crate::operation::delete_policy_store::DeletePolicyStoreError::Unhandled(inner) => Error::Unhandled(inner),
410 }
411 }
412}
413impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_policy_template::DeletePolicyTemplateError, R>> for Error
414where
415 R: Send + Sync + std::fmt::Debug + 'static,
416{
417 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_policy_template::DeletePolicyTemplateError, R>) -> Self {
418 match err {
419 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
420 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
421 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
422 source: err.into(),
423 }),
424 }
425 }
426}
427impl From<crate::operation::delete_policy_template::DeletePolicyTemplateError> for Error {
428 fn from(err: crate::operation::delete_policy_template::DeletePolicyTemplateError) -> Self {
429 match err {
430 crate::operation::delete_policy_template::DeletePolicyTemplateError::ConflictException(inner) => Error::ConflictException(inner),
431 crate::operation::delete_policy_template::DeletePolicyTemplateError::ResourceNotFoundException(inner) => {
432 Error::ResourceNotFoundException(inner)
433 }
434 crate::operation::delete_policy_template::DeletePolicyTemplateError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
435 crate::operation::delete_policy_template::DeletePolicyTemplateError::InternalServerException(inner) => {
436 Error::InternalServerException(inner)
437 }
438 crate::operation::delete_policy_template::DeletePolicyTemplateError::ThrottlingException(inner) => Error::ThrottlingException(inner),
439 crate::operation::delete_policy_template::DeletePolicyTemplateError::ValidationException(inner) => Error::ValidationException(inner),
440 crate::operation::delete_policy_template::DeletePolicyTemplateError::Unhandled(inner) => Error::Unhandled(inner),
441 }
442 }
443}
444impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_identity_source::GetIdentitySourceError, R>> for Error
445where
446 R: Send + Sync + std::fmt::Debug + 'static,
447{
448 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_identity_source::GetIdentitySourceError, R>) -> Self {
449 match err {
450 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
451 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
452 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
453 source: err.into(),
454 }),
455 }
456 }
457}
458impl From<crate::operation::get_identity_source::GetIdentitySourceError> for Error {
459 fn from(err: crate::operation::get_identity_source::GetIdentitySourceError) -> Self {
460 match err {
461 crate::operation::get_identity_source::GetIdentitySourceError::ResourceNotFoundException(inner) => {
462 Error::ResourceNotFoundException(inner)
463 }
464 crate::operation::get_identity_source::GetIdentitySourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
465 crate::operation::get_identity_source::GetIdentitySourceError::InternalServerException(inner) => Error::InternalServerException(inner),
466 crate::operation::get_identity_source::GetIdentitySourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
467 crate::operation::get_identity_source::GetIdentitySourceError::ValidationException(inner) => Error::ValidationException(inner),
468 crate::operation::get_identity_source::GetIdentitySourceError::Unhandled(inner) => Error::Unhandled(inner),
469 }
470 }
471}
472impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_policy::GetPolicyError, R>> for Error
473where
474 R: Send + Sync + std::fmt::Debug + 'static,
475{
476 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_policy::GetPolicyError, R>) -> Self {
477 match err {
478 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
479 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
480 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
481 source: err.into(),
482 }),
483 }
484 }
485}
486impl From<crate::operation::get_policy::GetPolicyError> for Error {
487 fn from(err: crate::operation::get_policy::GetPolicyError) -> Self {
488 match err {
489 crate::operation::get_policy::GetPolicyError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
490 crate::operation::get_policy::GetPolicyError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
491 crate::operation::get_policy::GetPolicyError::InternalServerException(inner) => Error::InternalServerException(inner),
492 crate::operation::get_policy::GetPolicyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
493 crate::operation::get_policy::GetPolicyError::ValidationException(inner) => Error::ValidationException(inner),
494 crate::operation::get_policy::GetPolicyError::Unhandled(inner) => Error::Unhandled(inner),
495 }
496 }
497}
498impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_policy_store::GetPolicyStoreError, R>> for Error
499where
500 R: Send + Sync + std::fmt::Debug + 'static,
501{
502 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_policy_store::GetPolicyStoreError, R>) -> Self {
503 match err {
504 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
505 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
506 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
507 source: err.into(),
508 }),
509 }
510 }
511}
512impl From<crate::operation::get_policy_store::GetPolicyStoreError> for Error {
513 fn from(err: crate::operation::get_policy_store::GetPolicyStoreError) -> Self {
514 match err {
515 crate::operation::get_policy_store::GetPolicyStoreError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
516 crate::operation::get_policy_store::GetPolicyStoreError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
517 crate::operation::get_policy_store::GetPolicyStoreError::InternalServerException(inner) => Error::InternalServerException(inner),
518 crate::operation::get_policy_store::GetPolicyStoreError::ThrottlingException(inner) => Error::ThrottlingException(inner),
519 crate::operation::get_policy_store::GetPolicyStoreError::ValidationException(inner) => Error::ValidationException(inner),
520 crate::operation::get_policy_store::GetPolicyStoreError::Unhandled(inner) => Error::Unhandled(inner),
521 }
522 }
523}
524impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_policy_template::GetPolicyTemplateError, R>> for Error
525where
526 R: Send + Sync + std::fmt::Debug + 'static,
527{
528 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_policy_template::GetPolicyTemplateError, R>) -> Self {
529 match err {
530 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
531 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
532 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
533 source: err.into(),
534 }),
535 }
536 }
537}
538impl From<crate::operation::get_policy_template::GetPolicyTemplateError> for Error {
539 fn from(err: crate::operation::get_policy_template::GetPolicyTemplateError) -> Self {
540 match err {
541 crate::operation::get_policy_template::GetPolicyTemplateError::ResourceNotFoundException(inner) => {
542 Error::ResourceNotFoundException(inner)
543 }
544 crate::operation::get_policy_template::GetPolicyTemplateError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
545 crate::operation::get_policy_template::GetPolicyTemplateError::InternalServerException(inner) => Error::InternalServerException(inner),
546 crate::operation::get_policy_template::GetPolicyTemplateError::ThrottlingException(inner) => Error::ThrottlingException(inner),
547 crate::operation::get_policy_template::GetPolicyTemplateError::ValidationException(inner) => Error::ValidationException(inner),
548 crate::operation::get_policy_template::GetPolicyTemplateError::Unhandled(inner) => Error::Unhandled(inner),
549 }
550 }
551}
552impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_schema::GetSchemaError, R>> for Error
553where
554 R: Send + Sync + std::fmt::Debug + 'static,
555{
556 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_schema::GetSchemaError, R>) -> Self {
557 match err {
558 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
559 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
560 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
561 source: err.into(),
562 }),
563 }
564 }
565}
566impl From<crate::operation::get_schema::GetSchemaError> for Error {
567 fn from(err: crate::operation::get_schema::GetSchemaError) -> Self {
568 match err {
569 crate::operation::get_schema::GetSchemaError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
570 crate::operation::get_schema::GetSchemaError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
571 crate::operation::get_schema::GetSchemaError::InternalServerException(inner) => Error::InternalServerException(inner),
572 crate::operation::get_schema::GetSchemaError::ThrottlingException(inner) => Error::ThrottlingException(inner),
573 crate::operation::get_schema::GetSchemaError::ValidationException(inner) => Error::ValidationException(inner),
574 crate::operation::get_schema::GetSchemaError::Unhandled(inner) => Error::Unhandled(inner),
575 }
576 }
577}
578impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::is_authorized::IsAuthorizedError, R>> for Error
579where
580 R: Send + Sync + std::fmt::Debug + 'static,
581{
582 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::is_authorized::IsAuthorizedError, R>) -> Self {
583 match err {
584 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
585 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
586 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
587 source: err.into(),
588 }),
589 }
590 }
591}
592impl From<crate::operation::is_authorized::IsAuthorizedError> for Error {
593 fn from(err: crate::operation::is_authorized::IsAuthorizedError) -> Self {
594 match err {
595 crate::operation::is_authorized::IsAuthorizedError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
596 crate::operation::is_authorized::IsAuthorizedError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
597 crate::operation::is_authorized::IsAuthorizedError::InternalServerException(inner) => Error::InternalServerException(inner),
598 crate::operation::is_authorized::IsAuthorizedError::ThrottlingException(inner) => Error::ThrottlingException(inner),
599 crate::operation::is_authorized::IsAuthorizedError::ValidationException(inner) => Error::ValidationException(inner),
600 crate::operation::is_authorized::IsAuthorizedError::Unhandled(inner) => Error::Unhandled(inner),
601 }
602 }
603}
604impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::is_authorized_with_token::IsAuthorizedWithTokenError, R>> for Error
605where
606 R: Send + Sync + std::fmt::Debug + 'static,
607{
608 fn from(
609 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::is_authorized_with_token::IsAuthorizedWithTokenError, R>,
610 ) -> Self {
611 match err {
612 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
613 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
614 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
615 source: err.into(),
616 }),
617 }
618 }
619}
620impl From<crate::operation::is_authorized_with_token::IsAuthorizedWithTokenError> for Error {
621 fn from(err: crate::operation::is_authorized_with_token::IsAuthorizedWithTokenError) -> Self {
622 match err {
623 crate::operation::is_authorized_with_token::IsAuthorizedWithTokenError::ResourceNotFoundException(inner) => {
624 Error::ResourceNotFoundException(inner)
625 }
626 crate::operation::is_authorized_with_token::IsAuthorizedWithTokenError::AccessDeniedException(inner) => {
627 Error::AccessDeniedException(inner)
628 }
629 crate::operation::is_authorized_with_token::IsAuthorizedWithTokenError::InternalServerException(inner) => {
630 Error::InternalServerException(inner)
631 }
632 crate::operation::is_authorized_with_token::IsAuthorizedWithTokenError::ThrottlingException(inner) => Error::ThrottlingException(inner),
633 crate::operation::is_authorized_with_token::IsAuthorizedWithTokenError::ValidationException(inner) => Error::ValidationException(inner),
634 crate::operation::is_authorized_with_token::IsAuthorizedWithTokenError::Unhandled(inner) => Error::Unhandled(inner),
635 }
636 }
637}
638impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_identity_sources::ListIdentitySourcesError, R>> for Error
639where
640 R: Send + Sync + std::fmt::Debug + 'static,
641{
642 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_identity_sources::ListIdentitySourcesError, R>) -> Self {
643 match err {
644 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
645 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
646 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
647 source: err.into(),
648 }),
649 }
650 }
651}
652impl From<crate::operation::list_identity_sources::ListIdentitySourcesError> for Error {
653 fn from(err: crate::operation::list_identity_sources::ListIdentitySourcesError) -> Self {
654 match err {
655 crate::operation::list_identity_sources::ListIdentitySourcesError::ResourceNotFoundException(inner) => {
656 Error::ResourceNotFoundException(inner)
657 }
658 crate::operation::list_identity_sources::ListIdentitySourcesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
659 crate::operation::list_identity_sources::ListIdentitySourcesError::InternalServerException(inner) => {
660 Error::InternalServerException(inner)
661 }
662 crate::operation::list_identity_sources::ListIdentitySourcesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
663 crate::operation::list_identity_sources::ListIdentitySourcesError::ValidationException(inner) => Error::ValidationException(inner),
664 crate::operation::list_identity_sources::ListIdentitySourcesError::Unhandled(inner) => Error::Unhandled(inner),
665 }
666 }
667}
668impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_policies::ListPoliciesError, R>> for Error
669where
670 R: Send + Sync + std::fmt::Debug + 'static,
671{
672 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_policies::ListPoliciesError, R>) -> Self {
673 match err {
674 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
675 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
676 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
677 source: err.into(),
678 }),
679 }
680 }
681}
682impl From<crate::operation::list_policies::ListPoliciesError> for Error {
683 fn from(err: crate::operation::list_policies::ListPoliciesError) -> Self {
684 match err {
685 crate::operation::list_policies::ListPoliciesError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
686 crate::operation::list_policies::ListPoliciesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
687 crate::operation::list_policies::ListPoliciesError::InternalServerException(inner) => Error::InternalServerException(inner),
688 crate::operation::list_policies::ListPoliciesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
689 crate::operation::list_policies::ListPoliciesError::ValidationException(inner) => Error::ValidationException(inner),
690 crate::operation::list_policies::ListPoliciesError::Unhandled(inner) => Error::Unhandled(inner),
691 }
692 }
693}
694impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_policy_stores::ListPolicyStoresError, R>> for Error
695where
696 R: Send + Sync + std::fmt::Debug + 'static,
697{
698 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_policy_stores::ListPolicyStoresError, R>) -> Self {
699 match err {
700 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
701 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
702 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
703 source: err.into(),
704 }),
705 }
706 }
707}
708impl From<crate::operation::list_policy_stores::ListPolicyStoresError> for Error {
709 fn from(err: crate::operation::list_policy_stores::ListPolicyStoresError) -> Self {
710 match err {
711 crate::operation::list_policy_stores::ListPolicyStoresError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
712 crate::operation::list_policy_stores::ListPolicyStoresError::InternalServerException(inner) => Error::InternalServerException(inner),
713 crate::operation::list_policy_stores::ListPolicyStoresError::ThrottlingException(inner) => Error::ThrottlingException(inner),
714 crate::operation::list_policy_stores::ListPolicyStoresError::ValidationException(inner) => Error::ValidationException(inner),
715 crate::operation::list_policy_stores::ListPolicyStoresError::Unhandled(inner) => Error::Unhandled(inner),
716 }
717 }
718}
719impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_policy_templates::ListPolicyTemplatesError, R>> for Error
720where
721 R: Send + Sync + std::fmt::Debug + 'static,
722{
723 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_policy_templates::ListPolicyTemplatesError, R>) -> Self {
724 match err {
725 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
726 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
727 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
728 source: err.into(),
729 }),
730 }
731 }
732}
733impl From<crate::operation::list_policy_templates::ListPolicyTemplatesError> for Error {
734 fn from(err: crate::operation::list_policy_templates::ListPolicyTemplatesError) -> Self {
735 match err {
736 crate::operation::list_policy_templates::ListPolicyTemplatesError::ResourceNotFoundException(inner) => {
737 Error::ResourceNotFoundException(inner)
738 }
739 crate::operation::list_policy_templates::ListPolicyTemplatesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
740 crate::operation::list_policy_templates::ListPolicyTemplatesError::InternalServerException(inner) => {
741 Error::InternalServerException(inner)
742 }
743 crate::operation::list_policy_templates::ListPolicyTemplatesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
744 crate::operation::list_policy_templates::ListPolicyTemplatesError::ValidationException(inner) => Error::ValidationException(inner),
745 crate::operation::list_policy_templates::ListPolicyTemplatesError::Unhandled(inner) => Error::Unhandled(inner),
746 }
747 }
748}
749impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
750where
751 R: Send + Sync + std::fmt::Debug + 'static,
752{
753 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
754 match err {
755 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
756 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
757 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
758 source: err.into(),
759 }),
760 }
761 }
762}
763impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
764 fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
765 match err {
766 crate::operation::list_tags_for_resource::ListTagsForResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
767 crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
768 Error::InternalServerException(inner)
769 }
770 crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
771 Error::ResourceNotFoundException(inner)
772 }
773 crate::operation::list_tags_for_resource::ListTagsForResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
774 crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
775 crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
776 }
777 }
778}
779impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_schema::PutSchemaError, R>> for Error
780where
781 R: Send + Sync + std::fmt::Debug + 'static,
782{
783 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_schema::PutSchemaError, R>) -> Self {
784 match err {
785 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
786 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
787 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
788 source: err.into(),
789 }),
790 }
791 }
792}
793impl From<crate::operation::put_schema::PutSchemaError> for Error {
794 fn from(err: crate::operation::put_schema::PutSchemaError) -> Self {
795 match err {
796 crate::operation::put_schema::PutSchemaError::ConflictException(inner) => Error::ConflictException(inner),
797 crate::operation::put_schema::PutSchemaError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
798 crate::operation::put_schema::PutSchemaError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
799 crate::operation::put_schema::PutSchemaError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
800 crate::operation::put_schema::PutSchemaError::InternalServerException(inner) => Error::InternalServerException(inner),
801 crate::operation::put_schema::PutSchemaError::ThrottlingException(inner) => Error::ThrottlingException(inner),
802 crate::operation::put_schema::PutSchemaError::ValidationException(inner) => Error::ValidationException(inner),
803 crate::operation::put_schema::PutSchemaError::Unhandled(inner) => Error::Unhandled(inner),
804 }
805 }
806}
807impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
808where
809 R: Send + Sync + std::fmt::Debug + 'static,
810{
811 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
812 match err {
813 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
814 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
815 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
816 source: err.into(),
817 }),
818 }
819 }
820}
821impl From<crate::operation::tag_resource::TagResourceError> for Error {
822 fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
823 match err {
824 crate::operation::tag_resource::TagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
825 crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
826 crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
827 crate::operation::tag_resource::TagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
828 crate::operation::tag_resource::TagResourceError::TooManyTagsException(inner) => Error::TooManyTagsException(inner),
829 crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
830 crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
831 }
832 }
833}
834impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
835where
836 R: Send + Sync + std::fmt::Debug + 'static,
837{
838 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
839 match err {
840 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
841 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
842 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
843 source: err.into(),
844 }),
845 }
846 }
847}
848impl From<crate::operation::untag_resource::UntagResourceError> for Error {
849 fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
850 match err {
851 crate::operation::untag_resource::UntagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
852 crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
853 crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
854 crate::operation::untag_resource::UntagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
855 crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
856 crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
857 }
858 }
859}
860impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_identity_source::UpdateIdentitySourceError, R>> for Error
861where
862 R: Send + Sync + std::fmt::Debug + 'static,
863{
864 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_identity_source::UpdateIdentitySourceError, R>) -> Self {
865 match err {
866 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
867 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
868 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
869 source: err.into(),
870 }),
871 }
872 }
873}
874impl From<crate::operation::update_identity_source::UpdateIdentitySourceError> for Error {
875 fn from(err: crate::operation::update_identity_source::UpdateIdentitySourceError) -> Self {
876 match err {
877 crate::operation::update_identity_source::UpdateIdentitySourceError::ConflictException(inner) => Error::ConflictException(inner),
878 crate::operation::update_identity_source::UpdateIdentitySourceError::ResourceNotFoundException(inner) => {
879 Error::ResourceNotFoundException(inner)
880 }
881 crate::operation::update_identity_source::UpdateIdentitySourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
882 crate::operation::update_identity_source::UpdateIdentitySourceError::InternalServerException(inner) => {
883 Error::InternalServerException(inner)
884 }
885 crate::operation::update_identity_source::UpdateIdentitySourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
886 crate::operation::update_identity_source::UpdateIdentitySourceError::ValidationException(inner) => Error::ValidationException(inner),
887 crate::operation::update_identity_source::UpdateIdentitySourceError::Unhandled(inner) => Error::Unhandled(inner),
888 }
889 }
890}
891impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_policy::UpdatePolicyError, R>> for Error
892where
893 R: Send + Sync + std::fmt::Debug + 'static,
894{
895 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_policy::UpdatePolicyError, R>) -> Self {
896 match err {
897 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
898 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
899 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
900 source: err.into(),
901 }),
902 }
903 }
904}
905impl From<crate::operation::update_policy::UpdatePolicyError> for Error {
906 fn from(err: crate::operation::update_policy::UpdatePolicyError) -> Self {
907 match err {
908 crate::operation::update_policy::UpdatePolicyError::ConflictException(inner) => Error::ConflictException(inner),
909 crate::operation::update_policy::UpdatePolicyError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
910 crate::operation::update_policy::UpdatePolicyError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
911 crate::operation::update_policy::UpdatePolicyError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
912 crate::operation::update_policy::UpdatePolicyError::InternalServerException(inner) => Error::InternalServerException(inner),
913 crate::operation::update_policy::UpdatePolicyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
914 crate::operation::update_policy::UpdatePolicyError::ValidationException(inner) => Error::ValidationException(inner),
915 crate::operation::update_policy::UpdatePolicyError::Unhandled(inner) => Error::Unhandled(inner),
916 }
917 }
918}
919impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_policy_store::UpdatePolicyStoreError, R>> for Error
920where
921 R: Send + Sync + std::fmt::Debug + 'static,
922{
923 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_policy_store::UpdatePolicyStoreError, R>) -> Self {
924 match err {
925 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
926 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
927 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
928 source: err.into(),
929 }),
930 }
931 }
932}
933impl From<crate::operation::update_policy_store::UpdatePolicyStoreError> for Error {
934 fn from(err: crate::operation::update_policy_store::UpdatePolicyStoreError) -> Self {
935 match err {
936 crate::operation::update_policy_store::UpdatePolicyStoreError::ConflictException(inner) => Error::ConflictException(inner),
937 crate::operation::update_policy_store::UpdatePolicyStoreError::ResourceNotFoundException(inner) => {
938 Error::ResourceNotFoundException(inner)
939 }
940 crate::operation::update_policy_store::UpdatePolicyStoreError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
941 crate::operation::update_policy_store::UpdatePolicyStoreError::InternalServerException(inner) => Error::InternalServerException(inner),
942 crate::operation::update_policy_store::UpdatePolicyStoreError::ThrottlingException(inner) => Error::ThrottlingException(inner),
943 crate::operation::update_policy_store::UpdatePolicyStoreError::ValidationException(inner) => Error::ValidationException(inner),
944 crate::operation::update_policy_store::UpdatePolicyStoreError::Unhandled(inner) => Error::Unhandled(inner),
945 }
946 }
947}
948impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_policy_template::UpdatePolicyTemplateError, R>> for Error
949where
950 R: Send + Sync + std::fmt::Debug + 'static,
951{
952 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_policy_template::UpdatePolicyTemplateError, R>) -> Self {
953 match err {
954 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
955 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
956 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
957 source: err.into(),
958 }),
959 }
960 }
961}
962impl From<crate::operation::update_policy_template::UpdatePolicyTemplateError> for Error {
963 fn from(err: crate::operation::update_policy_template::UpdatePolicyTemplateError) -> Self {
964 match err {
965 crate::operation::update_policy_template::UpdatePolicyTemplateError::ConflictException(inner) => Error::ConflictException(inner),
966 crate::operation::update_policy_template::UpdatePolicyTemplateError::ResourceNotFoundException(inner) => {
967 Error::ResourceNotFoundException(inner)
968 }
969 crate::operation::update_policy_template::UpdatePolicyTemplateError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
970 crate::operation::update_policy_template::UpdatePolicyTemplateError::InternalServerException(inner) => {
971 Error::InternalServerException(inner)
972 }
973 crate::operation::update_policy_template::UpdatePolicyTemplateError::ThrottlingException(inner) => Error::ThrottlingException(inner),
974 crate::operation::update_policy_template::UpdatePolicyTemplateError::ValidationException(inner) => Error::ValidationException(inner),
975 crate::operation::update_policy_template::UpdatePolicyTemplateError::Unhandled(inner) => Error::Unhandled(inner),
976 }
977 }
978}
979impl ::std::error::Error for Error {
980 fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
981 match self {
982 Error::AccessDeniedException(inner) => inner.source(),
983 Error::ConflictException(inner) => inner.source(),
984 Error::InternalServerException(inner) => inner.source(),
985 Error::InvalidStateException(inner) => inner.source(),
986 Error::ResourceNotFoundException(inner) => inner.source(),
987 Error::ServiceQuotaExceededException(inner) => inner.source(),
988 Error::ThrottlingException(inner) => inner.source(),
989 Error::TooManyTagsException(inner) => inner.source(),
990 Error::ValidationException(inner) => inner.source(),
991 Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
992 }
993 }
994}
995impl ::aws_types::request_id::RequestId for Error {
996 fn request_id(&self) -> Option<&str> {
997 match self {
998 Self::AccessDeniedException(e) => e.request_id(),
999 Self::ConflictException(e) => e.request_id(),
1000 Self::InternalServerException(e) => e.request_id(),
1001 Self::InvalidStateException(e) => e.request_id(),
1002 Self::ResourceNotFoundException(e) => e.request_id(),
1003 Self::ServiceQuotaExceededException(e) => e.request_id(),
1004 Self::ThrottlingException(e) => e.request_id(),
1005 Self::TooManyTagsException(e) => e.request_id(),
1006 Self::ValidationException(e) => e.request_id(),
1007 Self::Unhandled(e) => e.meta.request_id(),
1008 }
1009 }
1010}