# Google Cloud Dataproc V1 Client - Class ManagedCluster (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 ManagedCluster.

Cluster that is managed by the workflow.

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

## Namespace

Google \\ Cloud \\ Dataproc \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ cluster_name` | `string` Required. The cluster name prefix. A unique cluster name will be formed by appending a random suffix. The name must contain only lower-case letters (a-z), numbers (0-9), and hyphens (-). Must begin with a letter. Cannot begin or end with hyphen. Must consist of between 2 and 35 characters. |
| `↳ config` | `https://docs.cloud.google.com/php/docs/reference/cloud-dataproc/latest/V1.ClusterConfig` Required. The cluster configuration. |
| `↳ labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Optional. The labels to associate with this cluster. Label keys must be between 1 and 63 characters long, and must conform to the following PCRE regular expression: \[\\p{Ll}\\p{Lo}\]\[\\p{Ll}\\p{Lo}\\p{N}*-\]{0,62} Label values must be between 1 and 63 characters long, and must conform to the following PCRE regular expression: \[\\p{Ll}\\p{Lo}\\p{N}*-\]{0,63} No more than 32 labels can be associated with a given cluster. |

### getClusterName

Required. The cluster name prefix. A unique cluster name will be formed by
appending a random suffix.

The name must contain only lower-case letters (a-z), numbers (0-9),
and hyphens (-). Must begin with a letter. Cannot begin or end with
hyphen. Must consist of between 2 and 35 characters.

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

### setClusterName

Required. The cluster name prefix. A unique cluster name will be formed by
appending a random suffix.

The name must contain only lower-case letters (a-z), numbers (0-9),
and hyphens (-). Must begin with a letter. Cannot begin or end with
hyphen. Must consist of between 2 and 35 characters.

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

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

### getConfig

Required. The cluster configuration.

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

### hasConfig

### clearConfig

### setConfig

Required. The cluster configuration.

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

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

### getLabels

Optional. The labels to associate with this cluster.

Label keys must be between 1 and 63 characters long, and must conform to
the following PCRE regular expression:
\[\\p{Ll}\\p{Lo}\]\[\\p{Ll}\\p{Lo}\\p{N}*-\]{0,62}
Label values must be between 1 and 63 characters long, and must conform to
the following PCRE regular expression: \[\\p{Ll}\\p{Lo}\\p{N}*-\]{0,63}
No more than 32 labels can be associated with a given cluster.

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

### setLabels

Optional. The labels to associate with this cluster.

Label keys must be between 1 and 63 characters long, and must conform to
the following PCRE regular expression:
\[\\p{Ll}\\p{Lo}\]\[\\p{Ll}\\p{Lo}\\p{N}*-\]{0,62}
Label values must be between 1 and 63 characters long, and must conform to
the following PCRE regular expression: \[\\p{Ll}\\p{Lo}\\p{N}*-\]{0,63}
No more than 32 labels can be associated with a given cluster.

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

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