Class: Google::Apis::ComputeAlpha::PreservedStatePreservedDisk

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ PreservedStatePreservedDisk

Returns a new instance of PreservedStatePreservedDisk



23814
23815
23816
# File 'generated/google/apis/compute_alpha/classes.rb', line 23814

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

Instance Attribute Details

#auto_deleteString

These stateful disks will never be deleted during autohealing, update, instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole MIG is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted. Corresponds to the JSON property autoDelete

Returns:

  • (String)


23800
23801
23802
# File 'generated/google/apis/compute_alpha/classes.rb', line 23800

def auto_delete
  @auto_delete
end

#modeString

The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode. Corresponds to the JSON property mode

Returns:

  • (String)


23806
23807
23808
# File 'generated/google/apis/compute_alpha/classes.rb', line 23806

def mode
  @mode
end

#sourceString

The URL of the disk resource that is stateful and should be attached to the VM instance. Corresponds to the JSON property source

Returns:

  • (String)


23812
23813
23814
# File 'generated/google/apis/compute_alpha/classes.rb', line 23812

def source
  @source
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



23819
23820
23821
23822
23823
# File 'generated/google/apis/compute_alpha/classes.rb', line 23819

def update!(**args)
  @auto_delete = args[:auto_delete] if args.key?(:auto_delete)
  @mode = args[:mode] if args.key?(:mode)
  @source = args[:source] if args.key?(:source)
end