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 ANY of these GroupLabels. This allows targeting of disparate groups of VM instances.
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
Targets a group of VM instances by using their assigned labels. Labels are key-value pairs. A GroupLabel is a combination of labels that is used to target VMs for a patch job.
For example, a patch job can target VMs that have the following GroupLabel: {"env":"test", "app":"web"}. This means that the patch job is applied to VMs that have both the labels env=test 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 and target specific Virtual Machine (VM) instances for patching."],["VM targeting can be achieved using various criteria, including `all`, `groupLabels`, `zones`, `instances`, and `instanceNamePrefixes`, with all specified criteria needing to be met for a VM to be targeted."],["`GroupLabel` allows targeting VMs that have a specific combination of key-value pairs in their assigned labels, like `{\"env\":\"test\", \"app\":\"web\"}`."],["The `all` boolean field can target all VMs, but if set to true, no other criteria are permitted, and the `groupLabels` field targets any VM matching at least one of the provided group labels."],["VM instances can be targeted by their specific URI or by a common name prefix using the `instances` and `instanceNamePrefixes` fields respectively."]]],[]]