- NAME
-
- gcloud compute images deprecate - manage deprecation status of Compute Engine images
- SYNOPSIS
-
-
gcloud compute images deprecate
IMAGE_NAME
--state
=STATE
[--replacement
=REPLACEMENT
] [--delete-in
=DELETE_IN
|--delete-on
=DELETE_ON
] [--deprecate-in
=DEPRECATE_IN
|--deprecate-on
=DEPRECATE_ON
] [--obsolete-in
=OBSOLETE_IN
|--obsolete-on
=OBSOLETE_ON
] [GCLOUD_WIDE_FLAG …
]
-
- DESCRIPTION
-
gcloud compute images deprecate
is used to deprecate images. - EXAMPLES
-
To deprecate an image called 'IMAGE' immediately, mark it as obsolete in one
day, and mark it as deleted in two days, use:
gcloud compute images deprecate IMAGE --state=DEPRECATED --obsolete-in=1d --delete-in=2d
To un-deprecate an image called 'IMAGE' and clear times for deprecated, obsoleted, and deleted, use:
gcloud compute images deprecate IMAGE --state=ACTIVE
- POSITIONAL ARGUMENTS
-
IMAGE_NAME
- Name of the disk image to operate on.
- REQUIRED FLAGS
-
--state
=STATE
-
The deprecation state to set on the image.
STATE
must be one of:ACTIVE
- The image is currently supported.
DELETED
- New uses result in an error. Setting this state will not automatically delete the image. You must still make a request to delete the image to remove it from the image list.
DEPRECATED
-
Operations which create a new
DEPRECATED
resource return successfully, but with a warning indicating that the image is deprecated and recommending its replacement. OBSOLETE
- New uses result in an error.
- OPTIONAL FLAGS
-
--replacement
=REPLACEMENT
-
Specifies a Compute Engine image as a replacement for the image being phased
out. Users of the deprecated image will be advised to switch to this
replacement. For example,
--replacement example-image
or--replacement projects/google/global/images/example-image
.This flag value is purely informational and is not validated in any way.
-
At most one of these can be specified:
--delete-in
=DELETE_IN
-
Specifies a time duration in which the image should be marked as
.DELETED
Note: This is only informational and the image will not be deleted unless you manually delete it.
For example, specifying
sets the planned30d
time to 30 days from the current system time, but does not delete the image. You must manually delete the image in 30 days. See $ gcloud topic datetimes for information on duration formats.DELETED
This flag is mutually exclusive with
--delete-on
. --delete-on
=DELETE_ON
-
Specifies a date when the image should be marked as
.DELETED
Note: This is only informational and the image will not be deleted unless you manually delete it.
This flag is mutually exclusive with
--delete-in
.The date and time specified must be valid RFC 3339 full-date or date-time. For times in UTC, this looks like
. For example: 2020-01-02T00:00:00Z for midnight on January 2, 2020 in UTC.YYYY-MM-DDTHH:MM:SSZ
-
At most one of these can be specified:
--deprecate-in
=DEPRECATE_IN
-
Specifies a time duration in which the image should be marked as
.DEPRECATED
Note: This is only informational and the image will not be deprecated unless you manually deprecate it.
This flag is mutually exclusive with
--deprecate-on
.For example, specifying
sets the planned30d
date to 30 days from the current system time, but does not deprecate the image. You must manually deprecate the image in 30 days. See $ gcloud topic datetimes for information on duration formats.DEPRECATED
--deprecate-on
=DEPRECATE_ON
-
Specifies a date when the image should be marked as DEPRECATED.
Note: This is only informational and the image will not be deprecated unless you manually deprecate it.
This flag is mutually exclusive with
--deprecate-in
.The date and time specified must be valid RFC 3339 full-date or date-time. For times in UTC, this looks like
. For example: 2020-01-02T00:00:00Z for midnight on January 2, 2020 in UTC.YYYY-MM-DDTHH:MM:SSZ
-
At most one of these can be specified:
--obsolete-in
=OBSOLETE_IN
-
Specifies a time duration in which the image should be marked as
.OBSOLETE
Note: This is only informational and the image will not be obsoleted unless you manually obsolete it.
This flag is mutually exclusive with
--obsolete-on
.For example, specifying
sets the planned30d
time to 30 days from the current system time, but does not obsolete the image. You must manually obsolete the image in 30 days. See $ gcloud topic datetimes for information on duration formats.OBSOLETE
--obsolete-on
=OBSOLETE_ON
-
Specifies a date when the image should be marked as
.OBSOLETE
Note: This is only informational and the image will not be obsoleted unless you manually obsolete it.
This flag is mutually exclusive with
--obsolete-in
.The date and time specified must be valid RFC 3339 full-date or date-time. For times in UTC, this looks like
. For example: 2020-01-02T00:00:00Z for midnight on January 2, 2020 in UTC.YYYY-MM-DDTHH:MM:SSZ
- GCLOUD WIDE FLAGS
-
These flags are available to all commands:
--access-token-file
,--account
,--billing-project
,--configuration
,--flags-file
,--flatten
,--format
,--help
,--impersonate-service-account
,--log-http
,--project
,--quiet
,--trace-token
,--user-output-enabled
,--verbosity
.Run
$ gcloud help
for details. - NOTES
-
These variants are also available:
gcloud alpha compute images deprecate
gcloud beta compute images deprecate
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-05-21 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{
"last_modified": "Last updated 2024-05-21 UTC.",
"state": ""
}