gcloud alpha compute reservations update

NAME
gcloud alpha compute reservations update - update Compute Engine reservations
SYNOPSIS
gcloud alpha compute reservations updateRESERVATION[--add-share-with=PROJECT,[PROJECT,…]][--[no-]enable-emergent-maintenance][--remove-share-with=PROJECT,[PROJECT,…]][--reservation-sharing-policy=RESERVATION_SHARING_POLICY][--scheduling-type=SCHEDULING_TYPE][--share-setting=SHARE_SETTING][--share-with=SHARE_WITH,[SHARE_WITH,…]][--vm-count=VM_COUNT][--zone=ZONE][--delete-after-duration=DELETE_AFTER_DURATION    |--delete-at-time=DELETE_AT_TIME    |--disable-auto-delete][GCLOUD_WIDE_FLAG]
DESCRIPTION
(ALPHA) Update Compute Engine reservations.
EXAMPLES
To addproject-1,project-2,project-3 to the list of projects thatare shared with a Compute Engine reservation,my-reservation inzone:us-central1-a, run:
gcloudalphacomputereservationsupdatemy-reservation--add-share-with=project-1,project-2,project-3--zone=us-central1-a

To removeproject-1,project-2,project-3 from the list of projectsthat are shared with a Compute Engine reservation,my-reservationin zone:us-central1-a, run:

gcloudalphacomputereservationsupdatemy-reservation--remove-share-with=project-1,project-2,project-3--zone=us-central1-a

To update the entire list of projects that are shared with a Compute Enginereservation,my-reservation in zone:us-central1-a,run:

gcloudalphacomputereservationsupdatemy-reservation--share-with=project-1,project-2,project-3--zone=us-central1-a

To update the number of reserved VM instances to 500 for a Compute Enginereservation,my-reservation in zone:us-central1-a,run:

gcloudalphacomputereservationsupdatemy-reservation--zone=us-central1-a--vm-count=500
POSITIONAL ARGUMENTS
RESERVATION
Name of the reservation to update.
FLAGS
--add-share-with=PROJECT,[PROJECT,…]
If this reservation is shared (--share-setting is projects), then specify acomma-separated list of projects to share the reservation with. You must listthe projects using project IDs or project numbers.
--[no-]enable-emergent-maintenance
Enables the reservation to receive notifications when urgent maintenance for aGPU VM starts after the VM encounters a host error. Use--enable-emergent-maintenance to enable and--no-enable-emergent-maintenance to disable.
--remove-share-with=PROJECT,[PROJECT,…]
A list of specific projects to remove from the list of projects that thisreservation is shared with. List must contain project IDs or project numbers.
--reservation-sharing-policy=RESERVATION_SHARING_POLICY
The reservation sharing policy to use for this reservation.RESERVATION_SHARING_POLICY must be one of:
ALLOW_ALL
The reservation can be shared with Google Cloud services.
DISALLOW_ALL
The reservation won't be shared with Google Cloud services. If you omit thisflag during creation, the default value is DISALLOW_ALL.
--scheduling-type=SCHEDULING_TYPE
How Compute Engine schedules maintenance events for your reserved hosts.SCHEDULING_TYPE must be one of:
GROUPED
In GROUPED mode, maintenance is synchronized across all your VMs.
INDEPENDENT
In INDEPENDENT mode, your VMs have different, unsynchronized maintenanceschedules.
--share-setting=SHARE_SETTING
The projects that can use the reservation.SHARE_SETTINGmust be one of:
local
Only your project can use the reservation. This is the default value.
projects
Your project and up to 100 other projects within your project's organization canuse the reservation. If you specify this value, then you must also include the--share-with flag in the command.
--share-with=SHARE_WITH,[SHARE_WITH,…]
If this reservation is shared (--share-setting=projects), then specify acomma-separated list of projects to share the reservation with. List projectsusing project IDs or project numbers.
--vm-count=VM_COUNT
The number of VM instances that are allocated to this reservation. The value ofthis field must be an int in the range [1, 1000].
--zone=ZONE
Zone of the reservation to update. If not specified and thecompute/zone property isn't set, you mightbe prompted to select a zone (interactive mode only).

To avoid prompting when this flag is omitted, you can set thecompute/zone property:

gcloudconfigsetcompute/zoneZONE

A list of zones can be fetched by running:

gcloudcomputezoneslist

To unset the property, run:

gcloudconfigunsetcompute/zone

Alternatively, the zone can be stored in the environment variableCLOUDSDK_COMPUTE_ZONE.

Manage auto-delete properties for reservations.

At most one of these can be specified:

--delete-after-duration=DELETE_AFTER_DURATION
Automatically deletes the reservations after a specified number of days, hours,minutes, or seconds from its creation. For example, specify 30m for 30 minutes,or 1d2h3m4s for 1 day, 2 hours, 3 minutes, and 4 seconds. For more information,see $gcloud topicdatetimes.
--delete-at-time=DELETE_AT_TIME
Automatically deletes the reservation at a specific time from its creation. Thespecified time must be an RFC3339 timestamp, which must be formatted as"YYYY-MM-DDTHH:MM:SSZ" where YYYY = year, MM = month, DD = day, HH = hours, MM =minutes, SS = seconds, and Z = time zone in Coordinated Universal Time (UTC).For example, specify 2021-11-20T07:00:00Z.
--disable-auto-delete
Disables the auto-delete setting for the reservation.
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
This command is currently in alpha and might change without notice. If thiscommand fails with API permission errors despite specifying the correct project,you might be trying to access an API with an invitation-only early accessallowlist. These variants are also available:
gcloudcomputereservationsupdate
gcloudbetacomputereservationsupdate

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-09-30 UTC.