put_image
¶
put_image(
repository_name: RepositoryName,
image_manifest: ImageManifest,
*,
config_overrides: Optional[ECRPUBLICClientConfig] = None,
registry_id: Optional[RegistryIdOrAlias] = None,
image_manifest_media_type: Optional[MediaType] = None,
image_tag: Optional[ImageTag] = None,
image_digest: Optional[ImageDigest] = None,
) -> PutImageResponse
Creates or updates the image manifest and tags that are associated with an image.
When an image is pushed and all new image layers have been uploaded, the PutImage API is called once to create or update the image manifest and the tags that are associated with the image.
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 public registry that contains the repository where the image is put. If you do not specify a registry, the default public registry is assumed.
-
repository_name(RepositoryName) –The name of the repository where the image is put.
-
image_manifest(ImageManifest) –The image manifest that corresponds to the image to be uploaded.
-
image_manifest_media_type(Optional[MediaType], default:None) –The media type of the image manifest. If you push an image manifest that doesn't contain the
mediaTypefield, you must specify theimageManifestMediaTypein the request. -
image_tag(Optional[ImageTag], default:None) –The tag to associate with the image. This parameter is required for images that use the Docker Image Manifest V2 Schema 2 or Open Container Initiative (OCI) formats.
-
image_digest(Optional[ImageDigest], default:None) –The image digest of the image manifest that corresponds to the image.
Raises:
-
ImageAlreadyExistsException–The specified image has already been pushed, and there were no changes to the manifest or image tag after the last push.
-
ImageDigestDoesNotMatchException–The specified image digest doesn't match the digest that Amazon ECR calculated for the image.
-
ImageTagAlreadyExistsException–The specified image is tagged with a tag that already exists. The repository is configured for tag immutability.
-
InvalidParameterException–The specified parameter is invalid. Review the available parameters for the API request.
-
LayersNotFoundException–The specified layers can't be found, or the specified layer isn't valid for this repository.
-
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.
-
ReferencedImagesNotFoundException–The manifest list is referencing an image that doesn't exist.
-
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.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ecr_public/_services/ecrpublic.py
1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 | |