gcloud beta compute advice calendar-mode

NAME
gcloud beta compute advice calendar-mode - recommends the optimal time window and zone for Future Reservations
SYNOPSIS
gcloud beta compute advice calendar-mode([--chip-count=CHIP_COUNT--tpu-version=TPU_VERSION :--workload-type=WORKLOAD_TYPE]    | [--machine-type=MACHINE_TYPE--vm-count=VM_COUNT :--local-ssd=[interface=INTERFACE],[size=SIZE]])[--duration-range=[max=MAX],[min=MIN]][--end-time-range=[from=FROM],[to=TO]][--location-policy=[ZONE=POLICY,…]][--region=REGION][--start-time-range=[from=FROM],[to=TO]][GCLOUD_WIDE_FLAG]
DESCRIPTION
(BETA) Recommends the optimal time window and zone for FutureReservations.
EXAMPLES
To request an advice for a future reservation of 8 a3-highgpu-8g VMs, run:
gcloudbetacomputeadvicecalendar-mode--region=fake-region--machine-type=a3-megagpu-8g--vm-count=8--duration-range=min=7d,max=14d--start-time-range=from=2025-02-20,to=2025-03-25--end-time-range=from=2025-02-20,to=2025-03-25

To request advice for a future reservation of 512 v5e TPUs, run:

gcloudbetacomputeadvicecalendar-mode--region=fake-region--location-policy=fake-zone-1=DENY,fake-zone-2=ALLOW--tpu-version=V5E--chip-count=16--workload-type=BATCH--duration-range=min=30d,max=90d--start-time-range=from=2025-02-25,to=2025-06-25--end-time-range=from=2025-02-25,to=2025-06-25
REQUIRED FLAGS
Specifythepropertiesoftheresourcesthatyouwanttoviewtheavailabilityof.
Exactly one of these must be specified:
YoumustdefinetheversionandnumberofTPUstoreserve.
--chip-count=CHIP_COUNT
The number of chips to check for availability.

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

--tpu-version=TPU_VERSION
The version of Cloud TPU to reserve.TPU_VERSION must beone of:
TPU7X
Cloud TPU v7x
V5E
Cloud TPU v5e Lite
V5P
Cloud TPU v5p
V6E
Cloud TPU v6e
This flag argument must be specified if any of the other arguments in this groupare specified.
--workload-type=WORKLOAD_TYPE
Type of the workload that will be running on the reserved TPUs.WORKLOAD_TYPE must be one of:
BATCH
Reserved resources will be optimized for BATCH workloads that handle largeamounts of data in single or multiple operations, such as ML training workloads.
SERVING
Reserved resources will be optimized for SERVING workloads that handleconcurrent requests and require minimal network latency, such as ML inference.
DefineindividualinstancepropertiesforthespecificSKUreservation.
--machine-type=MACHINE_TYPE
The type of machine (name only) that has a fixed number of vCPUs and a fixedamount of memory. You can also specify a custom machine type by using thepatterncustom-number_of_CPUs-amount_of_memory-for example,custom-32-29440.

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

--vm-count=VM_COUNT
The number of instances to check for availability.

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

--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. The only valid valueisnvme.
size
The size of the local SSD in base-2 GB.
OPTIONAL FLAGS
--duration-range=[max=MAX],[min=MIN]
A duration range for the duration of the Future Reservation. Defined as a listof key-value pairs.

The key is either "min" or "max", and the value is a duration in seconds. Forexample, specify30m for a duration of 30 minutes or specify1d2h3m4s for a duration of 1 day, 2 hours, 3 minutes, and 4seconds.

See $gcloud topic datetimesfor information on duration formats.

min
The minimum duration of the Future Reservation.
max
The maximum duration of the Future Reservation.

Example:

gcloudcomputeadvicecalendar-mode--duration-range=min=24h,max=72h
--end-time-range=[from=FROM],[to=TO]
A time range for the end time of the Future Reservation. Defined as a list ofkey-value pairs.

The key is either "from" or "to", and the value is a datetime. See $gcloud topic datetimes forinformation on time formats.

from
The earliest possible end time for the reservation.
to
The latest possible end time for the reservation.

Example:

gcloudcomputeadvicecalendar-mode--end-time-range=from=2024-08-01T00:00:00Z,to=2024-08-02T00:00:00Z
--location-policy=[ZONE=POLICY,…]
Policy for which zones to include or exclude when looking for the optimal timewindow and zone for Future Reservations within a region. Policy is defined as alist of key-value pairs, with the key being the zone name, and value being theapplied policy. Available policies areallow anddeny.Default for zones if left unspecified isallow.

Example:

gcloudcomputeadvicecalendar-mode--location-policy=us-central1-a=allow,us-central1-b=deny
--region=REGION
Region of the resources to get advice on. 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.

--start-time-range=[from=FROM],[to=TO]
A time range for the start time of the Future Reservation. Defined as a list ofkey-value pairs.

The key is either "from" or "to", and the value is a datetime. See $gcloud topic datetimes forinformation on time formats.

from
The earliest possible start time for the reservation.
to
The latest possible start time for the reservation.

Example:

gcloudcomputeadvicecalendar-mode--start-time-range=from=2024-08-01T00:00:00Z,to=2024-08-02T00:00:00Z
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. Thesevariants are also available:
gcloudcomputeadvicecalendar-mode
gcloudalphacomputeadvicecalendar-mode

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-12-16 UTC.