Class PatchInstanceFilter (0.1.2)

PatchInstanceFilter(mapping=None, *, ignore_unknown_fields=False, **kwargs)

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.

Attributes

NameDescription
all bool
Target all VM instances in the project. If true, no other criteria is permitted.
group_labels Sequence[.gco_patch_jobs.PatchInstanceFilter.GroupLabel]
Targets VM instances matching ANY of these GroupLabels. This allows targeting of disparate groups of VM instances.
zones Sequence[str]
Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.
instances Sequence[str]
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]\`
instance_name_prefixes Sequence[str]
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-".

Classes

GroupLabel

GroupLabel(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Targets a group of VM instances by using their assigned labels <https://cloud.google.com/compute/docs/labeling-resources>__. 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.

Methods

__delattr__

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__

__eq__(other)

Return True if the messages are equal, False otherwise.

__ne__

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.