Class: Google::Apis::WorkstationsV1beta::GceRegionalPersistentDisk
- Inherits:
-
Object
- Object
- Google::Apis::WorkstationsV1beta::GceRegionalPersistentDisk
- 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. The
persistentDirectories[] field is repeated, but it may contain only one entry.
It creates a persistent disk that mounts to the workstation VM at /home when the
session starts and detaches when the session ends. If this field is empty,
workstations created with this configuration do not have a persistent home
directory.
Instance Attribute Summary collapse
-
#disk_type ⇒ String
The type of the persistent disk for the home directory.
-
#fs_type ⇒ String
Type of file system that the disk should be formatted with.
-
#reclaim_policy ⇒ String
Whether the persistent disk should be deleted when the workstation is deleted.
-
#size_gb ⇒ Fixnum
The GB capacity of a persistent home directory for each workstation created with this configuration.
-
#source_snapshot ⇒ String
Name of the snapshot to use as the source for the disk.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GceRegionalPersistentDisk
constructor
A new instance of GceRegionalPersistentDisk.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GceRegionalPersistentDisk
Returns a new instance of GceRegionalPersistentDisk.
526 527 528 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 526 def initialize(**args) update!(**args) end |
Instance Attribute Details
#disk_type ⇒ String
The type of the persistent disk for the home directory. Defaults to pd-standard.
Corresponds to the JSON property diskType
497 498 499 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 497 def disk_type @disk_type end |
#fs_type ⇒ String
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
504 505 506 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 504 def fs_type @fs_type end |
#reclaim_policy ⇒ String
Whether the persistent disk should be deleted when the workstation is deleted.
Valid values are DELETE and RETAIN. Defaults to DELETE.
Corresponds to the JSON property reclaimPolicy
510 511 512 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 510 def reclaim_policy @reclaim_policy end |
#size_gb ⇒ Fixnum
The GB capacity of a persistent home directory for each workstation created
with this configuration. Must be empty if source_snapshot is set. Valid
values are 10, 50, 100, 200, 500, or 1000. Defaults to 200. If
less than 200 GB, the diskType must be pd-balanced or pd-ssd.
Corresponds to the JSON property sizeGb
518 519 520 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 518 def size_gb @size_gb end |
#source_snapshot ⇒ String
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
524 525 526 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 524 def source_snapshot @source_snapshot end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
531 532 533 534 535 536 537 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 531 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 |