Class: Google::Apis::WorkstationsV1beta::GcePersistentDisk
- Inherits:
-
Object
- Object
- Google::Apis::WorkstationsV1beta::GcePersistentDisk
- 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
An EphemeralDirectory is backed by a Compute Engine persistent disk.
Instance Attribute Summary collapse
-
#disk_type ⇒ String
Optional.
-
#read_only ⇒ Boolean
(also: #read_only?)
Optional.
-
#source_image ⇒ String
Optional.
-
#source_snapshot ⇒ String
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GcePersistentDisk
constructor
A new instance of GcePersistentDisk.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GcePersistentDisk
Returns a new instance of GcePersistentDisk.
687 688 689 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 687 def initialize(**args) update!(**args) end |
Instance Attribute Details
#disk_type ⇒ String
Optional. Type of the disk to use. Defaults to "pd-standard"
.
Corresponds to the JSON property diskType
662 663 664 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 662 def disk_type @disk_type end |
#read_only ⇒ Boolean Also known as: read_only?
Optional. Whether the disk is read only. If true, the disk may be shared by
multiple VMs and source_snapshot must be set.
Corresponds to the JSON property readOnly
668 669 670 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 668 def read_only @read_only end |
#source_image ⇒ String
Optional. Name of the disk image to use as the source for the disk. Must be
empty if source_snapshot is set. Updating source_image will update content in
the ephemeral directory after the workstation is restarted. This field is
mutable.
Corresponds to the JSON property sourceImage
677 678 679 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 677 def source_image @source_image end |
#source_snapshot ⇒ String
Optional. Name of the snapshot to use as the source for the disk. Must be
empty if source_image is set. Must be empty if read_only is false. Updating
source_snapshot will update content in the ephemeral directory after the
workstation is restarted. This field is mutable.
Corresponds to the JSON property sourceSnapshot
685 686 687 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 685 def source_snapshot @source_snapshot end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
692 693 694 695 696 697 |
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 692 def update!(**args) @disk_type = args[:disk_type] if args.key?(:disk_type) @read_only = args[:read_only] if args.key?(:read_only) @source_image = args[:source_image] if args.key?(:source_image) @source_snapshot = args[:source_snapshot] if args.key?(:source_snapshot) end |