1// Copyright 2022 Google LLC 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package google.cloud.workstations.v1beta; 18 19import "google/api/annotations.proto"; 20import "google/api/client.proto"; 21import "google/api/field_behavior.proto"; 22import "google/api/resource.proto"; 23import "google/longrunning/operations.proto"; 24import "google/protobuf/duration.proto"; 25import "google/protobuf/field_mask.proto"; 26import "google/protobuf/timestamp.proto"; 27import "google/rpc/status.proto"; 28 29option go_package = "cloud.google.com/go/workstations/apiv1beta/workstationspb;workstationspb"; 30option java_multiple_files = true; 31option java_outer_classname = "WorkstationsProto"; 32option java_package = "com.google.cloud.workstations.v1beta"; 33 34// Service for interacting with Cloud Workstations. 35service Workstations { 36 option (google.api.default_host) = "workstations.googleapis.com"; 37 option (google.api.oauth_scopes) = 38 "https://www.googleapis.com/auth/cloud-platform"; 39 40 // Returns the requested workstation cluster. 41 rpc GetWorkstationCluster(GetWorkstationClusterRequest) 42 returns (WorkstationCluster) { 43 option (google.api.http) = { 44 get: "/v1beta/{name=projects/*/locations/*/workstationClusters/*}" 45 }; 46 option (google.api.method_signature) = "name"; 47 } 48 49 // Returns all workstation clusters in the specified location. 50 rpc ListWorkstationClusters(ListWorkstationClustersRequest) 51 returns (ListWorkstationClustersResponse) { 52 option (google.api.http) = { 53 get: "/v1beta/{parent=projects/*/locations/*}/workstationClusters" 54 }; 55 option (google.api.method_signature) = "parent"; 56 } 57 58 // Creates a new workstation cluster. 59 rpc CreateWorkstationCluster(CreateWorkstationClusterRequest) 60 returns (google.longrunning.Operation) { 61 option (google.api.http) = { 62 post: "/v1beta/{parent=projects/*/locations/*}/workstationClusters" 63 body: "workstation_cluster" 64 }; 65 option (google.api.method_signature) = 66 "parent,workstation_cluster,workstation_cluster_id"; 67 option (google.longrunning.operation_info) = { 68 response_type: "WorkstationCluster" 69 metadata_type: "OperationMetadata" 70 }; 71 } 72 73 // Updates an existing workstation cluster. 74 rpc UpdateWorkstationCluster(UpdateWorkstationClusterRequest) 75 returns (google.longrunning.Operation) { 76 option (google.api.http) = { 77 patch: "/v1beta/{workstation_cluster.name=projects/*/locations/*/workstationClusters/*}" 78 body: "workstation_cluster" 79 }; 80 option (google.api.method_signature) = "workstation_cluster,update_mask"; 81 option (google.longrunning.operation_info) = { 82 response_type: "WorkstationCluster" 83 metadata_type: "OperationMetadata" 84 }; 85 } 86 87 // Deletes the specified workstation cluster. 88 rpc DeleteWorkstationCluster(DeleteWorkstationClusterRequest) 89 returns (google.longrunning.Operation) { 90 option (google.api.http) = { 91 delete: "/v1beta/{name=projects/*/locations/*/workstationClusters/*}" 92 }; 93 option (google.api.method_signature) = "name"; 94 option (google.longrunning.operation_info) = { 95 response_type: "WorkstationCluster" 96 metadata_type: "OperationMetadata" 97 }; 98 } 99 100 // Returns the requested workstation configuration. 101 rpc GetWorkstationConfig(GetWorkstationConfigRequest) 102 returns (WorkstationConfig) { 103 option (google.api.http) = { 104 get: "/v1beta/{name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*}" 105 }; 106 option (google.api.method_signature) = "name"; 107 } 108 109 // Returns all workstation configurations in the specified cluster. 110 rpc ListWorkstationConfigs(ListWorkstationConfigsRequest) 111 returns (ListWorkstationConfigsResponse) { 112 option (google.api.http) = { 113 get: "/v1beta/{parent=projects/*/locations/*/workstationClusters/*}/workstationConfigs" 114 }; 115 option (google.api.method_signature) = "parent"; 116 } 117 118 // Returns all workstation configurations in the specified cluster on which 119 // the caller has the "workstations.workstation.create" permission. 120 rpc ListUsableWorkstationConfigs(ListUsableWorkstationConfigsRequest) 121 returns (ListUsableWorkstationConfigsResponse) { 122 option (google.api.http) = { 123 get: "/v1beta/{parent=projects/*/locations/*/workstationClusters/*}/workstationConfigs:listUsable" 124 }; 125 option (google.api.method_signature) = "parent"; 126 } 127 128 // Creates a new workstation configuration. 129 rpc CreateWorkstationConfig(CreateWorkstationConfigRequest) 130 returns (google.longrunning.Operation) { 131 option (google.api.http) = { 132 post: "/v1beta/{parent=projects/*/locations/*/workstationClusters/*}/workstationConfigs" 133 body: "workstation_config" 134 }; 135 option (google.api.method_signature) = 136 "parent,workstation_config,workstation_config_id"; 137 option (google.longrunning.operation_info) = { 138 response_type: "WorkstationConfig" 139 metadata_type: "OperationMetadata" 140 }; 141 } 142 143 // Updates an existing workstation configuration. 144 rpc UpdateWorkstationConfig(UpdateWorkstationConfigRequest) 145 returns (google.longrunning.Operation) { 146 option (google.api.http) = { 147 patch: "/v1beta/{workstation_config.name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*}" 148 body: "workstation_config" 149 }; 150 option (google.api.method_signature) = "workstation_config,update_mask"; 151 option (google.longrunning.operation_info) = { 152 response_type: "WorkstationConfig" 153 metadata_type: "OperationMetadata" 154 }; 155 } 156 157 // Deletes the specified workstation configuration. 158 rpc DeleteWorkstationConfig(DeleteWorkstationConfigRequest) 159 returns (google.longrunning.Operation) { 160 option (google.api.http) = { 161 delete: "/v1beta/{name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*}" 162 }; 163 option (google.api.method_signature) = "name"; 164 option (google.longrunning.operation_info) = { 165 response_type: "WorkstationConfig" 166 metadata_type: "OperationMetadata" 167 }; 168 } 169 170 // Returns the requested workstation. 171 rpc GetWorkstation(GetWorkstationRequest) returns (Workstation) { 172 option (google.api.http) = { 173 get: "/v1beta/{name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*/workstations/*}" 174 }; 175 option (google.api.method_signature) = "name"; 176 } 177 178 // Returns all Workstations using the specified workstation configuration. 179 rpc ListWorkstations(ListWorkstationsRequest) 180 returns (ListWorkstationsResponse) { 181 option (google.api.http) = { 182 get: "/v1beta/{parent=projects/*/locations/*/workstationClusters/*/workstationConfigs/*}/workstations" 183 }; 184 option (google.api.method_signature) = "parent"; 185 } 186 187 // Returns all workstations using the specified workstation configuration 188 // on which the caller has the "workstations.workstations.use" permission. 189 rpc ListUsableWorkstations(ListUsableWorkstationsRequest) 190 returns (ListUsableWorkstationsResponse) { 191 option (google.api.http) = { 192 get: "/v1beta/{parent=projects/*/locations/*/workstationClusters/*/workstationConfigs/*}/workstations:listUsable" 193 }; 194 option (google.api.method_signature) = "parent"; 195 } 196 197 // Creates a new workstation. 198 rpc CreateWorkstation(CreateWorkstationRequest) 199 returns (google.longrunning.Operation) { 200 option (google.api.http) = { 201 post: "/v1beta/{parent=projects/*/locations/*/workstationClusters/*/workstationConfigs/*}/workstations" 202 body: "workstation" 203 }; 204 option (google.api.method_signature) = "parent,workstation,workstation_id"; 205 option (google.longrunning.operation_info) = { 206 response_type: "Workstation" 207 metadata_type: "OperationMetadata" 208 }; 209 } 210 211 // Updates an existing workstation. 212 rpc UpdateWorkstation(UpdateWorkstationRequest) 213 returns (google.longrunning.Operation) { 214 option (google.api.http) = { 215 patch: "/v1beta/{workstation.name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*/workstations/*}" 216 body: "workstation" 217 }; 218 option (google.api.method_signature) = "workstation,update_mask"; 219 option (google.longrunning.operation_info) = { 220 response_type: "Workstation" 221 metadata_type: "OperationMetadata" 222 }; 223 } 224 225 // Deletes the specified workstation. 226 rpc DeleteWorkstation(DeleteWorkstationRequest) 227 returns (google.longrunning.Operation) { 228 option (google.api.http) = { 229 delete: "/v1beta/{name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*/workstations/*}" 230 }; 231 option (google.api.method_signature) = "name"; 232 option (google.longrunning.operation_info) = { 233 response_type: "Workstation" 234 metadata_type: "OperationMetadata" 235 }; 236 } 237 238 // Starts running a workstation so that users can connect to it. 239 rpc StartWorkstation(StartWorkstationRequest) 240 returns (google.longrunning.Operation) { 241 option (google.api.http) = { 242 post: "/v1beta/{name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*/workstations/*}:start" 243 body: "*" 244 }; 245 option (google.api.method_signature) = "name"; 246 option (google.longrunning.operation_info) = { 247 response_type: "Workstation" 248 metadata_type: "OperationMetadata" 249 }; 250 } 251 252 // Stops running a workstation, reducing costs. 253 rpc StopWorkstation(StopWorkstationRequest) 254 returns (google.longrunning.Operation) { 255 option (google.api.http) = { 256 post: "/v1beta/{name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*/workstations/*}:stop" 257 body: "*" 258 }; 259 option (google.api.method_signature) = "name"; 260 option (google.longrunning.operation_info) = { 261 response_type: "Workstation" 262 metadata_type: "OperationMetadata" 263 }; 264 } 265 266 // Returns a short-lived credential that can be used to send authenticated and 267 // authorized traffic to a workstation. 268 rpc GenerateAccessToken(GenerateAccessTokenRequest) 269 returns (GenerateAccessTokenResponse) { 270 option (google.api.http) = { 271 post: "/v1beta/{workstation=projects/*/locations/*/workstationClusters/*/workstationConfigs/*/workstations/*}:generateAccessToken" 272 body: "*" 273 }; 274 option (google.api.method_signature) = "workstation"; 275 } 276} 277 278// A workstation cluster resource in the Cloud Workstations API. 279// 280// Defines a group of workstations in a particular region and the 281// VPC network they're attached to. 282message WorkstationCluster { 283 option (google.api.resource) = { 284 type: "workstations.googleapis.com/WorkstationCluster" 285 pattern: "projects/{project}/locations/{location}/workstationClusters/{workstation_cluster}" 286 plural: "workstationClusters" 287 singular: "workstationCluster" 288 style: DECLARATIVE_FRIENDLY 289 }; 290 291 // Configuration options for private workstation clusters. 292 message PrivateClusterConfig { 293 // Immutable. Whether Workstations endpoint is private. 294 bool enable_private_endpoint = 1 [(google.api.field_behavior) = IMMUTABLE]; 295 296 // Output only. Hostname for the workstation cluster. This field will be 297 // populated only when private endpoint is enabled. To access workstations 298 // in the workstation cluster, create a new DNS zone mapping this domain 299 // name to an internal IP address and a forwarding rule mapping that address 300 // to the service attachment. 301 string cluster_hostname = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 302 303 // Output only. Service attachment URI for the workstation cluster. The 304 // service attachemnt is created when private endpoint is enabled. To access 305 // workstations in the workstation cluster, configure access to the managed 306 // service using [Private Service 307 // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-services). 308 string service_attachment_uri = 3 309 [(google.api.field_behavior) = OUTPUT_ONLY]; 310 311 // Optional. Additional projects that are allowed to attach to the 312 // workstation cluster's service attachment. By default, the workstation 313 // cluster's project and the VPC host project (if different) are allowed. 314 repeated string allowed_projects = 4 315 [(google.api.field_behavior) = OPTIONAL]; 316 } 317 318 // Full name of this workstation cluster. 319 string name = 1; 320 321 // Optional. Human-readable name for this workstation cluster. 322 string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; 323 324 // Output only. A system-assigned unique identifier for this workstation 325 // cluster. 326 string uid = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; 327 328 // Output only. Indicates whether this workstation cluster is currently being 329 // updated to match its intended state. 330 bool reconciling = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; 331 332 // Optional. Client-specified annotations. 333 map<string, string> annotations = 5 [(google.api.field_behavior) = OPTIONAL]; 334 335 // Optional. 336 // [Labels](https://cloud.google.com/workstations/docs/label-resources) that 337 // are applied to the workstation cluster and that are also propagated to the 338 // underlying Compute Engine resources. 339 map<string, string> labels = 15 [(google.api.field_behavior) = OPTIONAL]; 340 341 // Output only. Time when this workstation cluster was created. 342 google.protobuf.Timestamp create_time = 6 343 [(google.api.field_behavior) = OUTPUT_ONLY]; 344 345 // Output only. Time when this workstation cluster was most recently updated. 346 google.protobuf.Timestamp update_time = 7 347 [(google.api.field_behavior) = OUTPUT_ONLY]; 348 349 // Output only. Time when this workstation cluster was soft-deleted. 350 google.protobuf.Timestamp delete_time = 8 351 [(google.api.field_behavior) = OUTPUT_ONLY]; 352 353 // Optional. Checksum computed by the server. May be sent on update and delete 354 // requests to make sure that the client has an up-to-date value before 355 // proceeding. 356 string etag = 9 [(google.api.field_behavior) = OPTIONAL]; 357 358 // Immutable. Name of the Compute Engine network in which instances associated 359 // with this workstation cluster will be created. 360 string network = 10 [(google.api.field_behavior) = IMMUTABLE]; 361 362 // Immutable. Name of the Compute Engine subnetwork in which instances 363 // associated with this workstation cluster will be created. Must be part of 364 // the subnetwork specified for this workstation cluster. 365 string subnetwork = 11 [(google.api.field_behavior) = IMMUTABLE]; 366 367 // Output only. The private IP address of the control plane for this 368 // workstation cluster. Workstation VMs need access to this IP address to work 369 // with the service, so make sure that your firewall rules allow egress from 370 // the workstation VMs to this address. 371 string control_plane_ip = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; 372 373 // Optional. Configuration for private workstation cluster. 374 PrivateClusterConfig private_cluster_config = 12 375 [(google.api.field_behavior) = OPTIONAL]; 376 377 // Output only. Whether this workstation cluster is in degraded mode, in which 378 // case it may require user action to restore full functionality. Details can 379 // be found in 380 // [conditions][google.cloud.workstations.v1beta.WorkstationCluster.conditions]. 381 bool degraded = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; 382 383 // Output only. Status conditions describing the workstation cluster's current 384 // state. 385 repeated google.rpc.Status conditions = 14 386 [(google.api.field_behavior) = OUTPUT_ONLY]; 387} 388 389// A workstation configuration resource in the Cloud Workstations API. 390// 391// Workstation configurations act as templates for workstations. The workstation 392// configuration defines details such as the workstation virtual machine (VM) 393// instance type, persistent storage, container image defining environment, 394// which IDE or Code Editor to use, and more. Administrators and platform teams 395// can also use [Identity and Access Management 396// (IAM)](https://cloud.google.com/iam/docs/overview) rules to grant access to 397// teams or to individual developers. 398message WorkstationConfig { 399 option (google.api.resource) = { 400 type: "workstations.googleapis.com/WorkstationConfig" 401 pattern: "projects/{project}/locations/{location}/workstationClusters/{workstation_cluster}/workstationConfigs/{workstation_config}" 402 plural: "workstationConfigs" 403 singular: "workstationConfig" 404 style: DECLARATIVE_FRIENDLY 405 }; 406 407 // Runtime host for a workstation. 408 message Host { 409 // A runtime using a Compute Engine instance. 410 message GceInstance { 411 // A set of Compute Engine Shielded instance options. 412 message GceShieldedInstanceConfig { 413 // Optional. Whether the instance has Secure Boot enabled. 414 bool enable_secure_boot = 1 [(google.api.field_behavior) = OPTIONAL]; 415 416 // Optional. Whether the instance has the vTPM enabled. 417 bool enable_vtpm = 2 [(google.api.field_behavior) = OPTIONAL]; 418 419 // Optional. Whether the instance has integrity monitoring enabled. 420 bool enable_integrity_monitoring = 3 421 [(google.api.field_behavior) = OPTIONAL]; 422 } 423 424 // A set of Compute Engine Confidential VM instance options. 425 message GceConfidentialInstanceConfig { 426 // Optional. Whether the instance has confidential compute enabled. 427 bool enable_confidential_compute = 1 428 [(google.api.field_behavior) = OPTIONAL]; 429 } 430 431 // An accelerator card attached to the instance. 432 message Accelerator { 433 // Optional. Type of accelerator resource to attach to the instance, for 434 // example, 435 // `"nvidia-tesla-p100"`. 436 string type = 1 [(google.api.field_behavior) = OPTIONAL]; 437 438 // Optional. Number of accelerator cards exposed to the instance. 439 int32 count = 2 [(google.api.field_behavior) = OPTIONAL]; 440 } 441 442 // Optional. The type of machine to use for VM instances—for example, 443 // `"e2-standard-4"`. For more information about machine types that 444 // Cloud Workstations supports, see the list of 445 // [available machine 446 // types](https://cloud.google.com/workstations/docs/available-machine-types). 447 string machine_type = 1 [(google.api.field_behavior) = OPTIONAL]; 448 449 // Optional. The email address of the service account for Cloud 450 // Workstations VMs created with this configuration. When specified, be 451 // sure that the service account has `logginglogEntries.create` permission 452 // on the project so it can write logs out to Cloud Logging. If using a 453 // custom container image, the service account must have permissions to 454 // pull the specified image. 455 // 456 // If you as the administrator want to be able to `ssh` into the 457 // underlying VM, you need to set this value to a service account 458 // for which you have the `iam.serviceAccounts.actAs` permission. 459 // Conversely, if you don't want anyone to be able to `ssh` into the 460 // underlying VM, use a service account where no one has that 461 // permission. 462 // 463 // If not set, VMs run with a service account provided by the 464 // Cloud Workstations service, and the image must be publicly 465 // accessible. 466 string service_account = 2 [(google.api.field_behavior) = OPTIONAL]; 467 468 // Optional. Scopes to grant to the 469 // [service_account][google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.service_account]. 470 // Various scopes are automatically added based on feature usage. When 471 // specified, users of workstations under this configuration must have 472 // `iam.serviceAccounts.actAs` on the service account. 473 repeated string service_account_scopes = 3 474 [(google.api.field_behavior) = OPTIONAL]; 475 476 // Optional. Network tags to add to the Compute Engine VMs backing the 477 // workstations. This option applies 478 // [network 479 // tags](https://cloud.google.com/vpc/docs/add-remove-network-tags) to VMs 480 // created with this configuration. These network tags enable the creation 481 // of [firewall 482 // rules](https://cloud.google.com/workstations/docs/configure-firewall-rules). 483 repeated string tags = 4 [(google.api.field_behavior) = OPTIONAL]; 484 485 // Optional. The number of VMs that the system should keep idle so that 486 // new workstations can be started quickly for new users. Defaults to `0` 487 // in the API. 488 int32 pool_size = 5 [(google.api.field_behavior) = OPTIONAL]; 489 490 // Output only. Number of instances currently available in the pool for 491 // faster workstation startup. 492 int32 pooled_instances = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; 493 494 // Optional. When set to true, disables public IP addresses for VMs. If 495 // you disable public IP addresses, you must set up Private Google Access 496 // or Cloud NAT on your network. If you use Private Google Access and you 497 // use `private.googleapis.com` or `restricted.googleapis.com` for 498 // Container Registry and Artifact Registry, make sure that you set 499 // up DNS records for domains `*.gcr.io` and `*.pkg.dev`. 500 // Defaults to false (VMs have public IP addresses). 501 bool disable_public_ip_addresses = 6 502 [(google.api.field_behavior) = OPTIONAL]; 503 504 // Optional. Whether to enable nested virtualization on Cloud Workstations 505 // VMs created under this workstation configuration. 506 // 507 // Nested virtualization lets you run virtual machine (VM) instances 508 // inside your workstation. Before enabling nested virtualization, 509 // consider the following important considerations. Cloud Workstations 510 // instances are subject to the [same restrictions as Compute Engine 511 // instances](https://cloud.google.com/compute/docs/instances/nested-virtualization/overview#restrictions): 512 // 513 // * **Organization policy**: projects, folders, or 514 // organizations may be restricted from creating nested VMs if the 515 // **Disable VM nested virtualization** constraint is enforced in 516 // the organization policy. For more information, see the 517 // Compute Engine section, 518 // [Checking whether nested virtualization is 519 // allowed](https://cloud.google.com/compute/docs/instances/nested-virtualization/managing-constraint#checking_whether_nested_virtualization_is_allowed). 520 // * **Performance**: nested VMs might experience a 10% or greater 521 // decrease in performance for workloads that are CPU-bound and 522 // possibly greater than a 10% decrease for workloads that are 523 // input/output bound. 524 // * **Machine Type**: nested virtualization can only be enabled on 525 // workstation configurations that specify a 526 // [machine_type][google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.machine_type] 527 // in the N1 or N2 machine series. 528 // * **GPUs**: nested virtualization may not be enabled on workstation 529 // configurations with accelerators. 530 // * **Operating System**: Because 531 // [Container-Optimized 532 // OS](https://cloud.google.com/compute/docs/images/os-details#container-optimized_os_cos) 533 // does not support nested virtualization, when nested virtualization is 534 // enabled, the underlying Compute Engine VM instances boot from an 535 // [Ubuntu 536 // LTS](https://cloud.google.com/compute/docs/images/os-details#ubuntu_lts) 537 // image. 538 bool enable_nested_virtualization = 7 539 [(google.api.field_behavior) = OPTIONAL]; 540 541 // Optional. A set of Compute Engine Shielded instance options. 542 GceShieldedInstanceConfig shielded_instance_config = 8 543 [(google.api.field_behavior) = OPTIONAL]; 544 545 // Optional. A set of Compute Engine Confidential VM instance options. 546 GceConfidentialInstanceConfig confidential_instance_config = 10 547 [(google.api.field_behavior) = OPTIONAL]; 548 549 // Optional. The size of the boot disk for the VM in gigabytes (GB). 550 // The minimum boot disk size is `30` GB. Defaults to `50` GB. 551 int32 boot_disk_size_gb = 9 [(google.api.field_behavior) = OPTIONAL]; 552 553 // Optional. A list of the type and count of accelerator cards attached to 554 // the instance. 555 repeated Accelerator accelerators = 11 556 [(google.api.field_behavior) = OPTIONAL]; 557 } 558 559 // Type of host that will be used for the workstation's runtime. 560 oneof config { 561 // Specifies a Compute Engine instance as the host. 562 GceInstance gce_instance = 1; 563 } 564 } 565 566 // A directory to persist across workstation sessions. 567 message PersistentDirectory { 568 // A PersistentDirectory backed by a Compute Engine regional persistent 569 // disk. The 570 // [persistent_directories][google.cloud.workstations.v1beta.WorkstationConfig.persistent_directories] 571 // field is repeated, but it may contain only one entry. It creates a 572 // [persistent 573 // disk](https://cloud.google.com/compute/docs/disks/persistent-disks) that 574 // mounts to the workstation VM at `/home` when the session starts and 575 // detaches when the session ends. If this field is empty, workstations 576 // created with this configuration do not have a persistent home 577 // directory. 578 message GceRegionalPersistentDisk { 579 // Value representing what should happen to the disk after the workstation 580 // is deleted. 581 enum ReclaimPolicy { 582 // Do not use. 583 RECLAIM_POLICY_UNSPECIFIED = 0; 584 585 // Delete the persistent disk when deleting the workstation. 586 DELETE = 1; 587 588 // Keep the persistent disk when deleting the workstation. 589 // An administrator must manually delete the disk. 590 RETAIN = 2; 591 } 592 593 // Optional. The GB capacity of a persistent home directory for each 594 // workstation created with this configuration. Must be empty if 595 // [source_snapshot][google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.source_snapshot] 596 // is set. 597 // 598 // Valid values are `10`, `50`, `100`, `200`, `500`, or `1000`. 599 // Defaults to `200`. If less than `200` GB, the 600 // [disk_type][google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.disk_type] 601 // must be 602 // `"pd-balanced"` or `"pd-ssd"`. 603 int32 size_gb = 1 [(google.api.field_behavior) = OPTIONAL]; 604 605 // Optional. Type of file system that the disk should be formatted with. 606 // The workstation image must support this file system type. Must be empty 607 // if 608 // [source_snapshot][google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.source_snapshot] 609 // is set. Defaults to `"ext4"`. 610 string fs_type = 2 [(google.api.field_behavior) = OPTIONAL]; 611 612 // Optional. The [type of the persistent 613 // disk](https://cloud.google.com/compute/docs/disks#disk-types) for the 614 // home directory. Defaults to `"pd-standard"`. 615 string disk_type = 3 [(google.api.field_behavior) = OPTIONAL]; 616 617 // Optional. Name of the snapshot to use as the source for the disk. If 618 // set, 619 // [size_gb][google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.size_gb] 620 // and 621 // [fs_type][google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.fs_type] 622 // must be empty. 623 string source_snapshot = 5 [(google.api.field_behavior) = OPTIONAL]; 624 625 // Optional. Whether the persistent disk should be deleted when the 626 // workstation is deleted. Valid values are `DELETE` and `RETAIN`. 627 // Defaults to `DELETE`. 628 ReclaimPolicy reclaim_policy = 4 [(google.api.field_behavior) = OPTIONAL]; 629 } 630 631 // How a persistent directory should be implemented. 632 oneof directory_type { 633 // A PersistentDirectory backed by a Compute Engine persistent disk. 634 GceRegionalPersistentDisk gce_pd = 2; 635 } 636 637 // Optional. Location of this directory in the running workstation. 638 string mount_path = 1 [(google.api.field_behavior) = OPTIONAL]; 639 } 640 641 // An ephemeral directory which won't persist across workstation sessions. It 642 // is freshly created on every workstation start operation. 643 message EphemeralDirectory { 644 // An EphemeralDirectory is backed by a Compute Engine persistent disk. 645 message GcePersistentDisk { 646 // Optional. Type of the disk to use. Defaults to `"pd-standard"`. 647 string disk_type = 1 [(google.api.field_behavior) = OPTIONAL]; 648 649 // Optional. Name of the snapshot to use as the source for the disk. Must 650 // be empty if 651 // [source_image][google.cloud.workstations.v1beta.WorkstationConfig.EphemeralDirectory.GcePersistentDisk.source_image] 652 // is set. Updating 653 // [source_snapshot][google.cloud.workstations.v1beta.WorkstationConfig.EphemeralDirectory.GcePersistentDisk.source_snapshot] 654 // will update content in the ephemeral directory after the workstation is 655 // restarted. This field is mutable. 656 string source_snapshot = 2 [(google.api.field_behavior) = OPTIONAL]; 657 658 // Optional. Name of the disk image to use as the source for the disk. 659 // Must be empty if 660 // [source_snapshot][google.cloud.workstations.v1beta.WorkstationConfig.EphemeralDirectory.GcePersistentDisk.source_snapshot] 661 // is set. Updating 662 // [source_image][google.cloud.workstations.v1beta.WorkstationConfig.EphemeralDirectory.GcePersistentDisk.source_image] 663 // will update content in the ephemeral directory after the workstation is 664 // restarted. This field is mutable. 665 string source_image = 3 [(google.api.field_behavior) = OPTIONAL]; 666 667 // Optional. Whether the disk is read only. If true, the disk may be 668 // shared by multiple VMs and 669 // [source_snapshot][google.cloud.workstations.v1beta.WorkstationConfig.EphemeralDirectory.GcePersistentDisk.source_snapshot] 670 // must be set. 671 bool read_only = 4 [(google.api.field_behavior) = OPTIONAL]; 672 } 673 674 // How an ephemeral directory should be implemented. 675 oneof directory_type { 676 // An EphemeralDirectory backed by a Compute Engine persistent disk. 677 GcePersistentDisk gce_pd = 3; 678 } 679 680 // Required. Location of this directory in the running workstation. 681 string mount_path = 1 [(google.api.field_behavior) = REQUIRED]; 682 } 683 684 // A Docker container. 685 message Container { 686 // Optional. A Docker container image that defines a custom environment. 687 // 688 // Cloud Workstations provides a number of 689 // [preconfigured 690 // images](https://cloud.google.com/workstations/docs/preconfigured-base-images), 691 // but you can create your own 692 // [custom container 693 // images](https://cloud.google.com/workstations/docs/custom-container-images). 694 // If using a private image, the `host.gceInstance.serviceAccount` field 695 // must be specified in the workstation configuration and must have 696 // permission to pull the specified image. Otherwise, the image must be 697 // publicly accessible. 698 string image = 1 [(google.api.field_behavior) = OPTIONAL]; 699 700 // Optional. If set, overrides the default ENTRYPOINT specified by the 701 // image. 702 repeated string command = 2 [(google.api.field_behavior) = OPTIONAL]; 703 704 // Optional. Arguments passed to the entrypoint. 705 repeated string args = 3 [(google.api.field_behavior) = OPTIONAL]; 706 707 // Optional. Environment variables passed to the container's entrypoint. 708 map<string, string> env = 4 [(google.api.field_behavior) = OPTIONAL]; 709 710 // Optional. If set, overrides the default DIR specified by the image. 711 string working_dir = 5 [(google.api.field_behavior) = OPTIONAL]; 712 713 // Optional. If set, overrides the USER specified in the image with the 714 // given uid. 715 int32 run_as_user = 6 [(google.api.field_behavior) = OPTIONAL]; 716 } 717 718 // A customer-managed encryption key (CMEK) for the Compute Engine 719 // resources of the associated workstation configuration. Specify the name of 720 // your Cloud KMS encryption key and the default service account. 721 // We recommend that you use a separate service account and follow 722 // [Cloud KMS best 723 // practices](https://cloud.google.com/kms/docs/separation-of-duties). 724 message CustomerEncryptionKey { 725 // Immutable. The name of the Google Cloud KMS encryption key. For example, 726 // `"projects/PROJECT_ID/locations/REGION/keyRings/KEY_RING/cryptoKeys/KEY_NAME"`. 727 // The key must be in the same region as the workstation configuration. 728 string kms_key = 1 [(google.api.field_behavior) = IMMUTABLE]; 729 730 // Immutable. The service account to use with the specified 731 // KMS key. We recommend that you use a separate service account 732 // and follow KMS best practices. For more information, see 733 // [Separation of 734 // duties](https://cloud.google.com/kms/docs/separation-of-duties) and 735 // `gcloud kms keys add-iam-policy-binding` 736 // [`--member`](https://cloud.google.com/sdk/gcloud/reference/kms/keys/add-iam-policy-binding#--member). 737 string kms_key_service_account = 2 738 [(google.api.field_behavior) = IMMUTABLE]; 739 } 740 741 // A readiness check to be performed on a workstation. 742 message ReadinessCheck { 743 // Optional. Path to which the request should be sent. 744 string path = 1 [(google.api.field_behavior) = OPTIONAL]; 745 746 // Optional. Port to which the request should be sent. 747 int32 port = 2 [(google.api.field_behavior) = OPTIONAL]; 748 } 749 750 // Full name of this workstation configuration. 751 string name = 1; 752 753 // Optional. Human-readable name for this workstation configuration. 754 string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; 755 756 // Output only. A system-assigned unique identifier for this workstation 757 // configuration. 758 string uid = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; 759 760 // Output only. Indicates whether this workstation configuration is currently 761 // being updated to match its intended state. 762 bool reconciling = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; 763 764 // Optional. Client-specified annotations. 765 map<string, string> annotations = 5 [(google.api.field_behavior) = OPTIONAL]; 766 767 // Optional. 768 // [Labels](https://cloud.google.com/workstations/docs/label-resources) that 769 // are applied to the workstation configuration and that are also propagated 770 // to the underlying Compute Engine resources. 771 map<string, string> labels = 18 [(google.api.field_behavior) = OPTIONAL]; 772 773 // Output only. Time when this workstation configuration was created. 774 google.protobuf.Timestamp create_time = 6 775 [(google.api.field_behavior) = OUTPUT_ONLY]; 776 777 // Output only. Time when this workstation configuration was most recently 778 // updated. 779 google.protobuf.Timestamp update_time = 7 780 [(google.api.field_behavior) = OUTPUT_ONLY]; 781 782 // Output only. Time when this workstation configuration was soft-deleted. 783 google.protobuf.Timestamp delete_time = 8 784 [(google.api.field_behavior) = OUTPUT_ONLY]; 785 786 // Optional. Checksum computed by the server. May be sent on update and delete 787 // requests to make sure that the client has an up-to-date value before 788 // proceeding. 789 string etag = 9 [(google.api.field_behavior) = OPTIONAL]; 790 791 // Optional. Number of seconds to wait before automatically stopping a 792 // workstation after it last received user traffic. 793 // 794 // A value of `"0s"` indicates that Cloud Workstations VMs created with this 795 // configuration should never time out due to idleness. 796 // Provide 797 // [duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#duration) 798 // terminated by `s` for seconds—for example, `"7200s"` (2 hours). 799 // The default is `"1200s"` (20 minutes). 800 google.protobuf.Duration idle_timeout = 10 801 [(google.api.field_behavior) = OPTIONAL]; 802 803 // Optional. Number of seconds that a workstation can run until it is 804 // automatically shut down. We recommend that workstations be shut down daily 805 // to reduce costs and so that security updates can be applied upon restart. 806 // The 807 // [idle_timeout][google.cloud.workstations.v1beta.WorkstationConfig.idle_timeout] 808 // and 809 // [running_timeout][google.cloud.workstations.v1beta.WorkstationConfig.running_timeout] 810 // fields are independent of each other. Note that the 811 // [running_timeout][google.cloud.workstations.v1beta.WorkstationConfig.running_timeout] 812 // field shuts down VMs after the specified time, regardless of whether or not 813 // the VMs are idle. 814 // 815 // Provide duration terminated by `s` for seconds—for example, `"54000s"` 816 // (15 hours). Defaults to `"43200s"` (12 hours). A value of `"0s"` indicates 817 // that workstations using this configuration should never time out. If 818 // [encryption_key][google.cloud.workstations.v1beta.WorkstationConfig.encryption_key] 819 // is set, it must be greater than `"0s"` and less than 820 // `"86400s"` (24 hours). 821 // 822 // Warning: A value of `"0s"` indicates that Cloud Workstations VMs created 823 // with this configuration have no maximum running time. This is strongly 824 // discouraged because you incur costs and will not pick up security updates. 825 google.protobuf.Duration running_timeout = 11 826 [(google.api.field_behavior) = OPTIONAL]; 827 828 // Optional. Runtime host for the workstation. 829 Host host = 12 [(google.api.field_behavior) = OPTIONAL]; 830 831 // Optional. Directories to persist across workstation sessions. 832 repeated PersistentDirectory persistent_directories = 13 833 [(google.api.field_behavior) = OPTIONAL]; 834 835 // Optional. Ephemeral directories which won't persist across workstation 836 // sessions. 837 repeated EphemeralDirectory ephemeral_directories = 22 838 [(google.api.field_behavior) = OPTIONAL]; 839 840 // Optional. Container that runs upon startup for each workstation using this 841 // workstation configuration. 842 Container container = 14 [(google.api.field_behavior) = OPTIONAL]; 843 844 // Immutable. Encrypts resources of this workstation configuration using a 845 // customer-managed encryption key (CMEK). 846 // 847 // If specified, the boot disk of the Compute Engine instance and the 848 // persistent disk are encrypted using this encryption key. If 849 // this field is not set, the disks are encrypted using a generated 850 // key. Customer-managed encryption keys do not protect disk metadata. 851 // 852 // If the customer-managed encryption key is rotated, when the workstation 853 // instance is stopped, the system attempts to recreate the 854 // persistent disk with the new version of the key. Be sure to keep 855 // older versions of the key until the persistent disk is recreated. 856 // Otherwise, data on the persistent disk might be lost. 857 // 858 // If the encryption key is revoked, the workstation session automatically 859 // stops within 7 hours. 860 // 861 // Immutable after the workstation configuration is created. 862 CustomerEncryptionKey encryption_key = 17 863 [(google.api.field_behavior) = IMMUTABLE]; 864 865 // Optional. Readiness checks to perform when starting a workstation using 866 // this workstation configuration. Mark a workstation as running only after 867 // all specified readiness checks return 200 status codes. 868 repeated ReadinessCheck readiness_checks = 19 869 [(google.api.field_behavior) = OPTIONAL]; 870 871 // Optional. Immutable. Specifies the zones used to replicate the VM and disk 872 // resources within the region. If set, exactly two zones within the 873 // workstation cluster's region must be specified—for example, 874 // `['us-central1-a', 'us-central1-f']`. If this field is empty, two default 875 // zones within the region are used. 876 // 877 // Immutable after the workstation configuration is created. 878 repeated string replica_zones = 23 [ 879 (google.api.field_behavior) = OPTIONAL, 880 (google.api.field_behavior) = IMMUTABLE 881 ]; 882 883 // Output only. Whether this resource is degraded, in which case it may 884 // require user action to restore full functionality. See also the 885 // [conditions][google.cloud.workstations.v1beta.WorkstationConfig.conditions] 886 // field. 887 bool degraded = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; 888 889 // Output only. Status conditions describing the current resource state. 890 repeated google.rpc.Status conditions = 16 891 [(google.api.field_behavior) = OUTPUT_ONLY]; 892 893 // Optional. Whether to enable Linux `auditd` logging on the workstation. When 894 // enabled, a service account must also be specified that has 895 // `logging.buckets.write` permission on the project. Operating system audit 896 // logging is distinct from [Cloud Audit 897 // Logs](https://cloud.google.com/workstations/docs/audit-logging). 898 bool enable_audit_agent = 20 [(google.api.field_behavior) = OPTIONAL]; 899} 900 901// A single instance of a developer workstation with its own persistent storage. 902message Workstation { 903 option (google.api.resource) = { 904 type: "workstations.googleapis.com/Workstation" 905 pattern: "projects/{project}/locations/{location}/workstationClusters/{workstation_cluster}/workstationConfigs/{workstation_config}/workstations/{workstation}" 906 plural: "workstations" 907 singular: "workstation" 908 style: DECLARATIVE_FRIENDLY 909 }; 910 911 // Whether a workstation is running and ready to receive user requests. 912 enum State { 913 // Do not use. 914 STATE_UNSPECIFIED = 0; 915 916 // The workstation is not yet ready to accept requests from users but will 917 // be soon. 918 STATE_STARTING = 1; 919 920 // The workstation is ready to accept requests from users. 921 STATE_RUNNING = 2; 922 923 // The workstation is being stopped. 924 STATE_STOPPING = 3; 925 926 // The workstation is stopped and will not be able to receive requests until 927 // it is started. 928 STATE_STOPPED = 4; 929 } 930 931 // Full name of this workstation. 932 string name = 1; 933 934 // Optional. Human-readable name for this workstation. 935 string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; 936 937 // Output only. A system-assigned unique identifier for this workstation. 938 string uid = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; 939 940 // Output only. Indicates whether this workstation is currently being updated 941 // to match its intended state. 942 bool reconciling = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; 943 944 // Optional. Client-specified annotations. 945 map<string, string> annotations = 5 [(google.api.field_behavior) = OPTIONAL]; 946 947 // Optional. 948 // [Labels](https://cloud.google.com/workstations/docs/label-resources) that 949 // are applied to the workstation and that are also propagated to the 950 // underlying Compute Engine resources. 951 map<string, string> labels = 13 [(google.api.field_behavior) = OPTIONAL]; 952 953 // Output only. Time when this workstation was created. 954 google.protobuf.Timestamp create_time = 6 955 [(google.api.field_behavior) = OUTPUT_ONLY]; 956 957 // Output only. Time when this workstation was most recently updated. 958 google.protobuf.Timestamp update_time = 7 959 [(google.api.field_behavior) = OUTPUT_ONLY]; 960 961 // Output only. Time when this workstation was most recently successfully 962 // started, regardless of the workstation's initial state. 963 google.protobuf.Timestamp start_time = 14 964 [(google.api.field_behavior) = OUTPUT_ONLY]; 965 966 // Output only. Time when this workstation was soft-deleted. 967 google.protobuf.Timestamp delete_time = 8 968 [(google.api.field_behavior) = OUTPUT_ONLY]; 969 970 // Optional. Checksum computed by the server. May be sent on update and delete 971 // requests to make sure that the client has an up-to-date value before 972 // proceeding. 973 string etag = 9 [(google.api.field_behavior) = OPTIONAL]; 974 975 // Output only. Current state of the workstation. 976 State state = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; 977 978 // Output only. Host to which clients can send HTTPS traffic that will be 979 // received by the workstation. Authorized traffic will be received to the 980 // workstation as HTTP on port 80. To send traffic to a different port, 981 // clients may prefix the host with the destination port in the format 982 // `{port}-{host}`. 983 string host = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; 984 985 // Optional. Environment variables passed to the workstation container's 986 // entrypoint. 987 map<string, string> env = 12 [(google.api.field_behavior) = OPTIONAL]; 988} 989 990// Request message for GetWorkstationCluster. 991message GetWorkstationClusterRequest { 992 // Required. Name of the requested resource. 993 string name = 1 [ 994 (google.api.field_behavior) = REQUIRED, 995 (google.api.resource_reference) = { 996 type: "workstations.googleapis.com/WorkstationCluster" 997 } 998 ]; 999} 1000 1001// Request message for ListWorkstationClusters. 1002message ListWorkstationClustersRequest { 1003 // Required. Parent resource name. 1004 string parent = 1 [ 1005 (google.api.field_behavior) = REQUIRED, 1006 (google.api.resource_reference) = { 1007 child_type: "workstations.googleapis.com/WorkstationCluster" 1008 } 1009 ]; 1010 1011 // Optional. Maximum number of items to return. 1012 int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; 1013 1014 // Optional. next_page_token value returned from a previous List request, if 1015 // any. 1016 string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; 1017} 1018 1019// Response message for ListWorkstationClusters. 1020message ListWorkstationClustersResponse { 1021 // The requested workstation clusters. 1022 repeated WorkstationCluster workstation_clusters = 1; 1023 1024 // Token to retrieve the next page of results, or empty if there are no more 1025 // results in the list. 1026 string next_page_token = 2; 1027 1028 // Unreachable resources. 1029 repeated string unreachable = 3; 1030} 1031 1032// Message for creating a CreateWorkstationCluster. 1033message CreateWorkstationClusterRequest { 1034 // Required. Parent resource name. 1035 string parent = 1 [ 1036 (google.api.field_behavior) = REQUIRED, 1037 (google.api.resource_reference) = { 1038 child_type: "workstations.googleapis.com/WorkstationCluster" 1039 } 1040 ]; 1041 1042 // Required. ID to use for the workstation cluster. 1043 string workstation_cluster_id = 2 [(google.api.field_behavior) = REQUIRED]; 1044 1045 // Required. Workstation cluster to create. 1046 WorkstationCluster workstation_cluster = 3 1047 [(google.api.field_behavior) = REQUIRED]; 1048 1049 // Optional. If set, validate the request and preview the review, but do not 1050 // actually apply it. 1051 bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; 1052} 1053 1054// Request message for UpdateWorkstationCluster. 1055message UpdateWorkstationClusterRequest { 1056 // Required. Workstation cluster to update. 1057 WorkstationCluster workstation_cluster = 1 1058 [(google.api.field_behavior) = REQUIRED]; 1059 1060 // Required. Mask that specifies which fields in the workstation cluster 1061 // should be updated. 1062 google.protobuf.FieldMask update_mask = 2 1063 [(google.api.field_behavior) = REQUIRED]; 1064 1065 // Optional. If set, validate the request and preview the review, but do not 1066 // actually apply it. 1067 bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; 1068 1069 // Optional. If set, and the workstation cluster is not found, a new 1070 // workstation cluster will be created. In this situation, update_mask is 1071 // ignored. 1072 bool allow_missing = 4 [(google.api.field_behavior) = OPTIONAL]; 1073} 1074 1075// Message for deleting a workstation cluster. 1076message DeleteWorkstationClusterRequest { 1077 // Required. Name of the workstation cluster to delete. 1078 string name = 1 [ 1079 (google.api.field_behavior) = REQUIRED, 1080 (google.api.resource_reference) = { 1081 type: "workstations.googleapis.com/WorkstationCluster" 1082 } 1083 ]; 1084 1085 // Optional. If set, validate the request and preview the review, but do not 1086 // apply it. 1087 bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL]; 1088 1089 // Optional. If set, the request will be rejected if the latest version of the 1090 // workstation cluster on the server does not have this ETag. 1091 string etag = 3 [(google.api.field_behavior) = OPTIONAL]; 1092 1093 // Optional. If set, any workstation configurations and workstations in the 1094 // workstation cluster are also deleted. Otherwise, the request only 1095 // works if the workstation cluster has no configurations or workstations. 1096 bool force = 4 [(google.api.field_behavior) = OPTIONAL]; 1097} 1098 1099// Request message for GetWorkstationConfig. 1100message GetWorkstationConfigRequest { 1101 // Required. Name of the requested resource. 1102 string name = 1 [ 1103 (google.api.field_behavior) = REQUIRED, 1104 (google.api.resource_reference) = { 1105 type: "workstations.googleapis.com/WorkstationConfig" 1106 } 1107 ]; 1108} 1109 1110// Request message for ListWorkstationConfigs. 1111message ListWorkstationConfigsRequest { 1112 // Required. Parent resource name. 1113 string parent = 1 [ 1114 (google.api.field_behavior) = REQUIRED, 1115 (google.api.resource_reference) = { 1116 type: "workstations.googleapis.com/WorkstationCluster" 1117 } 1118 ]; 1119 1120 // Optional. Maximum number of items to return. 1121 int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; 1122 1123 // Optional. next_page_token value returned from a previous List request, if 1124 // any. 1125 string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; 1126} 1127 1128// Response message for ListWorkstationConfigs. 1129message ListWorkstationConfigsResponse { 1130 // The requested configs. 1131 repeated WorkstationConfig workstation_configs = 1; 1132 1133 // Token to retrieve the next page of results, or empty if there are no more 1134 // results in the list. 1135 string next_page_token = 2; 1136 1137 // Unreachable resources. 1138 repeated string unreachable = 3; 1139} 1140 1141// Request message for ListUsableWorkstationConfigs. 1142message ListUsableWorkstationConfigsRequest { 1143 // Required. Parent resource name. 1144 string parent = 1 [ 1145 (google.api.field_behavior) = REQUIRED, 1146 (google.api.resource_reference) = { 1147 type: "workstations.googleapis.com/WorkstationCluster" 1148 } 1149 ]; 1150 1151 // Optional. Maximum number of items to return. 1152 int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; 1153 1154 // Optional. next_page_token value returned from a previous List request, if 1155 // any. 1156 string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; 1157} 1158 1159// Response message for ListUsableWorkstationConfigs. 1160message ListUsableWorkstationConfigsResponse { 1161 // The requested configs. 1162 repeated WorkstationConfig workstation_configs = 1; 1163 1164 // Token to retrieve the next page of results, or empty if there are no more 1165 // results in the list. 1166 string next_page_token = 2; 1167 1168 // Unreachable resources. 1169 repeated string unreachable = 3; 1170} 1171 1172// Message for creating a CreateWorkstationConfig. 1173message CreateWorkstationConfigRequest { 1174 // Required. Parent resource name. 1175 string parent = 1 [ 1176 (google.api.field_behavior) = REQUIRED, 1177 (google.api.resource_reference) = { 1178 type: "workstations.googleapis.com/WorkstationCluster" 1179 } 1180 ]; 1181 1182 // Required. ID to use for the workstation configuration. 1183 string workstation_config_id = 2 [(google.api.field_behavior) = REQUIRED]; 1184 1185 // Required. Config to create. 1186 WorkstationConfig workstation_config = 3 1187 [(google.api.field_behavior) = REQUIRED]; 1188 1189 // Optional. If set, validate the request and preview the review, but do not 1190 // actually apply it. 1191 bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; 1192} 1193 1194// Request message for UpdateWorkstationConfig. 1195message UpdateWorkstationConfigRequest { 1196 // Required. Config to update. 1197 WorkstationConfig workstation_config = 1 1198 [(google.api.field_behavior) = REQUIRED]; 1199 1200 // Required. Mask specifying which fields in the workstation configuration 1201 // should be updated. 1202 google.protobuf.FieldMask update_mask = 2 1203 [(google.api.field_behavior) = REQUIRED]; 1204 1205 // Optional. If set, validate the request and preview the review, but do not 1206 // actually apply it. 1207 bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; 1208 1209 // Optional. If set and the workstation configuration is not found, a new 1210 // workstation configuration will be created. In this situation, 1211 // update_mask is ignored. 1212 bool allow_missing = 4 [(google.api.field_behavior) = OPTIONAL]; 1213} 1214 1215// Message for deleting a workstation configuration. 1216message DeleteWorkstationConfigRequest { 1217 // Required. Name of the workstation configuration to delete. 1218 string name = 1 [ 1219 (google.api.field_behavior) = REQUIRED, 1220 (google.api.resource_reference) = { 1221 type: "workstations.googleapis.com/WorkstationConfig" 1222 } 1223 ]; 1224 1225 // Optional. If set, validate the request and preview the review, but do not 1226 // actually apply it. 1227 bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL]; 1228 1229 // Optional. If set, the request is rejected if the latest version of the 1230 // workstation configuration on the server does not have this ETag. 1231 string etag = 3 [(google.api.field_behavior) = OPTIONAL]; 1232 1233 // Optional. If set, any workstations in the workstation configuration are 1234 // also deleted. Otherwise, the request works only if the workstation 1235 // configuration has no workstations. 1236 bool force = 4 [(google.api.field_behavior) = OPTIONAL]; 1237} 1238 1239// Request message for GetWorkstation. 1240message GetWorkstationRequest { 1241 // Required. Name of the requested resource. 1242 string name = 1 [ 1243 (google.api.field_behavior) = REQUIRED, 1244 (google.api.resource_reference) = { 1245 type: "workstations.googleapis.com/Workstation" 1246 } 1247 ]; 1248} 1249 1250// Request message for ListWorkstations. 1251message ListWorkstationsRequest { 1252 // Required. Parent resource name. 1253 string parent = 1 [ 1254 (google.api.field_behavior) = REQUIRED, 1255 (google.api.resource_reference) = { 1256 type: "workstations.googleapis.com/WorkstationConfig" 1257 } 1258 ]; 1259 1260 // Optional. Maximum number of items to return. 1261 int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; 1262 1263 // Optional. next_page_token value returned from a previous List request, if 1264 // any. 1265 string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; 1266} 1267 1268// Response message for ListWorkstations. 1269message ListWorkstationsResponse { 1270 // The requested workstations. 1271 repeated Workstation workstations = 1; 1272 1273 // Optional. Token to retrieve the next page of results, or empty if there are 1274 // no more results in the list. 1275 string next_page_token = 2 [(google.api.field_behavior) = OPTIONAL]; 1276 1277 // Optional. Unreachable resources. 1278 repeated string unreachable = 3 [(google.api.field_behavior) = OPTIONAL]; 1279} 1280 1281// Request message for ListUsableWorkstations. 1282message ListUsableWorkstationsRequest { 1283 // Required. Parent resource name. 1284 string parent = 1 [ 1285 (google.api.field_behavior) = REQUIRED, 1286 (google.api.resource_reference) = { 1287 type: "workstations.googleapis.com/WorkstationConfig" 1288 } 1289 ]; 1290 1291 // Optional. Maximum number of items to return. 1292 int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; 1293 1294 // Optional. next_page_token value returned from a previous List request, if 1295 // any. 1296 string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; 1297} 1298 1299// Response message for ListUsableWorkstations. 1300message ListUsableWorkstationsResponse { 1301 // The requested workstations. 1302 repeated Workstation workstations = 1; 1303 1304 // Token to retrieve the next page of results, or empty if there are no more 1305 // results in the list. 1306 string next_page_token = 2; 1307 1308 // Unreachable resources. 1309 repeated string unreachable = 3; 1310} 1311 1312// Message for creating a CreateWorkstation. 1313message CreateWorkstationRequest { 1314 // Required. Parent resource name. 1315 string parent = 1 [ 1316 (google.api.field_behavior) = REQUIRED, 1317 (google.api.resource_reference) = { 1318 type: "workstations.googleapis.com/WorkstationConfig" 1319 } 1320 ]; 1321 1322 // Required. ID to use for the workstation. 1323 string workstation_id = 2 [(google.api.field_behavior) = REQUIRED]; 1324 1325 // Required. Workstation to create. 1326 Workstation workstation = 3 [(google.api.field_behavior) = REQUIRED]; 1327 1328 // Optional. If set, validate the request and preview the review, but do not 1329 // actually apply it. 1330 bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; 1331} 1332 1333// Request message for UpdateWorkstation. 1334message UpdateWorkstationRequest { 1335 // Required. Workstation to update. 1336 Workstation workstation = 1 [(google.api.field_behavior) = REQUIRED]; 1337 1338 // Required. Mask specifying which fields in the workstation configuration 1339 // should be updated. 1340 google.protobuf.FieldMask update_mask = 2 1341 [(google.api.field_behavior) = REQUIRED]; 1342 1343 // Optional. If set, validate the request and preview the review, but do not 1344 // actually apply it. 1345 bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; 1346 1347 // Optional. If set and the workstation configuration is not found, a new 1348 // workstation configuration is created. In this situation, update_mask 1349 // is ignored. 1350 bool allow_missing = 4 [(google.api.field_behavior) = OPTIONAL]; 1351} 1352 1353// Request message for DeleteWorkstation. 1354message DeleteWorkstationRequest { 1355 // Required. Name of the workstation to delete. 1356 string name = 1 [ 1357 (google.api.field_behavior) = REQUIRED, 1358 (google.api.resource_reference) = { 1359 type: "workstations.googleapis.com/Workstation" 1360 } 1361 ]; 1362 1363 // Optional. If set, validate the request and preview the review, but do not 1364 // actually apply it. 1365 bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL]; 1366 1367 // Optional. If set, the request will be rejected if the latest version of the 1368 // workstation on the server does not have this ETag. 1369 string etag = 3 [(google.api.field_behavior) = OPTIONAL]; 1370} 1371 1372// Request message for StartWorkstation. 1373message StartWorkstationRequest { 1374 // Required. Name of the workstation to start. 1375 string name = 1 [ 1376 (google.api.field_behavior) = REQUIRED, 1377 (google.api.resource_reference) = { 1378 type: "workstations.googleapis.com/Workstation" 1379 } 1380 ]; 1381 1382 // Optional. If set, validate the request and preview the review, but do not 1383 // actually apply it. 1384 bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL]; 1385 1386 // Optional. If set, the request will be rejected if the latest version of the 1387 // workstation on the server does not have this ETag. 1388 string etag = 3 [(google.api.field_behavior) = OPTIONAL]; 1389} 1390 1391// Request message for StopWorkstation. 1392message StopWorkstationRequest { 1393 // Required. Name of the workstation to stop. 1394 string name = 1 [ 1395 (google.api.field_behavior) = REQUIRED, 1396 (google.api.resource_reference) = { 1397 type: "workstations.googleapis.com/Workstation" 1398 } 1399 ]; 1400 1401 // Optional. If set, validate the request and preview the review, but do not 1402 // actually apply it. 1403 bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL]; 1404 1405 // Optional. If set, the request will be rejected if the latest version of the 1406 // workstation on the server does not have this ETag. 1407 string etag = 3 [(google.api.field_behavior) = OPTIONAL]; 1408} 1409 1410// Request message for GenerateAccessToken. 1411message GenerateAccessTokenRequest { 1412 // Desired expiration or lifetime of the access token. 1413 oneof expiration { 1414 // Desired expiration time of the access token. This value must 1415 // be at most 24 hours in the future. If a value is not specified, the 1416 // token's expiration time will be set to a default value of 1 hour in the 1417 // future. 1418 google.protobuf.Timestamp expire_time = 2; 1419 1420 // Desired lifetime duration of the access token. This value must 1421 // be at most 24 hours. If a value is not specified, the token's lifetime 1422 // will be set to a default value of 1 hour. 1423 google.protobuf.Duration ttl = 3; 1424 } 1425 1426 // Required. Name of the workstation for which the access token should be 1427 // generated. 1428 string workstation = 1 [ 1429 (google.api.field_behavior) = REQUIRED, 1430 (google.api.resource_reference) = { 1431 type: "workstations.googleapis.com/Workstation" 1432 } 1433 ]; 1434} 1435 1436// Response message for GenerateAccessToken. 1437message GenerateAccessTokenResponse { 1438 // The generated bearer access token. To use this token, include it in an 1439 // Authorization header of an HTTP request sent to the associated 1440 // workstation's hostname—for example, `Authorization: Bearer 1441 // <access_token>`. 1442 string access_token = 1; 1443 1444 // Time at which the generated token will expire. 1445 google.protobuf.Timestamp expire_time = 2; 1446} 1447 1448// Metadata for long-running operations. 1449message OperationMetadata { 1450 // Output only. Time that the operation was created. 1451 google.protobuf.Timestamp create_time = 1 1452 [(google.api.field_behavior) = OUTPUT_ONLY]; 1453 1454 // Output only. Time that the operation finished running. 1455 google.protobuf.Timestamp end_time = 2 1456 [(google.api.field_behavior) = OUTPUT_ONLY]; 1457 1458 // Output only. Server-defined resource path for the target of the operation. 1459 string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; 1460 1461 // Output only. Name of the verb executed by the operation. 1462 string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; 1463 1464 // Output only. Human-readable status of the operation, if any. 1465 string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; 1466 1467 // Output only. Identifies whether the user has requested cancellation 1468 // of the operation. 1469 bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; 1470 1471 // Output only. API version used to start the operation. 1472 string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; 1473} 1474