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,
repository_type: Optional[RepositoryType] = 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.
-
repository_type(Optional[RepositoryType], default:None) –The type of the repository. If you don't specify a type, Amazon ECR uses
FREE. Valid values:-
FREE: A free repository. -
PREMIUM: A premium repository that holds paid content.
-
-
upload_id(UploadId) –The upload ID from a previous
InitiateLayerUploadoperation 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 Public service quotas in the Amazon Elastic Container Registry Public 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. Retry the request. If it continues to fail, contact Amazon Web Services Support.
-
UnsupportedCommandException–The action isn't supported in this Region. Check that the action is available in the Amazon Web Services Region that you're using, and try again in a supported 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
3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 | |