Class: Google::Apis::WorkstationsV1::WorkstationConfig

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/workstations_v1/classes.rb,
lib/google/apis/workstations_v1/representations.rb,
lib/google/apis/workstations_v1/representations.rb

Overview

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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ WorkstationConfig

Returns a new instance of WorkstationConfig.



2169
2170
2171
# File 'lib/google/apis/workstations_v1/classes.rb', line 2169

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

Instance Attribute Details

#allowed_portsArray<Google::Apis::WorkstationsV1::PortRange>

Optional. A list of PortRanges specifying single ports or ranges of ports that are externally accessible in the workstation. Allowed ports must be one of 22, 80, or within range 1024-65535. If not specified defaults to ports 22, 80, and ports 1024-65535. Corresponds to the JSON property allowedPorts



1979
1980
1981
# File 'lib/google/apis/workstations_v1/classes.rb', line 1979

def allowed_ports
  @allowed_ports
end

#annotationsHash<String,String>

Optional. Client-specified annotations. Corresponds to the JSON property annotations

Returns:

  • (Hash<String,String>)


1984
1985
1986
# File 'lib/google/apis/workstations_v1/classes.rb', line 1984

def annotations
  @annotations
end

#conditionsArray<Google::Apis::WorkstationsV1::Status>

Output only. Status conditions describing the current resource state. Corresponds to the JSON property conditions



1989
1990
1991
# File 'lib/google/apis/workstations_v1/classes.rb', line 1989

def conditions
  @conditions
end

#containerGoogle::Apis::WorkstationsV1::Container

A Docker container. Corresponds to the JSON property container



1994
1995
1996
# File 'lib/google/apis/workstations_v1/classes.rb', line 1994

def container
  @container
end

#create_timeString

Output only. Time when this workstation configuration was created. Corresponds to the JSON property createTime

Returns:

  • (String)


1999
2000
2001
# File 'lib/google/apis/workstations_v1/classes.rb', line 1999

def create_time
  @create_time
end

#degradedBoolean Also known as: degraded?

Output only. Whether this resource is degraded, in which case it may require user action to restore full functionality. See also the conditions field. Corresponds to the JSON property degraded

Returns:

  • (Boolean)


2005
2006
2007
# File 'lib/google/apis/workstations_v1/classes.rb', line 2005

def degraded
  @degraded
end

#delete_timeString

Output only. Time when this workstation configuration was soft-deleted. Corresponds to the JSON property deleteTime

Returns:

  • (String)


2011
2012
2013
# File 'lib/google/apis/workstations_v1/classes.rb', line 2011

def delete_time
  @delete_time
end

#disable_tcp_connectionsBoolean Also known as: disable_tcp_connections?

Optional. Disables support for plain TCP connections in the workstation. By default the service supports TCP connections through a websocket relay. Setting this option to true disables that relay, which prevents the usage of services that require plain TCP connections, such as SSH. When enabled, all communication must occur over HTTPS or WSS. Corresponds to the JSON property disableTcpConnections

Returns:

  • (Boolean)


2020
2021
2022
# File 'lib/google/apis/workstations_v1/classes.rb', line 2020

def disable_tcp_connections
  @disable_tcp_connections
end

#display_nameString

Optional. Human-readable name for this workstation configuration. Corresponds to the JSON property displayName

Returns:

  • (String)


2026
2027
2028
# File 'lib/google/apis/workstations_v1/classes.rb', line 2026

def display_name
  @display_name
end

#enable_audit_agentBoolean Also known as: enable_audit_agent?

Optional. Whether to enable Linux auditd logging on the workstation. When enabled, a service_account must also be specified that has roles/logging. logWriter and roles/monitoring.metricWriter on the project. Operating system audit logging is distinct from Cloud Audit Logs and Container output logging. Operating system audit logs are available in the Cloud Logging console by querying: resource.type="gce_instance" log_name:"/logs/linux-auditd" Corresponds to the JSON property enableAuditAgent

Returns:

  • (Boolean)


2039
2040
2041
# File 'lib/google/apis/workstations_v1/classes.rb', line 2039

def enable_audit_agent
  @enable_audit_agent
end

#encryption_keyGoogle::Apis::WorkstationsV1::CustomerEncryptionKey

A customer-managed encryption key (CMEK) for the Compute Engine resources of the associated workstation configuration. Specify the name of your Cloud KMS encryption key and the default service account. We recommend that you use a separate service account and follow Cloud KMS best practices. Corresponds to the JSON property encryptionKey



2049
2050
2051
# File 'lib/google/apis/workstations_v1/classes.rb', line 2049

def encryption_key
  @encryption_key
end

#ephemeral_directoriesArray<Google::Apis::WorkstationsV1::EphemeralDirectory>

Optional. Ephemeral directories which won't persist across workstation sessions. Corresponds to the JSON property ephemeralDirectories



2055
2056
2057
# File 'lib/google/apis/workstations_v1/classes.rb', line 2055

def ephemeral_directories
  @ephemeral_directories
end

#etagString

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. Corresponds to the JSON property etag

Returns:

  • (String)


2062
2063
2064
# File 'lib/google/apis/workstations_v1/classes.rb', line 2062

def etag
  @etag
end

#grant_workstation_admin_role_on_createBoolean Also known as: grant_workstation_admin_role_on_create?

Optional. Grant creator of a workstation roles/workstations.policyAdmin role along with roles/workstations.user role on the workstation created by them. This allows workstation users to share access to either their entire workstation, or individual ports. Defaults to false. Corresponds to the JSON property grantWorkstationAdminRoleOnCreate

Returns:

  • (Boolean)


2070
2071
2072
# File 'lib/google/apis/workstations_v1/classes.rb', line 2070

