{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.ECRPublic.Types
(
defaultService,
_EmptyUploadException,
_ImageAlreadyExistsException,
_ImageDigestDoesNotMatchException,
_ImageNotFoundException,
_ImageTagAlreadyExistsException,
_InvalidLayerException,
_InvalidLayerPartException,
_InvalidParameterException,
_InvalidTagParameterException,
_LayerAlreadyExistsException,
_LayerPartTooSmallException,
_LayersNotFoundException,
_LimitExceededException,
_ReferencedImagesNotFoundException,
_RegistryNotFoundException,
_RepositoryAlreadyExistsException,
_RepositoryNotEmptyException,
_RepositoryNotFoundException,
_RepositoryPolicyNotFoundException,
_ServerException,
_TooManyTagsException,
_UnsupportedCommandException,
_UploadNotFoundException,
ImageFailureCode (..),
LayerAvailability (..),
LayerFailureCode (..),
RegistryAliasStatus (..),
AuthorizationData (..),
newAuthorizationData,
authorizationData_authorizationToken,
authorizationData_expiresAt,
Image (..),
newImage,
image_imageId,
image_imageManifest,
image_imageManifestMediaType,
image_registryId,
image_repositoryName,
ImageDetail (..),
newImageDetail,
imageDetail_artifactMediaType,
imageDetail_imageDigest,
imageDetail_imageManifestMediaType,
imageDetail_imagePushedAt,
imageDetail_imageSizeInBytes,
imageDetail_imageTags,
imageDetail_registryId,
imageDetail_repositoryName,
ImageFailure (..),
newImageFailure,
imageFailure_failureCode,
imageFailure_failureReason,
imageFailure_imageId,
ImageIdentifier (..),
newImageIdentifier,
imageIdentifier_imageDigest,
imageIdentifier_imageTag,
ImageTagDetail (..),
newImageTagDetail,
imageTagDetail_createdAt,
imageTagDetail_imageDetail,
imageTagDetail_imageTag,
Layer (..),
newLayer,
layer_layerAvailability,
layer_layerDigest,
layer_layerSize,
layer_mediaType,
LayerFailure (..),
newLayerFailure,
layerFailure_failureCode,
layerFailure_failureReason,
layerFailure_layerDigest,
ReferencedImageDetail (..),
newReferencedImageDetail,
referencedImageDetail_artifactMediaType,
referencedImageDetail_imageDigest,
referencedImageDetail_imageManifestMediaType,
referencedImageDetail_imagePushedAt,
referencedImageDetail_imageSizeInBytes,
Registry (..),
newRegistry,
registry_registryId,
registry_registryArn,
registry_registryUri,
registry_verified,
registry_aliases,
RegistryAlias (..),
newRegistryAlias,
registryAlias_name,
registryAlias_status,
registryAlias_primaryRegistryAlias,
registryAlias_defaultRegistryAlias,
RegistryCatalogData (..),
newRegistryCatalogData,
registryCatalogData_displayName,
Repository (..),
newRepository,
repository_createdAt,
repository_registryId,
repository_repositoryArn,
repository_repositoryName,
repository_repositoryUri,
RepositoryCatalogData (..),
newRepositoryCatalogData,
repositoryCatalogData_aboutText,
repositoryCatalogData_architectures,
repositoryCatalogData_description,
repositoryCatalogData_logoUrl,
repositoryCatalogData_marketplaceCertified,
repositoryCatalogData_operatingSystems,
repositoryCatalogData_usageText,
RepositoryCatalogDataInput (..),
newRepositoryCatalogDataInput,
repositoryCatalogDataInput_aboutText,
repositoryCatalogDataInput_architectures,
repositoryCatalogDataInput_description,
repositoryCatalogDataInput_logoImageBlob,
repositoryCatalogDataInput_operatingSystems,
repositoryCatalogDataInput_usageText,
Tag (..),
newTag,
tag_key,
tag_value,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import Amazonka.ECRPublic.Types.AuthorizationData
import Amazonka.ECRPublic.Types.Image
import Amazonka.ECRPublic.Types.ImageDetail
import Amazonka.ECRPublic.Types.ImageFailure
import Amazonka.ECRPublic.Types.ImageFailureCode
import Amazonka.ECRPublic.Types.ImageIdentifier
import Amazonka.ECRPublic.Types.ImageTagDetail
import Amazonka.ECRPublic.Types.Layer
import Amazonka.ECRPublic.Types.LayerAvailability
import Amazonka.ECRPublic.Types.LayerFailure
import Amazonka.ECRPublic.Types.LayerFailureCode
import Amazonka.ECRPublic.Types.ReferencedImageDetail
import Amazonka.ECRPublic.Types.Registry
import Amazonka.ECRPublic.Types.RegistryAlias
import Amazonka.ECRPublic.Types.RegistryAliasStatus
import Amazonka.ECRPublic.Types.RegistryCatalogData
import Amazonka.ECRPublic.Types.Repository
import Amazonka.ECRPublic.Types.RepositoryCatalogData
import Amazonka.ECRPublic.Types.RepositoryCatalogDataInput
import Amazonka.ECRPublic.Types.Tag
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Sign.V4 as Sign
defaultService :: Core.Service
defaultService :: Service
defaultService =
Core.Service
{ $sel:abbrev:Service :: Abbrev
Core.abbrev = Abbrev
"ECRPublic",
$sel:signer:Service :: Signer
Core.signer = Signer
Sign.v4,
$sel:endpointPrefix:Service :: ByteString
Core.endpointPrefix = ByteString
"api.ecr-public",
$sel:signingName:Service :: ByteString
Core.signingName = ByteString
"ecr-public",
$sel:version:Service :: ByteString
Core.version = ByteString
"2020-10-30",
$sel:s3AddressingStyle:Service :: S3AddressingStyle
Core.s3AddressingStyle = S3AddressingStyle
Core.S3AddressingStyleAuto,
$sel:endpoint:Service :: Region -> Endpoint
Core.endpoint = Service -> Region -> Endpoint
Core.defaultEndpoint Service
defaultService,
$sel:timeout:Service :: Maybe Seconds
Core.timeout = forall a. a -> Maybe a
Prelude.Just Seconds
70,
$sel:check:Service :: Status -> Bool
Core.check = Status -> Bool
Core.statusSuccess,
$sel:error:Service :: Status -> [Header] -> ByteStringLazy -> Error
Core.error = Abbrev -> Status -> [Header] -> ByteStringLazy -> Error
Core.parseJSONError Abbrev
"ECRPublic",
$sel:retry:Service :: Retry
Core.retry = Retry
retry
}
where
retry :: Retry
retry =
Core.Exponential
{ $sel:base:Exponential :: Double
Core.base = Double
5.0e-2,
$sel:growth:Exponential :: Int
Core.growth = Int
2,
$sel:attempts:Exponential :: Int
Core.attempts = Int
5,
$sel:check:Exponential :: ServiceError -> Maybe Text
Core.check = forall {a}. IsString a => ServiceError -> Maybe a
check
}
check :: ServiceError -> Maybe a
check ServiceError
e
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
502) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"bad_gateway"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
504) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"gateway_timeout"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
500) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"general_server_error"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
509) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"limit_exceeded"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"RequestThrottledException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"request_throttled_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
503) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"service_unavailable"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottledException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttled_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"Throttling"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttling"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottlingException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttling_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode
ErrorCode
"ProvisionedThroughputExceededException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throughput_exceeded"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
429) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"too_many_requests"
| Bool
Prelude.otherwise = forall a. Maybe a
Prelude.Nothing
_EmptyUploadException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_EmptyUploadException :: forall a. AsError a => Fold a ServiceError
_EmptyUploadException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"EmptyUploadException"
_ImageAlreadyExistsException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ImageAlreadyExistsException :: forall a. AsError a => Fold a ServiceError
_ImageAlreadyExistsException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ImageAlreadyExistsException"
_ImageDigestDoesNotMatchException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ImageDigestDoesNotMatchException :: forall a. AsError a => Fold a ServiceError
_ImageDigestDoesNotMatchException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ImageDigestDoesNotMatchException"
_ImageNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ImageNotFoundException :: forall a. AsError a => Fold a ServiceError
_ImageNotFoundException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ImageNotFoundException"
_ImageTagAlreadyExistsException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ImageTagAlreadyExistsException :: forall a. AsError a => Fold a ServiceError
_ImageTagAlreadyExistsException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ImageTagAlreadyExistsException"
_InvalidLayerException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidLayerException :: forall a. AsError a => Fold a ServiceError
_InvalidLayerException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InvalidLayerException"
_InvalidLayerPartException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidLayerPartException :: forall a. AsError a => Fold a ServiceError
_InvalidLayerPartException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InvalidLayerPartException"
_InvalidParameterException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidParameterException :: forall a. AsError a => Fold a ServiceError
_InvalidParameterException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InvalidParameterException"
_InvalidTagParameterException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidTagParameterException :: forall a. AsError a => Fold a ServiceError
_InvalidTagParameterException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InvalidTagParameterException"
_LayerAlreadyExistsException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_LayerAlreadyExistsException :: forall a. AsError a => Fold a ServiceError
_LayerAlreadyExistsException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"LayerAlreadyExistsException"
_LayerPartTooSmallException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_LayerPartTooSmallException :: forall a. AsError a => Fold a ServiceError
_LayerPartTooSmallException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"LayerPartTooSmallException"
_LayersNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_LayersNotFoundException :: forall a. AsError a => Fold a ServiceError
_LayersNotFoundException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"LayersNotFoundException"
_LimitExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_LimitExceededException :: forall a. AsError a => Fold a ServiceError
_LimitExceededException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"LimitExceededException"
_ReferencedImagesNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ReferencedImagesNotFoundException :: forall a. AsError a => Fold a ServiceError
_ReferencedImagesNotFoundException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ReferencedImagesNotFoundException"
_RegistryNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_RegistryNotFoundException :: forall a. AsError a => Fold a ServiceError
_RegistryNotFoundException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"RegistryNotFoundException"
_RepositoryAlreadyExistsException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_RepositoryAlreadyExistsException :: forall a. AsError a => Fold a ServiceError
_RepositoryAlreadyExistsException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"RepositoryAlreadyExistsException"
_RepositoryNotEmptyException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_RepositoryNotEmptyException :: forall a. AsError a => Fold a ServiceError
_RepositoryNotEmptyException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"RepositoryNotEmptyException"
_RepositoryNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_RepositoryNotFoundException :: forall a. AsError a => Fold a ServiceError
_RepositoryNotFoundException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"RepositoryNotFoundException"
_RepositoryPolicyNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_RepositoryPolicyNotFoundException :: forall a. AsError a => Fold a ServiceError
_RepositoryPolicyNotFoundException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"RepositoryPolicyNotFoundException"
_ServerException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ServerException :: forall a. AsError a => Fold a ServiceError
_ServerException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ServerException"
_TooManyTagsException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_TooManyTagsException :: forall a. AsError a => Fold a ServiceError
_TooManyTagsException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"TooManyTagsException"
_UnsupportedCommandException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_UnsupportedCommandException :: forall a. AsError a => Fold a ServiceError
_UnsupportedCommandException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"UnsupportedCommandException"
_UploadNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_UploadNotFoundException :: forall a. AsError a => Fold a ServiceError
_UploadNotFoundException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"UploadNotFoundException"