Class: Google::Apis::ManagerV1beta2::DiskAttachment

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

Overview

How to attach a disk to a Replica.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ DiskAttachment

Returns a new instance of DiskAttachment



313
314
315
# File 'generated/google/apis/manager_v1beta2/classes.rb', line 313

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

Instance Attribute Details

#device_nameString

The device name of this disk. Corresponds to the JSON property deviceName

Returns:

  • (String)


305
306
307
# File 'generated/google/apis/manager_v1beta2/classes.rb', line 305

def device_name
  @device_name
end

#indexFixnum

A zero-based index to assign to this disk, where 0 is reserved for the boot disk. If not specified, this is assigned by the server. Corresponds to the JSON property index

Returns:

  • (Fixnum)


311
312
313
# File 'generated/google/apis/manager_v1beta2/classes.rb', line 311

def index
  @index
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



318
319
320
321
# File 'generated/google/apis/manager_v1beta2/classes.rb', line 318

def update!(**args)
  @device_name = args[:device_name] if args.key?(:device_name)
  @index = args[:index] if args.key?(:index)
end