# Cloud Dataproc V1beta2 API - Class Google::Cloud::Dataproc::V1beta2::ClusterController::Client (v0.6.3)

Reference documentation and code samples for the Cloud Dataproc V1beta2 API class Google::Cloud::Dataproc::V1beta2::ClusterController::Client.

Client for the ClusterController service.


<br />

The ClusterControllerService provides methods to manage clusters
of Compute Engine instances.

## Inherits

- Object

## Includes

- [Google::Cloud::Dataproc::V1beta2::ClusterController::Paths](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-ClusterController-Paths)

## Methods

### .configure

    def self.configure() { |config| ... } -> Client::Configuration

Configure the ClusterController Client class.


<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-ClusterController-Client-Configuration "Google::Cloud::Dataproc::V1beta2::ClusterController::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-ClusterController-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-ClusterController-Client-Configuration))
**Example**

```ruby
# Modify the configuration for all ClusterController clients
::Google::Cloud::Dataproc::V1beta2::ClusterController::Client.configure do |config|
  config.timeout = 10.0
end
```

### #configure

    def configure() { |config| ... } -> Client::Configuration

Configure the ClusterController Client instance.


The configuration is set to the derived mode, meaning that values can be changed,
but structural changes (adding new fields, etc.) are not allowed. Structural changes
should be made on [Client.configure](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-ClusterController-Client#Google__Cloud__Dataproc__V1beta2__ClusterController__Client_configure_class_ "Google::Cloud::Dataproc::V1beta2::ClusterController::Client.configure (method)").

<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-ClusterController-Client-Configuration "Google::Cloud::Dataproc::V1beta2::ClusterController::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-ClusterController-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-ClusterController-Client-Configuration))

### #create_cluster

    def create_cluster(request, options = nil) -> ::Gapic::Operation
    def create_cluster(project_id: nil, region: nil, cluster: nil, request_id: nil) -> ::Gapic::Operation

Creates a cluster in a project. The returned
[Operation.metadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Longrunning-Operation#Google__Longrunning__Operation_metadata_instance_ "Google::Longrunning::Operation#metadata (method)") will be
ClusterOperationMetadata.
**Overloads**

    def create_cluster(request, options = nil) -> ::Gapic::Operation

Pass arguments to `create_cluster` via a request object, either of type [Google::Cloud::Dataproc::V1beta2::CreateClusterRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-CreateClusterRequest "Google::Cloud::Dataproc::V1beta2::CreateClusterRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dataproc::V1beta2::CreateClusterRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-CreateClusterRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def create_cluster(project_id: nil, region: nil, cluster: nil, request_id: nil) -> ::Gapic::Operation

Pass arguments to `create_cluster` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **project_id** (::String) --- Required. The ID of the Google Cloud Platform project that the cluster belongs to.
- **region** (::String) --- Required. The Dataproc region in which to handle the request.
- **cluster** ([::Google::Cloud::Dataproc::V1beta2::Cluster](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-Cluster), ::Hash) --- Required. The cluster to create.
- **request_id** (::String) --- Optional. A unique id used to identify the request. If the server receives two [CreateClusterRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-CreateClusterRequest "Google::Cloud::Dataproc::V1beta2::CreateClusterRequest (class)") requests with the same id, then the second request will be ignored and the first [google.longrunning.Operation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Longrunning-Operation "Google::Longrunning::Operation (class)") created and stored in the backend is returned.


  It is recommended to always 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.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::Operation)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.

### #delete_cluster

    def delete_cluster(request, options = nil) -> ::Gapic::Operation
    def delete_cluster(project_id: nil, region: nil, cluster_name: nil, cluster_uuid: nil, request_id: nil) -> ::Gapic::Operation

Deletes a cluster in a project. The returned
[Operation.metadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Longrunning-Operation#Google__Longrunning__Operation_metadata_instance_ "Google::Longrunning::Operation#metadata (method)") will be
ClusterOperationMetadata.
**Overloads**

    def delete_cluster(request, options = nil) -> ::Gapic::Operation

Pass arguments to `delete_cluster` via a request object, either of type [DeleteClusterRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-DeleteClusterRequest "Google::Cloud::Dataproc::V1beta2::DeleteClusterRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dataproc::V1beta2::DeleteClusterRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-DeleteClusterRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def delete_cluster(project_id: nil, region: nil, cluster_name: nil, cluster_uuid: nil, request_id: nil) -> ::Gapic::Operation

Pass arguments to `delete_cluster` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **project_id** (::String) --- Required. The ID of the Google Cloud Platform project that the cluster belongs to.
- **region** (::String) --- Required. The Dataproc region in which to handle the request.
- **cluster_name** (::String) --- Required. The cluster name.
- **cluster_uuid** (::String) --- Optional. Specifying the `cluster_uuid` means the RPC should fail (with error NOT_FOUND) if cluster with specified UUID does not exist.
- **request_id** (::String) --- Optional. A unique id used to identify the request. If the server receives two [DeleteClusterRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-DeleteClusterRequest "Google::Cloud::Dataproc::V1beta2::DeleteClusterRequest (class)") requests with the same id, then the second request will be ignored and the first [google.longrunning.Operation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Longrunning-Operation "Google::Longrunning::Operation (class)") created and stored in the backend is returned.


  It is recommended to always 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.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::Operation)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.

### #diagnose_cluster

    def diagnose_cluster(request, options = nil) -> ::Gapic::Operation
    def diagnose_cluster(project_id: nil, region: nil, cluster_name: nil) -> ::Gapic::Operation

Gets cluster diagnostic information. The returned
[Operation.metadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Longrunning-Operation#Google__Longrunning__Operation_metadata_instance_ "Google::Longrunning::Operation#metadata (method)") will be
ClusterOperationMetadata.
After the operation completes,
[Operation.response](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Longrunning-Operation#Google__Longrunning__Operation_response_instance_ "Google::Longrunning::Operation#response (method)")
contains
[Empty](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Protobuf-Empty "Google::Protobuf::Empty (class)").
**Overloads**

    def diagnose_cluster(request, options = nil) -> ::Gapic::Operation

Pass arguments to `diagnose_cluster` via a request object, either of type [DiagnoseClusterRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-DiagnoseClusterRequest "Google::Cloud::Dataproc::V1beta2::DiagnoseClusterRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dataproc::V1beta2::DiagnoseClusterRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-DiagnoseClusterRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def diagnose_cluster(project_id: nil, region: nil, cluster_name: nil) -> ::Gapic::Operation

Pass arguments to `diagnose_cluster` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **project_id** (::String) --- Required. The ID of the Google Cloud Platform project that the cluster belongs to.
- **region** (::String) --- Required. The Dataproc region in which to handle the request.
- **cluster_name** (::String) --- Required. The cluster name.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::Operation)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.

### #get_cluster

    def get_cluster(request, options = nil) -> ::Google::Cloud::Dataproc::V1beta2::Cluster
    def get_cluster(project_id: nil, region: nil, cluster_name: nil) -> ::Google::Cloud::Dataproc::V1beta2::Cluster

Gets the resource representation for a cluster in a project.
**Overloads**

    def get_cluster(request, options = nil) -> ::Google::Cloud::Dataproc::V1beta2::Cluster

Pass arguments to `get_cluster` via a request object, either of type [GetClusterRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-GetClusterRequest "Google::Cloud::Dataproc::V1beta2::GetClusterRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dataproc::V1beta2::GetClusterRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-GetClusterRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def get_cluster(project_id: nil, region: nil, cluster_name: nil) -> ::Google::Cloud::Dataproc::V1beta2::Cluster

Pass arguments to `get_cluster` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **project_id** (::String) --- Required. The ID of the Google Cloud Platform project that the cluster belongs to.
- **region** (::String) --- Required. The Dataproc region in which to handle the request.
- **cluster_name** (::String) --- Required. The cluster name.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::Dataproc::V1beta2::Cluster](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-Cluster))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::Dataproc::V1beta2::Cluster](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-Cluster))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.

### #initialize

    def initialize() { |config| ... } -> Client

Create a new ClusterController client object.
**Yields**

- (config) --- Configure the ClusterController client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-ClusterController-Client-Configuration))
**Returns**

