Amazon EC2 Container Registry

2016/12/21 - Amazon EC2 Container Registry - 3 updated api methods

Changes  Update ecr client to latest version

BatchCheckLayerAvailability (updated) Link ¶
Changes (response)
{'layers': {'mediaType': 'string'}}

Check the availability of multiple image layers in a specified registry and repository.

See also: AWS API Documentation

Request Syntax

client.batch_check_layer_availability(
    registryId='string',
    repositoryName='string',
    layerDigests=[
        'string',
    ]
)
type registryId:

string

param registryId:

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.

type repositoryName:

string

param repositoryName:

[REQUIRED]

The name of the repository that is associated with the image layers to check.

type layerDigests:

list

param layerDigests:

[REQUIRED]

The digests of the image layers to check.

  • (string) --

rtype:

dict

returns:

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.

BatchGetImage (updated) Link ¶
Changes (request)
{'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',
    ]
)
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',
            '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.

PutImage (updated) Link ¶
Changes (request)
{'imageTag': 'string'}

Creates or updates the image manifest and tags associated with an image.

See also: AWS API Documentation

Request Syntax

client.put_image(
    registryId='string',
    repositoryName='string',
    imageManifest='string',
    imageTag='string'
)
type registryId:

string

param registryId:

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.

type repositoryName:

string

param repositoryName:

[REQUIRED]

The name of the repository in which to put the image.

type imageManifest:

string

param imageManifest:

[REQUIRED]

The image manifest corresponding to the image to be uploaded.

type imageTag:

string

param imageTag:

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.

rtype:

dict

returns:

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.