{-# LANGUAGE OverloadedStrings #-}
module Network.AWS.CodeStar.Types
(
codeStar
, _TeamMemberAlreadyAssociatedException
, _ValidationException
, _InvalidServiceRoleException
, _ProjectCreationFailedException
, _UserProfileAlreadyExistsException
, _ProjectNotFoundException
, _TeamMemberNotFoundException
, _ProjectAlreadyExistsException
, _ProjectConfigurationException
, _ConcurrentModificationException
, _InvalidNextTokenException
, _UserProfileNotFoundException
, _LimitExceededException
, ProjectSummary
, projectSummary
, psProjectARN
, psProjectId
, Resource
, resource
, rId
, TeamMember
, teamMember
, tmRemoteAccessAllowed
, tmUserARN
, tmProjectRole
, UserProfileSummary
, userProfileSummary
, upsSshPublicKey
, upsUserARN
, upsEmailAddress
, upsDisplayName
) where
import Network.AWS.CodeStar.Types.Product
import Network.AWS.CodeStar.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Sign.V4
codeStar :: Service
codeStar =
Service
{ _svcAbbrev = "CodeStar"
, _svcSigner = v4
, _svcPrefix = "codestar"
, _svcVersion = "2017-04-19"
, _svcEndpoint = defaultEndpoint codeStar
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError "CodeStar"
, _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 (hasCode "RequestThrottledException" . hasStatus 400) e =
Just "request_throttled_exception"
| 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
_TeamMemberAlreadyAssociatedException :: AsError a => Getting (First ServiceError) a ServiceError
_TeamMemberAlreadyAssociatedException =
_MatchServiceError codeStar "TeamMemberAlreadyAssociatedException"
_ValidationException :: AsError a => Getting (First ServiceError) a ServiceError
_ValidationException = _MatchServiceError codeStar "ValidationException"
_InvalidServiceRoleException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidServiceRoleException =
_MatchServiceError codeStar "InvalidServiceRoleException"
_ProjectCreationFailedException :: AsError a => Getting (First ServiceError) a ServiceError
_ProjectCreationFailedException =
_MatchServiceError codeStar "ProjectCreationFailedException"
_UserProfileAlreadyExistsException :: AsError a => Getting (First ServiceError) a ServiceError
_UserProfileAlreadyExistsException =
_MatchServiceError codeStar "UserProfileAlreadyExistsException"
_ProjectNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_ProjectNotFoundException =
_MatchServiceError codeStar "ProjectNotFoundException"
_TeamMemberNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_TeamMemberNotFoundException =
_MatchServiceError codeStar "TeamMemberNotFoundException"
_ProjectAlreadyExistsException :: AsError a => Getting (First ServiceError) a ServiceError
_ProjectAlreadyExistsException =
_MatchServiceError codeStar "ProjectAlreadyExistsException"
_ProjectConfigurationException :: AsError a => Getting (First ServiceError) a ServiceError
_ProjectConfigurationException =
_MatchServiceError codeStar "ProjectConfigurationException"
_ConcurrentModificationException :: AsError a => Getting (First ServiceError) a ServiceError
_ConcurrentModificationException =
_MatchServiceError codeStar "ConcurrentModificationException"
_InvalidNextTokenException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidNextTokenException =
_MatchServiceError codeStar "InvalidNextTokenException"
_UserProfileNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_UserProfileNotFoundException =
_MatchServiceError codeStar "UserProfileNotFoundException"
_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_LimitExceededException = _MatchServiceError codeStar "LimitExceededException"