Skip to main content

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(_) => if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
57                                        write!(f, "unhandled error ({code})")
58                                    } else {
59                                        f.write_str("unhandled error")
60                                    }
61        }
62    }
63}
64impl From<::aws_smithy_types::error::operation::BuildError> for Error {
65                fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
66                    Error::Unhandled(crate::error::sealed_unhandled::Unhandled { source: value.into(), meta: ::std::default::Default::default() })
67                }
68            }
69impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
70                fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
71                    match self {
72                        Self::ExpiredTokenException(inner) => inner.meta(),
73Self::ExpiredTradeInTokenException(inner) => inner.meta(),
74Self::IdpCommunicationErrorException(inner) => inner.meta(),
75Self::IdpRejectedClaimException(inner) => inner.meta(),
76Self::InvalidAuthorizationMessageException(inner) => inner.meta(),
77Self::InvalidIdentityTokenException(inner) => inner.meta(),
78Self::JwtPayloadSizeExceededException(inner) => inner.meta(),
79Self::MalformedPolicyDocumentException(inner) => inner.meta(),
80Self::OutboundWebIdentityFederationDisabledException(inner) => inner.meta(),
81Self::PackedPolicyTooLargeException(inner) => inner.meta(),
82Self::RegionDisabledException(inner) => inner.meta(),
83Self::SessionDurationEscalationException(inner) => inner.meta(),
84                        Self::Unhandled(inner) => &inner.meta,
85                    }
86                }
87            }
88impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::assume_role::AssumeRoleError, R>> for Error where R: Send + Sync + std::fmt::Debug + 'static {
89    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::assume_role::AssumeRoleError, R>) -> Self {
90        match err {
91            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
92            _ => Error::Unhandled(
93                                        crate::error::sealed_unhandled::Unhandled {
94                                            meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
95                                            source: err.into(),
96                                        }
97                                    ),
98        }
99    }
100}
101impl From<crate::operation::assume_role::AssumeRoleError> for Error {
102    fn from(err: crate::operation::assume_role::AssumeRoleError) -> Self {
103        match err {
104            crate::operation::assume_role::AssumeRoleError::ExpiredTokenException(inner) => Error::ExpiredTokenException(inner),
105            crate::operation::assume_role::AssumeRoleError::MalformedPolicyDocumentException(inner) => Error::MalformedPolicyDocumentException(inner),
106            crate::operation::assume_role::AssumeRoleError::PackedPolicyTooLargeException(inner) => Error::PackedPolicyTooLargeException(inner),
107            crate::operation::assume_role::AssumeRoleError::RegionDisabledException(inner) => Error::RegionDisabledException(inner),
108            crate::operation::assume_role::AssumeRoleError::Unhandled(inner) => Error::Unhandled(inner),
109        }
110    }
111}
112impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::assume_role_with_saml::AssumeRoleWithSAMLError, R>> for Error where R: Send + Sync + std::fmt::Debug + 'static {
113    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::assume_role_with_saml::AssumeRoleWithSAMLError, R>) -> Self {
114        match err {
115            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
116            _ => Error::Unhandled(
117                                        crate::error::sealed_unhandled::Unhandled {
118                                            meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
119                                            source: err.into(),
120                                        }
121                                    ),
122        }
123    }
124}
125impl From<crate::operation::assume_role_with_saml::AssumeRoleWithSAMLError> for Error {
126    fn from(err: crate::operation::assume_role_with_saml::AssumeRoleWithSAMLError) -> Self {
127        match err {
128            crate::operation::assume_role_with_saml::AssumeRoleWithSAMLError::ExpiredTokenException(inner) => Error::ExpiredTokenException(inner),
129            crate::operation::assume_role_with_saml::AssumeRoleWithSAMLError::IdpRejectedClaimException(inner) => Error::IdpRejectedClaimException(inner),
130            crate::operation::assume_role_with_saml::AssumeRoleWithSAMLError::InvalidIdentityTokenException(inner) => Error::InvalidIdentityTokenException(inner),
131            crate::operation::assume_role_with_saml::AssumeRoleWithSAMLError::MalformedPolicyDocumentException(inner) => Error::MalformedPolicyDocumentException(inner),
132            crate::operation::assume_role_with_saml::AssumeRoleWithSAMLError::PackedPolicyTooLargeException(inner) => Error::PackedPolicyTooLargeException(inner),
133            crate::operation::assume_role_with_saml::AssumeRoleWithSAMLError::RegionDisabledException(inner) => Error::RegionDisabledException(inner),
134            crate::operation::assume_role_with_saml::AssumeRoleWithSAMLError::Unhandled(inner) => Error::Unhandled(inner),
135        }
136    }
137}
138impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::assume_role_with_web_identity::AssumeRoleWithWebIdentityError, R>> for Error where R: Send + Sync + std::fmt::Debug + 'static {
139    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::assume_role_with_web_identity::AssumeRoleWithWebIdentityError, R>) -> Self {
140        match err {
141            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
142            _ => Error::Unhandled(
143                                        crate::error::sealed_unhandled::Unhandled {
144                                            meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
145                                            source: err.into(),
146                                        }
147                                    ),
148        }
149    }
150}
151impl From<crate::operation::assume_role_with_web_identity::AssumeRoleWithWebIdentityError> for Error {
152    fn from(err: crate::operation::assume_role_with_web_identity::AssumeRoleWithWebIdentityError) -> Self {
153        match err {
154            crate::operation::assume_role_with_web_identity::AssumeRoleWithWebIdentityError::ExpiredTokenException(inner) => Error::ExpiredTokenException(inner),
155            crate::operation::assume_role_with_web_identity::AssumeRoleWithWebIdentityError::IdpCommunicationErrorException(inner) => Error::IdpCommunicationErrorException(inner),
156            crate::operation::assume_role_with_web_identity::AssumeRoleWithWebIdentityError::IdpRejectedClaimException(inner) => Error::IdpRejectedClaimException(inner),
157            crate::operation::assume_role_with_web_identity::AssumeRoleWithWebIdentityError::InvalidIdentityTokenException(inner) => Error::InvalidIdentityTokenException(inner),
158            crate::operation::assume_role_with_web_identity::AssumeRoleWithWebIdentityError::MalformedPolicyDocumentException(inner) => Error::MalformedPolicyDocumentException(inner),
159            crate::operation::assume_role_with_web_identity::AssumeRoleWithWebIdentityError::PackedPolicyTooLargeException(inner) => Error::PackedPolicyTooLargeException(inner),
160            crate::operation::assume_role_with_web_identity::AssumeRoleWithWebIdentityError::RegionDisabledException(inner) => Error::RegionDisabledException(inner),
161            crate::operation::assume_role_with_web_identity::AssumeRoleWithWebIdentityError::Unhandled(inner) => Error::Unhandled(inner),
162        }
163    }
164}
165impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::assume_root::AssumeRootError, R>> for Error where R: Send + Sync + std::fmt::Debug + 'static {
166    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::assume_root::AssumeRootError, R>) -> Self {
167        match err {
168            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
169            _ => Error::Unhandled(
170                                        crate::error::sealed_unhandled::Unhandled {
171                                            meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
172                                            source: err.into(),
173                                        }
174                                    ),
175        }
176    }
177}
178impl From<crate::operation::assume_root::AssumeRootError> for Error {
179    fn from(err: crate::operation::assume_root::AssumeRootError) -> Self {
180        match err {
181            crate::operation::assume_root::AssumeRootError::ExpiredTokenException(inner) => Error::ExpiredTokenException(inner),
182            crate::operation::assume_root::AssumeRootError::RegionDisabledException(inner) => Error::RegionDisabledException(inner),
183            crate::operation::assume_root::AssumeRootError::Unhandled(inner) => Error::Unhandled(inner),
184        }
185    }
186}
187impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::decode_authorization_message::DecodeAuthorizationMessageError, R>> for Error where R: Send + Sync + std::fmt::Debug + 'static {
188    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::decode_authorization_message::DecodeAuthorizationMessageError, R>) -> Self {
189        match err {
190            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
191            _ => Error::Unhandled(
192                                        crate::error::sealed_unhandled::Unhandled {
193                                            meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
194                                            source: err.into(),
195                                        }
196                                    ),
197        }
198    }
199}
200impl From<crate::operation::decode_authorization_message::DecodeAuthorizationMessageError> for Error {
201    fn from(err: crate::operation::decode_authorization_message::DecodeAuthorizationMessageError) -> Self {
202        match err {
203            crate::operation::decode_authorization_message::DecodeAuthorizationMessageError::InvalidAuthorizationMessageException(inner) => Error::InvalidAuthorizationMessageException(inner),
204            crate::operation::decode_authorization_message::DecodeAuthorizationMessageError::Unhandled(inner) => Error::Unhandled(inner),
205        }
206    }
207}
208impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_access_key_info::GetAccessKeyInfoError, R>> for Error where R: Send + Sync + std::fmt::Debug + 'static {
209    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_access_key_info::GetAccessKeyInfoError, R>) -> Self {
210        match err {
211            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
212            _ => Error::Unhandled(
213                                        crate::error::sealed_unhandled::Unhandled {
214                                            meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
215                                            source: err.into(),
216                                        }
217                                    ),
218        }
219    }
220}
221impl From<crate::operation::get_access_key_info::GetAccessKeyInfoError> for Error {
222    fn from(err: crate::operation::get_access_key_info::GetAccessKeyInfoError) -> Self {
223        match err {
224            crate::operation::get_access_key_info::GetAccessKeyInfoError::Unhandled(inner) => Error::Unhandled(inner),
225        }
226    }
227}
228impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_caller_identity::GetCallerIdentityError, R>> for Error where R: Send + Sync + std::fmt::Debug + 'static {
229    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_caller_identity::GetCallerIdentityError, R>) -> Self {
230        match err {
231            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
232            _ => Error::Unhandled(
233                                        crate::error::sealed_unhandled::Unhandled {
234                                            meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
235                                            source: err.into(),
236                                        }
237                                    ),
238        }
239    }
240}
241impl From<crate::operation::get_caller_identity::GetCallerIdentityError> for Error {
242    fn from(err: crate::operation::get_caller_identity::GetCallerIdentityError) -> Self {
243        match err {
244            crate::operation::get_caller_identity::GetCallerIdentityError::Unhandled(inner) => Error::Unhandled(inner),
245        }
246    }
247}
248impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_delegated_access_token::GetDelegatedAccessTokenError, R>> for Error where R: Send + Sync + std::fmt::Debug + 'static {
249    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_delegated_access_token::GetDelegatedAccessTokenError, R>) -> Self {
250        match err {
251            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
252            _ => Error::Unhandled(
253                                        crate::error::sealed_unhandled::Unhandled {
254                                            meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
255                                            source: err.into(),
256                                        }
257                                    ),
258        }
259    }
260}
261impl From<crate::operation::get_delegated_access_token::GetDelegatedAccessTokenError> for Error {
262    fn from(err: crate::operation::get_delegated_access_token::GetDelegatedAccessTokenError) -> Self {
263        match err {
264            crate::operation::get_delegated_access_token::GetDelegatedAccessTokenError::ExpiredTradeInTokenException(inner) => Error::ExpiredTradeInTokenException(inner),
265            crate::operation::get_delegated_access_token::GetDelegatedAccessTokenError::PackedPolicyTooLargeException(inner) => Error::PackedPolicyTooLargeException(inner),
266            crate::operation::get_delegated_access_token::GetDelegatedAccessTokenError::RegionDisabledException(inner) => Error::RegionDisabledException(inner),
267            crate::operation::get_delegated_access_token::GetDelegatedAccessTokenError::Unhandled(inner) => Error::Unhandled(inner),
268        }
269    }
270}
271impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_federation_token::GetFederationTokenError, R>> for Error where R: Send + Sync + std::fmt::Debug + 'static {
272    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_federation_token::GetFederationTokenError, R>) -> Self {
273        match err {
274            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
275            _ => Error::Unhandled(
276                                        crate::error::sealed_unhandled::Unhandled {
277                                            meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
278                                            source: err.into(),
279                                        }
280                                    ),
281        }
282    }
283}
284impl From<crate::operation::get_federation_token::GetFederationTokenError> for Error {
285    fn from(err: crate::operation::get_federation_token::GetFederationTokenError) -> Self {
286        match err {
287            crate::operation::get_federation_token::GetFederationTokenError::MalformedPolicyDocumentException(inner) => Error::MalformedPolicyDocumentException(inner),
288            crate::operation::get_federation_token::GetFederationTokenError::PackedPolicyTooLargeException(inner) => Error::PackedPolicyTooLargeException(inner),
289            crate::operation::get_federation_token::GetFederationTokenError::RegionDisabledException(inner) => Error::RegionDisabledException(inner),
290            crate::operation::get_federation_token::GetFederationTokenError::Unhandled(inner) => Error::Unhandled(inner),
291        }
292    }
293}
294impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_session_token::GetSessionTokenError, R>> for Error where R: Send + Sync + std::fmt::Debug + 'static {
295    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_session_token::GetSessionTokenError, R>) -> Self {
296        match err {
297            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
298            _ => Error::Unhandled(
299                                        crate::error::sealed_unhandled::Unhandled {
300                                            meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
301                                            source: err.into(),
302                                        }
303                                    ),
304        }
305    }
306}
307impl From<crate::operation::get_session_token::GetSessionTokenError> for Error {
308    fn from(err: crate::operation::get_session_token::GetSessionTokenError) -> Self {
309        match err {
310            crate::operation::get_session_token::GetSessionTokenError::RegionDisabledException(inner) => Error::RegionDisabledException(inner),
311            crate::operation::get_session_token::GetSessionTokenError::Unhandled(inner) => Error::Unhandled(inner),
312        }
313    }
314}
315impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_web_identity_token::GetWebIdentityTokenError, R>> for Error where R: Send + Sync + std::fmt::Debug + 'static {
316    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_web_identity_token::GetWebIdentityTokenError, R>) -> Self {
317        match err {
318            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
319            _ => Error::Unhandled(
320                                        crate::error::sealed_unhandled::Unhandled {
321                                            meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
322                                            source: err.into(),
323                                        }
324                                    ),
325        }
326    }
327}
328impl From<crate::operation::get_web_identity_token::GetWebIdentityTokenError> for Error {
329    fn from(err: crate::operation::get_web_identity_token::GetWebIdentityTokenError) -> Self {
330        match err {
331            crate::operation::get_web_identity_token::GetWebIdentityTokenError::JwtPayloadSizeExceededException(inner) => Error::JwtPayloadSizeExceededException(inner),
332            crate::operation::get_web_identity_token::GetWebIdentityTokenError::OutboundWebIdentityFederationDisabledException(inner) => Error::OutboundWebIdentityFederationDisabledException(inner),
333            crate::operation::get_web_identity_token::GetWebIdentityTokenError::SessionDurationEscalationException(inner) => Error::SessionDurationEscalationException(inner),
334            crate::operation::get_web_identity_token::GetWebIdentityTokenError::Unhandled(inner) => Error::Unhandled(inner),
335        }
336    }
337}
338impl ::std::error::Error for Error {
339    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
340        match self {
341            Error::ExpiredTokenException(inner) => inner.source(),
342            Error::ExpiredTradeInTokenException(inner) => inner.source(),
343            Error::IdpCommunicationErrorException(inner) => inner.source(),
344            Error::IdpRejectedClaimException(inner) => inner.source(),
345            Error::InvalidAuthorizationMessageException(inner) => inner.source(),
346            Error::InvalidIdentityTokenException(inner) => inner.source(),
347            Error::JwtPayloadSizeExceededException(inner) => inner.source(),
348            Error::MalformedPolicyDocumentException(inner) => inner.source(),
349            Error::OutboundWebIdentityFederationDisabledException(inner) => inner.source(),
350            Error::PackedPolicyTooLargeException(inner) => inner.source(),
351            Error::RegionDisabledException(inner) => inner.source(),
352            Error::SessionDurationEscalationException(inner) => inner.source(),
353            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source)
354        }
355    }
356}
357impl ::aws_types::request_id::RequestId for Error {
358    fn request_id(&self) -> Option<&str> {
359        match self {
360            Self::ExpiredTokenException(e) => e.request_id(),
361            Self::ExpiredTradeInTokenException(e) => e.request_id(),
362            Self::IdpCommunicationErrorException(e) => e.request_id(),
363            Self::IdpRejectedClaimException(e) => e.request_id(),
364            Self::InvalidAuthorizationMessageException(e) => e.request_id(),
365            Self::InvalidIdentityTokenException(e) => e.request_id(),
366            Self::JwtPayloadSizeExceededException(e) => e.request_id(),
367            Self::MalformedPolicyDocumentException(e) => e.request_id(),
368            Self::OutboundWebIdentityFederationDisabledException(e) => e.request_id(),
369            Self::PackedPolicyTooLargeException(e) => e.request_id(),
370            Self::RegionDisabledException(e) => e.request_id(),
371            Self::SessionDurationEscalationException(e) => e.request_id(),
372            Self::Unhandled(e) => e.meta.request_id(),
373        }
374    }
375}
376