# Compute V1 Client - Class InstanceGroupManagerVersion (2.10.0)

2.10.0 (latest) 2.9.0 2.8.0 2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.1 2.0.0 1.36.0 1.35.0 1.34.0 1.33.0 1.32.0 1.31.0 1.30.0 1.29.0 1.28.0 1.27.0 1.26.0 1.25.0 1.24.0 1.23.0 1.22.1 1.21.0 1.20.0 1.19.0 1.18.1 1.17.0 1.16.2 1.14.0 1.13.0 1.12.1 1.11.1 1.10.1 1.9.1 1.8.3 1.7.1 1.6.1 1.5.0 Reference documentation and code samples for the Compute V1 Client class InstanceGroupManagerVersion.

Generated from protobuf message `google.cloud.compute.v1.InstanceGroupManagerVersion`

## Namespace

Google \\ Cloud \\ Compute \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ instance_template` | `string` The URL of the instance template that is specified for this managed instance group. The group uses this template to create new instances in the managed instance group until the `targetSize` for this version is reached. The templates for existing instances in the group do not change unless you run recreateInstances, runapplyUpdatesToInstances, or set the group'supdatePolicy.type to PROACTIVE; in those cases, existing instances are updated until the `targetSize` for this version is reached. |
| `↳ name` | `string` Name of the version. Unique among all versions in the scope of this managed instance group. |
| `↳ target_size` | `https://docs.cloud.google.com/php/docs/reference/cloud-compute/latest/V1.FixedOrPercent` Specifies the intended number of instances to be created from theinstanceTemplate. The final number of instances created from the template will be equal to: - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used. - if expressed as a percent, the targetSize would be (targetSize.percent/100 \* InstanceGroupManager.targetSize) If there is a remainder, the number is rounded. If unset, this version will update any remaining instances not updated by another version. ReadStarting a canary update for more information. |

### getInstanceTemplate

The URL of the instance template that is specified for this managed
instance group. The group uses this template to create new instances in
the managed instance group until the `targetSize` for this version is
reached. The templates for existing instances in the group do not change
unless you run recreateInstances, runapplyUpdatesToInstances, or set the group'supdatePolicy.type to PROACTIVE; in those cases,
existing instances are updated until the `targetSize` for this version is
reached.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### hasInstanceTemplate

### clearInstanceTemplate

### setInstanceTemplate

The URL of the instance template that is specified for this managed
instance group. The group uses this template to create new instances in
the managed instance group until the `targetSize` for this version is
reached. The templates for existing instances in the group do not change
unless you run recreateInstances, runapplyUpdatesToInstances, or set the group'supdatePolicy.type to PROACTIVE; in those cases,
existing instances are updated until the `targetSize` for this version is
reached.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getName

Name of the version. Unique among all versions in the scope of this
managed instance group.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### hasName

### clearName

### setName

Name of the version. Unique among all versions in the scope of this
managed instance group.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getTargetSize

Specifies the intended number of instances to be created from theinstanceTemplate. The final number of instances created
from the template will be equal to:

- If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.

<!-- -->

- if expressed as a percent, the targetSize would be (targetSize.percent/100 \* InstanceGroupManager.targetSize) If there is a remainder, the number is rounded. If unset, this version will update any remaining instances not updated by another version. ReadStarting a canary update for more information.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-compute/latest/V1.FixedOrPercent|null` |   |

### hasTargetSize

### clearTargetSize

### setTargetSize

Specifies the intended number of instances to be created from theinstanceTemplate. The final number of instances created
from the template will be equal to:

- If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.

<!-- -->

- if expressed as a percent, the targetSize would be (targetSize.percent/100 \* InstanceGroupManager.targetSize) If there is a remainder, the number is rounded. If unset, this version will update any remaining instances not updated by another version. ReadStarting a canary update for more information.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-compute/latest/V1.FixedOrPercent` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |