PatchInstanceFilter Stay organized with collections Save and categorize content based on your preferences.
A filter to target VM instances for patching. The targeted VMs must meet all criteria specified. So if both labels and zones are specified, the patch job targets only VMs with those labels and in those zones.
| JSON representation |
|---|
{"all":boolean,"groupLabels":[{object ( |
| Fields | |
|---|---|
all |
Target all VM instances in the project. If true, no other criteria is permitted. |
groupLabels[] |
Targets VM instances matching at least one of these label sets. This allows targeting of disparate groups, for example "env=prod or env=staging". |
zones[] |
Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone. |
instances[] |
Targets any of the VM instances specified. Instances are specified by their URI in the form |
instanceNamePrefixes[] |
Targets VMs whose name starts with one of these prefixes. Similar to labels, this is another way to group VMs when targeting configs, for example prefix="prod-". |
GroupLabel
Represents a group of VMs that can be identified as having all these labels, for example "env=prod and app=web".
| JSON representation |
|---|
{"labels":{string:string,...}} |
| Fields | |
|---|---|
labels |
Compute Engine instance labels that must be present for a VM instance to be targeted by this filter. An object containing a list of |
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-07-28 UTC.