{-# LANGUAGE OverloadedStrings #-}
module Network.AWS.CodeBuild.Types
(
codeBuild
, _ResourceAlreadyExistsException
, _AccountLimitExceededException
, _InvalidInputException
, _ResourceNotFoundException
, ArtifactNamespace (..)
, ArtifactPackaging (..)
, ArtifactsType (..)
, BuildPhaseType (..)
, ComputeType (..)
, EnvironmentType (..)
, LanguageType (..)
, PlatformType (..)
, ProjectSortByType (..)
, SortOrderType (..)
, SourceAuthType (..)
, SourceType (..)
, StatusType (..)
, Build
, build
, bPhases
, bBuildComplete
, bArn
, bStartTime
, bArtifacts
, bEnvironment
, bInitiator
, bCurrentPhase
, bSourceVersion
, bLogs
, bEndTime
, bProjectName
, bBuildStatus
, bSource
, bId
, bTimeoutInMinutes
, BuildArtifacts
, buildArtifacts
, baLocation
, baMd5sum
, baSha256sum
, BuildPhase
, buildPhase
, bpContexts
, bpStartTime
, bpPhaseStatus
, bpPhaseType
, bpEndTime
, bpDurationInSeconds
, EnvironmentImage
, environmentImage
, eiName
, eiDescription
, EnvironmentLanguage
, environmentLanguage
, elImages
, elLanguage
, EnvironmentPlatform
, environmentPlatform
, epPlatform
, epLanguages
, EnvironmentVariable
, environmentVariable
, evName
, evValue
, LogsLocation
, logsLocation
, llDeepLink
, llGroupName
, llStreamName
, PhaseContext
, phaseContext
, pcMessage
, pcStatusCode
, Project
, project
, pArn
, pArtifacts
, pEnvironment
, pCreated
, pName
, pSource
, pEncryptionKey
, pLastModified
, pDescription
, pServiceRole
, pTags
, pTimeoutInMinutes
, ProjectArtifacts
, projectArtifacts
, paPackaging
, paPath
, paLocation
, paName
, paNamespaceType
, paType
, ProjectEnvironment
, projectEnvironment
, peEnvironmentVariables
, peType
, peImage
, peComputeType
, ProjectSource
, projectSource
, psLocation
, psAuth
, psBuildspec
, psType
, SourceAuth
, sourceAuth
, saResource
, saType
, Tag
, tag
, tagValue
, tagKey
) where
import Network.AWS.CodeBuild.Types.Product
import Network.AWS.CodeBuild.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Sign.V4
codeBuild :: Service
codeBuild =
Service
{ _svcAbbrev = "CodeBuild"
, _svcSigner = v4
, _svcPrefix = "codebuild"
, _svcVersion = "2016-10-06"
, _svcEndpoint = defaultEndpoint codeBuild
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError "CodeBuild"
, _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
_ResourceAlreadyExistsException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceAlreadyExistsException =
_ServiceError . hasCode "ResourceAlreadyExistsException"
_AccountLimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_AccountLimitExceededException =
_ServiceError . hasCode "AccountLimitExceededException"
_InvalidInputException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidInputException = _ServiceError . hasCode "InvalidInputException"
_ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceNotFoundException =
_ServiceError . hasCode "ResourceNotFoundException"