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.



267
268
269
# File 'lib/google/apis/backupdr_v1/classes.rb', line 267

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)


181
182
183
# File 'lib/google/apis/backupdr_v1/classes.rb', line 181

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)


188
189
190
# File 'lib/google/apis/backupdr_v1/classes.rb', line 188

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)


196
197
198
# File 'lib/google/apis/backupdr_v1/classes.rb', line 196

def device_name
  @device_name
end

#disk_encryption_keyGoogle::Apis::BackupdrV1::CustomerEncryptionKey

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



201
202
203
# File 'lib/google/apis/backupdr_v1/classes.rb', line 201

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)


206
207
208
# File 'lib/google/apis/backupdr_v1/classes.rb', line 206

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)


211
212
213
# File 'lib/google/apis/backupdr_v1/classes.rb', line 211

def disk_size_gb
  @disk_size_gb
end

#disk_typeString

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

Returns:

  • (String)


216
217
218
# File 'lib/google/apis/backupdr_v1/classes.rb', line 216

def disk_type
  @disk_type
end

#disk_type_uriString

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 diskTypeUri

Returns:

  • (String)


222
223
224
# File 'lib/google/apis/backupdr_v1/classes.rb', line 222

def disk_type_uri
  @disk_type_uri
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



228
229
230
# File 'lib/google/apis/backupdr_v1/classes.rb', line 228

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)


234
235
236
# File 'lib/google/apis/backupdr_v1/classes.rb', line 234

def index
  @index
end

#initialize_paramsGoogle::Apis::BackupdrV1::InitializeParams

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



239
240
241
# File 'lib/google/apis/backupdr_v1/classes.rb', line 239

def initialize_params
  @initialize_params
end

#kindString

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

Returns:

  • (String)


244
245
246
# File 'lib/google/apis/backupdr_v1/classes.rb', line 244

def kind
  @kind
end

#licenseArray<String>

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

Returns:

  • (Array<String>)


249
250
251
# File 'lib/google/apis/backupdr_v1/classes.rb', line 249

def license
  @license
end

#modeString

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

Returns:

  • (String)


254
255
256
# File 'lib/google/apis/backupdr_v1/classes.rb', line 254

def mode
  @mode
end

#saved_stateString

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

Returns:

  • (String)


259
260
261
# File 'lib/google/apis/backupdr_v1/classes.rb', line 259

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)


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

def source
  @source
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
# File 'lib/google/apis/backupdr_v1/classes.rb', line 272

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_uri = args[:disk_type_uri] if args.key?(:disk_type_uri)
  @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)
end