# Google Cloud Run V2 Client - Class VolumeMount (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 VolumeMount.

VolumeMount describes a mounting of a Volume within a container.

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

## Namespace

Google \\ Cloud \\ Run \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Required. This must match the Name of a Volume. |
| `↳ mount_path` | `string` Required. Path within the container at which the volume should be mounted. Must not contain ':'. For Cloud SQL volumes, it can be left empty, or must otherwise be `/cloudsql`. All instances defined in the Volume will be available as `/cloudsql/[instance]`. For more information on Cloud SQL volumes, visit <https://cloud.google.com/sql/docs/mysql/connect-run> |
| `↳ sub_path` | `string` Optional. Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). |

### getName

Required. This must match the Name of a Volume.

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

### setName

Required. This must match the Name of a Volume.

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

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

### getMountPath

Required. Path within the container at which the volume should be mounted.

Must not contain ':'. For Cloud SQL volumes, it can be left empty, or must
otherwise be `/cloudsql`. All instances defined in the Volume will be
available as `/cloudsql/[instance]`. For more information on Cloud SQL
volumes, visit <https://cloud.google.com/sql/docs/mysql/connect-run>

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

### setMountPath

Required. Path within the container at which the volume should be mounted.

Must not contain ':'. For Cloud SQL volumes, it can be left empty, or must
otherwise be `/cloudsql`. All instances defined in the Volume will be
available as `/cloudsql/[instance]`. For more information on Cloud SQL
volumes, visit <https://cloud.google.com/sql/docs/mysql/connect-run>

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

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

### getSubPath

Optional. Path within the volume from which the container's volume should
be mounted. Defaults to "" (volume's root).

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

### setSubPath

Optional. Path within the volume from which the container's volume should
be mounted. Defaults to "" (volume's root).

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

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