upload_layer_part
¶
upload_layer_part(
repository_name: RepositoryName,
upload_id: UploadId,
part_first_byte: PartSize,
part_last_byte: PartSize,
layer_part_blob: LayerPartBlob,
*,
config_overrides: Optional[ECRClientConfig] = None,
registry_id: Optional[RegistryId] = None,
) -> UploadLayerPartResponse
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.
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.
Parameters:
-
registry_id(Optional[RegistryId], default:None) –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.
-
repository_name(RepositoryName) –The name of the repository to which you are uploading layer parts.
-
upload_id(UploadId) –The upload ID from a previous InitiateLayerUpload operation to associate with the layer part upload.
-
part_first_byte(PartSize) –The position of the first byte of the layer part witin the overall image layer.
-
part_last_byte(PartSize) –The position of the last byte of the layer part within the overall image layer.
-
layer_part_blob(LayerPartBlob) –The base64-encoded layer part payload.
Raises:
-
InvalidLayerPartException–The layer part size is not valid, or the first byte specified is not consecutive to the last byte of a previous layer part upload.
-
InvalidParameterException–The specified parameter is invalid. Review the available parameters for the API request.
-
KmsException–The operation failed due to a KMS exception.
-
LimitExceededException–The operation did not succeed because it would have exceeded a service limit for your account. For more information, see Amazon ECR service quotas in the Amazon Elastic Container Registry User Guide.
-
RepositoryNotFoundException–The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.
-
ServerException–These errors are usually caused by a server-side issue.
-
UploadNotFoundException–The upload could not be found, or the specified upload ID is not valid for this repository.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ecr/_services/ecr.py
3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 | |