gcloud alpha compute resource-policies create-vm-maintenance Stay organized with collections Save and categorize content based on your preferences.
- 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-maintenanceis deprecated. Usecomputeresource-policies create vm-maintenanceinstead.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.
- Cycle Frequency Group.
- 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 the
property:compute/regiongcloudconfigsetcompute/regionREGIONA list of regions can be fetched by running:
gcloudcomputeregionslistTo unset the property, run:
gcloudconfigunsetcompute/regionAlternatively, the region can be stored in the environment variable
.CLOUDSDK_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 helpfor 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.