Class: Google::Apis::BatchV1::AttachedDisk
- Inherits:
-
Object
- Object
- Google::Apis::BatchV1::AttachedDisk
- 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
-
#device_name ⇒ String
Device name that the guest operating system will see.
-
#existing_disk ⇒ String
Name of an existing PD.
-
#new_disk ⇒ Google::Apis::BatchV1::Disk
A new persistent disk or a local ssd.
Instance Method Summary collapse
-
#initialize(**args) ⇒ AttachedDisk
constructor
A new instance of AttachedDisk.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ AttachedDisk
Returns a new instance of AttachedDisk.
730 731 732 |
# File 'lib/google/apis/batch_v1/classes.rb', line 730 def initialize(**args) update!(**args) end |
Instance Attribute Details
#device_name ⇒ String
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
716 717 718 |
# File 'lib/google/apis/batch_v1/classes.rb', line 716 def device_name @device_name end |
#existing_disk ⇒ String
Name of an existing PD.
Corresponds to the JSON property existingDisk
721 722 723 |
# File 'lib/google/apis/batch_v1/classes.rb', line 721 def existing_disk @existing_disk end |
#new_disk ⇒ Google::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
728 729 730 |
# File 'lib/google/apis/batch_v1/classes.rb', line 728 def new_disk @new_disk end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
735 736 737 738 739 |
# File 'lib/google/apis/batch_v1/classes.rb', line 735 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 |