Google Cloud Batch V1 Client - Class Volume (0.3.0)

Reference documentation and code samples for the Google Cloud Batch V1 Client class Volume.

Volume describes a volume and parameters for it to be mounted to a VM.

Generated from protobuf message google.cloud.batch.v1.Volume

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ nfs Google\Cloud\Batch\V1\NFS

A Network File System (NFS) volume. For example, a Filestore file share.

↳ gcs Google\Cloud\Batch\V1\GCS

A Google Cloud Storage (GCS) volume.

↳ device_name string

Device name of an attached disk volume, which should align with a device_name specified by job.allocation_policy.instances[0].policy.disks[i].device_name or defined by the given instance template in job.allocation_policy.instances[0].instance_template.

↳ mount_path string

The mount path for the volume, e.g. /mnt/disks/share.

↳ mount_options array

For Google Cloud Storage (GCS), mount options are the options supported by the gcsfuse tool (https://github.com/GoogleCloudPlatform/gcsfuse). For existing persistent disks, mount options provided by the mount command (https://man7.org/linux/man-pages/man8/mount.8.html) except writing are supported. This is due to restrictions of multi-writer mode (https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). For other attached disks and Network File System (NFS), mount options are these supported by the mount command (https://man7.org/linux/man-pages/man8/mount.8.html).

getNfs

A Network File System (NFS) volume. For example, a Filestore file share.

Returns
TypeDescription
Google\Cloud\Batch\V1\NFS|null

hasNfs

setNfs

A Network File System (NFS) volume. For example, a Filestore file share.

Parameter
NameDescription
var Google\Cloud\Batch\V1\NFS
Returns
TypeDescription
$this

getGcs

A Google Cloud Storage (GCS) volume.

Returns
TypeDescription
Google\Cloud\Batch\V1\GCS|null

hasGcs

setGcs

A Google Cloud Storage (GCS) volume.

Parameter
NameDescription
var Google\Cloud\Batch\V1\GCS
Returns
TypeDescription
$this

getDeviceName

Device name of an attached disk volume, which should align with a device_name specified by job.allocation_policy.instances[0].policy.disks[i].device_name or defined by the given instance template in job.allocation_policy.instances[0].instance_template.

Returns
TypeDescription
string

hasDeviceName

setDeviceName

Device name of an attached disk volume, which should align with a device_name specified by job.allocation_policy.instances[0].policy.disks[i].device_name or defined by the given instance template in job.allocation_policy.instances[0].instance_template.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getMountPath

The mount path for the volume, e.g. /mnt/disks/share.

Returns
TypeDescription
string

setMountPath

The mount path for the volume, e.g. /mnt/disks/share.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getMountOptions

For Google Cloud Storage (GCS), mount options are the options supported by the gcsfuse tool (https://github.com/GoogleCloudPlatform/gcsfuse).

For existing persistent disks, mount options provided by the mount command (https://man7.org/linux/man-pages/man8/mount.8.html) except writing are supported. This is due to restrictions of multi-writer mode (https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). For other attached disks and Network File System (NFS), mount options are these supported by the mount command (https://man7.org/linux/man-pages/man8/mount.8.html).

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setMountOptions

For Google Cloud Storage (GCS), mount options are the options supported by the gcsfuse tool (https://github.com/GoogleCloudPlatform/gcsfuse).

For existing persistent disks, mount options provided by the mount command (https://man7.org/linux/man-pages/man8/mount.8.html) except writing are supported. This is due to restrictions of multi-writer mode (https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). For other attached disks and Network File System (NFS), mount options are these supported by the mount command (https://man7.org/linux/man-pages/man8/mount.8.html).

Parameter
NameDescription
var string[]
Returns
TypeDescription
$this

getSource

Returns
TypeDescription
string