Skip to content

Commit 23b2dd2

Browse files
feat(workstations): update the API
#### workstations:v1beta The following keys were added: - schemas.BoostConfig.properties.reservationAffinity.$ref - schemas.BoostConfig.properties.reservationAffinity.description - schemas.GceInstance.properties.reservationAffinity.$ref - schemas.GceInstance.properties.reservationAffinity.description - schemas.ReservationAffinity.description - schemas.ReservationAffinity.id - schemas.ReservationAffinity.properties.consumeReservationType.description - schemas.ReservationAffinity.properties.consumeReservationType.enum - schemas.ReservationAffinity.properties.consumeReservationType.enumDescriptions - schemas.ReservationAffinity.properties.consumeReservationType.type - schemas.ReservationAffinity.properties.key.description - schemas.ReservationAffinity.properties.key.type - schemas.ReservationAffinity.properties.values.description - schemas.ReservationAffinity.properties.values.items.type - schemas.ReservationAffinity.properties.values.type - schemas.ReservationAffinity.type
1 parent 0bc596a commit 23b2dd2

File tree

3 files changed

+69
-2
lines changed

3 files changed

+69
-2
lines changed

‎discovery/workstations-v1beta.json

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,7 @@
11421142
}
11431143
}
11441144
},
1145-
"revision": "20250604",
1145+
"revision": "20250625",
11461146
"rootUrl": "https://workstations.googleapis.com/",
11471147
"schemas": {
11481148
"Accelerator": {
@@ -1263,6 +1263,10 @@
12631263
"description": "Optional. The number of boost VMs that the system should keep idle so that workstations can be boosted quickly. Defaults to `0`.",
12641264
"format": "int32",
12651265
"type": "integer"
1266+
},
1267+
"reservationAffinity": {
1268+
"$ref": "ReservationAffinity",
1269+
"description": "Optional. [ReservationAffinity](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) specifies a reservation that can be consumed to create boost VM instances. If SPECIFIC_RESERVATION is specified, Cloud Workstations will only create VMs in the zone where the reservation is located. This would affect availability since the service will no longer be resilient to zonal outages. If ANY_RESERVATION is specified, creating reservations in both zones that the config creates VMs in will ensure higher availability. **Important Considerations for Reservation Affinity:** * This feature is intended for advanced users and requires familiarity with Google Compute Engine reservations. * Using reservations incurs charges, regardless of utilization. * The resources in the pool will consume the specified reservation. Take this into account when setting the pool size."
12661270
}
12671271
},
12681272
"type": "object"
@@ -1454,6 +1458,10 @@
14541458
"readOnly": true,
14551459
"type": "integer"
14561460
},
1461+
"reservationAffinity": {
1462+
"$ref": "ReservationAffinity",
1463+
"description": "Optional. [ReservationAffinity](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) specifies a reservation that can be consumed to create boost VM instances. If SPECIFIC_RESERVATION is specified, Cloud Workstations will only create VMs in the zone where the reservation is located. This would affect availability since the service will no longer be resilient to zonal outages. If ANY_RESERVATION is specified, creating reservations in both zones that the config creates VMs in will ensure higher availability. **Important Considerations for Reservation Affinity:** * This feature is intended for advanced users and requires familiarity with Google Compute Engine reservations. * Using reservations incurs charges, regardless of utilization. * The resources in the pool will consume the specified reservation. Take this into account when setting the pool size."
1464+
},
14571465
"serviceAccount": {
14581466
"description": "Optional. The email address of the service account for Cloud Workstations VMs created with this configuration. When specified, be sure that the service account has `logging.logEntries.create` and `monitoring.timeSeries.create` permissions on the project so it can write logs out to Cloud Logging. If using a custom container image, the service account must have [Artifact Registry Reader](https://cloud.google.com/artifact-registry/docs/access-control#roles) permission to pull the specified image. If you as the administrator want to be able to `ssh` into the underlying VM, you need to set this value to a service account for which you have the `iam.serviceAccounts.actAs` permission. Conversely, if you don't want anyone to be able to `ssh` into the underlying VM, use a service account where no one has that permission. If not set, VMs run with a service account provided by the Cloud Workstations service, and the image must be publicly accessible.",
14591467
"type": "string"
@@ -1987,6 +1995,40 @@
19871995
},
19881996
"type": "object"
19891997
},
1998+
"ReservationAffinity": {
1999+
"description": "ReservationAffinity is the configuration of the desired reservation from which instances can consume resources.",
2000+
"id": "ReservationAffinity",
2001+
"properties": {
2002+
"consumeReservationType": {
2003+
"description": "Optional. Corresponds to the type of reservation consumption.",
2004+
"enum": [
2005+
"TYPE_UNSPECIFIED",
2006+
"NO_RESERVATION",
2007+
"ANY_RESERVATION",
2008+
"SPECIFIC_RESERVATION"
2009+
],
2010+
"enumDescriptions": [
2011+
"Default value. This should not be used.",
2012+
"Do not consume from any reserved capacity.",
2013+
"Consume any reservation available.",
2014+
"Must consume from a specific reservation. Must specify key value fields for specifying the reservations."
2015+
],
2016+
"type": "string"
2017+
},
2018+
"key": {
2019+
"description": "Optional. Corresponds to the label key of reservation resource.",
2020+
"type": "string"
2021+
},
2022+
"values": {
2023+
"description": "Optional. Corresponds to the label values of reservation resources. Valid values are either a name to a reservation in the same project or \"projects/{project}/reservations/{reservation}\" to target a shared reservation in the same zone but in a different project.",
2024+
"items": {
2025+
"type": "string"
2026+
},
2027+
"type": "array"
2028+
}
2029+
},
2030+
"type": "object"
2031+
},
19902032
"RuntimeHost": {
19912033
"description": "Runtime host for the workstation.",
19922034
"id": "RuntimeHost",

‎src/apis/workstations/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"webpack": "webpack"
2929
},
3030
"dependencies": {
31-
"googleapis-common": "^8.0.0"
31+
"googleapis-common": "^8.0.2-rc.0"
3232
},
3333
"devDependencies": {
3434
"@microsoft/api-documenter": "^7.8.10",

‎src/apis/workstations/v1beta.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,10 @@ export namespace workstations_v1beta {
208208
* Optional. The number of boost VMs that the system should keep idle so that workstations can be boosted quickly. Defaults to `0`.
209209
*/
210210
poolSize?: number | null;
211+
/**
212+
* Optional. [ReservationAffinity](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) specifies a reservation that can be consumed to create boost VM instances. If SPECIFIC_RESERVATION is specified, Cloud Workstations will only create VMs in the zone where the reservation is located. This would affect availability since the service will no longer be resilient to zonal outages. If ANY_RESERVATION is specified, creating reservations in both zones that the config creates VMs in will ensure higher availability. **Important Considerations for Reservation Affinity:** * This feature is intended for advanced users and requires familiarity with Google Compute Engine reservations. * Using reservations incurs charges, regardless of utilization. * The resources in the pool will consume the specified reservation. Take this into account when setting the pool size.
213+
*/
214+
reservationAffinity?: Schema$ReservationAffinity;
211215
}
212216
/**
213217
* The request message for Operations.CancelOperation.
@@ -360,6 +364,10 @@ export namespace workstations_v1beta {
360364
* Optional. The number of VMs that the system should keep idle so that new workstations can be started quickly for new users. Defaults to `0` in the API.
361365
*/
362366
poolSize?: number | null;
367+
/**
368+
* Optional. [ReservationAffinity](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) specifies a reservation that can be consumed to create boost VM instances. If SPECIFIC_RESERVATION is specified, Cloud Workstations will only create VMs in the zone where the reservation is located. This would affect availability since the service will no longer be resilient to zonal outages. If ANY_RESERVATION is specified, creating reservations in both zones that the config creates VMs in will ensure higher availability. **Important Considerations for Reservation Affinity:** * This feature is intended for advanced users and requires familiarity with Google Compute Engine reservations. * Using reservations incurs charges, regardless of utilization. * The resources in the pool will consume the specified reservation. Take this into account when setting the pool size.
369+
*/
370+
reservationAffinity?: Schema$ReservationAffinity;
363371
/**
364372
* Optional. The email address of the service account for Cloud Workstations VMs created with this configuration. When specified, be sure that the service account has `logging.logEntries.create` and `monitoring.timeSeries.create` permissions on the project so it can write logs out to Cloud Logging. If using a custom container image, the service account must have [Artifact Registry Reader](https://cloud.google.com/artifact-registry/docs/access-control#roles) permission to pull the specified image. If you as the administrator want to be able to `ssh` into the underlying VM, you need to set this value to a service account for which you have the `iam.serviceAccounts.actAs` permission. Conversely, if you don't want anyone to be able to `ssh` into the underlying VM, use a service account where no one has that permission. If not set, VMs run with a service account provided by the Cloud Workstations service, and the image must be publicly accessible.
365373
*/
@@ -754,6 +762,23 @@ export namespace workstations_v1beta {
754762
*/
755763
port?: number | null;
756764
}
765+
/**
766+
* ReservationAffinity is the configuration of the desired reservation from which instances can consume resources.
767+
*/
768+
export interface Schema$ReservationAffinity {
769+
/**
770+
* Optional. Corresponds to the type of reservation consumption.
771+
*/
772+
consumeReservationType?: string | null;
773+
/**
774+
* Optional. Corresponds to the label key of reservation resource.
775+
*/
776+
key?: string | null;
777+
/**
778+
* Optional. Corresponds to the label values of reservation resources. Valid values are either a name to a reservation in the same project or "projects/{project\}/reservations/{reservation\}" to target a shared reservation in the same zone but in a different project.
779+
*/
780+
values?: string[] | null;
781+
}
757782
/**
758783
* Runtime host for the workstation.
759784
*/

0 commit comments

Comments
 (0)