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.



480
481
482
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 480

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)


453
454
455
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 453

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)


460
461
462
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 460

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)


466
467
468
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 466

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)


472
473
474
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 472

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)


478
479
480
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 478

def source_snapshot
  @source_snapshot
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



485
486
487
488
489
490
491
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 485

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