Class: Google::Apis::BatchV1::Disk
- Inherits:
-
Object
- Object
- Google::Apis::BatchV1::Disk
- 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 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.
Instance Attribute Summary collapse
-
#disk_interface ⇒ String
Local SSDs are available through both "SCSI" and "NVMe" interfaces.
-
#image ⇒ String
Name of a public or custom image used as the data source.
-
#size_gb ⇒ Fixnum
Disk size in GB.
-
#snapshot ⇒ String
Name of a snapshot used as the data source.
-
#type ⇒ String
Disk type as shown in
gcloud compute disk-types listFor example, "pd-ssd", " pd-standard", "pd-balanced", "local-ssd".
Instance Method Summary collapse
-
#initialize(**args) ⇒ Disk
constructor
A new instance of Disk.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Disk
Returns a new instance of Disk.
660 661 662 |
# File 'lib/google/apis/batch_v1/classes.rb', line 660 def initialize(**args) update!(**args) end |
Instance Attribute Details
#disk_interface ⇒ String
Local SSDs are available through both "SCSI" and "NVMe" interfaces. If not
indicated, "NVMe" will be the default one for local ssds. We only support "
SCSI" for persistent disks now.
Corresponds to the JSON property diskInterface
635 636 637 |
# File 'lib/google/apis/batch_v1/classes.rb', line 635 def disk_interface @disk_interface end |
#image ⇒ String
Name of a public or custom image used as the data source.
Corresponds to the JSON property image
640 641 642 |
# File 'lib/google/apis/batch_v1/classes.rb', line 640 def image @image end |
#size_gb ⇒ Fixnum
Disk size in GB. This field is ignored if data_source is disk or image.
If type is local-ssd, size_gb should be a multiple of 375GB, otherwise,
the final size will be the next greater multiple of 375 GB.
Corresponds to the JSON property sizeGb
647 648 649 |
# File 'lib/google/apis/batch_v1/classes.rb', line 647 def size_gb @size_gb end |
#snapshot ⇒ String
Name of a snapshot used as the data source.
Corresponds to the JSON property snapshot
652 653 654 |
# File 'lib/google/apis/batch_v1/classes.rb', line 652 def snapshot @snapshot end |
#type ⇒ String
Disk type as shown in gcloud compute disk-types list For example, "pd-ssd", "
pd-standard", "pd-balanced", "local-ssd".
Corresponds to the JSON property type
658 659 660 |
# File 'lib/google/apis/batch_v1/classes.rb', line 658 def type @type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
665 666 667 668 669 670 671 |
# File 'lib/google/apis/batch_v1/classes.rb', line 665 def update!(**args) @disk_interface = args[:disk_interface] if args.key?(:disk_interface) @image = args[:image] if args.key?(:image) @size_gb = args[:size_gb] if args.key?(:size_gb) @snapshot = args[:snapshot] if args.key?(:snapshot) @type = args[:type] if args.key?(:type) end |