Batch v1 API - Class Volume (2.10.0)

public sealed class Volume : IMessage<Volume>, IEquatable<Volume>, IDeepCloneable<Volume>, IBufferMessage, IMessage

Reference documentation and code samples for the Batch v1 API class Volume.

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

Inheritance

object > Volume

Namespace

Google.Cloud.Batch.V1

Assembly

Google.Cloud.Batch.V1.dll

Constructors

Volume()

public Volume()

Volume(Volume)

public Volume(Volume other)
Parameter
Name Description
other Volume

Properties

DeviceName

public string DeviceName { get; set; }

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.

Property Value
Type Description
string

Gcs

public GCS Gcs { get; set; }

A Google Cloud Storage (GCS) volume.

Property Value
Type Description
GCS

HasDeviceName

public bool HasDeviceName { get; }

Gets whether the "device_name" field is set

Property Value
Type Description
bool

MountOptions

public RepeatedField<string> MountOptions { get; }

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).

Property Value
Type Description
RepeatedField string

MountPath

public string MountPath { get; set; }

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

Property Value
Type Description
string

Nfs

public NFS Nfs { get; set; }

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

Property Value
Type Description
NFS

SourceCase

public Volume.SourceOneofCase SourceCase { get; }
Property Value
Type Description
Volume SourceOneofCase

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年11月05日 UTC.