gcloud alpha compute resource-policies create-vm-maintenance

NAME
gcloud alpha compute resource-policies create-vm-maintenance - create a Compute Engine VM Maintenance Resource Policy
SYNOPSIS
gcloud alpha compute resource-policies create-vm-maintenanceNAME(--daily-window--start-time=START_TIME)[--description=DESCRIPTION][--region=REGION][GCLOUD_WIDE_FLAG]
DESCRIPTION
(ALPHA)(DEPRECATED)create-vm-maintenance is deprecated. Usecomputeresource-policies create vm-maintenance instead.Create a Compute Engine VM Maintenance Resource Policy.
EXAMPLES
The following command creates a Compute Engine VM Maintenance Resource Policywith a daily maintenance activity window that starts at 04:00Z.
gcloudalphacomputeresource-policiescreate-vm-maintenancemy-resource-policy--region=REGION--start-time=04:00Z--daily-window
POSITIONAL ARGUMENTS
NAME
Name of the resource policy to operate on.
REQUIRED FLAGS
Cycle Frequency Group.

This must be specified.

--daily-window
Maintenance activity window starts daily at START_TIME.

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

--start-time=START_TIME
Start time of a four-hour window in which maintenance should start in dailycadence. Valid choices are 00:00, 04:00, 08:00, 12:00, 16:00 and 20:00 UTC. Forexample,--start-time="08:00".

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

OPTIONAL FLAGS
--description=DESCRIPTION
An optional, textual description for the backend.
--region=REGION
Region of the resource policy to operate 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.

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.

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.