{-# LANGUAGE OverloadedStrings #-}
module Network.AWS.ELBv2.Types
(
eLBv2
, _InvalidConfigurationRequestException
, _SubnetNotFoundException
, _TooManyTargetsException
, _RuleNotFoundException
, _InvalidSubnetException
, _TooManyRulesException
, _TooManyTargetGroupsException
, _DuplicateLoadBalancerNameException
, _IncompatibleProtocolsException
, _TooManyCertificatesException
, _DuplicateTagKeysException
, _DuplicateListenerException
, _TooManyTagsException
, _DuplicateTargetGroupNameException
, _HealthUnavailableException
, _PriorityInUseException
, _TooManyLoadBalancersException
, _UnsupportedProtocolException
, _InvalidTargetException
, _InvalidSecurityGroupException
, _TargetGroupNotFoundException
, _ListenerNotFoundException
, _TooManyRegistrationsForTargetIdException
, _TooManyListenersException
, _TargetGroupAssociationLimitException
, _OperationNotPermittedException
, _SSLPolicyNotFoundException
, _InvalidSchemeException
, _LoadBalancerNotFoundException
, _ResourceInUseException
, _CertificateNotFoundException
, ActionTypeEnum (..)
, LoadBalancerSchemeEnum (..)
, LoadBalancerStateEnum (..)
, LoadBalancerTypeEnum (..)
, ProtocolEnum (..)
, TargetHealthReasonEnum (..)
, TargetHealthStateEnum (..)
, Action
, action
, aType
, aTargetGroupARN
, AvailabilityZone
, availabilityZone
, azSubnetId
, azZoneName
, Certificate
, certificate
, cCertificateARN
, Cipher
, cipher
, cPriority
, cName
, Listener
, listener
, lSSLPolicy
, lListenerARN
, lProtocol
, lDefaultActions
, lCertificates
, lLoadBalancerARN
, lPort
, LoadBalancer
, loadBalancer
, lbState
, lbSecurityGroups
, lbLoadBalancerName
, lbCreatedTime
, lbVPCId
, lbCanonicalHostedZoneId
, lbAvailabilityZones
, lbLoadBalancerARN
, lbScheme
, lbType
, lbDNSName
, LoadBalancerAttribute
, loadBalancerAttribute
, lbaValue
, lbaKey
, LoadBalancerState
, loadBalancerState
, lbsReason
, lbsCode
, Matcher
, matcher
, mHTTPCode
, Rule
, rule
, rPriority
, rActions
, rConditions
, rRuleARN
, rIsDefault
, RuleCondition
, ruleCondition
, rcField
, rcValues
, RulePriorityPair
, rulePriorityPair
, rppPriority
, rppRuleARN
, SSLPolicy
, sslPolicy
, spCiphers
, spName
, spSSLProtocols
, Tag
, tag
, tagValue
, tagKey
, TagDescription
, tagDescription
, tdResourceARN
, tdTags
, TargetDescription
, targetDescription
, tdPort
, tdId
, TargetGroup
, targetGroup
, tgMatcher
, tgHealthCheckPath
, tgUnhealthyThresholdCount
, tgVPCId
, tgTargetGroupARN
, tgProtocol
, tgHealthCheckIntervalSeconds
, tgHealthyThresholdCount
, tgHealthCheckProtocol
, tgLoadBalancerARNs
, tgHealthCheckTimeoutSeconds
, tgHealthCheckPort
, tgTargetGroupName
, tgPort
, TargetGroupAttribute
, targetGroupAttribute
, tgaValue
, tgaKey
, TargetHealth
, targetHealth
, thState
, thReason
, thDescription
, TargetHealthDescription
, targetHealthDescription
, thdTargetHealth
, thdHealthCheckPort
, thdTarget
) where
import Network.AWS.ELBv2.Types.Product
import Network.AWS.ELBv2.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Sign.V4
eLBv2 :: Service
eLBv2 =
Service
{ _svcAbbrev = "ELBv2"
, _svcSigner = v4
, _svcPrefix = "elasticloadbalancing"
, _svcVersion = "2015-12-01"
, _svcEndpoint = defaultEndpoint eLBv2
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseXMLError "ELBv2"
, _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
_InvalidConfigurationRequestException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidConfigurationRequestException =
_ServiceError . hasStatus 400 . hasCode "InvalidConfigurationRequest"
_SubnetNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_SubnetNotFoundException =
_ServiceError . hasStatus 400 . hasCode "SubnetNotFound"
_TooManyTargetsException :: AsError a => Getting (First ServiceError) a ServiceError
_TooManyTargetsException =
_ServiceError . hasStatus 400 . hasCode "TooManyTargets"
_RuleNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_RuleNotFoundException = _ServiceError . hasStatus 400 . hasCode "RuleNotFound"
_InvalidSubnetException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidSubnetException =
_ServiceError . hasStatus 400 . hasCode "InvalidSubnet"
_TooManyRulesException :: AsError a => Getting (First ServiceError) a ServiceError
_TooManyRulesException = _ServiceError . hasStatus 400 . hasCode "TooManyRules"
_TooManyTargetGroupsException :: AsError a => Getting (First ServiceError) a ServiceError
_TooManyTargetGroupsException =
_ServiceError . hasStatus 400 . hasCode "TooManyTargetGroups"
_DuplicateLoadBalancerNameException :: AsError a => Getting (First ServiceError) a ServiceError
_DuplicateLoadBalancerNameException =
_ServiceError . hasStatus 400 . hasCode "DuplicateLoadBalancerName"
_IncompatibleProtocolsException :: AsError a => Getting (First ServiceError) a ServiceError
_IncompatibleProtocolsException =
_ServiceError . hasStatus 400 . hasCode "IncompatibleProtocols"
_TooManyCertificatesException :: AsError a => Getting (First ServiceError) a ServiceError
_TooManyCertificatesException =
_ServiceError . hasStatus 400 . hasCode "TooManyCertificates"
_DuplicateTagKeysException :: AsError a => Getting (First ServiceError) a ServiceError
_DuplicateTagKeysException =
_ServiceError . hasStatus 400 . hasCode "DuplicateTagKeys"
_DuplicateListenerException :: AsError a => Getting (First ServiceError) a ServiceError
_DuplicateListenerException =
_ServiceError . hasStatus 400 . hasCode "DuplicateListener"
_TooManyTagsException :: AsError a => Getting (First ServiceError) a ServiceError
_TooManyTagsException = _ServiceError . hasStatus 400 . hasCode "TooManyTags"
_DuplicateTargetGroupNameException :: AsError a => Getting (First ServiceError) a ServiceError
_DuplicateTargetGroupNameException =
_ServiceError . hasStatus 400 . hasCode "DuplicateTargetGroupName"
_HealthUnavailableException :: AsError a => Getting (First ServiceError) a ServiceError
_HealthUnavailableException =
_ServiceError . hasStatus 500 . hasCode "HealthUnavailable"
_PriorityInUseException :: AsError a => Getting (First ServiceError) a ServiceError
_PriorityInUseException =
_ServiceError . hasStatus 400 . hasCode "PriorityInUse"
_TooManyLoadBalancersException :: AsError a => Getting (First ServiceError) a ServiceError
_TooManyLoadBalancersException =
_ServiceError . hasStatus 400 . hasCode "TooManyLoadBalancers"
_UnsupportedProtocolException :: AsError a => Getting (First ServiceError) a ServiceError
_UnsupportedProtocolException =
_ServiceError . hasStatus 400 . hasCode "UnsupportedProtocol"
_InvalidTargetException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidTargetException =
_ServiceError . hasStatus 400 . hasCode "InvalidTarget"
_InvalidSecurityGroupException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidSecurityGroupException =
_ServiceError . hasStatus 400 . hasCode "InvalidSecurityGroup"
_TargetGroupNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_TargetGroupNotFoundException =
_ServiceError . hasStatus 400 . hasCode "TargetGroupNotFound"
_ListenerNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_ListenerNotFoundException =
_ServiceError . hasStatus 400 . hasCode "ListenerNotFound"
_TooManyRegistrationsForTargetIdException :: AsError a => Getting (First ServiceError) a ServiceError
_TooManyRegistrationsForTargetIdException =
_ServiceError . hasStatus 400 . hasCode "TooManyRegistrationsForTargetId"
_TooManyListenersException :: AsError a => Getting (First ServiceError) a ServiceError
_TooManyListenersException =
_ServiceError . hasStatus 400 . hasCode "TooManyListeners"
_TargetGroupAssociationLimitException :: AsError a => Getting (First ServiceError) a ServiceError
_TargetGroupAssociationLimitException =
_ServiceError . hasStatus 400 . hasCode "TargetGroupAssociationLimit"
_OperationNotPermittedException :: AsError a => Getting (First ServiceError) a ServiceError
_OperationNotPermittedException =
_ServiceError . hasStatus 400 . hasCode "OperationNotPermitted"
_SSLPolicyNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_SSLPolicyNotFoundException =
_ServiceError . hasStatus 400 . hasCode "SSLPolicyNotFound"
_InvalidSchemeException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidSchemeException =
_ServiceError . hasStatus 400 . hasCode "InvalidScheme"
_LoadBalancerNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_LoadBalancerNotFoundException =
_ServiceError . hasStatus 400 . hasCode "LoadBalancerNotFound"
_ResourceInUseException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceInUseException =
_ServiceError . hasStatus 400 . hasCode "ResourceInUse"
_CertificateNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_CertificateNotFoundException =
_ServiceError . hasStatus 400 . hasCode "CertificateNotFound"