complete_layer_upload

ECR.Client.complete_layer_upload(**kwargs)

Informs Amazon ECR that the image layer upload has completed for a specified registry, repository name, and upload ID. You can optionally provide a sha256 digest of the image layer for data validation purposes.

When an image is pushed, the CompleteLayerUpload API is called once per each new image layer to verify that the upload has completed.

Note

This operation is used by the Amazon ECR proxy and is not generally used 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

response = client.complete_layer_upload(
    registryId='string',
    repositoryName='string',
    uploadId='string',
    layerDigests=[
        'string',
    ]
)
Parameters
  • registryId (string) -- The Amazon Web Services account ID associated with the registry to which to upload layers. If you do not specify a registry, the default registry is assumed.
  • repositoryName (string) --

    [REQUIRED]

    The name of the repository to associate with the image layer.

  • uploadId (string) --

    [REQUIRED]

    The upload ID from a previous InitiateLayerUpload operation to associate with the image layer.

  • layerDigests (list) --

    [REQUIRED]

    The sha256 digest of the image layer.

    • (string) --
Return type

dict

Returns

Response Syntax

{
    'registryId': 'string',
    'repositoryName': 'string',
    'uploadId': 'string',
    'layerDigest': 'string'
}

Response Structure

  • (dict) --

    • registryId (string) --

      The registry ID associated with the request.

    • repositoryName (string) --

      The repository name associated with the request.

    • uploadId (string) --

      The upload ID associated with the layer.

    • layerDigest (string) --

      The sha256 digest of the image layer.

Exceptions

  • ECR.Client.exceptions.ServerException
  • ECR.Client.exceptions.InvalidParameterException
  • ECR.Client.exceptions.RepositoryNotFoundException
  • ECR.Client.exceptions.UploadNotFoundException
  • ECR.Client.exceptions.InvalidLayerException
  • ECR.Client.exceptions.LayerPartTooSmallException
  • ECR.Client.exceptions.LayerAlreadyExistsException
  • ECR.Client.exceptions.EmptyUploadException
  • ECR.Client.exceptions.KmsException