Class: Google::Apis::BatchV1::AttachedDisk

Inherits:
Object
  • Object
show all
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

A new or an existing persistent disk (PD) or a local ssd attached to a VM instance.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AttachedDisk

Returns a new instance of AttachedDisk.



386
387
388
# File 'lib/google/apis/batch_v1/classes.rb', line 386

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#device_nameString

Device name that the guest operating system will see. It is used by Runnable. volumes field to mount disks. So please specify the device_name if you want Batch to help mount the disk, and it should match the device_name field in volumes. Corresponds to the JSON property deviceName

Returns:

  • (String)


372
373
374
# File 'lib/google/apis/batch_v1/classes.rb', line 372

def device_name
  @device_name
end

#existing_diskString

Name of an existing PD. Corresponds to the JSON property existingDisk

Returns:

  • (String)


377
378
379
# File 'lib/google/apis/batch_v1/classes.rb', line 377

def existing_disk
  @existing_disk
end

#new_diskGoogle::Apis::BatchV1::Disk

A new persistent disk or a local ssd. A VM can only have one local SSD setting but multiple local SSD partitions. See https://cloud.google.com/compute/docs/ disks#pdspecs and https://cloud.google.com/compute/docs/disks#localssds. Corresponds to the JSON property newDisk



384
385
386
# File 'lib/google/apis/batch_v1/classes.rb', line 384

def new_disk
  @new_disk
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



391
392
393
394
395
# File 'lib/google/apis/batch_v1/classes.rb', line 391

def update!(**args)
  @device_name = args[:device_name] if args.key?(:device_name)
  @existing_disk = args[:existing_disk] if args.key?(:existing_disk)
  @new_disk = args[:new_disk] if args.key?(:new_disk)
end