gcloud compute images deprecate
NAME
--delete-in
DELETE_IN
| --delete-on
DELETE_ON
]--format
FORMAT
]--help
]--obsolete-in
OBSOLETE_IN
| --obsolete-on
OBSOLETE_ON
]--project
PROJECT_ID
]--quiet
, -q
]--replacement
REPLACEMENT
] --state
STATE
[-h
]gcloud compute images deprecate
is used to deprecate images.NAME
--delete-in
DELETE_IN
30d
will set the status to
DELETED in 30 days from the current system time. Valid units for this
flag are s
for seconds, m
for minutes, h
for hours and
d
for days. If no unit is specified, seconds is assumed.
--delete-on
DELETE_ON
YYYY-MM-DDTHH:MM:SSZ
. For example:
2020-01-02T00:00:00Z for midnight on January 2, 2020 in UTC.
This flag is mutually exclusive with --delete-in.
--obsolete-in
OBSOLETE_IN
--obsolete-on
OBSOLETE_ON
--replacement
REPLACEMENT
--replacement example-image
or
--replacement projects/google/global/images/example-image
. This
flag is required when setting the image state to anything other than
ACTIVE
or when --delete-in, --delete-on, --obsolete-in, or
--obsolete-on is provided.
--state
STATE
ACTIVE
, suggesting that the image is
currently supported. Operations which create a new
resource using a DEPRECATED
image
return successfully, but with a warning indicating that the image
is deprecated and recommending its replacement. New uses of OBSOLETE
or
DELETED
images result in an error. Note that setting the
deprecation state to DELETED
will not automatically delete the
image. You must still make a request to delete the image to remove it
from the image list.
--format
FORMAT
json
, text
, yaml
.
--help
--project
PROJECT_ID
--quiet
, -q
-h
IMAGE
immediately, mark it as
obsolete in one day, and mark it as deleted in two days, use:$ gcloud compute images deprecate IMAGE --status DEPRECATED \ --obsolete-in 1d --delete-in 2d
IMAGE
, use:$ gcloud compute images deprecate IMAGE --status ACTIVE
compute
component. See
installing components
if it is not installed.