:doc:`ECRPublic <../../ecr-public>` / Client / complete_layer_upload

*********************
complete_layer_upload
*********************



.. py:method:: ECRPublic.Client.complete_layer_upload(**kwargs)

  

  Informs Amazon ECR that the image layer upload is complete for a specified public 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 for each new image layer to verify that the upload is complete.

   

  .. 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 <https://docs.aws.amazon.com/goto/WebAPI/ecr-public-2020-10-30/CompleteLayerUpload>`_  


  **Request Syntax**
  ::

    response = client.complete_layer_upload(
        registryId='string',
        repositoryName='string',
        uploadId='string',
        layerDigests=[
            'string',
        ]
    )
    
  :type registryId: string
  :param registryId: 

    The Amazon Web Services account ID, or registry alias, associated with the registry where layers are uploaded. If you do not specify a registry, the default public registry is assumed.

    

  
  :type repositoryName: string
  :param repositoryName: **[REQUIRED]** 

    The name of the repository in a public registry to associate with the image layer.

    

  
  :type uploadId: string
  :param uploadId: **[REQUIRED]** 

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

    

  
  :type layerDigests: list
  :param layerDigests: **[REQUIRED]** 

    The ``sha256`` digest of the image layer.

    

  
    - *(string) --* 

    

  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'registryId': 'string',
          'repositoryName': 'string',
          'uploadId': 'string',
          'layerDigest': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **registryId** *(string) --* 

        The public registry ID that's associated with the request.

        
      

      - **repositoryName** *(string) --* 

        The repository name that's associated with the request.

        
      

      - **uploadId** *(string) --* 

        The upload ID that's associated with the layer.

        
      

      - **layerDigest** *(string) --* 

        The ``sha256`` digest of the image layer.

        
  
  **Exceptions**
  
  *   :py:class:`ECRPublic.Client.exceptions.ServerException`

  
  *   :py:class:`ECRPublic.Client.exceptions.InvalidParameterException`

  
  *   :py:class:`ECRPublic.Client.exceptions.RepositoryNotFoundException`

  
  *   :py:class:`ECRPublic.Client.exceptions.UploadNotFoundException`

  
  *   :py:class:`ECRPublic.Client.exceptions.InvalidLayerException`

  
  *   :py:class:`ECRPublic.Client.exceptions.LayerPartTooSmallException`

  
  *   :py:class:`ECRPublic.Client.exceptions.LayerAlreadyExistsException`

  
  *   :py:class:`ECRPublic.Client.exceptions.EmptyUploadException`

  
  *   :py:class:`ECRPublic.Client.exceptions.RegistryNotFoundException`

  
  *   :py:class:`ECRPublic.Client.exceptions.UnsupportedCommandException`

  