module Network.AWS.CognitoIdentityProvider.Types
(
cognitoIdentityProvider
, _InvalidParameterException
, _InvalidLambdaResponseException
, _UnexpectedLambdaException
, _NotAuthorizedException
, _InternalErrorException
, _CodeMismatchException
, _TooManyRequestsException
, _ConcurrentModificationException
, _UserLambdaValidationException
, _ExpiredCodeException
, _TooManyFailedAttemptsException
, _ResourceNotFoundException
, _AliasExistsException
, _LimitExceededException
, _InvalidPasswordException
, _UsernameExistsException
, AliasAttributeType (..)
, AttributeDataType (..)
, DeliveryMediumType (..)
, StatusType (..)
, UserPoolMFAType (..)
, UserStatusType (..)
, VerifiedAttributeType (..)
, AttributeType
, attributeType
, atValue
, atName
, CodeDeliveryDetailsType
, codeDeliveryDetailsType
, cddtDestination
, cddtDeliveryMedium
, cddtAttributeName
, LambdaConfigType
, lambdaConfigType
, lctPreAuthentication
, lctPostAuthentication
, lctCustomMessage
, lctPostConfirmation
, lctPreSignUp
, MFAOptionType
, mfaOptionType
, motDeliveryMedium
, motAttributeName
, NumberAttributeConstraintsType
, numberAttributeConstraintsType
, nactMaxValue
, nactMinValue
, PasswordPolicyType
, passwordPolicyType
, pptRequireNumbers
, pptRequireUppercase
, pptRequireLowercase
, pptMinimumLength
, pptRequireSymbols
, SchemaAttributeType
, schemaAttributeType
, satNumberAttributeConstraints
, satRequired
, satAttributeDataType
, satStringAttributeConstraints
, satName
, satDeveloperOnlyAttribute
, satMutable
, StringAttributeConstraintsType
, stringAttributeConstraintsType
, sactMaxLength
, sactMinLength
, UserPoolClientDescription
, userPoolClientDescription
, upcdClientId
, upcdUserPoolId
, upcdClientName
, UserPoolClientType
, userPoolClientType
, upctClientId
, upctClientSecret
, upctLastModifiedDate
, upctUserPoolId
, upctCreationDate
, upctClientName
, UserPoolDescriptionType
, userPoolDescriptionType
, updtStatus
, updtLastModifiedDate
, updtName
, updtId
, updtCreationDate
, updtLambdaConfig
, UserPoolPolicyType
, userPoolPolicyType
, upptPasswordPolicy
, UserPoolType
, userPoolType
, uptStatus
, uptLastModifiedDate
, uptEstimatedNumberOfUsers
, uptEmailVerificationMessage
, uptSmsAuthenticationMessage
, uptSchemaAttributes
, uptEmailVerificationSubject
, uptAliasAttributes
, uptSmsVerificationMessage
, uptName
, uptMFAConfiguration
, uptId
, uptCreationDate
, uptLambdaConfig
, uptAutoVerifiedAttributes
, uptPolicies
, UserType
, userType
, utEnabled
, utUserStatus
, utUsername
, utUserCreateDate
, utAttributes
, utUserLastModifiedDate
) where
import Network.AWS.CognitoIdentityProvider.Types.Product
import Network.AWS.CognitoIdentityProvider.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Sign.V4
cognitoIdentityProvider :: Service
cognitoIdentityProvider =
Service
{ _svcAbbrev = "CognitoIdentityProvider"
, _svcSigner = v4
, _svcPrefix = "cognito-idp"
, _svcVersion = "2016-04-18"
, _svcEndpoint = defaultEndpoint cognitoIdentityProvider
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError "CognitoIdentityProvider"
, _svcRetry = retry
}
where
retry =
Exponential
{ _retryBase = 5.0e-2
, _retryGrowth = 2
, _retryAttempts = 5
, _retryCheck = check
}
check e
| 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
_InvalidParameterException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidParameterException =
_ServiceError . hasCode "InvalidParameterException"
_InvalidLambdaResponseException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidLambdaResponseException =
_ServiceError . hasCode "InvalidLambdaResponseException"
_UnexpectedLambdaException :: AsError a => Getting (First ServiceError) a ServiceError
_UnexpectedLambdaException =
_ServiceError . hasCode "UnexpectedLambdaException"
_NotAuthorizedException :: AsError a => Getting (First ServiceError) a ServiceError
_NotAuthorizedException = _ServiceError . hasCode "NotAuthorizedException"
_InternalErrorException :: AsError a => Getting (First ServiceError) a ServiceError
_InternalErrorException = _ServiceError . hasCode "InternalErrorException"
_CodeMismatchException :: AsError a => Getting (First ServiceError) a ServiceError
_CodeMismatchException = _ServiceError . hasCode "CodeMismatchException"
_TooManyRequestsException :: AsError a => Getting (First ServiceError) a ServiceError
_TooManyRequestsException = _ServiceError . hasCode "TooManyRequestsException"
_ConcurrentModificationException :: AsError a => Getting (First ServiceError) a ServiceError
_ConcurrentModificationException =
_ServiceError . hasCode "ConcurrentModificationException"
_UserLambdaValidationException :: AsError a => Getting (First ServiceError) a ServiceError
_UserLambdaValidationException =
_ServiceError . hasCode "UserLambdaValidationException"
_ExpiredCodeException :: AsError a => Getting (First ServiceError) a ServiceError
_ExpiredCodeException = _ServiceError . hasCode "ExpiredCodeException"
_TooManyFailedAttemptsException :: AsError a => Getting (First ServiceError) a ServiceError
_TooManyFailedAttemptsException =
_ServiceError . hasCode "TooManyFailedAttemptsException"
_ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceNotFoundException =
_ServiceError . hasCode "ResourceNotFoundException"
_AliasExistsException :: AsError a => Getting (First ServiceError) a ServiceError
_AliasExistsException = _ServiceError . hasCode "AliasExistsException"
_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_LimitExceededException = _ServiceError . hasCode "LimitExceededException"
_InvalidPasswordException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidPasswordException = _ServiceError . hasCode "InvalidPasswordException"
_UsernameExistsException :: AsError a => Getting (First ServiceError) a ServiceError
_UsernameExistsException = _ServiceError . hasCode "UsernameExistsException"