Class: Google::Apis::ComputeAlpha::SavedAttachedDisk

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

Overview

An instance-attached disk resource.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SavedAttachedDisk

Returns a new instance of SavedAttachedDisk.



33711
33712
33713
# File 'lib/google/apis/compute_alpha/classes.rb', line 33711

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

Instance Attribute Details

#auto_deleteBoolean Also known as: auto_delete?

Specifies whether the disk will be auto-deleted when the instance is deleted ( but not when the disk is detached from the instance). Corresponds to the JSON property autoDelete

Returns:

  • (Boolean)


33621
33622
33623
# File 'lib/google/apis/compute_alpha/classes.rb', line 33621

def auto_delete
  @auto_delete
end

#bootBoolean Also known as: boot?

Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem. Corresponds to the JSON property boot

Returns:

  • (Boolean)


33628
33629
33630
# File 'lib/google/apis/compute_alpha/classes.rb', line 33628

def boot
  @boot
end

#device_nameString

Specifies the name of the disk attached to the source instance. Corresponds to the JSON property deviceName

Returns:

  • (String)


33634
33635
33636
# File 'lib/google/apis/compute_alpha/classes.rb', line 33634

def device_name
  @device_name
end

#disk_encryption_keyGoogle::Apis::ComputeAlpha::CustomerEncryptionKey

The encryption key for the disk. Corresponds to the JSON property diskEncryptionKey



33639
33640
33641
# File 'lib/google/apis/compute_alpha/classes.rb', line 33639

def disk_encryption_key
  @disk_encryption_key
end

#disk_size_gbFixnum

The size of the disk in base-2 GB. Corresponds to the JSON property diskSizeGb

Returns:

  • (Fixnum)


33644
33645
33646
# File 'lib/google/apis/compute_alpha/classes.rb', line 33644

def disk_size_gb
  @disk_size_gb
end

#disk_typeString

[Output Only] URL of the disk type resource. For example: projects/project/ zones/zone/diskTypes/pd-standard or pd-ssd Corresponds to the JSON property diskType

Returns:

  • (String)


33650
33651
33652
# File 'lib/google/apis/compute_alpha/classes.rb', line 33650

def disk_type
  @disk_type
end

#guest_os_featuresArray<Google::Apis::ComputeAlpha::GuestOsFeature>

A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options. Corresponds to the JSON property guestOsFeatures



33657
33658
33659
# File 'lib/google/apis/compute_alpha/classes.rb', line 33657

def guest_os_features
  @guest_os_features
end

#indexFixnum

Specifies zero-based index of the disk that is attached to the source instance. Corresponds to the JSON property index

Returns:

  • (Fixnum)


33662
33663
33664
# File 'lib/google/apis/compute_alpha/classes.rb', line 33662

def index
  @index
end

#interfaceString

Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. Corresponds to the JSON property interface

Returns:

  • (String)


33668
33669
33670
# File 'lib/google/apis/compute_alpha/classes.rb', line 33668

def interface
  @interface
end

#kindString

[Output Only] Type of the resource. Always compute#attachedDisk for attached disks. Corresponds to the JSON property kind

Returns:

  • (String)


33674
33675
33676
# File 'lib/google/apis/compute_alpha/classes.rb', line 33674

def kind
  @kind
end

#licensesArray<String>

[Output Only] Any valid publicly visible licenses. Corresponds to the JSON property licenses

Returns:

  • (Array<String>)


33679
33680
33681
# File 'lib/google/apis/compute_alpha/classes.rb', line 33679

def licenses
  @licenses
end

#modeString

The mode in which this disk is attached to the source instance, either READ_WRITE or READ_ONLY. Corresponds to the JSON property mode

Returns:

  • (String)


33685
33686
33687
# File 'lib/google/apis/compute_alpha/classes.rb', line 33685

def mode
  @mode
end

#sourceString

Specifies a URL of the disk attached to the source instance. Corresponds to the JSON property source

Returns:

  • (String)


33690
33691
33692
# File 'lib/google/apis/compute_alpha/classes.rb', line 33690

def source
  @source
end

#storage_bytesFixnum

[Output Only] A size of the storage used by the disk's snapshot by this machine image. Corresponds to the JSON property storageBytes

Returns:

  • (Fixnum)


33696
33697
33698
# File 'lib/google/apis/compute_alpha/classes.rb', line 33696

def storage_bytes
  @storage_bytes
end

#storage_bytes_statusString

[Output Only] An indicator whether storageBytes is in a stable state or it is being adjusted as a result of shared storage reallocation. This status can either be UPDATING, meaning the size of the snapshot is being updated, or UP_TO_DATE, meaning the size of the snapshot is up-to-date. Corresponds to the JSON property storageBytesStatus

Returns:

  • (String)


33704
33705
33706
# File 'lib/google/apis/compute_alpha/classes.rb', line 33704

def storage_bytes_status
  @storage_bytes_status
end

#typeString

Specifies the type of the attached disk, either SCRATCH or PERSISTENT. Corresponds to the JSON property type

Returns:

  • (String)


33709
33710
33711
# File 'lib/google/apis/compute_alpha/classes.rb', line 33709

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



33716
33717
33718
33719
33720
33721
33722
33723
33724
33725
33726
33727
33728
33729
33730
33731
33732
33733
# File 'lib/google/apis/compute_alpha/classes.rb', line 33716

def update!(**args)
  @auto_delete = args[:auto_delete] if args.key?(:auto_delete)
  @boot = args[:boot] if args.key?(:boot)
  @device_name = args[:device_name] if args.key?(:device_name)
  @disk_encryption_key = args[:disk_encryption_key] if args.key?(:disk_encryption_key)
  @disk_size_gb = args[:disk_size_gb] if args.key?(:disk_size_gb)
  @disk_type = args[:disk_type] if args.key?(:disk_type)
  @guest_os_features = args[:guest_os_features] if args.key?(:guest_os_features)
  @index = args[:index] if args.key?(:index)
  @interface = args[:interface] if args.key?(:interface)
  @kind = args[:kind] if args.key?(:kind)
  @licenses = args[:licenses] if args.key?(:licenses)
  @mode = args[:mode] if args.key?(:mode)
  @source = args[:source] if args.key?(:source)
  @storage_bytes = args[:storage_bytes] if args.key?(:storage_bytes)
  @storage_bytes_status = args[:storage_bytes_status] if args.key?(:storage_bytes_status)
  @type = args[:type] if args.key?(:type)
end