module Network.AWS.STS.Types
(
sts
, _MalformedPolicyDocumentException
, _InvalidAuthorizationMessageException
, _PackedPolicyTooLargeException
, _RegionDisabledException
, _IdPCommunicationErrorException
, _InvalidIdentityTokenException
, _ExpiredTokenException
, _IdPRejectedClaimException
, AssumedRoleUser
, assumedRoleUser
, aruAssumedRoleId
, aruARN
, FederatedUser
, federatedUser
, fuFederatedUserId
, fuARN
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Sign.V4
import Network.AWS.STS.Types.Product
import Network.AWS.STS.Types.Sum
sts :: Service
sts =
Service
{ _svcAbbrev = "STS"
, _svcSigner = v4
, _svcPrefix = "sts"
, _svcVersion = "2011-06-15"
, _svcEndpoint = defaultEndpoint sts
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseXMLError "STS"
, _svcRetry = retry
}
where
retry =
Exponential
{ _retryBase = 5.0e-2
, _retryGrowth = 2
, _retryAttempts = 5
, _retryCheck = check
}
check e
| has (hasCode "ThrottledException" . hasStatus 400) e =
Just "throttled_exception"
| has (hasStatus 429) e = Just "too_many_requests"
| has (hasCode "ThrottlingException" . hasStatus 400) e =
Just "throttling_exception"
| has (hasCode "Throttling" . hasStatus 400) e = Just "throttling"
| has (hasStatus 504) e = Just "gateway_timeout"
| has (hasStatus 502) e = Just "bad_gateway"
| has (hasStatus 503) e = Just "service_unavailable"
| has (hasStatus 500) e = Just "general_server_error"
| has (hasStatus 509) e = Just "limit_exceeded"
| otherwise = Nothing
_MalformedPolicyDocumentException :: AsError a => Getting (First ServiceError) a ServiceError
_MalformedPolicyDocumentException =
_MatchServiceError sts "MalformedPolicyDocument" . hasStatus 400
_InvalidAuthorizationMessageException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidAuthorizationMessageException =
_MatchServiceError sts "InvalidAuthorizationMessageException" . hasStatus 400
_PackedPolicyTooLargeException :: AsError a => Getting (First ServiceError) a ServiceError
_PackedPolicyTooLargeException =
_MatchServiceError sts "PackedPolicyTooLarge" . hasStatus 400
_RegionDisabledException :: AsError a => Getting (First ServiceError) a ServiceError
_RegionDisabledException =
_MatchServiceError sts "RegionDisabledException" . hasStatus 403
_IdPCommunicationErrorException :: AsError a => Getting (First ServiceError) a ServiceError
_IdPCommunicationErrorException =
_MatchServiceError sts "IDPCommunicationError" . hasStatus 400
_InvalidIdentityTokenException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidIdentityTokenException =
_MatchServiceError sts "InvalidIdentityToken" . hasStatus 400
_ExpiredTokenException :: AsError a => Getting (First ServiceError) a ServiceError
_ExpiredTokenException =
_MatchServiceError sts "ExpiredTokenException" . hasStatus 400
_IdPRejectedClaimException :: AsError a => Getting (First ServiceError) a ServiceError
_IdPRejectedClaimException =
_MatchServiceError sts "IDPRejectedClaim" . hasStatus 403