- gcloud alpha compute resource-policies create vm-maintenance concurrency-limit - create a Compute Engine VM Maintenance Resource Policy
(ALPHA)Create a Compute Engine VM Maintenance Resource Policy that, when attached to an instance, recognizes that instance as a part of a group of instances where only up the configured amount of instances in that group can undergo simultaneous maintenance.
- POSITIONAL ARGUMENTS
- Name of the resource policy to operate on.
- An optional, textual description for the backend.
Sets maximum percentage of instances in the group that can undergo simultaneous
maintenance. If this flag is not specified default value of 1% will be set.
--max-percent=10sets to 10%.
Region of the resource policy to operate on. If not specified, you may be
prompted to select a region (interactive mode only).
To avoid prompting when this flag is omitted, you can set the
gcloud config set compute/region REGION
A list of regions can be fetched by running:
To unset the property, run:
gcloud config unset compute/region
Alternatively, the region can be stored in the environment variable
- GCLOUD WIDE FLAGS
These flags are available to all commands:
$ gcloud helpfor details.
The following command creates a VM maintenance resource policy with a
concurrency maintenance limit set to 1%.
gcloud alpha compute resource-policies create vm-maintenance concurrency-limit my-resource-policy --region=REGION
- This command is currently in ALPHA and may change without notice. If this command fails with API permission errors despite specifying the right project, you may be trying to access an API with an invitation-only early access allowlist.
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 2020-12-15 UTC.