# Google Cloud Run V2 Client - Class EmptyDirVolumeSource (1.12.2)

1.12.2 (latest) 1.12.1 1.11.0 1.10.1 1.9.0 1.8.0 1.7.0 1.6.0 1.5.2 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0 0.9.3 0.8.0 0.7.2 0.6.0 0.5.2 0.4.0 0.3.4 Reference documentation and code samples for the Google Cloud Run V2 Client class EmptyDirVolumeSource.

In memory (tmpfs) ephemeral storage.

It is ephemeral in the sense that when the sandbox is taken down, the data is
destroyed with it (it does not persist across sandbox runs).

Generated from protobuf message `google.cloud.run.v2.EmptyDirVolumeSource`

## Namespace

Google \\ Cloud \\ Run \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ medium` | `int` The medium on which the data is stored. Acceptable values today is only MEMORY or none. When none, the default will currently be backed by memory but could change over time. +optional |
| `↳ size_limit` | `string` Limit on the storage usable by this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers. The default is nil which means that the limit is undefined. More info: <https://cloud.google.com/run/docs/configuring/in-memory-volumes#configure-volume>. Info in Kubernetes: <https://kubernetes.io/docs/concepts/storage/volumes/#emptydir> |

### getMedium

The medium on which the data is stored. Acceptable values today is only
MEMORY or none. When none, the default will currently be backed by memory
but could change over time. +optional

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Medium](https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.EmptyDirVolumeSource.Medium). |

### setMedium

The medium on which the data is stored. Acceptable values today is only
MEMORY or none. When none, the default will currently be backed by memory
but could change over time. +optional

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Medium](https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.EmptyDirVolumeSource.Medium). |

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

### getSizeLimit

Limit on the storage usable by this EmptyDir volume.

The size limit is also applicable for memory medium.
The maximum usage on memory medium EmptyDir would be the minimum value
between the SizeLimit specified here and the sum of memory limits of all
containers. The default is nil which means that the limit is undefined.
More info:
<https://cloud.google.com/run/docs/configuring/in-memory-volumes#configure-volume>.
Info in Kubernetes:
<https://kubernetes.io/docs/concepts/storage/volumes/#emptydir>

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

### setSizeLimit

Limit on the storage usable by this EmptyDir volume.

The size limit is also applicable for memory medium.
The maximum usage on memory medium EmptyDir would be the minimum value
between the SizeLimit specified here and the sum of memory limits of all
containers. The default is nil which means that the limit is undefined.
More info:
<https://cloud.google.com/run/docs/configuring/in-memory-volumes#configure-volume>.
Info in Kubernetes:
<https://kubernetes.io/docs/concepts/storage/volumes/#emptydir>

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

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