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

*****************
upload_layer_part
*****************



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

  

  Uploads an image layer part to Amazon ECR.

   

  When an image is pushed, each new image layer is uploaded in parts. The maximum size of each image layer part can be 20971520 bytes (about 20MB). The UploadLayerPart API is called once for each new image layer part.

   

  .. 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/UploadLayerPart>`_  


  **Request Syntax**
  ::

    response = client.upload_layer_part(
        registryId='string',
        repositoryName='string',
        uploadId='string',
        partFirstByte=123,
        partLastByte=123,
        layerPartBlob=b'bytes'
    )
    
  :type registryId: string
  :param registryId: 

    The Amazon Web Services account ID, or registry alias, that's associated with the registry that you're uploading layer parts to. If you do not specify a registry, the default public registry is assumed.

    

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

    The name of the repository that you're uploading layer parts to.

    

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

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

    

  
  :type partFirstByte: integer
  :param partFirstByte: **[REQUIRED]** 

    The position of the first byte of the layer part witin the overall image layer.

    

  
  :type partLastByte: integer
  :param partLastByte: **[REQUIRED]** 

    The position of the last byte of the layer part within the overall image layer.

    

  
  :type layerPartBlob: bytes
  :param layerPartBlob: **[REQUIRED]** 

    The base64-encoded layer part payload.

    

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

    
    ::

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

    

    - *(dict) --* 
      

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

        The 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 request.

        
      

      - **lastByteReceived** *(integer) --* 

        The integer value of the last byte that's received in the request.

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

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

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

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

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

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

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

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

  