Class: Google::Apis::BackupdrV1::AttachedDisk

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

Overview

An instance-attached disk resource.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AttachedDisk

Returns a new instance of AttachedDisk.



348
349
350
# File 'lib/google/apis/backupdr_v1/classes.rb', line 348

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

Instance Attribute Details

#auto_deleteBoolean Also known as: auto_delete?

Optional. 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)


257
258
259
# File 'lib/google/apis/backupdr_v1/classes.rb', line 257

def auto_delete
  @auto_delete
end

#bootBoolean Also known as: boot?

Optional. 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)


264
265
266
# File 'lib/google/apis/backupdr_v1/classes.rb', line 264

def boot
  @boot
end

#device_nameString

Optional. This is used as an identifier for the disks. This is the unique name has to provided to modify disk parameters like disk_name and replica_zones (in case of RePDs) Corresponds to the JSON property deviceName

Returns:

  • (String)


272
273
274
# File 'lib/google/apis/backupdr_v1/classes.rb', line 272

def device_name
  @device_name
end

#disk_encryption_keyGoogle::Apis::BackupdrV1::CustomerEncryptionKey

A customer-supplied encryption key. Corresponds to the JSON property diskEncryptionKey



277
278
279
# File 'lib/google/apis/backupdr_v1/classes.rb', line 277

def disk_encryption_key
  @disk_encryption_key
end

#disk_interfaceString

Optional. Specifies the disk interface to use for attaching this disk. Corresponds to the JSON property diskInterface

Returns:

  • (String)


282
283
284
# File 'lib/google/apis/backupdr_v1/classes.rb', line 282

def disk_interface
  @disk_interface
end

#disk_size_gbFixnum

Optional. The size of the disk in GB. Corresponds to the JSON property diskSizeGb

Returns:

  • (Fixnum)


287
288
289
# File 'lib/google/apis/backupdr_v1/classes.rb', line 287

def disk_size_gb
  @disk_size_gb
end

#disk_typeString

Optional. Output only. The URI 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)


293
294
295
# File 'lib/google/apis/backupdr_v1/classes.rb', line 293

def disk_type
  @disk_type
end

#disk_type_deprecatedString

Specifies the type of the disk. Corresponds to the JSON property diskTypeDeprecated

Returns:

  • (String)


298
299
300
# File 'lib/google/apis/backupdr_v1/classes.rb', line 298

def disk_type_deprecated
  @disk_type_deprecated
end

#guest_os_featureArray<Google::Apis::BackupdrV1::GuestOsFeature>

Optional. A list of features to enable on the guest operating system. Applicable only for bootable images. Corresponds to the JSON property guestOsFeature



304
305
306
# File 'lib/google/apis/backupdr_v1/classes.rb', line 304

def guest_os_feature
  @guest_os_feature
end

#indexFixnum

Optional. A zero-based index to this disk, where 0 is reserved for the boot disk. Corresponds to the JSON property index

Returns:

  • (Fixnum)


310
311
312
# File 'lib/google/apis/backupdr_v1/classes.rb', line 310

def index
  @index
end

#initialize_paramsGoogle::Apis::BackupdrV1::InitializeParams

Specifies the parameters to initialize this disk. Corresponds to the JSON property initializeParams



315
316
317
# File 'lib/google/apis/backupdr_v1/classes.rb', line 315

def initialize_params
  @initialize_params
end

#kindString

Optional. Type of the resource. Corresponds to the JSON property kind

Returns:

  • (String)


320
321
322
# File 'lib/google/apis/backupdr_v1/classes.rb', line 320

def kind
  @kind
end

#licenseArray<String>

Optional. Any valid publicly visible licenses. Corresponds to the JSON property license

Returns:

  • (Array<String>)


325
326
327
# File 'lib/google/apis/backupdr_v1/classes.rb', line 325

def license
  @license
end

#modeString

Optional. The mode in which to attach this disk. Corresponds to the JSON property mode

Returns:

  • (String)


330
331
332
# File 'lib/google/apis/backupdr_v1/classes.rb', line 330

def mode
  @mode
end

#saved_stateString

Optional. Output only. The state of the disk. Corresponds to the JSON property savedState

Returns:

  • (String)


335
336
337
# File 'lib/google/apis/backupdr_v1/classes.rb', line 335

def saved_state
  @saved_state
end

#sourceString

Optional. Specifies a valid partial or full URL to an existing Persistent Disk resource. Corresponds to the JSON property source

Returns:

  • (String)


341
342
343
# File 'lib/google/apis/backupdr_v1/classes.rb', line 341

def source
  @source
end

#typeString

Optional. Specifies the type of the disk. Corresponds to the JSON property type

Returns:

  • (String)


346
347
348
# File 'lib/google/apis/backupdr_v1/classes.rb', line 346

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
# File 'lib/google/apis/backupdr_v1/classes.rb', line 353

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_interface = args[:disk_interface] if args.key?(:disk_interface)
  @disk_size_gb = args[:disk_size_gb] if args.key?(:disk_size_gb)
  @disk_type = args[:disk_type] if args.key?(:disk_type)
  @disk_type_deprecated = args[:disk_type_deprecated] if args.key?(:disk_type_deprecated)
  @guest_os_feature = args[:guest_os_feature] if args.key?(:guest_os_feature)
  @index = args[:index] if args.key?(:index)
  @initialize_params = args[:initialize_params] if args.key?(:initialize_params)
  @kind = args[:kind] if args.key?(:kind)
  @license = args[:license] if args.key?(:license)
  @mode = args[:mode] if args.key?(:mode)
  @saved_state = args[:saved_state] if args.key?(:saved_state)
  @source = args[:source] if args.key?(:source)
  @type = args[:type] if args.key?(:type)
end