Skip to content

SetImageStatusRequest

Source code in docs_src/capo_ecr_public/types/set_image_status_request.py
class SetImageStatusRequest(TypedDict, closed=True):
    registry_id: NotRequired["capo_ecr_public.types.registry_id.RegistryId"]
    """<p>The Amazon Web Services account ID that's associated with the public registry that contains the image. If you do not specify a registry, the default public registry is assumed. You can specify only your own account ID. Cross-account access through a repository policy isn't supported for this operation.</p>"""
    repository_name: "capo_ecr_public.types.repository_name.RepositoryName"
    """<p>The name of the repository that contains the image.</p>"""
    repository_type: "capo_ecr_public.types.repository_type.RepositoryType"
    """<p>The type of the repository. You can set the image status only in a <code>PREMIUM</code> repository.</p>"""
    image_id: "capo_ecr_public.types.image_identifier.ImageIdentifier"
    """<p>The image ID of the image to set the status for. If you specify a tag, the tag is resolved to the digest of the image that it currently points to, and the status is set on that image.</p>"""
    status: "capo_ecr_public.types.image_status.ImageStatus"
    """<p>The status to set on the image. Valid values:</p> <ul> <li> <p> <code>ACTIVE</code>: Cancels a pending deletion. You can do this only before the scheduled deletion time.</p> </li> <li> <p> <code>DEPRECATED</code>: Schedules the image for deletion after the deprecation period.</p> </li> </ul> <p>After the scheduled deletion time, you can't change the status of the image.</p> <p>If the image is part of a manifest list, Amazon ECR requires that a manifest list is deleted before the images that it references. To deprecate an image that a manifest list references, deprecate the manifest list first, with a scheduled deletion time before the image's. You can't set a manifest list to <code>ACTIVE</code> while it references deprecated images. Requests that break these rules fail with <code>ValidationException</code>.</p>"""
    deprecation_period_days: NotRequired[
        "capo_ecr_public.types.deprecation_period_days.DeprecationPeriodDays"
    ]
    """<p>The number of days that Amazon ECR waits before it deletes the deprecated image. You can specify a value between 90 and 365. This parameter is required when you set <code>status</code> to <code>DEPRECATED</code>. Don't specify it when you set <code>status</code> to <code>ACTIVE</code>.</p>"""

deprecation_period_days instance-attribute

deprecation_period_days: NotRequired[DeprecationPeriodDays]

The number of days that Amazon ECR waits before it deletes the deprecated image. You can specify a value between 90 and 365. This parameter is required when you set status to DEPRECATED. Don't specify it when you set status to ACTIVE.

image_id instance-attribute

image_id: ImageIdentifier

The image ID of the image to set the status for. If you specify a tag, the tag is resolved to the digest of the image that it currently points to, and the status is set on that image.

registry_id instance-attribute

registry_id: NotRequired[RegistryId]

The Amazon Web Services account ID that's associated with the public registry that contains the image. If you do not specify a registry, the default public registry is assumed. You can specify only your own account ID. Cross-account access through a repository policy isn't supported for this operation.

repository_name instance-attribute

repository_name: RepositoryName

The name of the repository that contains the image.

repository_type instance-attribute

repository_type: RepositoryType

The type of the repository. You can set the image status only in a PREMIUM repository.

status instance-attribute

status: ImageStatus

The status to set on the image. Valid values:

  • ACTIVE: Cancels a pending deletion. You can do this only before the scheduled deletion time.

  • DEPRECATED: Schedules the image for deletion after the deprecation period.

After the scheduled deletion time, you can't change the status of the image.

If the image is part of a manifest list, Amazon ECR requires that a manifest list is deleted before the images that it references. To deprecate an image that a manifest list references, deprecate the manifest list first, with a scheduled deletion time before the image's. You can't set a manifest list to ACTIVE while it references deprecated images. Requests that break these rules fail with ValidationException.