gcloud beta compute commitments update-reservations

NAME
gcloud beta compute commitments update-reservations - update the resource shape of reservations within the commitment
SYNOPSIS
gcloud beta compute commitments update-reservationsCOMMITMENT[--region=REGION][--reservations-from-file=PATH_TO_FILE    | [--dest-reservation=[machine-type=MACHINE-TYPE],[min-cpu-platform=MIN-CPU-PLATFORM],[require-specific-reservation=REQUIRE-SPECIFIC-RESERVATION],[reservation=RESERVATION],[reservation-zone=RESERVATION-ZONE],[vm-count=VM-COUNT]--source-reservation=[machine-type=MACHINE-TYPE],[min-cpu-platform=MIN-CPU-PLATFORM],[require-specific-reservation=REQUIRE-SPECIFIC-RESERVATION],[reservation=RESERVATION],[reservation-zone=RESERVATION-ZONE],[vm-count=VM-COUNT] :--dest-accelerator=[count=COUNT],[type=TYPE]--dest-local-ssd=[interface=INTERFACE],[size=SIZE]--dest-share-setting=DEST_SHARE_SETTING--dest-share-with=SHARE_WITH,[SHARE_WITH,…]--source-accelerator=[count=COUNT],[type=TYPE]--source-local-ssd=[interface=INTERFACE],[size=SIZE]--source-share-setting=SOURCE_SHARE_SETTING--source-share-with=SHARE_WITH,[SHARE_WITH,…]]][GCLOUD_WIDE_FLAG]
DESCRIPTION
(BETA) Update the resource shape of reservations within thecommitment.
EXAMPLES
To update reservations of the commitment calledcommitment-1 in theus-central1 region with values fromreservations.yaml, run:
gcloudbetacomputecommitmentsupdate-reservationscommitment-1--reservations-from-file=reservations.yaml

For detailed examples, please refer tohttps://cloud.google.com/compute/docs/instances/reserving-zonal-resources#modifying_reservations_that_are_attached_to_commitments

POSITIONAL ARGUMENTS
COMMITMENT
Name of the commitment to update reservation.
FLAGS
--region=REGION
Region of the commitment to update reservation. If not specified, you might beprompted to select a region (interactive mode only).

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

gcloudconfigsetcompute/regionREGION

A list of regions can be fetched by running:

gcloudcomputeregionslist

To unset the property, run:

gcloudconfigunsetcompute/region

Alternatively, the region can be stored in the environment variableCLOUDSDK_COMPUTE_REGION.

Manage reservations that are attached to the commitment.

At most one of these can be specified:

--reservations-from-file=PATH_TO_FILE
Path to a YAML file of two reservations' configuration. Use a full or relativepath to a local file containing the value of reservations.
Specify source and destination reservations configuration.
--dest-reservation=[machine-type=MACHINE-TYPE],[min-cpu-platform=MIN-CPU-PLATFORM],[require-specific-reservation=REQUIRE-SPECIFIC-RESERVATION],[reservation=RESERVATION],[reservation-zone=RESERVATION-ZONE],[vm-count=VM-COUNT]
destination reservation configuration.
reservation
Name of the destination reservation to operate on.
reservation-zone
Zone of the destination reservation to operate on.
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].
machine-type
The type of machine (name only) which has a fixed number of vCPUs and a fixedamount of memory. This also includes specifying custom machine type followingcustom-number_of_CPUs-amount_of_memory pattern, e.g.custom-32-29440.
min-cpu-platform
Optional minimum CPU platform of the reservation to create.
require-specific-reservation
Indicates whether the reservation can be consumed by VMs with "any reservation"defined. If enabled, then only VMs that target this reservation by name using--reservation-affinity=specific can consume from this reservation.

This flag argument must be specified if any of the other arguments in this groupare specified.

--source-reservation=[machine-type=MACHINE-TYPE],[min-cpu-platform=MIN-CPU-PLATFORM],[require-specific-reservation=REQUIRE-SPECIFIC-RESERVATION],[reservation=RESERVATION],[reservation-zone=RESERVATION-ZONE],[vm-count=VM-COUNT]
source reservation configuration.
reservation
Name of the source reservation to operate on.
reservation-zone
Zone of the source reservation to operate on.
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].
machine-type
The type of machine (name only) which has a fixed number of vCPUs and a fixedamount of memory. This also includes specifying custom machine type followingcustom-number_of_CPUs-amount_of_memory pattern, e.g.custom-32-29440.
min-cpu-platform
Optional minimum CPU platform of the reservation to create.
require-specific-reservation
Indicates whether the reservation can be consumed by VMs with "any reservation"defined. If enabled, then only VMs that target this reservation by name using--reservation-affinity=specific can consume from this reservation.

This flag argument must be specified if any of the other arguments in this groupare specified.

--dest-accelerator=[count=COUNT],[type=TYPE]
Manage the configuration of the type and number of accelerator cards attached.
count
The number of accelerators to attach to each instance in the reservation.
type
The specific type (e.g.nvidia-tesla-k80 for nVidia Tesla K80) ofaccelerator to attach to instances in the reservation. Usegcloud computeaccelerator-types list to learn about all available acceleratortypes.
--dest-local-ssd=[interface=INTERFACE],[size=SIZE]
Manage the size and the interface of local SSD to use. Seehttps://cloud.google.com/compute/docs/disks/local-ssdfor more information.
interface
The kind of disk interface exposed to the VM for this SSD. Valid values arescsi andnvme. SCSI is the default and is supported bymore guest operating systems. NVME may provide higher performance.
size
The size of the local SSD in base-2 GB.
--dest-share-setting=DEST_SHARE_SETTING
The projects that can use the reservation.DEST_SHARE_SETTING must 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.
--dest-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.
--source-accelerator=[count=COUNT],[type=TYPE]
Manage the configuration of the type and number of accelerator cards attached.
count
The number of accelerators to attach to each instance in the reservation.
type
The specific type (e.g.nvidia-tesla-k80 for nVidia Tesla K80) ofaccelerator to attach to instances in the reservation. Usegcloud computeaccelerator-types list to learn about all available acceleratortypes.
--source-local-ssd=[interface=INTERFACE],[size=SIZE]
Manage the size and the interface of local SSD to use. Seehttps://cloud.google.com/compute/docs/disks/local-ssdfor more information.
interface
The kind of disk interface exposed to the VM for this SSD. Valid values arescsi andnvme. SCSI is the default and is supported bymore guest operating systems. NVME may provide higher performance.
size
The size of the local SSD in base-2 GB.
--source-share-setting=SOURCE_SHARE_SETTING
The projects that can use the reservation.SOURCE_SHARE_SETTING must 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.
--source-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.
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 beta and might change without notice. This variantis also available:
gcloudalphacomputecommitmentsupdate-reservations

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-05-07 UTC.