upload_layer_part
async
¶
upload_layer_part(
repository_name: RepositoryName,
upload_id: UploadId,
part_first_byte: PartSize,
part_last_byte: PartSize,
layer_part_blob: LayerPartBlob,
*,
config_overrides: Optional[AsyncECRClientConfig] = 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/async_ecr.py
3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 | |