public sealed class WorkstationConfig : IMessage<WorkstationConfig>, IEquatable<WorkstationConfig>, IDeepCloneable<WorkstationConfig>, IBufferMessage, IMessage
Reference documentation and code samples for the Cloud Workstations v1 API class WorkstationConfig.
A workstation configuration resource in the Cloud Workstations API.
Workstation configurations act as templates for workstations. The workstation
configuration defines details such as the workstation virtual machine (VM)
instance type, persistent storage, container image defining environment,
which IDE or Code Editor to use, and more. Administrators and platform teams
can also use Identity and Access Management
(IAM) rules to grant access to
teams or to individual developers.
Output only. Whether this resource is degraded, in which case it may
require user action to restore full functionality. See also the
[conditions][google.cloud.workstations.v1.WorkstationConfig.conditions]
field.
public WorkstationConfig.Types.CustomerEncryptionKey EncryptionKey { get; set; }
Immutable. Encrypts resources of this workstation configuration using a
customer-managed encryption key (CMEK).
If specified, the boot disk of the Compute Engine instance and the
persistent disk are encrypted using this encryption key. If
this field is not set, the disks are encrypted using a generated
key. Customer-managed encryption keys do not protect disk metadata.
If the customer-managed encryption key is rotated, when the workstation
instance is stopped, the system attempts to recreate the
persistent disk with the new version of the key. Be sure to keep
older versions of the key until the persistent disk is recreated.
Otherwise, data on the persistent disk might be lost.
If the encryption key is revoked, the workstation session automatically
stops within 7 hours.
Immutable after the workstation configuration is created.
Optional. Checksum computed by the server. May be sent on update and delete
requests to make sure that the client has an up-to-date value before
proceeding.
Optional. Number of seconds to wait before automatically stopping a
workstation after it last received user traffic.
A value of "0s" indicates that Cloud Workstations VMs created with this
configuration should never time out due to idleness.
Provide
duration
terminated by s for seconds—for example, "7200s" (2 hours).
The default is "1200s" (20 minutes).
public RepeatedField<WorkstationConfig.Types.ReadinessCheck> ReadinessChecks { get; }
Optional. Readiness checks to perform when starting a workstation using
this workstation configuration. Mark a workstation as running only after
all specified readiness checks return 200 status codes.
public RepeatedField<string> ReplicaZones { get; }
Optional. Immutable. Specifies the zones used to replicate the VM and disk
resources within the region. If set, exactly two zones within the
workstation cluster's region must be specified—for example,
['us-central1-a', 'us-central1-f']. If this field is empty, two default
zones within the region are used.
Immutable after the workstation configuration is created.
Optional. Number of seconds that a workstation can run until it is
automatically shut down. We recommend that workstations be shut down daily
to reduce costs and so that security updates can be applied upon restart.
The
[idle_timeout][google.cloud.workstations.v1.WorkstationConfig.idle_timeout]
and
[running_timeout][google.cloud.workstations.v1.WorkstationConfig.running_timeout]
fields are independent of each other. Note that the
[running_timeout][google.cloud.workstations.v1.WorkstationConfig.running_timeout]
field shuts down VMs after the specified time, regardless of whether or not
the VMs are idle.
Provide duration terminated by s for seconds—for example, "54000s"
(15 hours). Defaults to "43200s" (12 hours). A value of "0s" indicates
that workstations using this configuration should never time out. If
[encryption_key][google.cloud.workstations.v1.WorkstationConfig.encryption_key]
is set, it must be greater than "0s" and less than
"86400s" (24 hours).
Warning: A value of "0s" indicates that Cloud Workstations VMs created
with this configuration have no maximum running time. This is strongly
discouraged because you incur costs and will not pick up security updates.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eWorkstationConfig\u003c/code\u003e class in the Cloud Workstations v1 API serves as a template for creating and managing workstations, defining elements such as VM instance type, storage, and container environments.\u003c/p\u003e\n"],["\u003cp\u003eWorkstation configurations support features like custom encryption keys, persistent directories, and readiness checks to enhance security and setup.\u003c/p\u003e\n"],["\u003cp\u003eAdministrators can use IAM rules to control access to workstation configurations for individual developers or teams.\u003c/p\u003e\n"],["\u003cp\u003eThe configuration allows setting idle and running timeouts, which automatically shut down workstations after periods of inactivity or maximum run times.\u003c/p\u003e\n"],["\u003cp\u003eThere are multiple versions available, with the latest being version 1.3.0, and each version is linked for reference within the documentation.\u003c/p\u003e\n"]]],[],null,["# Cloud Workstations v1 API - Class WorkstationConfig (1.3.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.3.0 (latest)](/dotnet/docs/reference/Google.Cloud.Workstations.V1/latest/Google.Cloud.Workstations.V1.WorkstationConfig)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.Workstations.V1/1.2.0/Google.Cloud.Workstations.V1.WorkstationConfig)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.Workstations.V1/1.1.0/Google.Cloud.Workstations.V1.WorkstationConfig)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.Workstations.V1/1.0.0/Google.Cloud.Workstations.V1.WorkstationConfig) \n\n public sealed class WorkstationConfig : IMessage\u003cWorkstationConfig\u003e, IEquatable\u003cWorkstationConfig\u003e, IDeepCloneable\u003cWorkstationConfig\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Cloud Workstations v1 API class WorkstationConfig.\n\nA workstation configuration resource in the Cloud Workstations API.\n\nWorkstation configurations act as templates for workstations. The workstation\nconfiguration defines details such as the workstation virtual machine (VM)\ninstance type, persistent storage, container image defining environment,\nwhich IDE or Code Editor to use, and more. Administrators and platform teams\ncan also use [Identity and Access Management\n(IAM)](https://cloud.google.com/iam/docs/overview) rules to grant access to\nteams or to individual developers. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e WorkstationConfig \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[WorkstationConfig](/dotnet/docs/reference/Google.Cloud.Workstations.V1/latest/Google.Cloud.Workstations.V1.WorkstationConfig), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[WorkstationConfig](/dotnet/docs/reference/Google.Cloud.Workstations.V1/latest/Google.Cloud.Workstations.V1.WorkstationConfig), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[WorkstationConfig](/dotnet/docs/reference/Google.Cloud.Workstations.V1/latest/Google.Cloud.Workstations.V1.WorkstationConfig), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Workstations.V1](/dotnet/docs/reference/Google.Cloud.Workstations.V1/latest/Google.Cloud.Workstations.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Workstations.V1.dll\n\nConstructors\n------------\n\n### WorkstationConfig()\n\n public WorkstationConfig()\n\n### WorkstationConfig(WorkstationConfig)\n\n public WorkstationConfig(WorkstationConfig other)\n\nProperties\n----------\n\n### Annotations\n\n public MapField\u003cstring, string\u003e Annotations { get; }\n\nOptional. Client-specified annotations.\n\n### Conditions\n\n public RepeatedField\u003cStatus\u003e Conditions { get; }\n\nOutput only. Status conditions describing the current resource state.\n\n### Container\n\n public WorkstationConfig.Types.Container Container { get; set; }\n\nOptional. Container that runs upon startup for each workstation using this\nworkstation configuration.\n\n### CreateTime\n\n public Timestamp CreateTime { get; set; }\n\nOutput only. Time when this workstation configuration was created.\n\n### Degraded\n\n public bool Degraded { get; set; }\n\nOutput only. Whether this resource is degraded, in which case it may\nrequire user action to restore full functionality. See also the\n\\[conditions\\]\\[google.cloud.workstations.v1.WorkstationConfig.conditions\\]\nfield.\n\n### DeleteTime\n\n public Timestamp DeleteTime { get; set; }\n\nOutput only. Time when this workstation configuration was soft-deleted.\n\n### DisplayName\n\n public string DisplayName { get; set; }\n\nOptional. Human-readable name for this workstation configuration.\n\n### EncryptionKey\n\n public WorkstationConfig.Types.CustomerEncryptionKey EncryptionKey { get; set; }\n\nImmutable. Encrypts resources of this workstation configuration using a\ncustomer-managed encryption key (CMEK).\n\nIf specified, the boot disk of the Compute Engine instance and the\npersistent disk are encrypted using this encryption key. If\nthis field is not set, the disks are encrypted using a generated\nkey. Customer-managed encryption keys do not protect disk metadata.\n\nIf the customer-managed encryption key is rotated, when the workstation\ninstance is stopped, the system attempts to recreate the\npersistent disk with the new version of the key. Be sure to keep\nolder versions of the key until the persistent disk is recreated.\nOtherwise, data on the persistent disk might be lost.\n\nIf the encryption key is revoked, the workstation session automatically\nstops within 7 hours.\n\nImmutable after the workstation configuration is created.\n\n### Etag\n\n public string Etag { get; set; }\n\nOptional. Checksum computed by the server. May be sent on update and delete\nrequests to make sure that the client has an up-to-date value before\nproceeding.\n\n### Host\n\n public WorkstationConfig.Types.Host Host { get; set; }\n\nOptional. Runtime host for the workstation.\n\n### IdleTimeout\n\n public Duration IdleTimeout { get; set; }\n\nOptional. Number of seconds to wait before automatically stopping a\nworkstation after it last received user traffic.\n\nA value of `\"0s\"` indicates that Cloud Workstations VMs created with this\nconfiguration should never time out due to idleness.\nProvide\n[duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#duration)\nterminated by `s` for seconds---for example, `\"7200s\"` (2 hours).\nThe default is `\"1200s\"` (20 minutes).\n\n### Labels\n\n public MapField\u003cstring, string\u003e Labels { get; }\n\nOptional.\n[Labels](https://cloud.google.com/workstations/docs/label-resources) that\nare applied to the workstation configuration and that are also propagated\nto the underlying Compute Engine resources.\n\n### Name\n\n public string Name { get; set; }\n\nFull name of this workstation configuration.\n\n### PersistentDirectories\n\n public RepeatedField\u003cWorkstationConfig.Types.PersistentDirectory\u003e PersistentDirectories { get; }\n\nOptional. Directories to persist across workstation sessions.\n\n### ReadinessChecks\n\n public RepeatedField\u003cWorkstationConfig.Types.ReadinessCheck\u003e ReadinessChecks { get; }\n\nOptional. Readiness checks to perform when starting a workstation using\nthis workstation configuration. Mark a workstation as running only after\nall specified readiness checks return 200 status codes.\n\n### Reconciling\n\n public bool Reconciling { get; set; }\n\nOutput only. Indicates whether this workstation configuration is currently\nbeing updated to match its intended state.\n\n### ReplicaZones\n\n public RepeatedField\u003cstring\u003e ReplicaZones { get; }\n\nOptional. Immutable. Specifies the zones used to replicate the VM and disk\nresources within the region. If set, exactly two zones within the\nworkstation cluster's region must be specified---for example,\n`['us-central1-a', 'us-central1-f']`. If this field is empty, two default\nzones within the region are used.\n\nImmutable after the workstation configuration is created.\n\n### RunningTimeout\n\n public Duration RunningTimeout { get; set; }\n\nOptional. Number of seconds that a workstation can run until it is\nautomatically shut down. We recommend that workstations be shut down daily\nto reduce costs and so that security updates can be applied upon restart.\nThe\n\\[idle_timeout\\]\\[google.cloud.workstations.v1.WorkstationConfig.idle_timeout\\]\nand\n\\[running_timeout\\]\\[google.cloud.workstations.v1.WorkstationConfig.running_timeout\\]\nfields are independent of each other. Note that the\n\\[running_timeout\\]\\[google.cloud.workstations.v1.WorkstationConfig.running_timeout\\]\nfield shuts down VMs after the specified time, regardless of whether or not\nthe VMs are idle.\n\nProvide duration terminated by `s` for seconds---for example, `\"54000s\"`\n(15 hours). Defaults to `\"43200s\"` (12 hours). A value of `\"0s\"` indicates\nthat workstations using this configuration should never time out. If\n\\[encryption_key\\]\\[google.cloud.workstations.v1.WorkstationConfig.encryption_key\\]\nis set, it must be greater than `\"0s\"` and less than\n`\"86400s\"` (24 hours).\n\nWarning: A value of `\"0s\"` indicates that Cloud Workstations VMs created\nwith this configuration have no maximum running time. This is strongly\ndiscouraged because you incur costs and will not pick up security updates.\n\n### Uid\n\n public string Uid { get; set; }\n\nOutput only. A system-assigned unique identifier for this workstation\nconfiguration.\n\n### UpdateTime\n\n public Timestamp UpdateTime { get; set; }\n\nOutput only. Time when this workstation configuration was most recently\nupdated.\n\n### WorkstationConfigName\n\n public WorkstationConfigName WorkstationConfigName { get; set; }\n\n[WorkstationConfigName](/dotnet/docs/reference/Google.Cloud.Workstations.V1/latest/Google.Cloud.Workstations.V1.WorkstationConfigName)-typed view over the [Name](/dotnet/docs/reference/Google.Cloud.Workstations.V1/latest/Google.Cloud.Workstations.V1.WorkstationConfig#Google_Cloud_Workstations_V1_WorkstationConfig_Name) resource name property."]]