# Cloud OS Config V1 API - Class Google::Cloud::OsConfig::V1::PatchInstanceFilter (v1.9.0)

1.9.0 (latest) 1.8.1 1.7.0 1.6.1 1.5.0 1.4.0 1.3.0 1.2.1 1.1.0 1.0.1 0.16.0 0.15.2 0.14.0 0.13.0 0.12.0 0.11.0 0.10.0 0.9.1 Reference documentation and code samples for the Cloud OS Config V1 API class Google::Cloud::OsConfig::V1::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.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #all

    def all() -> ::Boolean

**Returns**

- (::Boolean) --- Target all VM instances in the project. If true, no other criteria is permitted.

### #all=

    def all=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- Target all VM instances in the project. If true, no other criteria is permitted.
**Returns**

- (::Boolean) --- Target all VM instances in the project. If true, no other criteria is permitted.

### #group_labels

    def group_labels() -> ::Array<::Google::Cloud::OsConfig::V1::PatchInstanceFilter::GroupLabel>

**Returns**

- (::Array\<[::Google::Cloud::OsConfig::V1::PatchInstanceFilter::GroupLabel](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-PatchInstanceFilter-GroupLabel)\>) --- Targets VM instances matching ANY of these GroupLabels. This allows targeting of disparate groups of VM instances.

### #group_labels=

    def group_labels=(value) -> ::Array<::Google::Cloud::OsConfig::V1::PatchInstanceFilter::GroupLabel>

**Parameter**

- **value** (::Array\<[::Google::Cloud::OsConfig::V1::PatchInstanceFilter::GroupLabel](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-PatchInstanceFilter-GroupLabel)\>) --- Targets VM instances matching ANY of these GroupLabels. This allows targeting of disparate groups of VM instances.
**Returns**

- (::Array\<[::Google::Cloud::OsConfig::V1::PatchInstanceFilter::GroupLabel](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-PatchInstanceFilter-GroupLabel)\>) --- Targets VM instances matching ANY of these GroupLabels. This allows targeting of disparate groups of VM instances.

### #instance_name_prefixes

    def instance_name_prefixes() -> ::Array<::String>

**Returns**

- (::Array\<::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-".

### #instance_name_prefixes=

    def instance_name_prefixes=(value) -> ::Array<::String>

**Parameter**

- **value** (::Array\<::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-".
**Returns**

- (::Array\<::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-".

### #instances

    def instances() -> ::Array<::String>

**Returns**

- (::Array\<::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]`

### #instances=

    def instances=(value) -> ::Array<::String>

**Parameter**

- **value** (::Array\<::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]`
**Returns**

- (::Array\<::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]`

### #zones

    def zones() -> ::Array<::String>

**Returns**

- (::Array\<::String\>) --- Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.

### #zones=

    def zones=(value) -> ::Array<::String>

**Parameter**

- **value** (::Array\<::String\>) --- Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.
**Returns**

- (::Array\<::String\>) --- Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.