{-# LANGUAGE OverloadedStrings #-}
module Network.AWS.ECR.Types
(
ecr
, _LayersNotFoundException
, _InvalidParameterException
, _LayerAlreadyExistsException
, _ServerException
, _LayerInaccessibleException
, _InvalidLayerException
, _LayerPartTooSmallException
, _ImageNotFoundException
, _ImageAlreadyExistsException
, _RepositoryNotFoundException
, _UploadNotFoundException
, _InvalidLayerPartException
, _RepositoryNotEmptyException
, _RepositoryAlreadyExistsException
, _RepositoryPolicyNotFoundException
, _EmptyUploadException
, _LimitExceededException
, ImageFailureCode (..)
, LayerAvailability (..)
, LayerFailureCode (..)
, TagStatus (..)
, AuthorizationData
, authorizationData
, adExpiresAt
, adProxyEndpoint
, adAuthorizationToken
, DescribeImagesFilter
, describeImagesFilter
, difTagStatus
, Image
, image
, iRegistryId
, iImageId
, iRepositoryName
, iImageManifest
, ImageDetail
, imageDetail
, idRegistryId
, idImageTags
, idImageSizeInBytes
, idImageDigest
, idImagePushedAt
, idRepositoryName
, ImageFailure
, imageFailure
, ifFailureReason
, ifFailureCode
, ifImageId
, ImageIdentifier
, imageIdentifier
, iiImageDigest
, iiImageTag
, Layer
, layer
, lLayerDigest
, lLayerSize
, lLayerAvailability
, LayerFailure
, layerFailure
, lfFailureReason
, lfFailureCode
, lfLayerDigest
, ListImagesFilter
, listImagesFilter
, lifTagStatus
, Repository
, repository
, rRepositoryARN
, rCreatedAt
, rRegistryId
, rRepositoryURI
, rRepositoryName
) where
import Network.AWS.ECR.Types.Product
import Network.AWS.ECR.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Sign.V4
ecr :: Service
ecr =
Service
{ _svcAbbrev = "ECR"
, _svcSigner = v4
, _svcPrefix = "ecr"
, _svcVersion = "2015-09-21"
, _svcEndpoint = defaultEndpoint ecr
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError "ECR"
, _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
_LayersNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_LayersNotFoundException = _ServiceError . hasCode "LayersNotFoundException"
_InvalidParameterException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidParameterException =
_ServiceError . hasCode "InvalidParameterException"
_LayerAlreadyExistsException :: AsError a => Getting (First ServiceError) a ServiceError
_LayerAlreadyExistsException =
_ServiceError . hasCode "LayerAlreadyExistsException"
_ServerException :: AsError a => Getting (First ServiceError) a ServiceError
_ServerException = _ServiceError . hasCode "ServerException"
_LayerInaccessibleException :: AsError a => Getting (First ServiceError) a ServiceError
_LayerInaccessibleException =
_ServiceError . hasCode "LayerInaccessibleException"
_InvalidLayerException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidLayerException = _ServiceError . hasCode "InvalidLayerException"
_LayerPartTooSmallException :: AsError a => Getting (First ServiceError) a ServiceError
_LayerPartTooSmallException =
_ServiceError . hasCode "LayerPartTooSmallException"
_ImageNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_ImageNotFoundException = _ServiceError . hasCode "ImageNotFoundException"
_ImageAlreadyExistsException :: AsError a => Getting (First ServiceError) a ServiceError
_ImageAlreadyExistsException =
_ServiceError . hasCode "ImageAlreadyExistsException"
_RepositoryNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_RepositoryNotFoundException =
_ServiceError . hasCode "RepositoryNotFoundException"
_UploadNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_UploadNotFoundException = _ServiceError . hasCode "UploadNotFoundException"
_InvalidLayerPartException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidLayerPartException =
_ServiceError . hasCode "InvalidLayerPartException"
_RepositoryNotEmptyException :: AsError a => Getting (First ServiceError) a ServiceError
_RepositoryNotEmptyException =
_ServiceError . hasCode "RepositoryNotEmptyException"
_RepositoryAlreadyExistsException :: AsError a => Getting (First ServiceError) a ServiceError
_RepositoryAlreadyExistsException =
_ServiceError . hasCode "RepositoryAlreadyExistsException"
_RepositoryPolicyNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_RepositoryPolicyNotFoundException =
_ServiceError . hasCode "RepositoryPolicyNotFoundException"
_EmptyUploadException :: AsError a => Getting (First ServiceError) a ServiceError
_EmptyUploadException = _ServiceError . hasCode "EmptyUploadException"
_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_LimitExceededException = _ServiceError . hasCode "LimitExceededException"