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

Specifies the type and number of accelerator cards attached to the instances
of an instance. See [GPUs on Compute
Engine](https://cloud.google.com/compute/docs/gpus/).

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

## Namespace

Google \\ Cloud \\ Dataproc \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ accelerator_type_uri` | `string` Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See [Compute Engine AcceleratorTypes](https://cloud.google.com/compute/docs/reference/v1/acceleratorTypes). Examples: \* `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-k80` \* `projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-k80` \* `nvidia-tesla-k80` **Auto Zone Exception** : If you are using the Dataproc [Auto Zone Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the accelerator type resource, for example, `nvidia-tesla-k80`. |
| `↳ accelerator_count` | `int` The number of the accelerator cards of this type exposed to this instance. |

### getAcceleratorTypeUri

Full URL, partial URI, or short name of the accelerator type resource to
expose to this instance. See
[Compute Engine
AcceleratorTypes](https://cloud.google.com/compute/docs/reference/v1/acceleratorTypes).

Examples:

- `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-k80`
- `projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-k80`
- `nvidia-tesla-k80` **Auto Zone Exception** : If you are using the Dataproc [Auto Zone
  Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the accelerator type resource, for example, `nvidia-tesla-k80`.

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

### setAcceleratorTypeUri

Full URL, partial URI, or short name of the accelerator type resource to
expose to this instance. See
[Compute Engine
AcceleratorTypes](https://cloud.google.com/compute/docs/reference/v1/acceleratorTypes).

Examples:

- `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-k80`
- `projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-k80`
- `nvidia-tesla-k80` **Auto Zone Exception** : If you are using the Dataproc [Auto Zone
  Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the accelerator type resource, for example, `nvidia-tesla-k80`.

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

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

### getAcceleratorCount

The number of the accelerator cards of this type exposed to this instance.

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

### setAcceleratorCount

The number of the accelerator cards of this type exposed to this instance.

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

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