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[ECRPUBLICClientConfig] = None,
registry_id: Optional[RegistryIdOrAlias] = 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 (about 20MB). The UploadLayerPart API is called once for 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[RegistryIdOrAlias], default:None) –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.
-
repository_name(RepositoryName) –The name of the repository that you're uploading layer parts to.
-
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 isn't valid, or the first byte specified isn't 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.
-
LimitExceededException–The operation didn't 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.
-
RegistryNotFoundException–The registry doesn't exist.
-
RepositoryNotFoundException–The specified repository can't be found. Check the spelling of the specified repository and ensure that you're performing operations on the correct registry.
-
ServerException–These errors are usually caused by a server-side issue.
-
UnsupportedCommandException–The action isn't supported in this Region.
-
UploadNotFoundException–The upload can't be found, or the specified upload ID isn't valid for this repository.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ecr_public/_services/ecrpublic.py
1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 | |