ECR / Client / upload_layer_part
upload_layer_part#
- ECR.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 (or about 20MB). The UploadLayerPart API is called once per 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
Request Syntax
response = client.upload_layer_part( registryId='string', repositoryName='string', uploadId='string', partFirstByte=123, partLastByte=123, layerPartBlob=b'bytes' )
- Parameters:
registryId (string) – The Amazon Web Services account ID associated with the registry to which you are uploading layer parts. If you do not specify a registry, the default registry is assumed.
repositoryName (string) –
[REQUIRED]
The name of the repository to which you are uploading layer parts.
uploadId (string) –
[REQUIRED]
The upload ID from a previous InitiateLayerUpload operation to associate with the layer part upload.
partFirstByte (integer) –
[REQUIRED]
The position of the first byte of the layer part witin the overall image layer.
partLastByte (integer) –
[REQUIRED]
The position of the last byte of the layer part within the overall image layer.
layerPartBlob (bytes) –
[REQUIRED]
The base64-encoded layer part payload.
- Return type:
dict
- Returns:
Response Syntax
{ 'registryId': 'string', 'repositoryName': 'string', 'uploadId': 'string', 'lastByteReceived': 123 }
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 request.
lastByteReceived (integer) –
The integer value of the last byte received in the request.
Exceptions
ECR.Client.exceptions.ServerException
ECR.Client.exceptions.InvalidParameterException
ECR.Client.exceptions.InvalidLayerPartException
ECR.Client.exceptions.RepositoryNotFoundException
ECR.Client.exceptions.UploadNotFoundException
ECR.Client.exceptions.LimitExceededException
ECR.Client.exceptions.KmsException