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.
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[]
string
Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.
instances[]
string
Targets any of the VM instances specified. Instances are specified by their URI in the form zones/[ZONE]/instances/[INSTANCE_NAME], projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME], or https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]
instanceNamePrefixes[]
string
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
map (key: string, value: string)
Compute Engine instance labels that must be present for a VM instance to be targeted by this filter.
An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-11-11 UTC."],[[["This document details how to filter VM instances for patching, ensuring that only VMs meeting all specified criteria are targeted."],["The `PatchInstanceFilter` allows targeting VMs using various criteria like labels, zones, specific instances, or instance name prefixes, with an option to target all VMs in a project."],["The `GroupLabel` feature enables grouping VMs based on shared labels, such as targeting all VMs with both \"env=prod\" and \"app=web\" labels."],["VM instances can be targeted using their URI or by specifying a prefix of the instance name."],["When utilizing `groupLabels` you can specify multiple sets of labels, and only one of the sets need to match for that instance to be included."]]],[]]