2016/12/21 - Amazon EC2 Container Registry - 3 updated api methods
Changes Amazon ECR now implements Docker Image Manifest V2, Schema 2 providing the ability to use multiple tags per image, support for storing Windows container images, and compatibility with the Open Container Initiative (OCI) image format. With this update, customers can also add tags to an image via PutImage and delete tags using BatchDeleteImage.
{'layers': {'mediaType': 'string'}}
Check the availability of multiple image layers in a specified registry and repository.
Note
This operation is used by the Amazon ECR proxy, and it is not intended for general use by customers for pulling and pushing images. In most cases, you should use the docker CLI to pull, tag, and push images.
See also: AWS API Documentation
Request Syntax
client.batch_check_layer_availability( registryId='string', repositoryName='string', layerDigests=[ 'string', ] )
string
The AWS account ID associated with the registry that contains the image layers to check. If you do not specify a registry, the default registry is assumed.
string
[REQUIRED]
The name of the repository that is associated with the image layers to check.
list
[REQUIRED]
The digests of the image layers to check.
(string) --
dict
Response Syntax
{ 'layers': [ { 'layerDigest': 'string', 'layerAvailability': 'AVAILABLE'|'UNAVAILABLE', 'layerSize': 123, 'mediaType': 'string' }, ], 'failures': [ { 'layerDigest': 'string', 'failureCode': 'InvalidLayerDigest'|'MissingLayerDigest', 'failureReason': 'string' }, ] }
Response Structure
(dict) --
layers (list) --
A list of image layer objects corresponding to the image layer references in the request.
(dict) --
An object representing an Amazon ECR image layer.
layerDigest (string) --
The sha256 digest of the image layer.
layerAvailability (string) --
The availability status of the image layer.
layerSize (integer) --
The size, in bytes, of the image layer.
mediaType (string) --
The media type of the layer, such as application/vnd.docker.image.rootfs.diff.tar.gzip or application/vnd.oci.image.layer.v1.tar+gzip .
failures (list) --
Any failures associated with the call.
(dict) --
An object representing an Amazon ECR image layer failure.
layerDigest (string) --
The layer digest associated with the failure.
failureCode (string) --
The failure code associated with the failure.
failureReason (string) --
The reason for the failure.
{'acceptedMediaTypes': ['string']}
Gets detailed information for specified images within a specified repository. Images are specified with either imageTag or imageDigest .
See also: AWS API Documentation
Request Syntax
client.batch_get_image( registryId='string', repositoryName='string', imageIds=[ { 'imageDigest': 'string', 'imageTag': 'string' }, ], acceptedMediaTypes=[ 'string', ] )
string
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.
string
[REQUIRED]
The repository that contains the images to describe.
list
[REQUIRED]
A list of image ID references that correspond to images to describe. The format of the imageIds reference is imageTag=tag or imageDigest=digest .
(dict) --
An object with identifying information for an Amazon ECR image.
imageDigest (string) --
The sha256 digest of the image manifest.
imageTag (string) --
The tag used for the image.
list
The accepted media types for the request.
Valid values: application/vnd.docker.distribution.manifest.v1+json | application/vnd.docker.distribution.manifest.v2+json | application/vnd.oci.image.manifest.v1+json
(string) --
dict
Response Syntax
{ 'images': [ { 'registryId': 'string', 'repositoryName': 'string', 'imageId': { 'imageDigest': 'string', 'imageTag': 'string' }, 'imageManifest': 'string' }, ], 'failures': [ { 'imageId': { 'imageDigest': 'string', 'imageTag': 'string' }, 'failureCode': 'InvalidImageDigest'|'InvalidImageTag'|'ImageTagDoesNotMatchDigest'|'ImageNotFound'|'MissingDigestAndTag', 'failureReason': 'string' }, ] }
Response Structure
(dict) --
images (list) --
A list of image objects corresponding to the image references in the request.
(dict) --
An object representing an Amazon ECR image.
registryId (string) --
The AWS account ID associated with the registry containing the image.
repositoryName (string) --
The name of the repository associated with the image.
imageId (dict) --
An object containing the image tag and image digest associated with an image.
imageDigest (string) --
The sha256 digest of the image manifest.
imageTag (string) --
The tag used for the image.
imageManifest (string) --
The image manifest associated with the image.
failures (list) --
Any failures associated with the call.
(dict) --
An object representing an Amazon ECR image failure.
imageId (dict) --
The image ID associated with the failure.
imageDigest (string) --
The sha256 digest of the image manifest.
imageTag (string) --
The tag used for the image.
failureCode (string) --
The code associated with the failure.
failureReason (string) --
The reason for the failure.
{'imageTag': 'string'}
Creates or updates the image manifest and tags associated with an image.
Note
This operation is used by the Amazon ECR proxy, and it is not intended for general use by customers for pulling and pushing images. In most cases, you should use the docker CLI to pull, tag, and push images.
See also: AWS API Documentation
Request Syntax
client.put_image( registryId='string', repositoryName='string', imageManifest='string', imageTag='string' )
string
The AWS account ID associated with the registry that contains the repository in which to put the image. If you do not specify a registry, the default registry is assumed.
string
[REQUIRED]
The name of the repository in which to put the image.
string
[REQUIRED]
The image manifest corresponding to the image to be uploaded.
string
The tag to associate with the image. This parameter is required for images that use the Docker Image Manifest V2 Schema 2 or OCI formats.
dict
Response Syntax
{ 'image': { 'registryId': 'string', 'repositoryName': 'string', 'imageId': { 'imageDigest': 'string', 'imageTag': 'string' }, 'imageManifest': 'string' } }
Response Structure
(dict) --
image (dict) --
Details of the image uploaded.
registryId (string) --
The AWS account ID associated with the registry containing the image.
repositoryName (string) --
The name of the repository associated with the image.
imageId (dict) --
An object containing the image tag and image digest associated with an image.
imageDigest (string) --
The sha256 digest of the image manifest.
imageTag (string) --
The tag used for the image.
imageManifest (string) --
The image manifest associated with the image.