Amazon EC2 Container Registry

2020/04/28 - Amazon EC2 Container Registry - 2 updated api methods

Changes  This release adds support for multi-architecture images also known as a manifest list

BatchDeleteImage (updated) Link ¶
Changes (response)
{'failures': {'failureCode': {'ImageReferencedByManifestList'}}}

Deletes a list of specified images within a repository. Images are specified with either an imageTag or imageDigest .

You can remove a tag from an image by specifying the image's tag in your request. When you remove the last tag from an image, the image is deleted from your repository.

You can completely delete an image (and all of its tags) by specifying the image's digest in your request.

See also: AWS API Documentation

Request Syntax

client.batch_delete_image(
    registryId='string',
    repositoryName='string',
    imageIds=[
        {
            'imageDigest': 'string',
            'imageTag': 'string'
        },
    ]
)
type registryId

string

param registryId

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.

type repositoryName

string

param repositoryName

[REQUIRED]

The repository that contains the image to delete.

type imageIds

list

param imageIds

[REQUIRED]

A list of image ID references that correspond to images to delete. 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.

rtype

dict

returns

Response Syntax

{
    'imageIds': [
        {
            'imageDigest': 'string',
            'imageTag': 'string'
        },
    ],
    'failures': [
        {
            'imageId': {
                'imageDigest': 'string',
                'imageTag': 'string'
            },
            'failureCode': 'InvalidImageDigest'|'InvalidImageTag'|'ImageTagDoesNotMatchDigest'|'ImageNotFound'|'MissingDigestAndTag'|'ImageReferencedByManifestList',
            'failureReason': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • imageIds (list) --

      The image IDs of the deleted images.

      • (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.

    • 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.

BatchGetImage (updated) Link ¶
Changes (response)
{'failures': {'failureCode': {'ImageReferencedByManifestList'}}}

Gets detailed information for an image. Images are specified with either an imageTag or imageDigest .

When an image is pulled, the BatchGetImage API is called once to retrieve the image manifest.

See also: AWS API Documentation

Request Syntax

client.batch_get_image(
    registryId='string',
    repositoryName='string',
    imageIds=[
        {
            'imageDigest': 'string',
            'imageTag': 'string'
        },
    ],
    acceptedMediaTypes=[
        'string',
    ]
)
type registryId

string

param registryId

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.

type repositoryName

string

param repositoryName

[REQUIRED]

The repository that contains the images to describe.

type imageIds

list

param imageIds

[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.

type acceptedMediaTypes

list

param acceptedMediaTypes

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) --

rtype

dict

returns

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'|'ImageReferencedByManifestList',
            '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.