gcloud beta compute reservations update Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud beta compute reservations update - update Compute Engine reservations
- SYNOPSIS
gcloud beta 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
(BETA)Update Compute Engine reservations.- EXAMPLES
- To add
project-1,project-2,project-3to the list of projects thatare shared with a Compute Engine reservation,my-reservationinzone:us-central1-a, run:gcloudbetacomputereservationsupdatemy-reservation--add-share-with=project-1,project-2,project-3--zone=us-central1-aTo remove
project-1,project-2,project-3from the list of projectsthat are shared with a Compute Engine reservation,my-reservationin zone:us-central1-a, run:gcloudbetacomputereservationsupdatemy-reservation--remove-share-with=project-1,project-2,project-3--zone=us-central1-aTo update the entire list of projects that are shared with a Compute Enginereservation,
my-reservationin zone:us-central1-a,run:gcloudbetacomputereservationsupdatemy-reservation--share-with=project-1,project-2,project-3--zone=us-central1-aTo update the number of reserved VM instances to 500 for a Compute Enginereservation,
my-reservationin zone:us-central1-a,run:gcloudbetacomputereservationsupdatemy-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-maintenanceto enable and--no-enable-emergent-maintenanceto 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_POLICYmust 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_TYPEmust 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 the
property isn't set, you mightbe prompted to select a zone (interactive mode only).compute/zoneTo avoid prompting when this flag is omitted, you can set the
property:compute/zonegcloudconfigsetcompute/zoneZONEA list of zones can be fetched by running:
gcloudcomputezoneslistTo unset the property, run:
gcloudconfigunsetcompute/zoneAlternatively, the zone can be stored in the environment variable
.CLOUDSDK_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 helpfor details. - NOTES
- This command is currently in beta and might change without notice. Thesevariants are also available:
gcloudcomputereservationsupdategcloudalphacomputereservationsupdate
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.