put_image
¶
put_image(
repository_name: RepositoryName,
image_manifest: ImageManifest,
*,
config_overrides: Optional[ECRPUBLICClientConfig] = None,
registry_id: Optional[RegistryIdOrAlias] = None,
repository_type: Optional[RepositoryType] = 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.
-
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.
-
-
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 optional.
-
image_digest(Optional[ImageDigest], default:None) –The image digest of the image manifest that corresponds to the image.
Raises:
-
ConflictException–Another operation is in progress on the same resource. Wait and then retry the request.
-
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 Public service quotas in the Amazon Elastic Container Registry Public 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. 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.
-
ValidationException–There was an error validating the request. Check the request parameters and try again.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ecr_public/_services/ecrpublic.py
2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 | |