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
4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 | |