4.3.0 (latest) 4.2.0 4.1.3 4.0.0 3.14.0 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 GceClusterConfig.

Common config settings for resources of Compute Engine cluster
instances, applicable to all instances in the cluster.

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

## Namespace

Google \\ Cloud \\ Dataproc \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ zone_uri` | `string` Optional. The Compute Engine zone where the Dataproc cluster will be located. If omitted, the service will pick a zone in the cluster's Compute Engine region. On a get request, zone will always be present. A full URL, partial URI, or short name are valid. Examples: \* \* `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]` \* \* `projects/[project_id]/zones/[zone]` \* \* `[zone]` |
| `↳ multi_zone_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-dataproc/latest/V1.MultiZoneConfig` Optional. Controls how instances within this Cluster are allowed to exist in multiple Zones within the Region. Only one of `zone_uri` or `multi_zone_config` must be set. |
| `↳ network_uri` | `string` Optional. The Compute Engine network to be used for machine communications. Cannot be specified with subnetwork_uri. If neither `network_uri` nor `subnetwork_uri` is specified, the "default" network of the project is used, if it exists. Cannot be a "Custom Subnet Network" (see [Using Subnetworks](https://cloud.google.com/compute/docs/subnetworks) for more information). A full URL, partial URI, or short name are valid. Examples: \* \* `https://www.googleapis.com/compute/v1/projects/[project_id]/global/networks/default` \* \* `projects/[project_id]/global/networks/default` \* \* `default` |
| `↳ subnetwork_uri` | `string` Optional. The Compute Engine subnetwork to be used for machine communications. Cannot be specified with network_uri. A full URL, partial URI, or short name are valid. Examples: \* \* `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/[region]/subnetworks/sub0` \* \* `projects/[project_id]/regions/[region]/subnetworks/sub0` \* \* `sub0` |
| `↳ internal_ip_only` | `bool` Optional. This setting applies to subnetwork-enabled networks. It is set to `true` by default in clusters created with image versions 2.2.x. When set to `true`: \* \* All cluster VMs have internal IP addresses. \* \* [Google Private Access](https://cloud.google.com/vpc/docs/private-google-access) must be enabled to access Dataproc and other Google Cloud APIs. \* \* Off-cluster dependencies must be configured to be accessible without external IP addresses. When set to `false`: \* \* Cluster VMs are not restricted to internal IP addresses. \* \* Ephemeral external IP addresses are assigned to each cluster VM. |
| `↳ private_ipv6_google_access` | `int` Optional. The type of IPv6 access for a cluster. |
| `↳ service_account` | `string` Optional. The [Dataproc service account](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/service-accounts#service_accounts_in_dataproc) (also see [VM Data Plane identity](https://cloud.google.com/dataproc/docs/concepts/iam/dataproc-principals#vm_service_account_data_plane_identity)) used by Dataproc cluster VM instances to access Google Cloud Platform services. If not specified, the [Compute Engine default service account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) is used. |
| `↳ service_account_scopes` | `string[]` Optional. The URIs of service account scopes to be included in Compute Engine instances. The following base set of scopes is always included: \* \* <https://www.googleapis.com/auth/cloud.useraccounts.readonly> \* \* <https://www.googleapis.com/auth/devstorage.read_write> \* \* <https://www.googleapis.com/auth/logging.write> If no scopes are specified, the following defaults are also provided: \* \* <https://www.googleapis.com/auth/bigquery> \* \* <https://www.googleapis.com/auth/bigtable.admin.table> \* \* <https://www.googleapis.com/auth/bigtable.data> \* \* <https://www.googleapis.com/auth/devstorage.full_control> |
| `↳ tags` | `string[]` The Compute Engine network tags to add to all instances (see [Tagging instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)). |
| `↳ metadata` | `array|Google\Protobuf\Internal\MapField` Optional. The Compute Engine metadata entries to add to all instances (see [Project and instance metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)). |
| `↳ reservation_affinity` | `https://docs.cloud.google.com/php/docs/reference/cloud-dataproc/latest/V1.ReservationAffinity` Optional. Reservation Affinity for consuming Zonal reservation. |
| `↳ node_group_affinity` | `https://docs.cloud.google.com/php/docs/reference/cloud-dataproc/latest/V1.NodeGroupAffinity` Optional. Node Group Affinity for sole-tenant clusters. |
| `↳ shielded_instance_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-dataproc/latest/V1.ShieldedInstanceConfig` Optional. Shielded Instance Config for clusters using [Compute Engine Shielded VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm). |
| `↳ confidential_instance_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-dataproc/latest/V1.ConfidentialInstanceConfig` Optional. Confidential Instance Config for clusters using [Confidential VMs](https://cloud.google.com/confidential-computing/confidential-vm/docs). |
| `↳ resource_manager_tags` | `array|Google\Protobuf\Internal\MapField` Optional. [Resource manager tags](https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing) to add to all instances (see [Use secure tags](https://cloud.google.com/dataproc/docs/guides/use-secure-tags)). |

### getZoneUri

Optional. The Compute Engine zone where the Dataproc cluster will be
located. If omitted, the service will pick a zone in the cluster's Compute
Engine region. On a get request, zone will always be present.

A full URL, partial URI, or short name are valid. Examples:

- `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]`
- `projects/[project_id]/zones/[zone]`
- `[zone]`

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

### setZoneUri

Optional. The Compute Engine zone where the Dataproc cluster will be
located. If omitted, the service will pick a zone in the cluster's Compute
Engine region. On a get request, zone will always be present.

A full URL, partial URI, or short name are valid. Examples:

- `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]`
- `projects/[project_id]/zones/[zone]`
- `[zone]`

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

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

### getMultiZoneConfig

Optional. Controls how instances within this Cluster are allowed to exist
in multiple Zones within the Region. Only one of `zone_uri` or
`multi_zone_config` must be set.

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

### hasMultiZoneConfig

### clearMultiZoneConfig

### setMultiZoneConfig

Optional. Controls how instances within this Cluster are allowed to exist
in multiple Zones within the Region. Only one of `zone_uri` or
`multi_zone_config` must be set.

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

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

### getNetworkUri

Optional. The Compute Engine network to be used for machine
communications. Cannot be specified with subnetwork_uri. If neither
`network_uri` nor `subnetwork_uri` is specified, the "default" network of
the project is used, if it exists. Cannot be a "Custom Subnet Network" (see
[Using Subnetworks](https://cloud.google.com/compute/docs/subnetworks) for
more information).

A full URL, partial URI, or short name are valid. Examples:

- `https://www.googleapis.com/compute/v1/projects/[project_id]/global/networks/default`
- `projects/[project_id]/global/networks/default`
- `default`

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

### setNetworkUri

Optional. The Compute Engine network to be used for machine
communications. Cannot be specified with subnetwork_uri. If neither
`network_uri` nor `subnetwork_uri` is specified, the "default" network of
the project is used, if it exists. Cannot be a "Custom Subnet Network" (see
[Using Subnetworks](https://cloud.google.com/compute/docs/subnetworks) for
more information).

A full URL, partial URI, or short name are valid. Examples:

- `https://www.googleapis.com/compute/v1/projects/[project_id]/global/networks/default`
- `projects/[project_id]/global/networks/default`
- `default`

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

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

### getSubnetworkUri

Optional. The Compute Engine subnetwork to be used for machine
communications. Cannot be specified with network_uri.

A full URL, partial URI, or short name are valid. Examples:

- `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/[region]/subnetworks/sub0`
- `projects/[project_id]/regions/[region]/subnetworks/sub0`
- `sub0`

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

### setSubnetworkUri

Optional. The Compute Engine subnetwork to be used for machine
communications. Cannot be specified with network_uri.

A full URL, partial URI, or short name are valid. Examples:

- `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/[region]/subnetworks/sub0`
- `projects/[project_id]/regions/[region]/subnetworks/sub0`
- `sub0`

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

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

### getInternalIpOnly

Optional. This setting applies to subnetwork-enabled networks. It is set to
`true` by default in clusters created with image versions 2.2.x.

When set to `true`:

- All cluster VMs have internal IP addresses.
- [Google Private Access](https://cloud.google.com/vpc/docs/private-google-access) must be enabled to access Dataproc and other Google Cloud APIs.
- Off-cluster dependencies must be configured to be accessible without external IP addresses. When set to `false`:
- Cluster VMs are not restricted to internal IP addresses.
- Ephemeral external IP addresses are assigned to each cluster VM.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### hasInternalIpOnly

### clearInternalIpOnly

### setInternalIpOnly

Optional. This setting applies to subnetwork-enabled networks. It is set to
`true` by default in clusters created with image versions 2.2.x.

When set to `true`:

- All cluster VMs have internal IP addresses.
- [Google Private Access](https://cloud.google.com/vpc/docs/private-google-access) must be enabled to access Dataproc and other Google Cloud APIs.
- Off-cluster dependencies must be configured to be accessible without external IP addresses. When set to `false`:
- Cluster VMs are not restricted to internal IP addresses.
- Ephemeral external IP addresses are assigned to each cluster VM.

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

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

### getPrivateIpv6GoogleAccess

Optional. The type of IPv6 access for a cluster.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [PrivateIpv6GoogleAccess](https://docs.cloud.google.com/php/docs/reference/cloud-dataproc/latest/V1.GceClusterConfig.PrivateIpv6GoogleAccess). |

### setPrivateIpv6GoogleAccess

Optional. The type of IPv6 access for a cluster.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [PrivateIpv6GoogleAccess](https://docs.cloud.google.com/php/docs/reference/cloud-dataproc/latest/V1.GceClusterConfig.PrivateIpv6GoogleAccess). |

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

### getServiceAccount

Optional. The [Dataproc service
account](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/service-accounts#service_accounts_in_dataproc)
(also see [VM Data Plane
identity](https://cloud.google.com/dataproc/docs/concepts/iam/dataproc-principals#vm_service_account_data_plane_identity))
used by Dataproc cluster VM instances to access Google Cloud Platform
services.

If not specified, the
[Compute Engine default service
account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
is used.

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

### setServiceAccount

Optional. The [Dataproc service
account](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/service-accounts#service_accounts_in_dataproc)
(also see [VM Data Plane
identity](https://cloud.google.com/dataproc/docs/concepts/iam/dataproc-principals#vm_service_account_data_plane_identity))
used by Dataproc cluster VM instances to access Google Cloud Platform
services.

If not specified, the
[Compute Engine default service
account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
is used.

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

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

### getServiceAccountScopes

Optional. The URIs of service account scopes to be included in
Compute Engine instances. The following base set of scopes is always
included:

- <https://www.googleapis.com/auth/cloud.useraccounts.readonly>
- <https://www.googleapis.com/auth/devstorage.read_write>
- <https://www.googleapis.com/auth/logging.write> If no scopes are specified, the following defaults are also provided:
- <https://www.googleapis.com/auth/bigquery>
- <https://www.googleapis.com/auth/bigtable.admin.table>
- <https://www.googleapis.com/auth/bigtable.data>
- <https://www.googleapis.com/auth/devstorage.full_control>

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\RepeatedField<string>` |   |

### setServiceAccountScopes

Optional. The URIs of service account scopes to be included in
Compute Engine instances. The following base set of scopes is always
included:

- <https://www.googleapis.com/auth/cloud.useraccounts.readonly>
- <https://www.googleapis.com/auth/devstorage.read_write>
- <https://www.googleapis.com/auth/logging.write> If no scopes are specified, the following defaults are also provided:
- <https://www.googleapis.com/auth/bigquery>
- <https://www.googleapis.com/auth/bigtable.admin.table>
- <https://www.googleapis.com/auth/bigtable.data>
- <https://www.googleapis.com/auth/devstorage.full_control>

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

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

### getTags

The Compute Engine network tags to add to all instances (see [Tagging
instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\RepeatedField<string>` |   |

### setTags

The Compute Engine network tags to add to all instances (see [Tagging
instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).

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

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

### getMetadata

Optional. The Compute Engine metadata entries to add to all instances (see
[Project and instance
metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Internal\MapField` |   |

### setMetadata

Optional. The Compute Engine metadata entries to add to all instances (see
[Project and instance
metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|Google\Protobuf\Internal\MapField` |

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

### getReservationAffinity

Optional. Reservation Affinity for consuming Zonal reservation.

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

### hasReservationAffinity

### clearReservationAffinity

### setReservationAffinity

Optional. Reservation Affinity for consuming Zonal reservation.

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

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

### getNodeGroupAffinity

Optional. Node Group Affinity for sole-tenant clusters.

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

### hasNodeGroupAffinity

### clearNodeGroupAffinity

### setNodeGroupAffinity

Optional. Node Group Affinity for sole-tenant clusters.

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

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

### getShieldedInstanceConfig

Optional. Shielded Instance Config for clusters using [Compute Engine
Shielded
VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).

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

### hasShieldedInstanceConfig

### clearShieldedInstanceConfig

### setShieldedInstanceConfig

Optional. Shielded Instance Config for clusters using [Compute Engine
Shielded
VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).

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

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

### getConfidentialInstanceConfig

Optional. Confidential Instance Config for clusters using [Confidential
VMs](https://cloud.google.com/confidential-computing/confidential-vm/docs).

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

### hasConfidentialInstanceConfig

### clearConfidentialInstanceConfig

### setConfidentialInstanceConfig

Optional. Confidential Instance Config for clusters using [Confidential
VMs](https://cloud.google.com/confidential-computing/confidential-vm/docs).

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

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

### getResourceManagerTags

Optional. [Resource manager tags](https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing)
to add to all instances (see [Use secure tags](https://cloud.google.com/dataproc/docs/guides/use-secure-tags)).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Internal\MapField` |   |

### setResourceManagerTags

Optional. [Resource manager tags](https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing)
to add to all instances (see [Use secure tags](https://cloud.google.com/dataproc/docs/guides/use-secure-tags)).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|Google\Protobuf\Internal\MapField` |

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