{-# LANGUAGE OverloadedStrings #-}
module Network.AWS.ECR.Types
(
ecr
, _LayersNotFoundException
, _InvalidParameterException
, _LayerAlreadyExistsException
, _ServerException
, _LayerInaccessibleException
, _InvalidLayerException
, _LayerPartTooSmallException
, _LifecyclePolicyPreviewNotFoundException
, _ImageNotFoundException
, _ImageAlreadyExistsException
, _RepositoryNotFoundException
, _LifecyclePolicyPreviewInProgressException
, _UploadNotFoundException
, _LifecyclePolicyNotFoundException
, _InvalidLayerPartException
, _RepositoryNotEmptyException
, _RepositoryAlreadyExistsException
, _RepositoryPolicyNotFoundException
, _EmptyUploadException
, _LimitExceededException
, ImageActionType (..)
, ImageFailureCode (..)
, LayerAvailability (..)
, LayerFailureCode (..)
, LifecyclePolicyPreviewStatus (..)
, 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
, lMediaType
, lLayerDigest
, lLayerSize
, lLayerAvailability
, LayerFailure
, layerFailure
, lfFailureReason
, lfFailureCode
, lfLayerDigest
, LifecyclePolicyPreviewFilter
, lifecyclePolicyPreviewFilter
, lppfTagStatus
, LifecyclePolicyPreviewResult
, lifecyclePolicyPreviewResult
, lpprImageTags
, lpprAction
, lpprImageDigest
, lpprImagePushedAt
, lpprAppliedRulePriority
, LifecyclePolicyPreviewSummary
, lifecyclePolicyPreviewSummary
, lppsExpiringImageTotalCount
, LifecyclePolicyRuleAction
, lifecyclePolicyRuleAction
, lpraType
, 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 (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
_LayersNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_LayersNotFoundException = _MatchServiceError ecr "LayersNotFoundException"
_InvalidParameterException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidParameterException = _MatchServiceError ecr "InvalidParameterException"
_LayerAlreadyExistsException :: AsError a => Getting (First ServiceError) a ServiceError
_LayerAlreadyExistsException =
_MatchServiceError ecr "LayerAlreadyExistsException"
_ServerException :: AsError a => Getting (First ServiceError) a ServiceError
_ServerException = _MatchServiceError ecr "ServerException"
_LayerInaccessibleException :: AsError a => Getting (First ServiceError) a ServiceError
_LayerInaccessibleException =
_MatchServiceError ecr "LayerInaccessibleException"
_InvalidLayerException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidLayerException = _MatchServiceError ecr "InvalidLayerException"
_LayerPartTooSmallException :: AsError a => Getting (First ServiceError) a ServiceError
_LayerPartTooSmallException =
_MatchServiceError ecr "LayerPartTooSmallException"
_LifecyclePolicyPreviewNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_LifecyclePolicyPreviewNotFoundException =
_MatchServiceError ecr "LifecyclePolicyPreviewNotFoundException"
_ImageNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_ImageNotFoundException = _MatchServiceError ecr "ImageNotFoundException"
_ImageAlreadyExistsException :: AsError a => Getting (First ServiceError) a ServiceError
_ImageAlreadyExistsException =
_MatchServiceError ecr "ImageAlreadyExistsException"
_RepositoryNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_RepositoryNotFoundException =
_MatchServiceError ecr "RepositoryNotFoundException"
_LifecyclePolicyPreviewInProgressException :: AsError a => Getting (First ServiceError) a ServiceError
_LifecyclePolicyPreviewInProgressException =
_MatchServiceError ecr "LifecyclePolicyPreviewInProgressException"
_UploadNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_UploadNotFoundException = _MatchServiceError ecr "UploadNotFoundException"
_LifecyclePolicyNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_LifecyclePolicyNotFoundException =
_MatchServiceError ecr "LifecyclePolicyNotFoundException"
_InvalidLayerPartException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidLayerPartException = _MatchServiceError ecr "InvalidLayerPartException"
_RepositoryNotEmptyException :: AsError a => Getting (First ServiceError) a ServiceError
_RepositoryNotEmptyException =
_MatchServiceError ecr "RepositoryNotEmptyException"
_RepositoryAlreadyExistsException :: AsError a => Getting (First ServiceError) a ServiceError
_RepositoryAlreadyExistsException =
_MatchServiceError ecr "RepositoryAlreadyExistsException"
_RepositoryPolicyNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_RepositoryPolicyNotFoundException =
_MatchServiceError ecr "RepositoryPolicyNotFoundException"
_EmptyUploadException :: AsError a => Getting (First ServiceError) a ServiceError
_EmptyUploadException = _MatchServiceError ecr "EmptyUploadException"
_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_LimitExceededException = _MatchServiceError ecr "LimitExceededException"