# Google Cloud Dataproc V1 Client - Class ResizeNodeGroupRequest (3.14.0)

3.14.0 (latest) 3.13.4 3.12.0 3.11.0 3.10.1 3.9.0 3.8.1 3.7.1 3.6.1 3.5.1 3.4.0 3.3.0 3.2.2 2.12.0 2.11.0 2.10.0 2.9.1 2.8.2 2.7.0 2.6.1 2.5.0 2.3.0 2.2.3 2.1.0 2.0.0 Reference documentation and code samples for the Google Cloud Dataproc V1 Client class ResizeNodeGroupRequest.

A request to resize a node group.

Generated from protobuf message `google.cloud.dataproc.v1.ResizeNodeGroupRequest`

## Namespace

Google \\ Cloud \\ Dataproc \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Required. The name of the node group to resize. Format: `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}` |
| `↳ size` | `int` Required. The number of running instances for the node group to maintain. The group adds or removes instances to maintain the number of instances specified by this parameter. |
| `↳ request_id` | `string` Optional. A unique ID used to identify the request. If the server receives two [ResizeNodeGroupRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.ResizeNodeGroupRequests) with the same ID, the second request is ignored and the first google.longrunning.Operation created and stored in the backend is returned. Recommendation: Set this value to a [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters. |
| `↳ graceful_decommission_timeout` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` Optional. Timeout for graceful YARN decommissioning. [Graceful decommissioning](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/scaling-clusters#graceful_decommissioning) allows the removal of nodes from the Compute Engine node group without interrupting jobs in progress. This timeout specifies how long to wait for jobs in progress to finish before forcefully removing nodes (and potentially interrupting jobs). Default timeout is 0 (for forceful decommission), and the maximum allowed timeout is 1 day. (see JSON representation of [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). Only supported on Dataproc image versions 1.2 and higher. |

### getName

Required. The name of the node group to resize.

Format:
`projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}`

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

### setName

Required. The name of the node group to resize.

Format:
`projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}`

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

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

### getSize

Required. The number of running instances for the node group to maintain.

The group adds or removes instances to maintain the number of instances
specified by this parameter.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setSize

Required. The number of running instances for the node group to maintain.

The group adds or removes instances to maintain the number of instances
specified by this parameter.

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

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

### getRequestId

Optional. A unique ID used to identify the request. If the server receives
two
[ResizeNodeGroupRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.ResizeNodeGroupRequests)
with the same ID, the second request is ignored and the
first google.longrunning.Operation created
and stored in the backend is returned.

Recommendation: Set this value to a
[UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
The ID must contain only letters (a-z, A-Z), numbers (0-9),
underscores (_), and hyphens (-). The maximum length is 40 characters.

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

### setRequestId

Optional. A unique ID used to identify the request. If the server receives
two
[ResizeNodeGroupRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.ResizeNodeGroupRequests)
with the same ID, the second request is ignored and the
first google.longrunning.Operation created
and stored in the backend is returned.

Recommendation: Set this value to a
[UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
The ID must contain only letters (a-z, A-Z), numbers (0-9),
underscores (_), and hyphens (-). The maximum length is 40 characters.

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

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

### getGracefulDecommissionTimeout

Optional. Timeout for graceful YARN decommissioning. [Graceful
decommissioning](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/scaling-clusters#graceful_decommissioning)
allows the removal of nodes from the Compute Engine node group
without interrupting jobs in progress. This timeout specifies how long to
wait for jobs in progress to finish before forcefully removing nodes (and
potentially interrupting jobs). Default timeout is 0 (for forceful
decommission), and the maximum allowed timeout is 1 day. (see JSON
representation of
[Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).

Only supported on Dataproc image versions 1.2 and higher.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration|null` |   |

### hasGracefulDecommissionTimeout

### clearGracefulDecommissionTimeout

### setGracefulDecommissionTimeout

Optional. Timeout for graceful YARN decommissioning. [Graceful
decommissioning](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/scaling-clusters#graceful_decommissioning)
allows the removal of nodes from the Compute Engine node group
without interrupting jobs in progress. This timeout specifies how long to
wait for jobs in progress to finish before forcefully removing nodes (and
potentially interrupting jobs). Default timeout is 0 (for forceful
decommission), and the maximum allowed timeout is 1 day. (see JSON
representation of
[Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).

Only supported on Dataproc image versions 1.2 and higher.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` |

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. The name of the node group to resize. Format: `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}` |
| `size` | `int` Required. The number of running instances for the node group to maintain. The group adds or removes instances to maintain the number of instances specified by this parameter. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dataproc/latest/V1.ResizeNodeGroupRequest` |   |