put_image
¶
put_image(
repository_name: RepositoryName,
image_manifest: ImageManifest,
*,
config_overrides: Optional[ECRClientConfig] = None,
registry_id: Optional[RegistryId] = 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 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 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[RegistryId], default:None) –The Amazon Web Services account ID associated with the registry that contains the repository in which to put the image. If you do not specify a registry, the default registry is assumed.
-
repository_name(RepositoryName) –The name of the repository in which to put the image.
-
image_manifest(ImageManifest) –The image manifest corresponding 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 does not 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 corresponding 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 does not 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.
-
KmsException–The operation failed due to a KMS exception.
-
LayersNotFoundException–The specified layers could not be found, or the specified layer is not valid for this repository.
-
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.
-
ReferencedImagesNotFoundException–The manifest list is referencing an image that does not exist.
-
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.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ecr/_services/ecr.py
3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 | |