Reference documentation and code samples for the Google Cloud OsConfig V1 Client class PatchInstanceFilter.
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.
Generated from protobuf message google.cloud.osconfig.v1.PatchInstanceFilter
Namespace
Google \ Cloud \ OsConfig \ V1Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ all
bool
Target all VM instances in the project. If true, no other criteria is permitted.
↳ group_labels
array< Google\Cloud\OsConfig\V1\PatchInstanceFilter\GroupLabel
>
Targets VM instances matching ANY of these GroupLabels. This allows targeting of disparate groups of VM instances.
↳ zones
array
Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.
↳ instances
array
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
array
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-".
getAll
Target all VM instances in the project. If true, no other criteria is permitted.
bool
setAll
Target all VM instances in the project. If true, no other criteria is permitted.
var
bool
$this
getGroupLabels
Targets VM instances matching ANY of these GroupLabels. This allows targeting of disparate groups of VM instances.
setGroupLabels
Targets VM instances matching ANY of these GroupLabels. This allows targeting of disparate groups of VM instances.
$this
getZones
Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.
setZones
Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.
var
string[]
$this
getInstances
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]
setInstances
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]
var
string[]
$this
getInstanceNamePrefixes
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-".
setInstanceNamePrefixes
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-".
var
string[]
$this