- INFORMATION
-
gcloud compute reservations updateis supported in universe domainuniverse; however, some of the values used in the help text may not be available. Command examples may not work as-is and may requires changes before execution. - NAME
-
- gcloud compute reservations update - update Compute Engine reservations
- SYNOPSIS
-
-
gcloud 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] [--vm-count=VM_COUNT] [--zone=ZONE] [GCLOUD_WIDE_FLAG …]
-
- DESCRIPTION
- Update Compute Engine reservations.
- EXAMPLES
-
To add
project-1,project-2,project-3to the list of projects that are shared with a Compute Engine reservation,my-reservationin zone:us-central1-a, run:gcloud compute reservations update my-reservation --add-share-with=project-1,project-2,project-3 --zone=us-central1-aTo remove
project-1,project-2,project-3from the list of projects that are shared with a Compute Engine reservation,my-reservationin zone:us-central1-a, run:gcloud compute reservations update my-reservation --remove-share-with=project-1,project-2,project-3 --zone=us-central1-aTo update the number of reserved VM instances to 500 for a Compute Engine reservation,
my-reservationin zone:us-central1-a, run:gcloud compute reservations update my-reservation --zone=us-central1-a --vm-count=500 - POSITIONAL ARGUMENTS
-
RESERVATION- Name of the reservation to update.
- FLAGS
-
- If this reservation is shared (--share-setting is projects), then specify a comma-separated list of projects to share the reservation with. You must list the projects using project IDs or project numbers.
--[no-]enable-emergent-maintenance-
Enables the reservation to receive notifications when urgent maintenance for a
GPU VM starts after the VM encounters a host error. Use
--enable-emergent-maintenanceto enable and--no-enable-emergent-maintenanceto disable. - A list of specific projects to remove from the list of projects that this reservation 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 this flag 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 maintenance schedules.
--vm-count=VM_COUNT- The number of VM instances that are allocated to this reservation. The value of this 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 might be prompted to select a zone (interactive mode only).compute/zoneTo avoid prompting when this flag is omitted, you can set the
property:compute/zonegcloud config set compute/zone ZONEA list of zones can be fetched by running:
gcloud compute zones listTo unset the property, run:
gcloud config unset compute/zoneAlternatively, the zone can be stored in the environment variable
.CLOUDSDK_COMPUTE_ZONE
- 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
-
These variants are also available:
gcloud alpha compute reservations updategcloud beta compute reservations update
gcloud compute reservations update
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 2025-09-30 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-30 UTC."],[],[]]