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>
For Google Cloud Storage (GCS), mount options are the options supported by the gcsfuse tool (https://github.com/GoogleCloudPlatform/gcsfuse).
-
#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.
2071 2072 2073 |
# File 'lib/google/apis/batch_v1/classes.rb', line 2071 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
2042 2043 2044 |
# File 'lib/google/apis/batch_v1/classes.rb', line 2042 def device_name @device_name end |
#gcs ⇒ Google::Apis::BatchV1::Gcs
Represents a Google Cloud Storage volume.
Corresponds to the JSON property gcs
2047 2048 2049 |
# File 'lib/google/apis/batch_v1/classes.rb', line 2047 def gcs @gcs end |
#mount_options ⇒ Array<String>
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).
Corresponds to the JSON property mountOptions
2059 2060 2061 |
# File 'lib/google/apis/batch_v1/classes.rb', line 2059 def @mount_options end |
#mount_path ⇒ String
The mount path for the volume, e.g. /mnt/disks/share.
Corresponds to the JSON property mountPath
2064 2065 2066 |
# File 'lib/google/apis/batch_v1/classes.rb', line 2064 def mount_path @mount_path end |
#nfs ⇒ Google::Apis::BatchV1::Nfs
Represents an NFS volume.
Corresponds to the JSON property nfs
2069 2070 2071 |
# File 'lib/google/apis/batch_v1/classes.rb', line 2069 def nfs @nfs end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2076 2077 2078 2079 2080 2081 2082 |
# File 'lib/google/apis/batch_v1/classes.rb', line 2076 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 |