aws_sdk_sts/
error_meta.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// All possible error types for this service.
3#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6    /// <p>The web identity token that was passed is expired or is not valid. Get a new identity token from the identity provider and then retry the request.</p>
7    ExpiredTokenException(crate::types::error::ExpiredTokenException),
8    /// <p>The trade-in token provided in the request has expired and can no longer be exchanged for credentials. Request a new token and retry the operation.</p>
9    ExpiredTradeInTokenException(crate::types::error::ExpiredTradeInTokenException),
10    /// <p>The request could not be fulfilled because the identity provider (IDP) that was asked to verify the incoming identity token could not be reached. This is often a transient error caused by network conditions. Retry the request a limited number of times so that you don't exceed the request rate. If the error persists, the identity provider might be down or not responding.</p>
11    IdpCommunicationErrorException(crate::types::error::IdpCommunicationErrorException),
12    /// <p>The identity provider (IdP) reported that authentication failed. This might be because the claim is invalid.</p>
13    /// <p>If this error is returned for the <code>AssumeRoleWithWebIdentity</code> operation, it can also mean that the claim has expired or has been explicitly revoked.</p>
14    IdpRejectedClaimException(crate::types::error::IdpRejectedClaimException),
15    /// <p>The error returned if the message passed to <code>DecodeAuthorizationMessage</code> was invalid. This can happen if the token contains invalid characters, such as line breaks, or if the message has expired.</p>
16    InvalidAuthorizationMessageException(crate::types::error::InvalidAuthorizationMessageException),
17    /// <p>The web identity token that was passed could not be validated by Amazon Web Services. Get a new identity token from the identity provider and then retry the request.</p>
18    InvalidIdentityTokenException(crate::types::error::InvalidIdentityTokenException),
19    /// <p>The requested token payload size exceeds the maximum allowed size. Reduce the number of request tags included in the <code>GetWebIdentityToken</code> API call to reduce the token payload size.</p>
20    JwtPayloadSizeExceededException(crate::types::error::JwtPayloadSizeExceededException),
21    /// <p>The request was rejected because the policy document was malformed. The error message describes the specific error.</p>
22    MalformedPolicyDocumentException(crate::types::error::MalformedPolicyDocumentException),
23    /// <p>The outbound web identity federation feature is not enabled for this account. To use this feature, you must first enable it through the Amazon Web Services Management Console or API.</p>
24    OutboundWebIdentityFederationDisabledException(crate::types::error::OutboundWebIdentityFederationDisabledException),
25    /// <p>The request was rejected because the total packed size of the session policies and session tags combined was too large. An Amazon Web Services conversion compresses the session policy document, session policy ARNs, and session tags into a packed binary format that has a separate limit. The error message indicates by percentage how close the policies and tags are to the upper size limit. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html">Passing Session Tags in STS</a> in the <i>IAM User Guide</i>.</p>
26    /// <p>You could receive this error even though you meet other defined session policy and session tag limits. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length">IAM and STS Entity Character Limits</a> in the <i>IAM User Guide</i>.</p>
27    PackedPolicyTooLargeException(crate::types::error::PackedPolicyTooLargeException),
28    /// <p>STS is not activated in the requested region for the account that is being asked to generate credentials. The account administrator must use the IAM console to activate STS in that region. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html#sts-regions-activate-deactivate">Activating and Deactivating STS in an Amazon Web Services Region</a> in the <i>IAM User Guide</i>.</p>
29    RegionDisabledException(crate::types::error::RegionDisabledException),
30    /// <p>The requested token duration would extend the session beyond its original expiration time. You cannot use this operation to extend the lifetime of a session beyond what was granted when the session was originally created.</p>
31    SessionDurationEscalationException(crate::types::error::SessionDurationEscalationException),
32    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
33    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
34    variable wildcard pattern and check `.code()`:
35     \
36    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
37     \
38    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
39    Unhandled(crate::error::sealed_unhandled::Unhandled),
40}
41impl ::std::fmt::Display for Error {
42    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
43        match self {
44            Error::ExpiredTokenException(inner) => inner.fmt(f),
45            Error::ExpiredTradeInTokenException(inner) => inner.fmt(f),
46            Error::IdpCommunicationErrorException(inner) => inner.fmt(f),
47            Error::IdpRejectedClaimException(inner) => inner.fmt(f),
48            Error::InvalidAuthorizationMessageException(inner) => inner.fmt(f),
49            Error::InvalidIdentityTokenException(inner) => inner.fmt(f),
50            Error::JwtPayloadSizeExceededException(inner) => inner.fmt(f),
51            Error::MalformedPolicyDocumentException(inner) => inner.fmt(f),
52            Error::OutboundWebIdentityFederationDisabledException(inner) => inner.fmt(f),
53            Error::PackedPolicyTooLargeException(inner) => inner.fmt(f),
54            Error::RegionDisabledException(inner) => inner.fmt(f),
55            Error::SessionDurationEscalationException(inner) => inner.fmt(f),
56            Error::Unhandled(_) => {
57                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
58                    write!(f, "unhandled error ({code})")
59                } else {
60                    f.write_str("unhandled error")
61                }
62            }
63        }
64    }
65}
66impl From<::aws_smithy_types::error::operation::BuildError> for Error {
67    fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
68        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
69            source: value.into(),
70            meta: ::std::default::Default::default(),
71        })
72    }
73}
74impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
75    fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
76        match self {
77            Self::ExpiredTokenException(inner) => inner.meta(),
78            Self::ExpiredTradeInTokenException(inner) => inner.meta(),
79            Self::IdpCommunicationErrorException(inner) => inner.meta(),
80            Self::IdpRejectedClaimException(inner) => inner.meta(),
81            Self::InvalidAuthorizationMessageException(inner) => inner.meta(),
82            Self::InvalidIdentityTokenException(inner) => inner.meta(),
83            Self::JwtPayloadSizeExceededException(inner) => inner.meta(),
84            Self::MalformedPolicyDocumentException(inner) => inner.meta(),
85            Self::OutboundWebIdentityFederationDisabledException(inner) => inner.meta(),
86            Self::PackedPolicyTooLargeException(inner) => inner.meta(),
87            Self::RegionDisabledException(inner) => inner.meta(),
88            Self::SessionDurationEscalationException(inner) => inner.meta(),
89            Self::Unhandled(inner) => &inner.meta,
90        }
91    }
92}
93impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::assume_role::AssumeRoleError, R>> for Error
94where
95    R: Send + Sync + std::fmt::Debug + 'static,
96{
97    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::assume_role::AssumeRoleError, R>) -> Self {
98        match err {
99            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
100            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
101                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
102                source: err.into(),
103            }),
104        }
105    }
106}
107impl From<crate::operation::assume_role::AssumeRoleError> for Error {
108    fn from(err: crate::operation::assume_role::AssumeRoleError) -> Self {
109        match err {
110            crate::operation::assume_role::AssumeRoleError::ExpiredTokenException(inner) => Error::ExpiredTokenException(inner),
111            crate::operation::assume_role::AssumeRoleError::MalformedPolicyDocumentException(inner) => Error::MalformedPolicyDocumentException(inner),
112            crate::operation::assume_role::AssumeRoleError::PackedPolicyTooLargeException(inner) => Error::PackedPolicyTooLargeException(inner),
113            crate::operation::assume_role::AssumeRoleError::RegionDisabledException(inner) => Error::RegionDisabledException(inner),
114            crate::operation::assume_role::AssumeRoleError::Unhandled(inner) => Error::Unhandled(inner),
115        }
116    }
117}
118impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::assume_role_with_saml::AssumeRoleWithSAMLError, R>> for Error
119where
120    R: Send + Sync + std::fmt::Debug + 'static,
121{
122    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::assume_role_with_saml::AssumeRoleWithSAMLError, R>) -> Self {
123        match err {
124            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
125            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
126                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
127                source: err.into(),
128            }),
129        }
130    }
131}
132impl From<crate::operation::assume_role_with_saml::AssumeRoleWithSAMLError> for Error {
133    fn from(err: crate::operation::assume_role_with_saml::AssumeRoleWithSAMLError) -> Self {
134        match err {
135            crate::operation::assume_role_with_saml::AssumeRoleWithSAMLError::ExpiredTokenException(inner) => Error::ExpiredTokenException(inner),
136            crate::operation::assume_role_with_saml::AssumeRoleWithSAMLError::IdpRejectedClaimException(inner) => {
137                Error::IdpRejectedClaimException(inner)
138            }
139            crate::operation::assume_role_with_saml::AssumeRoleWithSAMLError::InvalidIdentityTokenException(inner) => {
140                Error::InvalidIdentityTokenException(inner)
141            }
142            crate::operation::assume_role_with_saml::AssumeRoleWithSAMLError::MalformedPolicyDocumentException(inner) => {
143                Error::MalformedPolicyDocumentException(inner)
144            }
145            crate::operation::assume_role_with_saml::AssumeRoleWithSAMLError::PackedPolicyTooLargeException(inner) => {
146                Error::PackedPolicyTooLargeException(inner)
147            }
148            crate::operation::assume_role_with_saml::AssumeRoleWithSAMLError::RegionDisabledException(inner) => Error::RegionDisabledException(inner),
149            crate::operation::assume_role_with_saml::AssumeRoleWithSAMLError::Unhandled(inner) => Error::Unhandled(inner),
150        }
151    }
152}
153impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::assume_role_with_web_identity::AssumeRoleWithWebIdentityError, R>>
154    for Error
155where
156    R: Send + Sync + std::fmt::Debug + 'static,
157{
158    fn from(
159        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::assume_role_with_web_identity::AssumeRoleWithWebIdentityError, R>,
160    ) -> Self {
161        match err {
162            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
163            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
164                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
165                source: err.into(),
166            }),
167        }
168    }
169}
170impl From<crate::operation::assume_role_with_web_identity::AssumeRoleWithWebIdentityError> for Error {
171    fn from(err: crate::operation::assume_role_with_web_identity::AssumeRoleWithWebIdentityError) -> Self {
172        match err {
173            crate::operation::assume_role_with_web_identity::AssumeRoleWithWebIdentityError::ExpiredTokenException(inner) => {
174                Error::ExpiredTokenException(inner)
175            }
176            crate::operation::assume_role_with_web_identity::AssumeRoleWithWebIdentityError::IdpCommunicationErrorException(inner) => {
177                Error::IdpCommunicationErrorException(inner)
178            }
179            crate::operation::assume_role_with_web_identity::AssumeRoleWithWebIdentityError::IdpRejectedClaimException(inner) => {
180                Error::IdpRejectedClaimException(inner)
181            }
182            crate::operation::assume_role_with_web_identity::AssumeRoleWithWebIdentityError::InvalidIdentityTokenException(inner) => {
183                Error::InvalidIdentityTokenException(inner)
184            }
185            crate::operation::assume_role_with_web_identity::AssumeRoleWithWebIdentityError::MalformedPolicyDocumentException(inner) => {
186                Error::MalformedPolicyDocumentException(inner)
187            }
188            crate::operation::assume_role_with_web_identity::AssumeRoleWithWebIdentityError::PackedPolicyTooLargeException(inner) => {
189                Error::PackedPolicyTooLargeException(inner)
190            }
191            crate::operation::assume_role_with_web_identity::AssumeRoleWithWebIdentityError::RegionDisabledException(inner) => {
192                Error::RegionDisabledException(inner)
193            }
194            crate::operation::assume_role_with_web_identity::AssumeRoleWithWebIdentityError::Unhandled(inner) => Error::Unhandled(inner),
195        }
196    }
197}
198impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::assume_root::AssumeRootError, R>> for Error
199where
200    R: Send + Sync + std::fmt::Debug + 'static,
201{
202    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::assume_root::AssumeRootError, R>) -> Self {
203        match err {
204            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
205            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
206                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
207                source: err.into(),
208            }),
209        }
210    }
211}
212impl From<crate::operation::assume_root::AssumeRootError> for Error {
213    fn from(err: crate::operation::assume_root::AssumeRootError) -> Self {
214        match err {
215            crate::operation::assume_root::AssumeRootError::ExpiredTokenException(inner) => Error::ExpiredTokenException(inner),
216            crate::operation::assume_root::AssumeRootError::RegionDisabledException(inner) => Error::RegionDisabledException(inner),
217            crate::operation::assume_root::AssumeRootError::Unhandled(inner) => Error::Unhandled(inner),
218        }
219    }
220}
221impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::decode_authorization_message::DecodeAuthorizationMessageError, R>>
222    for Error
223where
224    R: Send + Sync + std::fmt::Debug + 'static,
225{
226    fn from(
227        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::decode_authorization_message::DecodeAuthorizationMessageError, R>,
228    ) -> Self {
229        match err {
230            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
231            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
232                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
233                source: err.into(),
234            }),
235        }
236    }
237}
238impl From<crate::operation::decode_authorization_message::DecodeAuthorizationMessageError> for Error {
239    fn from(err: crate::operation::decode_authorization_message::DecodeAuthorizationMessageError) -> Self {
240        match err {
241            crate::operation::decode_authorization_message::DecodeAuthorizationMessageError::InvalidAuthorizationMessageException(inner) => {
242                Error::InvalidAuthorizationMessageException(inner)
243            }
244            crate::operation::decode_authorization_message::DecodeAuthorizationMessageError::Unhandled(inner) => Error::Unhandled(inner),
245        }
246    }
247}
248impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_access_key_info::GetAccessKeyInfoError, R>> for Error
249where
250    R: Send + Sync + std::fmt::Debug + 'static,
251{
252    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_access_key_info::GetAccessKeyInfoError, R>) -> Self {
253        match err {
254            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
255            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
256                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
257                source: err.into(),
258            }),
259        }
260    }
261}
262impl From<crate::operation::get_access_key_info::GetAccessKeyInfoError> for Error {
263    fn from(err: crate::operation::get_access_key_info::GetAccessKeyInfoError) -> Self {
264        match err {
265            crate::operation::get_access_key_info::GetAccessKeyInfoError::Unhandled(inner) => Error::Unhandled(inner),
266        }
267    }
268}
269impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_caller_identity::GetCallerIdentityError, R>> for Error
270where
271    R: Send + Sync + std::fmt::Debug + 'static,
272{
273    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_caller_identity::GetCallerIdentityError, R>) -> Self {
274        match err {
275            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
276            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
277                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
278                source: err.into(),
279            }),
280        }
281    }
282}
283impl From<crate::operation::get_caller_identity::GetCallerIdentityError> for Error {
284    fn from(err: crate::operation::get_caller_identity::GetCallerIdentityError) -> Self {
285        match err {
286            crate::operation::get_caller_identity::GetCallerIdentityError::Unhandled(inner) => Error::Unhandled(inner),
287        }
288    }
289}
290impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_delegated_access_token::GetDelegatedAccessTokenError, R>>
291    for Error
292where
293    R: Send + Sync + std::fmt::Debug + 'static,
294{
295    fn from(
296        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_delegated_access_token::GetDelegatedAccessTokenError, R>,
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::get_delegated_access_token::GetDelegatedAccessTokenError> for Error {
308    fn from(err: crate::operation::get_delegated_access_token::GetDelegatedAccessTokenError) -> Self {
309        match err {
310            crate::operation::get_delegated_access_token::GetDelegatedAccessTokenError::ExpiredTradeInTokenException(inner) => {
311                Error::ExpiredTradeInTokenException(inner)
312            }
313            crate::operation::get_delegated_access_token::GetDelegatedAccessTokenError::PackedPolicyTooLargeException(inner) => {
314                Error::PackedPolicyTooLargeException(inner)
315            }
316            crate::operation::get_delegated_access_token::GetDelegatedAccessTokenError::RegionDisabledException(inner) => {
317                Error::RegionDisabledException(inner)
318            }
319            crate::operation::get_delegated_access_token::GetDelegatedAccessTokenError::Unhandled(inner) => Error::Unhandled(inner),
320        }
321    }
322}
323impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_federation_token::GetFederationTokenError, R>> for Error
324where
325    R: Send + Sync + std::fmt::Debug + 'static,
326{
327    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_federation_token::GetFederationTokenError, R>) -> Self {
328        match err {
329            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
330            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
331                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
332                source: err.into(),
333            }),
334        }
335    }
336}
337impl From<crate::operation::get_federation_token::GetFederationTokenError> for Error {
338    fn from(err: crate::operation::get_federation_token::GetFederationTokenError) -> Self {
339        match err {
340            crate::operation::get_federation_token::GetFederationTokenError::MalformedPolicyDocumentException(inner) => {
341                Error::MalformedPolicyDocumentException(inner)
342            }
343            crate::operation::get_federation_token::GetFederationTokenError::PackedPolicyTooLargeException(inner) => {
344                Error::PackedPolicyTooLargeException(inner)
345            }
346            crate::operation::get_federation_token::GetFederationTokenError::RegionDisabledException(inner) => Error::RegionDisabledException(inner),
347            crate::operation::get_federation_token::GetFederationTokenError::Unhandled(inner) => Error::Unhandled(inner),
348        }
349    }
350}
351impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_session_token::GetSessionTokenError, R>> for Error
352where
353    R: Send + Sync + std::fmt::Debug + 'static,
354{
355    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_session_token::GetSessionTokenError, R>) -> Self {
356        match err {
357            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
358            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
359                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
360                source: err.into(),
361            }),
362        }
363    }
364}
365impl From<crate::operation::get_session_token::GetSessionTokenError> for Error {
366    fn from(err: crate::operation::get_session_token::GetSessionTokenError) -> Self {
367        match err {
368            crate::operation::get_session_token::GetSessionTokenError::RegionDisabledException(inner) => Error::RegionDisabledException(inner),
369            crate::operation::get_session_token::GetSessionTokenError::Unhandled(inner) => Error::Unhandled(inner),
370        }
371    }
372}
373impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_web_identity_token::GetWebIdentityTokenError, R>> for Error
374where
375    R: Send + Sync + std::fmt::Debug + 'static,
376{
377    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_web_identity_token::GetWebIdentityTokenError, R>) -> Self {
378        match err {
379            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
380            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
381                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
382                source: err.into(),
383            }),
384        }
385    }
386}
387impl From<crate::operation::get_web_identity_token::GetWebIdentityTokenError> for Error {
388    fn from(err: crate::operation::get_web_identity_token::GetWebIdentityTokenError) -> Self {
389        match err {
390            crate::operation::get_web_identity_token::GetWebIdentityTokenError::JwtPayloadSizeExceededException(inner) => {
391                Error::JwtPayloadSizeExceededException(inner)
392            }
393            crate::operation::get_web_identity_token::GetWebIdentityTokenError::OutboundWebIdentityFederationDisabledException(inner) => {
394                Error::OutboundWebIdentityFederationDisabledException(inner)
395            }
396            crate::operation::get_web_identity_token::GetWebIdentityTokenError::SessionDurationEscalationException(inner) => {
397                Error::SessionDurationEscalationException(inner)
398            }
399            crate::operation::get_web_identity_token::GetWebIdentityTokenError::Unhandled(inner) => Error::Unhandled(inner),
400        }
401    }
402}
403impl ::std::error::Error for Error {
404    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
405        match self {
406            Error::ExpiredTokenException(inner) => inner.source(),
407            Error::ExpiredTradeInTokenException(inner) => inner.source(),
408            Error::IdpCommunicationErrorException(inner) => inner.source(),
409            Error::IdpRejectedClaimException(inner) => inner.source(),
410            Error::InvalidAuthorizationMessageException(inner) => inner.source(),
411            Error::InvalidIdentityTokenException(inner) => inner.source(),
412            Error::JwtPayloadSizeExceededException(inner) => inner.source(),
413            Error::MalformedPolicyDocumentException(inner) => inner.source(),
414            Error::OutboundWebIdentityFederationDisabledException(inner) => inner.source(),
415            Error::PackedPolicyTooLargeException(inner) => inner.source(),
416            Error::RegionDisabledException(inner) => inner.source(),
417            Error::SessionDurationEscalationException(inner) => inner.source(),
418            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
419        }
420    }
421}
422impl ::aws_types::request_id::RequestId for Error {
423    fn request_id(&self) -> Option<&str> {
424        match self {
425            Self::ExpiredTokenException(e) => e.request_id(),
426            Self::ExpiredTradeInTokenException(e) => e.request_id(),
427            Self::IdpCommunicationErrorException(e) => e.request_id(),
428            Self::IdpRejectedClaimException(e) => e.request_id(),
429            Self::InvalidAuthorizationMessageException(e) => e.request_id(),
430            Self::InvalidIdentityTokenException(e) => e.request_id(),
431            Self::JwtPayloadSizeExceededException(e) => e.request_id(),
432            Self::MalformedPolicyDocumentException(e) => e.request_id(),
433            Self::OutboundWebIdentityFederationDisabledException(e) => e.request_id(),
434            Self::PackedPolicyTooLargeException(e) => e.request_id(),
435            Self::RegionDisabledException(e) => e.request_id(),
436            Self::SessionDurationEscalationException(e) => e.request_id(),
437            Self::Unhandled(e) => e.meta.request_id(),
438        }
439    }
440}