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.



366
367
368
# File 'lib/google/apis/batch_v1/classes.rb', line 366

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)


352
353
354
# File 'lib/google/apis/batch_v1/classes.rb', line 352

def device_name
  @device_name
end

#existing_diskString

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

Returns:

  • (String)


357
358
359
# File 'lib/google/apis/batch_v1/classes.rb', line 357

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. https://cloud.google.com/compute/docs/disks# pdspecs. https://cloud.google.com/compute/docs/disks#localssds. Corresponds to the JSON property newDisk



364
365
366
# File 'lib/google/apis/batch_v1/classes.rb', line 364

def new_disk
  @new_disk
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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