amazonka-ecr 1.4.3 → 1.4.4
raw patch · 11 files changed
+145/−38 lines, 11 filesdep ~amazonka-coredep ~amazonka-ecrdep ~amazonka-testPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: amazonka-core, amazonka-ecr, amazonka-test
API changes (from Hackage documentation)
+ Network.AWS.ECR: Tagged :: TagStatus
+ Network.AWS.ECR: Untagged :: TagStatus
+ Network.AWS.ECR: data ListImagesFilter
+ Network.AWS.ECR: data TagStatus
+ Network.AWS.ECR: lifTagStatus :: Lens' ListImagesFilter (Maybe TagStatus)
+ Network.AWS.ECR: listImagesFilter :: ListImagesFilter
+ Network.AWS.ECR.ListImages: instance Network.AWS.Pager.AWSPager Network.AWS.ECR.ListImages.ListImages
+ Network.AWS.ECR.ListImages: liFilter :: Lens' ListImages (Maybe ListImagesFilter)
+ Network.AWS.ECR.Types: Tagged :: TagStatus
+ Network.AWS.ECR.Types: Untagged :: TagStatus
+ Network.AWS.ECR.Types: data ListImagesFilter
+ Network.AWS.ECR.Types: data TagStatus
+ Network.AWS.ECR.Types: lifTagStatus :: Lens' ListImagesFilter (Maybe TagStatus)
+ Network.AWS.ECR.Types: listImagesFilter :: ListImagesFilter
- Network.AWS.ECR.BatchDeleteImage: batchDeleteImage :: Text -> NonEmpty ImageIdentifier -> BatchDeleteImage
+ Network.AWS.ECR.BatchDeleteImage: batchDeleteImage :: Text -> BatchDeleteImage
- Network.AWS.ECR.BatchDeleteImage: bdiImageIds :: Lens' BatchDeleteImage (NonEmpty ImageIdentifier)
+ Network.AWS.ECR.BatchDeleteImage: bdiImageIds :: Lens' BatchDeleteImage [ImageIdentifier]
- Network.AWS.ECR.BatchDeleteImage: bdirsImageIds :: Lens' BatchDeleteImageResponse (Maybe (NonEmpty ImageIdentifier))
+ Network.AWS.ECR.BatchDeleteImage: bdirsImageIds :: Lens' BatchDeleteImageResponse [ImageIdentifier]
- Network.AWS.ECR.BatchGetImage: batchGetImage :: Text -> NonEmpty ImageIdentifier -> BatchGetImage
+ Network.AWS.ECR.BatchGetImage: batchGetImage :: Text -> BatchGetImage
- Network.AWS.ECR.BatchGetImage: bgiImageIds :: Lens' BatchGetImage (NonEmpty ImageIdentifier)
+ Network.AWS.ECR.BatchGetImage: bgiImageIds :: Lens' BatchGetImage [ImageIdentifier]
- Network.AWS.ECR.ListImages: lirsImageIds :: Lens' ListImagesResponse (Maybe (NonEmpty ImageIdentifier))
+ Network.AWS.ECR.ListImages: lirsImageIds :: Lens' ListImagesResponse [ImageIdentifier]
Files
- README.md +1/−1
- amazonka-ecr.cabal +6/−6
- gen/Network/AWS/ECR.hs +9/−1
- gen/Network/AWS/ECR/BatchDeleteImage.hs +10/−10
- gen/Network/AWS/ECR/BatchGetImage.hs +5/−6
- gen/Network/AWS/ECR/DescribeRepositories.hs +2/−0
- gen/Network/AWS/ECR/ListImages.hs +29/−5
- gen/Network/AWS/ECR/Types.hs +8/−0
- gen/Network/AWS/ECR/Types/Product.hs +46/−6
- gen/Network/AWS/ECR/Types/Sum.hs +29/−3
- src/.gitkeep +0/−0
README.md view
@@ -8,7 +8,7 @@ ## Version -`1.4.3`+`1.4.4` ## Description
amazonka-ecr.cabal view
@@ -1,5 +1,5 @@ name: amazonka-ecr-version: 1.4.3+version: 1.4.4 synopsis: Amazon EC2 Container Registry SDK. homepage: https://github.com/brendanhay/amazonka bug-reports: https://github.com/brendanhay/amazonka/issues@@ -11,7 +11,7 @@ category: Network, AWS, Cloud, Distributed Computing build-type: Simple cabal-version: >= 1.10-extra-source-files: README.md fixture/*.yaml fixture/*.proto+extra-source-files: README.md fixture/*.yaml fixture/*.proto src/.gitkeep description: Amazon EC2 Container Registry (Amazon ECR) is a managed AWS Docker registry service. Customers can use the familiar Docker CLI to push, pull, and manage images. Amazon ECR provides a secure, scalable, and reliable registry. Amazon ECR supports private Docker repositories with resource-based permissions using AWS IAM so that specific users or Amazon EC2 instances can access repositories and images. Developers can use the Docker CLI to author and manage images. .@@ -65,7 +65,7 @@ , Network.AWS.ECR.Types.Sum build-depends:- amazonka-core == 1.4.3.*+ amazonka-core == 1.4.4.* , base >= 4.7 && < 5 test-suite amazonka-ecr-test@@ -85,9 +85,9 @@ , Test.AWS.ECR.Internal build-depends:- amazonka-core == 1.4.3.*- , amazonka-test == 1.4.3.*- , amazonka-ecr == 1.4.3.*+ amazonka-core == 1.4.4.*+ , amazonka-test == 1.4.4.*+ , amazonka-ecr == 1.4.4.* , base , bytestring , tasty
gen/Network/AWS/ECR.hs view
@@ -113,7 +113,7 @@ -- ** PutImage , module Network.AWS.ECR.PutImage - -- ** ListImages+ -- ** ListImages (Paginated) , module Network.AWS.ECR.ListImages -- ** GetAuthorizationToken@@ -133,6 +133,9 @@ -- ** LayerFailureCode , LayerFailureCode (..) + -- ** TagStatus+ , TagStatus (..)+ -- ** AuthorizationData , AuthorizationData , authorizationData@@ -174,6 +177,11 @@ , lfFailureReason , lfFailureCode , lfLayerDigest++ -- ** ListImagesFilter+ , ListImagesFilter+ , listImagesFilter+ , lifTagStatus -- ** Repository , Repository
gen/Network/AWS/ECR/BatchDeleteImage.hs view
@@ -51,7 +51,7 @@ data BatchDeleteImage = BatchDeleteImage' { _bdiRegistryId :: !(Maybe Text) , _bdiRepositoryName :: !Text- , _bdiImageIds :: !(List1 ImageIdentifier)+ , _bdiImageIds :: ![ImageIdentifier] } deriving (Eq,Read,Show,Data,Typeable,Generic) -- | Creates a value of 'BatchDeleteImage' with the minimum fields required to make a request.@@ -65,13 +65,12 @@ -- * 'bdiImageIds' batchDeleteImage :: Text -- ^ 'bdiRepositoryName'- -> NonEmpty ImageIdentifier -- ^ 'bdiImageIds' -> BatchDeleteImage-batchDeleteImage pRepositoryName_ pImageIds_ =+batchDeleteImage pRepositoryName_ = BatchDeleteImage' { _bdiRegistryId = Nothing , _bdiRepositoryName = pRepositoryName_- , _bdiImageIds = _List1 # pImageIds_+ , _bdiImageIds = mempty } -- | The AWS account ID associated with the registry that contains the image to delete. If you do not specify a registry, the default registry is assumed.@@ -83,8 +82,8 @@ bdiRepositoryName = lens _bdiRepositoryName (\ s a -> s{_bdiRepositoryName = a}); -- | A list of image ID references that correspond to images to delete. The format of the 'imageIds' reference is 'imageTag=tag' or 'imageDigest=digest'.-bdiImageIds :: Lens' BatchDeleteImage (NonEmpty ImageIdentifier)-bdiImageIds = lens _bdiImageIds (\ s a -> s{_bdiImageIds = a}) . _List1;+bdiImageIds :: Lens' BatchDeleteImage [ImageIdentifier]+bdiImageIds = lens _bdiImageIds (\ s a -> s{_bdiImageIds = a}) . _Coerce; instance AWSRequest BatchDeleteImage where type Rs BatchDeleteImage = BatchDeleteImageResponse@@ -93,7 +92,8 @@ = receiveJSON (\ s h x -> BatchDeleteImageResponse' <$>- (x .?> "failures" .!@ mempty) <*> (x .?> "imageIds")+ (x .?> "failures" .!@ mempty) <*>+ (x .?> "imageIds" .!@ mempty) <*> (pure (fromEnum s))) instance Hashable BatchDeleteImage@@ -127,7 +127,7 @@ -- | /See:/ 'batchDeleteImageResponse' smart constructor. data BatchDeleteImageResponse = BatchDeleteImageResponse' { _bdirsFailures :: !(Maybe [ImageFailure])- , _bdirsImageIds :: !(Maybe (List1 ImageIdentifier))+ , _bdirsImageIds :: !(Maybe [ImageIdentifier]) , _bdirsResponseStatus :: !Int } deriving (Eq,Read,Show,Data,Typeable,Generic) @@ -155,8 +155,8 @@ bdirsFailures = lens _bdirsFailures (\ s a -> s{_bdirsFailures = a}) . _Default . _Coerce; -- | The image IDs of the deleted images.-bdirsImageIds :: Lens' BatchDeleteImageResponse (Maybe (NonEmpty ImageIdentifier))-bdirsImageIds = lens _bdirsImageIds (\ s a -> s{_bdirsImageIds = a}) . mapping _List1;+bdirsImageIds :: Lens' BatchDeleteImageResponse [ImageIdentifier]+bdirsImageIds = lens _bdirsImageIds (\ s a -> s{_bdirsImageIds = a}) . _Default . _Coerce; -- | The response status code. bdirsResponseStatus :: Lens' BatchDeleteImageResponse Int
gen/Network/AWS/ECR/BatchGetImage.hs view
@@ -49,7 +49,7 @@ data BatchGetImage = BatchGetImage' { _bgiRegistryId :: !(Maybe Text) , _bgiRepositoryName :: !Text- , _bgiImageIds :: !(List1 ImageIdentifier)+ , _bgiImageIds :: ![ImageIdentifier] } deriving (Eq,Read,Show,Data,Typeable,Generic) -- | Creates a value of 'BatchGetImage' with the minimum fields required to make a request.@@ -63,13 +63,12 @@ -- * 'bgiImageIds' batchGetImage :: Text -- ^ 'bgiRepositoryName'- -> NonEmpty ImageIdentifier -- ^ 'bgiImageIds' -> BatchGetImage-batchGetImage pRepositoryName_ pImageIds_ =+batchGetImage pRepositoryName_ = BatchGetImage' { _bgiRegistryId = Nothing , _bgiRepositoryName = pRepositoryName_- , _bgiImageIds = _List1 # pImageIds_+ , _bgiImageIds = mempty } -- | The AWS account ID associated with the registry that contains the images to describe. If you do not specify a registry, the default registry is assumed.@@ -81,8 +80,8 @@ bgiRepositoryName = lens _bgiRepositoryName (\ s a -> s{_bgiRepositoryName = a}); -- | A list of image ID references that correspond to images to describe. The format of the 'imageIds' reference is 'imageTag=tag' or 'imageDigest=digest'.-bgiImageIds :: Lens' BatchGetImage (NonEmpty ImageIdentifier)-bgiImageIds = lens _bgiImageIds (\ s a -> s{_bgiImageIds = a}) . _List1;+bgiImageIds :: Lens' BatchGetImage [ImageIdentifier]+bgiImageIds = lens _bgiImageIds (\ s a -> s{_bgiImageIds = a}) . _Coerce; instance AWSRequest BatchGetImage where type Rs BatchGetImage = BatchGetImageResponse
gen/Network/AWS/ECR/DescribeRepositories.hs view
@@ -84,6 +84,8 @@ drRepositoryNames = lens _drRepositoryNames (\ s a -> s{_drRepositoryNames = a}) . mapping _List1; -- | The 'nextToken' value returned from a previous paginated 'DescribeRepositories' request where 'maxResults' was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the 'nextToken' value. This value is 'null' when there are no more results to return.+--+-- This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes. drNextToken :: Lens' DescribeRepositories (Maybe Text) drNextToken = lens _drNextToken (\ s a -> s{_drNextToken = a});
gen/Network/AWS/ECR/ListImages.hs view
@@ -19,6 +19,10 @@ -- Portability : non-portable (GHC extensions) -- -- Lists all the image IDs for a given repository.+--+-- You can filter images based on whether or not they are tagged by setting the 'tagStatus' parameter to 'TAGGED' or 'UNTAGGED'. For example, you can filter your results to return only 'UNTAGGED' images and then pipe that result to a < BatchDeleteImage> operation to delete them. Or, you can filter your results to return only 'TAGGED' images to list all of the tags in your repository.+--+-- This operation returns paginated results. module Network.AWS.ECR.ListImages ( -- * Creating a Request@@ -27,6 +31,7 @@ -- * Request Lenses , liRegistryId , liNextToken+ , liFilter , liMaxResults , liRepositoryName @@ -42,6 +47,7 @@ import Network.AWS.ECR.Types import Network.AWS.ECR.Types.Product import Network.AWS.Lens+import Network.AWS.Pager import Network.AWS.Prelude import Network.AWS.Request import Network.AWS.Response@@ -50,6 +56,7 @@ data ListImages = ListImages' { _liRegistryId :: !(Maybe Text) , _liNextToken :: !(Maybe Text)+ , _liFilter :: !(Maybe ListImagesFilter) , _liMaxResults :: !(Maybe Nat) , _liRepositoryName :: !Text } deriving (Eq,Read,Show,Data,Typeable,Generic)@@ -62,6 +69,8 @@ -- -- * 'liNextToken' --+-- * 'liFilter'+-- -- * 'liMaxResults' -- -- * 'liRepositoryName'@@ -72,6 +81,7 @@ ListImages' { _liRegistryId = Nothing , _liNextToken = Nothing+ , _liFilter = Nothing , _liMaxResults = Nothing , _liRepositoryName = pRepositoryName_ }@@ -81,9 +91,15 @@ liRegistryId = lens _liRegistryId (\ s a -> s{_liRegistryId = a}); -- | The 'nextToken' value returned from a previous paginated 'ListImages' request where 'maxResults' was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the 'nextToken' value. This value is 'null' when there are no more results to return.+--+-- This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes. liNextToken :: Lens' ListImages (Maybe Text) liNextToken = lens _liNextToken (\ s a -> s{_liNextToken = a}); +-- | The filter key and value with which to filter your 'ListImages' results.+liFilter :: Lens' ListImages (Maybe ListImagesFilter)+liFilter = lens _liFilter (\ s a -> s{_liFilter = a});+ -- | The maximum number of image results returned by 'ListImages' in paginated output. When this parameter is used, 'ListImages' only returns 'maxResults' results in a single page along with a 'nextToken' response element. The remaining results of the initial request can be seen by sending another 'ListImages' request with the returned 'nextToken' value. This value can be between 1 and 100. If this parameter is not used, then 'ListImages' returns up to 100 results and a 'nextToken' value, if applicable. liMaxResults :: Lens' ListImages (Maybe Natural) liMaxResults = lens _liMaxResults (\ s a -> s{_liMaxResults = a}) . mapping _Nat;@@ -92,6 +108,13 @@ liRepositoryName :: Lens' ListImages Text liRepositoryName = lens _liRepositoryName (\ s a -> s{_liRepositoryName = a}); +instance AWSPager ListImages where+ page rq rs+ | stop (rs ^. lirsNextToken) = Nothing+ | stop (rs ^. lirsImageIds) = Nothing+ | otherwise =+ Just $ rq & liNextToken .~ rs ^. lirsNextToken+ instance AWSRequest ListImages where type Rs ListImages = ListImagesResponse request = postJSON ecr@@ -99,8 +122,8 @@ = receiveJSON (\ s h x -> ListImagesResponse' <$>- (x .?> "imageIds") <*> (x .?> "nextToken") <*>- (pure (fromEnum s)))+ (x .?> "imageIds" .!@ mempty) <*> (x .?> "nextToken")+ <*> (pure (fromEnum s))) instance Hashable ListImages @@ -122,6 +145,7 @@ (catMaybes [("registryId" .=) <$> _liRegistryId, ("nextToken" .=) <$> _liNextToken,+ ("filter" .=) <$> _liFilter, ("maxResults" .=) <$> _liMaxResults, Just ("repositoryName" .= _liRepositoryName)]) @@ -133,7 +157,7 @@ -- | /See:/ 'listImagesResponse' smart constructor. data ListImagesResponse = ListImagesResponse'- { _lirsImageIds :: !(Maybe (List1 ImageIdentifier))+ { _lirsImageIds :: !(Maybe [ImageIdentifier]) , _lirsNextToken :: !(Maybe Text) , _lirsResponseStatus :: !Int } deriving (Eq,Read,Show,Data,Typeable,Generic)@@ -158,8 +182,8 @@ } -- | The list of image IDs for the requested repository.-lirsImageIds :: Lens' ListImagesResponse (Maybe (NonEmpty ImageIdentifier))-lirsImageIds = lens _lirsImageIds (\ s a -> s{_lirsImageIds = a}) . mapping _List1;+lirsImageIds :: Lens' ListImagesResponse [ImageIdentifier]+lirsImageIds = lens _lirsImageIds (\ s a -> s{_lirsImageIds = a}) . _Default . _Coerce; -- | The 'nextToken' value to include in a future 'ListImages' request. When the results of a 'ListImages' request exceed 'maxResults', this value can be used to retrieve the next page of results. This value is 'null' when there are no more results to return. lirsNextToken :: Lens' ListImagesResponse (Maybe Text)
gen/Network/AWS/ECR/Types.hs view
@@ -42,6 +42,9 @@ -- * LayerFailureCode , LayerFailureCode (..) + -- * TagStatus+ , TagStatus (..)+ -- * AuthorizationData , AuthorizationData , authorizationData@@ -83,6 +86,11 @@ , lfFailureReason , lfFailureCode , lfLayerDigest++ -- * ListImagesFilter+ , ListImagesFilter+ , listImagesFilter+ , lifTagStatus -- * Repository , Repository
gen/Network/AWS/ECR/Types/Product.hs view
@@ -72,7 +72,7 @@ instance NFData AuthorizationData --- | Object representing an image.+-- | An object representing an Amazon ECR image. -- -- /See:/ 'image' smart constructor. data Image = Image'@@ -132,7 +132,9 @@ instance NFData Image --- | /See:/ 'imageFailure' smart constructor.+-- | An object representing an Amazon ECR image failure.+--+-- /See:/ 'imageFailure' smart constructor. data ImageFailure = ImageFailure' { _ifFailureReason :: !(Maybe Text) , _ifFailureCode :: !(Maybe ImageFailureCode)@@ -181,7 +183,9 @@ instance NFData ImageFailure --- | /See:/ 'imageIdentifier' smart constructor.+-- | An object with identifying information for an Amazon ECR image.+--+-- /See:/ 'imageIdentifier' smart constructor. data ImageIdentifier = ImageIdentifier' { _iiImageDigest :: !(Maybe Text) , _iiImageTag :: !(Maybe Text)@@ -228,7 +232,9 @@ [("imageDigest" .=) <$> _iiImageDigest, ("imageTag" .=) <$> _iiImageTag]) --- | /See:/ 'layer' smart constructor.+-- | An object representing an Amazon ECR image layer.+--+-- /See:/ 'layer' smart constructor. data Layer = Layer' { _lLayerDigest :: !(Maybe Text) , _lLayerSize :: !(Maybe Integer)@@ -277,7 +283,9 @@ instance NFData Layer --- | /See:/ 'layerFailure' smart constructor.+-- | An object representing an Amazon ECR image layer failure.+--+-- /See:/ 'layerFailure' smart constructor. data LayerFailure = LayerFailure' { _lfFailureReason :: !(Maybe Text) , _lfFailureCode :: !(Maybe LayerFailureCode)@@ -326,7 +334,39 @@ instance NFData LayerFailure --- | Object representing a repository.+-- | An object representing a filter on a < ListImages> operation.+--+-- /See:/ 'listImagesFilter' smart constructor.+newtype ListImagesFilter = ListImagesFilter'+ { _lifTagStatus :: Maybe TagStatus+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ListImagesFilter' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lifTagStatus'+listImagesFilter+ :: ListImagesFilter+listImagesFilter =+ ListImagesFilter'+ { _lifTagStatus = Nothing+ }++-- | The tag status with which to filter your < ListImages> results. You can filter results based on whether they are 'TAGGED' or 'UNTAGGED'.+lifTagStatus :: Lens' ListImagesFilter (Maybe TagStatus)+lifTagStatus = lens _lifTagStatus (\ s a -> s{_lifTagStatus = a});++instance Hashable ListImagesFilter++instance NFData ListImagesFilter++instance ToJSON ListImagesFilter where+ toJSON ListImagesFilter'{..}+ = object+ (catMaybes [("tagStatus" .=) <$> _lifTagStatus])++-- | An object representing a repository. -- -- /See:/ 'repository' smart constructor. data Repository = Repository'
gen/Network/AWS/ECR/Types/Sum.hs view
@@ -35,7 +35,7 @@ "invalidimagetag" -> pure InvalidImageTag "missingdigestandtag" -> pure MissingDigestAndTag e -> fromTextError $ "Failure parsing ImageFailureCode from value: '" <> e- <> "'. Accepted values: ImageNotFound, ImageTagDoesNotMatchDigest, InvalidImageDigest, InvalidImageTag, MissingDigestAndTag"+ <> "'. Accepted values: imagenotfound, imagetagdoesnotmatchdigest, invalidimagedigest, invalidimagetag, missingdigestandtag" instance ToText ImageFailureCode where toText = \case@@ -64,7 +64,7 @@ "available" -> pure Available "unavailable" -> pure Unavailable e -> fromTextError $ "Failure parsing LayerAvailability from value: '" <> e- <> "'. Accepted values: AVAILABLE, UNAVAILABLE"+ <> "'. Accepted values: available, unavailable" instance ToText LayerAvailability where toText = \case@@ -90,7 +90,7 @@ "invalidlayerdigest" -> pure InvalidLayerDigest "missinglayerdigest" -> pure MissingLayerDigest e -> fromTextError $ "Failure parsing LayerFailureCode from value: '" <> e- <> "'. Accepted values: InvalidLayerDigest, MissingLayerDigest"+ <> "'. Accepted values: invalidlayerdigest, missinglayerdigest" instance ToText LayerFailureCode where toText = \case@@ -105,3 +105,29 @@ instance FromJSON LayerFailureCode where parseJSON = parseJSONText "LayerFailureCode"++data TagStatus+ = Tagged+ | Untagged+ deriving (Eq,Ord,Read,Show,Enum,Bounded,Data,Typeable,Generic)++instance FromText TagStatus where+ parser = takeLowerText >>= \case+ "tagged" -> pure Tagged+ "untagged" -> pure Untagged+ e -> fromTextError $ "Failure parsing TagStatus from value: '" <> e+ <> "'. Accepted values: tagged, untagged"++instance ToText TagStatus where+ toText = \case+ Tagged -> "TAGGED"+ Untagged -> "UNTAGGED"++instance Hashable TagStatus+instance NFData TagStatus+instance ToByteString TagStatus+instance ToQuery TagStatus+instance ToHeader TagStatus++instance ToJSON TagStatus where+ toJSON = toJSONText
+ src/.gitkeep view