put_image
async
¶
put_image(
repository_name: RepositoryName,
image_manifest: ImageManifest,
*,
config_overrides: Optional[AsyncECRClientConfig] = 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/async_ecr.py
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 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 | |