def grant_workstation_admin_role_on_create
  @grant_workstation_admin_role_on_create
end

#hostGoogle::Apis::WorkstationsV1::Host

Runtime host for a workstation. Corresponds to the JSON property host



2076
2077
2078
# File 'lib/google/apis/workstations_v1/classes.rb', line 2076

def host
  @host
end

#idle_timeoutString

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). Corresponds to the JSON property idleTimeout

Returns:

  • (String)


2086
2087
2088
# File 'lib/google/apis/workstations_v1/classes.rb', line 2086

def idle_timeout
  @idle_timeout
end

#labelsHash<String,String>

Optional. Labels that are applied to the workstation configuration and that are also propagated to the underlying Compute Engine resources. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


2093
2094
2095
# File 'lib/google/apis/workstations_v1/classes.rb', line 2093

def labels
  @labels
end

#max_usable_workstationsFixnum

Optional. Maximum number of workstations under this configuration a user can have workstations.workstation.use permission on. Only enforced on CreateWorkstation API calls on the user issuing the API request. Can be overridden by: - granting a user workstations.workstationConfigs. exemptMaxUsableWorkstationLimit permission, or - having a user with that permission create a workstation and granting another user workstations. workstation.use permission on that workstation. If not specified, defaults to 0, which indicates unlimited. Corresponds to the JSON property maxUsableWorkstations

Returns:

  • (Fixnum)


2105
2106
2107
# File 'lib/google/apis/workstations_v1/classes.rb', line 2105

def max_usable_workstations
  @max_usable_workstations
end

#nameString

Identifier. Full name of this workstation configuration. Corresponds to the JSON property name

Returns:

  • (String)


2110
2111
2112
# File 'lib/google/apis/workstations_v1/classes.rb', line 2110

def name
  @name
end

#persistent_directoriesArray<Google::Apis::WorkstationsV1::PersistentDirectory>

Optional. Directories to persist across workstation sessions. Corresponds to the JSON property persistentDirectories



2115
2116
2117
# File 'lib/google/apis/workstations_v1/classes.rb', line 2115

def persistent_directories
  @persistent_directories
end

#readiness_checksArray<Google::Apis::WorkstationsV1::ReadinessCheck>

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. Corresponds to the JSON property readinessChecks



2122
2123
2124
# File 'lib/google/apis/workstations_v1/classes.rb', line 2122

def readiness_checks
  @readiness_checks
end

#reconcilingBoolean Also known as: reconciling?

Output only. Indicates whether this workstation configuration is currently being updated to match its intended state. Corresponds to the JSON property reconciling

Returns:

  • (Boolean)


2128
2129
2130
# File 'lib/google/apis/workstations_v1/classes.rb', line 2128

def reconciling
  @reconciling
end

#replica_zonesArray<String>

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. Corresponds to the JSON property replicaZones

Returns:

  • (Array<String>)


2138
2139
2140
# File 'lib/google/apis/workstations_v1/classes.rb', line 2138

def replica_zones
  @replica_zones
end

#running_timeoutString

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 and running_timeout fields are independent of each other. Note that the 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 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. Corresponds to the JSON property runningTimeout

Returns:

  • (String)


2155
2156
2157
# File 'lib/google/apis/workstations_v1/classes.rb', line 2155

def running_timeout
  @running_timeout
end

#uidString

Output only. A system-assigned unique identifier for this workstation configuration. Corresponds to the JSON property uid

Returns:

  • (String)


2161
2162
2163
# File 'lib/google/apis/workstations_v1/classes.rb', line 2161

def uid
  @uid
end

#update_timeString

Output only. Time when this workstation configuration was most recently updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


2167
2168
2169
# File 'lib/google/apis/workstations_v1/classes.rb', line 2167

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
# File 'lib/google/apis/workstations_v1/classes.rb', line 2174

def update!(**args)
  @allowed_ports = args[:allowed_ports] if args.key?(:allowed_ports)
  @annotations = args[:annotations] if args.key?(:annotations)
  @conditions = args[:conditions] if args.key?(:conditions)
  @container = args[:container] if args.key?(:container)
  @create_time = args[:create_time] if args.key?(:create_time)
  @degraded = args[:degraded] if args.key?(:degraded)
  @delete_time = args[:delete_time] if args.key?(:delete_time)
  @disable_tcp_connections = args[:disable_tcp_connections] if args.key?(:disable_tcp_connections)
  @display_name = args[:display_name] if args.key?(:display_name)
  @enable_audit_agent = args[:enable_audit_agent] if args.key?(:enable_audit_agent)
  @encryption_key = args[:encryption_key] if args.key?(:encryption_key)
  @ephemeral_directories = args[:ephemeral_directories] if args.key?(:ephemeral_directories)
  @etag = args[:etag] if args.key?(:etag)
  @grant_workstation_admin_role_on_create = args[:grant_workstation_admin_role_on_create] if args.key?(:grant_workstation_admin_role_on_create)
  @host = args[:host] if args.key?(:host)
  @idle_timeout = args[:idle_timeout] if args.key?(:idle_timeout)
  @labels = args[:labels] if args.key?(:labels)
  @max_usable_workstations = args[:max_usable_workstations] if args.key?(:max_usable_workstations)
  @name = args[:name] if args.key?(:name)
  @persistent_directories = args[:persistent_directories] if args.key?(:persistent_directories)
  @readiness_checks = args[:readiness_checks] if args.key?(:readiness_checks)
  @reconciling = args[:reconciling] if args.key?(:reconciling)
  @replica_zones = args[:replica_zones] if args.key?(:replica_zones)
  @running_timeout = args[:running_timeout] if args.key?(:running_timeout)
  @uid = args[:uid] if args.key?(:uid)
  @update_time = args[:update_time] if args.key?(:update_time)
end