# Cloud Workstations V1BETA API - Class Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk (v0.10.0)

0.10.0 (latest) 0.9.0 0.8.1 0.7.1 0.6.0 0.5.1 0.4.1 0.3.0 0.2.0 0.1.3 Reference documentation and code samples for the Cloud Workstations V1BETA API class Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk.

A Persistent Directory backed by a Compute Engine regional persistent
disk. The
[persistent_directories](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-workstations-v1beta/latest/Google-Cloud-Workstations-V1beta-WorkstationConfig#Google__Cloud__Workstations__V1beta__WorkstationConfig_persistent_directories_instance_ "Google::Cloud::Workstations::V1beta::WorkstationConfig#persistent_directories (method)")
field is repeated, but it may contain only one entry. It creates a
[persistent
disk](https://cloud.google.com/compute/docs/disks/persistent-disks) 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.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #archive_timeout

    def archive_timeout() -> ::Google::Protobuf::Duration

**Returns**

- ([::Google::Protobuf::Duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-workstations-v1beta/latest/Google-Protobuf-Duration)) --- 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.

### #archive_timeout=

    def archive_timeout=(value) -> ::Google::Protobuf::Duration

**Parameter**

- **value** ([::Google::Protobuf::Duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-workstations-v1beta/latest/Google-Protobuf-Duration)) --- 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.
**Returns**

- ([::Google::Protobuf::Duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-workstations-v1beta/latest/Google-Protobuf-Duration)) --- 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.

### #disk_type

    def disk_type() -> ::String

**Returns**

- (::String) --- Optional. The [type of the persistent
  disk](https://cloud.google.com/compute/docs/disks#disk-types) for the home directory. Defaults to `"pd-standard"`.

### #disk_type=

    def disk_type=(value) -> ::String

**Parameter**

- **value** (::String) --- Optional. The [type of the persistent
  disk](https://cloud.google.com/compute/docs/disks#disk-types) for the home directory. Defaults to `"pd-standard"`.
**Returns**

- (::String) --- Optional. The [type of the persistent
  disk](https://cloud.google.com/compute/docs/disks#disk-types) for the home directory. Defaults to `"pd-standard"`.

### #fs_type

    def fs_type() -> ::String

**Returns**

- (::String) --- 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-workstations-v1beta/latest/Google-Cloud-Workstations-V1beta-WorkstationConfig-PersistentDirectory-GceRegionalPersistentDisk#Google__Cloud__Workstations__V1beta__WorkstationConfig__PersistentDirectory__GceRegionalPersistentDisk_source_snapshot_instance_ "Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk#source_snapshot (method)") is set. Defaults to `"ext4"`.

### #fs_type=

    def fs_type=(value) -> ::String

**Parameter**

- **value** (::String) --- 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-workstations-v1beta/latest/Google-Cloud-Workstations-V1beta-WorkstationConfig-PersistentDirectory-GceRegionalPersistentDisk#Google__Cloud__Workstations__V1beta__WorkstationConfig__PersistentDirectory__GceRegionalPersistentDisk_source_snapshot_instance_ "Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk#source_snapshot (method)") is set. Defaults to `"ext4"`.
**Returns**

- (::String) --- 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-workstations-v1beta/latest/Google-Cloud-Workstations-V1beta-WorkstationConfig-PersistentDirectory-GceRegionalPersistentDisk#Google__Cloud__Workstations__V1beta__WorkstationConfig__PersistentDirectory__GceRegionalPersistentDisk_source_snapshot_instance_ "Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk#source_snapshot (method)") is set. Defaults to `"ext4"`.

### #max_size_gb

    def max_size_gb() -> ::Integer

**Returns**

- (::Integer) --- Optional. Maximum size in GB to which this persistent directory can be resized. Defaults to unlimited if not set.

### #max_size_gb=

    def max_size_gb=(value) -> ::Integer

**Parameter**

- **value** (::Integer) --- Optional. Maximum size in GB to which this persistent directory can be resized. Defaults to unlimited if not set.
**Returns**

- (::Integer) --- Optional. Maximum size in GB to which this persistent directory can be resized. Defaults to unlimited if not set.

### #reclaim_policy

    def reclaim_policy() -> ::Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk::ReclaimPolicy

**Returns**

- ([::Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk::ReclaimPolicy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-workstations-v1beta/latest/Google-Cloud-Workstations-V1beta-WorkstationConfig-PersistentDirectory-GceRegionalPersistentDisk-ReclaimPolicy)) --- Optional. Whether the persistent disk should be deleted when the workstation is deleted. Valid values are `DELETE` and `RETAIN`. Defaults to `DELETE`.

### #reclaim_policy=

    def reclaim_policy=(value) -> ::Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk::ReclaimPolicy

**Parameter**

- **value** ([::Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk::ReclaimPolicy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-workstations-v1beta/latest/Google-Cloud-Workstations-V1beta-WorkstationConfig-PersistentDirectory-GceRegionalPersistentDisk-ReclaimPolicy)) --- Optional. Whether the persistent disk should be deleted when the workstation is deleted. Valid values are `DELETE` and `RETAIN`. Defaults to `DELETE`.
**Returns**

- ([::Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk::ReclaimPolicy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-workstations-v1beta/latest/Google-Cloud-Workstations-V1beta-WorkstationConfig-PersistentDirectory-GceRegionalPersistentDisk-ReclaimPolicy)) --- Optional. Whether the persistent disk should be deleted when the workstation is deleted. Valid values are `DELETE` and `RETAIN`. Defaults to `DELETE`.

### #size_gb

    def size_gb() -> ::Integer

**Returns**

- (::Integer) --- Optional. The GB capacity of a persistent home directory for each workstation created with this configuration. Must be empty if [source_snapshot](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-workstations-v1beta/latest/Google-Cloud-Workstations-V1beta-WorkstationConfig-PersistentDirectory-GceRegionalPersistentDisk#Google__Cloud__Workstations__V1beta__WorkstationConfig__PersistentDirectory__GceRegionalPersistentDisk_source_snapshot_instance_ "Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk#source_snapshot (method)") is set.


  Valid values are `10`, `50`, `100`, `200`, `500`, or `1000`.
  Defaults to `200`. If less than `200` GB, the
  [disk_type](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-workstations-v1beta/latest/Google-Cloud-Workstations-V1beta-WorkstationConfig-PersistentDirectory-GceRegionalPersistentDisk#Google__Cloud__Workstations__V1beta__WorkstationConfig__PersistentDirectory__GceRegionalPersistentDisk_disk_type_instance_ "Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk#disk_type (method)")
  must be
  `"pd-balanced"` or `"pd-ssd"`.

### #size_gb=

    def size_gb=(value) -> ::Integer

**Parameter**

- **value** (::Integer) --- Optional. The GB capacity of a persistent home directory for each workstation created with this configuration. Must be empty if [source_snapshot](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-workstations-v1beta/latest/Google-Cloud-Workstations-V1beta-WorkstationConfig-PersistentDirectory-GceRegionalPersistentDisk#Google__Cloud__Workstations__V1beta__WorkstationConfig__PersistentDirectory__GceRegionalPersistentDisk_source_snapshot_instance_ "Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk#source_snapshot (method)") is set.


  Valid values are `10`, `50`, `100`, `200`, `500`, or `1000`.
  Defaults to `200`. If less than `200` GB, the
  [disk_type](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-workstations-v1beta/latest/Google-Cloud-Workstations-V1beta-WorkstationConfig-PersistentDirectory-GceRegionalPersistentDisk#Google__Cloud__Workstations__V1beta__WorkstationConfig__PersistentDirectory__GceRegionalPersistentDisk_disk_type_instance_ "Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk#disk_type (method)")
  must be
  `"pd-balanced"` or `"pd-ssd"`.
**Returns**

- (::Integer) --- Optional. The GB capacity of a persistent home directory for each workstation created with this configuration. Must be empty if [source_snapshot](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-workstations-v1beta/latest/Google-Cloud-Workstations-V1beta-WorkstationConfig-PersistentDirectory-GceRegionalPersistentDisk#Google__Cloud__Workstations__V1beta__WorkstationConfig__PersistentDirectory__GceRegionalPersistentDisk_source_snapshot_instance_ "Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk#source_snapshot (method)") is set.


  Valid values are `10`, `50`, `100`, `200`, `500`, or `1000`.
  Defaults to `200`. If less than `200` GB, the
  [disk_type](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-workstations-v1beta/latest/Google-Cloud-Workstations-V1beta-WorkstationConfig-PersistentDirectory-GceRegionalPersistentDisk#Google__Cloud__Workstations__V1beta__WorkstationConfig__PersistentDirectory__GceRegionalPersistentDisk_disk_type_instance_ "Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk#disk_type (method)")
  must be
  `"pd-balanced"` or `"pd-ssd"`.

### #source_snapshot

    def source_snapshot() -> ::String

**Returns**

- (::String) --- Optional. Name of the snapshot to use as the source for the disk. If set, [size_gb](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-workstations-v1beta/latest/Google-Cloud-Workstations-V1beta-WorkstationConfig-PersistentDirectory-GceRegionalPersistentDisk#Google__Cloud__Workstations__V1beta__WorkstationConfig__PersistentDirectory__GceRegionalPersistentDisk_size_gb_instance_ "Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk#size_gb (method)") and [fs_type](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-workstations-v1beta/latest/Google-Cloud-Workstations-V1beta-WorkstationConfig-PersistentDirectory-GceRegionalPersistentDisk#Google__Cloud__Workstations__V1beta__WorkstationConfig__PersistentDirectory__GceRegionalPersistentDisk_fs_type_instance_ "Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk#fs_type (method)") must be empty. Must be formatted as ext4 file system with no partitions.

### #source_snapshot=

    def source_snapshot=(value) -> ::String

**Parameter**

- **value** (::String) --- Optional. Name of the snapshot to use as the source for the disk. If set, [size_gb](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-workstations-v1beta/latest/Google-Cloud-Workstations-V1beta-WorkstationConfig-PersistentDirectory-GceRegionalPersistentDisk#Google__Cloud__Workstations__V1beta__WorkstationConfig__PersistentDirectory__GceRegionalPersistentDisk_size_gb_instance_ "Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk#size_gb (method)") and [fs_type](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-workstations-v1beta/latest/Google-Cloud-Workstations-V1beta-WorkstationConfig-PersistentDirectory-GceRegionalPersistentDisk#Google__Cloud__Workstations__V1beta__WorkstationConfig__PersistentDirectory__GceRegionalPersistentDisk_fs_type_instance_ "Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk#fs_type (method)") must be empty. Must be formatted as ext4 file system with no partitions.
**Returns**

- (::String) --- Optional. Name of the snapshot to use as the source for the disk. If set, [size_gb](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-workstations-v1beta/latest/Google-Cloud-Workstations-V1beta-WorkstationConfig-PersistentDirectory-GceRegionalPersistentDisk#Google__Cloud__Workstations__V1beta__WorkstationConfig__PersistentDirectory__GceRegionalPersistentDisk_size_gb_instance_ "Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk#size_gb (method)") and [fs_type](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-workstations-v1beta/latest/Google-Cloud-Workstations-V1beta-WorkstationConfig-PersistentDirectory-GceRegionalPersistentDisk#Google__Cloud__Workstations__V1beta__WorkstationConfig__PersistentDirectory__GceRegionalPersistentDisk_fs_type_instance_ "Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk#fs_type (method)") must be empty. Must be formatted as ext4 file system with no partitions.