Class: Google::Apis::WorkstationsV1beta::GceRegionalPersistentDisk

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

Overview

A PersistentDirectory backed by a Compute Engine regional persistent disk.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GceRegionalPersistentDisk

Returns a new instance of GceRegionalPersistentDisk.



440
441
442
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 440

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

Instance Attribute Details

#disk_typeString

Type of the disk to use. Defaults to pd-standard. Corresponds to the JSON property diskType

Returns:

  • (String)


413
414
415
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 413

def disk_type
  @disk_type
end

#fs_typeString

Type of file system that the disk should be formatted with. The workstation image must support this file system type. Must be empty if source_snapshot is set. Defaults to ext4. Corresponds to the JSON property fsType

Returns:

  • (String)


420
421
422
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 420

def fs_type
  @fs_type
end

#reclaim_policyString

What should happen to the disk after the workstation is deleted. Defaults to DELETE. Corresponds to the JSON property reclaimPolicy

Returns:

  • (String)


426
427
428
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 426

def reclaim_policy
  @reclaim_policy
end

#size_gbFixnum

Size of the disk in GB. Must be empty if source_snapshot is set. Defaults to 200. Corresponds to the JSON property sizeGb

Returns:

  • (Fixnum)


432
433
434
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 432

def size_gb
  @size_gb
end

#source_snapshotString

Name of the snapshot to use as the source for the disk. If set, size_gb and fs_type must be empty. Corresponds to the JSON property sourceSnapshot

Returns:

  • (String)


438
439
440
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 438

def source_snapshot
  @source_snapshot
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



445
446
447
448
449
450
451
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 445

def update!(**args)
  @disk_type = args[:disk_type] if args.key?(:disk_type)
  @fs_type = args[:fs_type] if args.key?(:fs_type)
  @reclaim_policy = args[:reclaim_policy] if args.key?(:reclaim_policy)
  @size_gb = args[:size_gb] if args.key?(:size_gb)
  @source_snapshot = args[:source_snapshot] if args.key?(:source_snapshot)
end