Class: Google::Apis::LifesciencesV2beta::Disk

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/lifesciences_v2beta/classes.rb,
lib/google/apis/lifesciences_v2beta/representations.rb,
lib/google/apis/lifesciences_v2beta/representations.rb

Overview

Carries information about a disk that can be attached to a VM. See https:// cloud.google.com/compute/docs/disks/performance for more information about disk type, size, and performance considerations. Specify either Volume or Disk, but not both.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Disk

Returns a new instance of Disk.



431
432
433
# File 'lib/google/apis/lifesciences_v2beta/classes.rb', line 431

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

Instance Attribute Details

#nameString

A user-supplied name for the disk. Used when mounting the disk into actions. The name must contain only upper and lowercase alphanumeric characters and hyphens and cannot start with a hyphen. Corresponds to the JSON property name

Returns:

  • (String)


410
411
412
# File 'lib/google/apis/lifesciences_v2beta/classes.rb', line 410

def name
  @name
end

#size_gbFixnum

The size, in GB, of the disk to attach. If the size is not specified, a default is chosen to ensure reasonable I/O performance. If the disk type is specified as local-ssd, multiple local drives are automatically combined to provide the requested size. Note, however, that each physical SSD is 375GB in size, and no more than 8 drives can be attached to a single instance. Corresponds to the JSON property sizeGb

Returns:

  • (Fixnum)


419
420
421
# File 'lib/google/apis/lifesciences_v2beta/classes.rb', line 419

def size_gb
  @size_gb
end

#source_imageString

An optional image to put on the disk before attaching it to the VM. Corresponds to the JSON property sourceImage

Returns:

  • (String)


424
425
426
# File 'lib/google/apis/lifesciences_v2beta/classes.rb', line 424

def source_image
  @source_image
end

#typeString

The Compute Engine disk type. If unspecified, pd-standard is used. Corresponds to the JSON property type

Returns:

  • (String)


429
430
431
# File 'lib/google/apis/lifesciences_v2beta/classes.rb', line 429

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



436
437
438
439
440
441
# File 'lib/google/apis/lifesciences_v2beta/classes.rb', line 436

def update!(**args)
  @name = args[:name] if args.key?(:name)
  @size_gb = args[:size_gb] if args.key?(:size_gb)
  @source_image = args[:source_image] if args.key?(:source_image)
  @type = args[:type] if args.key?(:type)
end