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 Persistent Directory backed by a Compute Engine regional persistent disk. The persistent_directories 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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GceRegionalPersistentDisk

Returns a new instance of GceRegionalPersistentDisk.



941
942
943
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 941

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

Instance Attribute Details

#archive_timeoutString

Optional. Number of seconds to wait after initially creating or subsequently shutting down the workstation before converting its disk into a snapshot. This generally saves costs at the expense of greater startup time on next workstation start, as the service will need to create a disk from the archival snapshot. A value of "0s" indicates that the disk will never be archived. Corresponds to the JSON property archiveTimeout

Returns:

  • (String)


899
900
901
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 899

def archive_timeout
  @archive_timeout
end

#disk_typeString

Optional. The type of the persistent disk for the home directory. Defaults to "pd-standard". Corresponds to the JSON property diskType

Returns:

  • (String)


905
906
907
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 905

def disk_type
  @disk_type
end

#fs_typeString

Optional. 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)


912
913
914
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 912

def fs_type
  @fs_type
end

#max_size_gbFixnum

Optional. Maximum size in GB to which this persistent directory can be resized. Defaults to unlimited if not set. Corresponds to the JSON property maxSizeGb

Returns:

  • (Fixnum)


918
919
920
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 918

def max_size_gb
  @max_size_gb
end

#reclaim_policyString

Optional. 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

Returns:

  • (String)


924
925
926
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 924

def reclaim_policy
  @reclaim_policy
end

#size_gbFixnum

Optional. 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 disk_type must be "pd-balanced" or "pd-ssd". Corresponds to the JSON property sizeGb

Returns:

  • (Fixnum)


932
933
934
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 932

def size_gb
  @size_gb
end

#source_snapshotString

Optional. Name of the snapshot to use as the source for the disk. If set, size_gb and fs_type must be empty. Must be formatted as ext4 file system with no partitions. Corresponds to the JSON property sourceSnapshot

Returns:

  • (String)


939
940
941
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 939

def source_snapshot
  @source_snapshot
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



946
947
948
949
950
951
952
953
954
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 946

def update!(**args)
  @archive_timeout = args[:archive_timeout] if args.key?(:archive_timeout)
  @disk_type = args[:disk_type] if args.key?(:disk_type)
  @fs_type = args[:fs_type] if args.key?(:fs_type)
  @max_size_gb = args[:max_size_gb] if args.key?(:max_size_gb)
  @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