Class: Google::Apis::BatchV1::Volume
- Inherits:
-
Object
- Object
- Google::Apis::BatchV1::Volume
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/batch_v1/classes.rb,
lib/google/apis/batch_v1/representations.rb,
lib/google/apis/batch_v1/representations.rb
Overview
Volume describes a volume and parameters for it to be mounted to a VM.
Instance Attribute Summary collapse
-
#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].
-
#gcs ⇒ Google::Apis::BatchV1::Gcs
Represents a Google Cloud Storage volume.
-
#mount_options ⇒ Array<String>
Mount options vary based on the type of storage volume: * For a Cloud Storage bucket, all the mount options provided by the
gcsfuse
tool are supported. -
#mount_path ⇒ String
The mount path for the volume, e.g.
-
#nfs ⇒ Google::Apis::BatchV1::Nfs
Represents an NFS volume.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Volume
constructor
A new instance of Volume.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Volume
Returns a new instance of Volume.
2649 2650 2651 |
# File 'lib/google/apis/batch_v1/classes.rb', line 2649 def initialize(**args) update!(**args) end |
Instance Attribute Details
#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.
Corresponds to the JSON property deviceName
2619 2620 2621 |
# File 'lib/google/apis/batch_v1/classes.rb', line 2619 def device_name @device_name end |
#gcs ⇒ Google::Apis::BatchV1::Gcs
Represents a Google Cloud Storage volume.
Corresponds to the JSON property gcs
2624 2625 2626 |
# File 'lib/google/apis/batch_v1/classes.rb', line 2624 def gcs @gcs end |
#mount_options ⇒ Array<String>
Mount options vary based on the type of storage volume: * For a Cloud Storage
bucket, all the mount options provided by the gcsfuse
tool are supported. * For an existing
persistent disk, all mount options provided by the mount
command except writing are supported. This
is due to restrictions of multi-writer mode. * For any other disk or a Network File
System (NFS), all the mount options provided by the mount
command are
supported.
Corresponds to the JSON property mountOptions
2637 2638 2639 |
# File 'lib/google/apis/batch_v1/classes.rb', line 2637 def @mount_options end |
#mount_path ⇒ String
The mount path for the volume, e.g. /mnt/disks/share.
Corresponds to the JSON property mountPath
2642 2643 2644 |
# File 'lib/google/apis/batch_v1/classes.rb', line 2642 def mount_path @mount_path end |
#nfs ⇒ Google::Apis::BatchV1::Nfs
Represents an NFS volume.
Corresponds to the JSON property nfs
2647 2648 2649 |
# File 'lib/google/apis/batch_v1/classes.rb', line 2647 def nfs @nfs end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2654 2655 2656 2657 2658 2659 2660 |
# File 'lib/google/apis/batch_v1/classes.rb', line 2654 def update!(**args) @device_name = args[:device_name] if args.key?(:device_name) @gcs = args[:gcs] if args.key?(:gcs) @mount_options = args[:mount_options] if args.key?(:mount_options) @mount_path = args[:mount_path] if args.key?(:mount_path) @nfs = args[:nfs] if args.key?(:nfs) end |