- ([Client](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-ClusterController-Client)) --- a new instance of Client
**Example**

```ruby
# Create a client using the default configuration
client = ::Google::Cloud::Dataproc::V1beta2::ClusterController::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::Dataproc::V1beta2::ClusterController::Client.new do |config|
  config.timeout = 10.0
end
```

### #list_clusters

    def list_clusters(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataproc::V1beta2::Cluster>
    def list_clusters(project_id: nil, region: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataproc::V1beta2::Cluster>

Lists all regions/{region}/clusters in a project alphabetically.
**Overloads**

    def list_clusters(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataproc::V1beta2::Cluster>

Pass arguments to `list_clusters` via a request object, either of type [ListClustersRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-ListClustersRequest "Google::Cloud::Dataproc::V1beta2::ListClustersRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dataproc::V1beta2::ListClustersRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-ListClustersRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def list_clusters(project_id: nil, region: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataproc::V1beta2::Cluster>

Pass arguments to `list_clusters` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **project_id** (::String) --- Required. The ID of the Google Cloud Platform project that the cluster belongs to.
- **region** (::String) --- Required. The Dataproc region in which to handle the request.
- **filter** (::String) --- Optional. A filter constraining the clusters to list. Filters are case-sensitive and have the following syntax:


  field = value \[AND \[field = value\]\] ...

  where **field** is one of `status.state`, `clusterName`, or `labels.[KEY]`,
  and `[KEY]` is a label key. **value** can be `*` to match all values.
  `status.state` can be one of the following: `ACTIVE`, `INACTIVE`,
  `CREATING`, `RUNNING`, `ERROR`, `DELETING`, or `UPDATING`. `ACTIVE`
  contains the `CREATING`, `UPDATING`, and `RUNNING` states. `INACTIVE`
  contains the `DELETING` and `ERROR` states.
  `clusterName` is the name of the cluster provided at creation time.
  Only the logical `AND` operator is supported; space-separated items are
  treated as having an implicit `AND` operator.

  Example filter:

  status.state = ACTIVE AND clusterName = mycluster
  AND labels.env = staging AND labels.starred = \*
- **page_size** (::Integer) --- Optional. The standard List page size.
- **page_token** (::String) --- Optional. The standard List page token.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::PagedEnumerable\<[::Google::Cloud::Dataproc::V1beta2::Cluster](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-Cluster)\>)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::PagedEnumerable\<[::Google::Cloud::Dataproc::V1beta2::Cluster](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-Cluster)\>)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.

### #operations_client

    def operations_client() -> ::Google::Cloud::Dataproc::V1beta2::ClusterController::Operations

Get the associated client for long-running operations.
**Returns**

- ([::Google::Cloud::Dataproc::V1beta2::ClusterController::Operations](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-ClusterController-Operations))

### #update_cluster

    def update_cluster(request, options = nil) -> ::Gapic::Operation
    def update_cluster(project_id: nil, region: nil, cluster_name: nil, cluster: nil, graceful_decommission_timeout: nil, update_mask: nil, request_id: nil) -> ::Gapic::Operation

Updates a cluster in a project. The returned
[Operation.metadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Longrunning-Operation#Google__Longrunning__Operation_metadata_instance_ "Google::Longrunning::Operation#metadata (method)") will be
ClusterOperationMetadata.
**Overloads**

    def update_cluster(request, options = nil) -> ::Gapic::Operation

Pass arguments to `update_cluster` via a request object, either of type [UpdateClusterRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-UpdateClusterRequest "Google::Cloud::Dataproc::V1beta2::UpdateClusterRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dataproc::V1beta2::UpdateClusterRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-UpdateClusterRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def update_cluster(project_id: nil, region: nil, cluster_name: nil, cluster: nil, graceful_decommission_timeout: nil, update_mask: nil, request_id: nil) -> ::Gapic::Operation

Pass arguments to `update_cluster` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **project_id** (::String) --- Required. The ID of the Google Cloud Platform project the cluster belongs to.
- **region** (::String) --- Required. The Dataproc region in which to handle the request.
- **cluster_name** (::String) --- Required. The cluster name.
- **cluster** ([::Google::Cloud::Dataproc::V1beta2::Cluster](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-Cluster), ::Hash) --- Required. The changes to the cluster.
- **graceful_decommission_timeout** ([::Google::Protobuf::Duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Protobuf-Duration), ::Hash) --- Optional. Timeout for graceful YARN decomissioning. Graceful decommissioning allows removing nodes from the cluster without interrupting jobs in progress. 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.
- **update_mask** ([::Google::Protobuf::FieldMask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Protobuf-FieldMask), ::Hash) ---

  Required. Specifies the path, relative to `Cluster`, of
  the field to update. For example, to change the number of workers
  in a cluster to 5, the `update_mask` parameter would be
  specified as `config.worker_config.num_instances`,
  and the `PATCH` request body would specify the new value, as follows:

      {
        "config":{
          "workerConfig":{
            "numInstances":"5"
          }
        }
      }

  Similarly, to change the number of preemptible workers in a cluster to 5,
  the `update_mask` parameter would be
  `config.secondary_worker_config.num_instances`, and the `PATCH` request
  body would be set as follows:

      {
        "config":{
          "secondaryWorkerConfig":{
            "numInstances":"5"
          }
        }
      }

  **Note:** currently only the following fields can be updated:

  |---|---|
  | **Mask** | **Purpose** |
  | labels | Updates labels |
  | config.worker_config.num_instances | Resize primary worker group |
  | config.secondary_worker_config.num_instances | Resize secondary worker group |
  | config.lifecycle_config.auto_delete_ttl | Reset MAX TTL duration |
  | config.lifecycle_config.auto_delete_time | Update MAX TTL deletion timestamp |
  | config.lifecycle_config.idle_delete_ttl | Update Idle TTL duration |
  | config.autoscaling_config.policy_uri | Use, stop using, or change autoscaling policies |

- **request_id** (::String) --- Optional. A unique id used to identify the request. If the server receives two [UpdateClusterRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-UpdateClusterRequest "Google::Cloud::Dataproc::V1beta2::UpdateClusterRequest (class)") requests with the same id, then the second request will be ignored and the first [google.longrunning.Operation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Longrunning-Operation "Google::Longrunning::Operation (class)") created and stored in the backend is returned.


  It is recommended to always 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.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::Operation)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.