workstations
Creates, updates, deletes, gets or lists a workstations
resource.
Overview
Name | workstations |
Type | Resource |
Id | google.workstations.workstations |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Identifier. Full name of this workstation. |
annotations | object | Optional. Client-specified annotations. |
createTime | string | Output only. Time when this workstation was created. |
deleteTime | string | Output only. Time when this workstation was soft-deleted. |
displayName | string | Optional. Human-readable name for this workstation. |
env | object | Optional. Environment variables passed to the workstation container's entrypoint. |
etag | string | 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. |
host | string | Output only. Host to which clients can send HTTPS traffic that will be received by the workstation. Authorized traffic will be received to the workstation as HTTP on port 80. To send traffic to a different port, clients may prefix the host with the destination port in the format {port}-{host} . |
kmsKey | string | Output only. The name of the Google Cloud KMS encryption key used to encrypt this workstation. The KMS key can only be configured in the WorkstationConfig. The expected format is projects/*/locations/*/keyRings/*/cryptoKeys/* . |
labels | object | Optional. Labels that are applied to the workstation and that are also propagated to the underlying Compute Engine resources. |
reconciling | boolean | Output only. Indicates whether this workstation is currently being updated to match its intended state. |
startTime | string | Output only. Time when this workstation was most recently successfully started, regardless of the workstation's initial state. |
state | string | Output only. Current state of the workstation. |
uid | string | Output only. A system-assigned unique identifier for this workstation. |
updateTime | string | Output only. Time when this workstation was most recently updated. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | locationsId, projectsId, workstationClustersId, workstationConfigsId, workstationsId | Returns the requested workstation. |
list | SELECT | locationsId, projectsId, workstationClustersId, workstationConfigsId | Returns all Workstations using the specified workstation configuration. |
create | INSERT | locationsId, projectsId, workstationClustersId, workstationConfigsId | Creates a new workstation. |
delete | DELETE | locationsId, projectsId, workstationClustersId, workstationConfigsId, workstationsId | Deletes the specified workstation. |
patch | UPDATE | locationsId, projectsId, workstationClustersId, workstationConfigsId, workstationsId | Updates an existing workstation. |
generate_access_token | EXEC | locationsId, projectsId, workstationClustersId, workstationConfigsId, workstationsId | Returns a short-lived credential that can be used to send authenticated and authorized traffic to a workstation. |
start | EXEC | locationsId, projectsId, workstationClustersId, workstationConfigsId, workstationsId | Starts running a workstation so that users can connect to it. |
stop | EXEC | locationsId, projectsId, workstationClustersId, workstationConfigsId, workstationsId | Stops running a workstation, reducing costs. |
SELECT
examples
Returns all Workstations using the specified workstation configuration.
SELECT
name,
annotations,
createTime,
deleteTime,
displayName,
env,
etag,
host,
kmsKey,
labels,
reconciling,
startTime,
state,
uid,
updateTime
FROM google.workstations.workstations
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND workstationClustersId = '{{ workstationClustersId }}'
AND workstationConfigsId = '{{ workstationConfigsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new workstations
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.workstations.workstations (
locationsId,
projectsId,
workstationClustersId,
workstationConfigsId,
name,
displayName,
annotations,
labels,
etag,
env
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ workstationClustersId }}',
'{{ workstationConfigsId }}',
'{{ name }}',
'{{ displayName }}',
'{{ annotations }}',
'{{ labels }}',
'{{ etag }}',
'{{ env }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: displayName
value: string
- name: uid
value: string
- name: reconciling
value: boolean
- name: annotations
value: object
- name: labels
value: object
- name: createTime
value: string
- name: updateTime
value: string
- name: startTime
value: string
- name: deleteTime
value: string
- name: etag
value: string
- name: state
value: string
- name: host
value: string
- name: env
value: object
- name: kmsKey
value: string
UPDATE
example
Updates a workstations
resource.
/*+ update */
UPDATE google.workstations.workstations
SET
name = '{{ name }}',
displayName = '{{ displayName }}',
annotations = '{{ annotations }}',
labels = '{{ labels }}',
etag = '{{ etag }}',
env = '{{ env }}'
WHERE
locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND workstationClustersId = '{{ workstationClustersId }}'
AND workstationConfigsId = '{{ workstationConfigsId }}'
AND workstationsId = '{{ workstationsId }}';
DELETE
example
Deletes the specified workstations
resource.
/*+ delete */
DELETE FROM google.workstations.workstations
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND workstationClustersId = '{{ workstationClustersId }}'
AND workstationConfigsId = '{{ workstationConfigsId }}'
AND workstationsId = '{{ workstationsId }}';