From 3dd2a4cdc5b77b252e5ccee6ce513195acdec834 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Date: Wed, 8 Jan 2025 01:36:02 +0000 Subject: [PATCH] feat(workstations): update the API #### workstations:v1beta The following keys were added: - schemas.WorkstationCluster.properties.tags.additionalProperties.type - schemas.WorkstationCluster.properties.tags.description - schemas.WorkstationCluster.properties.tags.type The following keys were changed: - resources.projects.resources.locations.resources.operations.methods.cancel.description - resources.projects.resources.locations.resources.workstationClusters.resources.workstationConfigs.resources.workstations.methods.generateAccessToken.description - schemas.BoostConfig.description - schemas.BoostConfig.properties.id.description - schemas.GceInstance.properties.boostConfigs.description #### workstations:v1 The following keys were added: - schemas.BoostConfig.description - schemas.BoostConfig.id - schemas.BoostConfig.properties.accelerators.description - schemas.BoostConfig.properties.accelerators.items.$ref - schemas.BoostConfig.properties.accelerators.type - schemas.BoostConfig.properties.bootDiskSizeGb.description - schemas.BoostConfig.properties.bootDiskSizeGb.format - schemas.BoostConfig.properties.bootDiskSizeGb.type - schemas.BoostConfig.properties.enableNestedVirtualization.description - schemas.BoostConfig.properties.enableNestedVirtualization.type - schemas.BoostConfig.properties.id.description - schemas.BoostConfig.properties.id.type - schemas.BoostConfig.properties.machineType.description - schemas.BoostConfig.properties.machineType.type - schemas.BoostConfig.properties.poolSize.description - schemas.BoostConfig.properties.poolSize.format - schemas.BoostConfig.properties.poolSize.type - schemas.BoostConfig.type - schemas.GceInstance.properties.boostConfigs.description - schemas.GceInstance.properties.boostConfigs.items.$ref - schemas.GceInstance.properties.boostConfigs.type - schemas.WorkstationCluster.properties.tags.additionalProperties.type - schemas.WorkstationCluster.properties.tags.description - schemas.WorkstationCluster.properties.tags.type The following keys were changed: - resources.projects.resources.locations.resources.operations.methods.cancel.description - resources.projects.resources.locations.resources.workstationClusters.resources.workstationConfigs.resources.workstations.methods.generateAccessToken.description --- discovery/workstations-v1.json | 56 ++++++++++++++++++++++++++++-- discovery/workstations-v1beta.json | 19 ++++++---- src/apis/workstations/v1.ts | 41 ++++++++++++++++++++-- src/apis/workstations/v1beta.ts | 14 +++++--- 4 files changed, 114 insertions(+), 16 deletions(-) diff --git a/discovery/workstations-v1.json b/discovery/workstations-v1.json index 2b245913b6..c4c53d1ff2 100644 --- a/discovery/workstations-v1.json +++ b/discovery/workstations-v1.json @@ -180,7 +180,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "workstations.projects.locations.operations.cancel", @@ -873,7 +873,7 @@ ] }, "generateAccessToken": { - "description": "Returns a short-lived credential that can be used to send authenticated and authorized traffic to a workstation.", + "description": "Returns a short-lived credential that can be used to send authenticated and authorized traffic to a workstation. Once generated this token cannot be revoked and is good for the lifetime of the token.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:generateAccessToken", "httpMethod": "POST", "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.generateAccessToken", @@ -1195,7 +1195,7 @@ } } }, - "revision": "20240904", + "revision": "20241202", "rootUrl": "https://workstations.googleapis.com/", "schemas": { "Accelerator": { @@ -1284,6 +1284,42 @@ }, "type": "object" }, + "BoostConfig": { + "description": "A boost configuration is a set of resources that a workstation can use to increase its performance. If a boost configuration is specified, when starting a workstation, users can choose to use a VM provisioned under the boost config by passing the boost config id in the start request. If no boost config id is provided in the start request, the system will choose a VM from the pool provisioned under the default config.", + "id": "BoostConfig", + "properties": { + "accelerators": { + "description": "Optional. A list of the type and count of accelerator cards attached to the boost instance. Defaults to `none`.", + "items": { + "$ref": "Accelerator" + }, + "type": "array" + }, + "bootDiskSizeGb": { + "description": "Optional. The size of the boot disk for the VM in gigabytes (GB). The minimum boot disk size is `30` GB. Defaults to `50` GB.", + "format": "int32", + "type": "integer" + }, + "enableNestedVirtualization": { + "description": "Optional. Whether to enable nested virtualization on boosted Cloud Workstations VMs running using this boost configuration. Defaults to false. Nested virtualization lets you run virtual machine (VM) instances inside your workstation. Before enabling nested virtualization, consider the following important considerations. Cloud Workstations instances are subject to the [same restrictions as Compute Engine instances](https://cloud.google.com/compute/docs/instances/nested-virtualization/overview#restrictions): * **Organization policy**: projects, folders, or organizations may be restricted from creating nested VMs if the **Disable VM nested virtualization** constraint is enforced in the organization policy. For more information, see the Compute Engine section, [Checking whether nested virtualization is allowed](https://cloud.google.com/compute/docs/instances/nested-virtualization/managing-constraint#checking_whether_nested_virtualization_is_allowed). * **Performance**: nested VMs might experience a 10% or greater decrease in performance for workloads that are CPU-bound and possibly greater than a 10% decrease for workloads that are input/output bound. * **Machine Type**: nested virtualization can only be enabled on boost configurations that specify a machine_type in the N1 or N2 machine series.", + "type": "boolean" + }, + "id": { + "description": "Required. The id to be used for the boost configuration.", + "type": "string" + }, + "machineType": { + "description": "Optional. The type of machine that boosted VM instances will use—for example, `e2-standard-4`. For more information about machine types that Cloud Workstations supports, see the list of [available machine types](https://cloud.google.com/workstations/docs/available-machine-types). Defaults to `e2-standard-4`.", + "type": "string" + }, + "poolSize": { + "description": "Optional. The number of boost VMs that the system should keep idle so that workstations can be boosted quickly. Defaults to `0`.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "CancelOperationRequest": { "description": "The request message for Operations.CancelOperation.", "id": "CancelOperationRequest", @@ -1417,6 +1453,13 @@ }, "type": "array" }, + "boostConfigs": { + "description": "Optional. A list of the boost configurations that workstations created using this workstation configuration are allowed to use. If specified, users will have the option to choose from the list of boost configs when starting a workstation.", + "items": { + "$ref": "BoostConfig" + }, + "type": "array" + }, "bootDiskSizeGb": { "description": "Optional. The size of the boot disk for the VM in gigabytes (GB). The minimum boot disk size is `30` GB. Defaults to `50` GB.", "format": "int32", @@ -2286,6 +2329,13 @@ "description": "Immutable. Name of the Compute Engine subnetwork in which instances associated with this workstation cluster will be created. Must be part of the subnetwork specified for this workstation cluster.", "type": "string" }, + "tags": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Tag keys/values directly bound to this resource. For example: \"123/environment\": \"production\", \"123/costCenter\": \"marketing\"", + "type": "object" + }, "uid": { "description": "Output only. A system-assigned unique identifier for this workstation cluster.", "readOnly": true, diff --git a/discovery/workstations-v1beta.json b/discovery/workstations-v1beta.json index da19146f3e..f68f6ace1a 100644 --- a/discovery/workstations-v1beta.json +++ b/discovery/workstations-v1beta.json @@ -112,7 +112,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "workstations.projects.locations.operations.cancel", @@ -805,7 +805,7 @@ ] }, "generateAccessToken": { - "description": "Returns a short-lived credential that can be used to send authenticated and authorized traffic to a workstation.", + "description": "Returns a short-lived credential that can be used to send authenticated and authorized traffic to a workstation. Once generated this token cannot be revoked and is good for the lifetime of the token.", "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:generateAccessToken", "httpMethod": "POST", "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.generateAccessToken", @@ -1127,7 +1127,7 @@ } } }, - "revision": "20240904", + "revision": "20241202", "rootUrl": "https://workstations.googleapis.com/", "schemas": { "Accelerator": { @@ -1217,7 +1217,7 @@ "type": "object" }, "BoostConfig": { - "description": "A configuration that workstations can boost to.", + "description": "A boost configuration is a set of resources that a workstation can use to increase its performance. If a boost configuration is specified, when starting a workstation, users can choose to use a VM provisioned under the boost config by passing the boost config id in the start request. If no boost config id is provided in the start request, the system will choose a VM from the pool provisioned under the default config.", "id": "BoostConfig", "properties": { "accelerators": { @@ -1237,7 +1237,7 @@ "type": "boolean" }, "id": { - "description": "Optional. Required. The id to be used for the boost configuration.", + "description": "Required. The id to be used for the boost configuration.", "type": "string" }, "machineType": { @@ -1386,7 +1386,7 @@ "type": "array" }, "boostConfigs": { - "description": "Optional. A list of the boost configurations that workstations created using this workstation configuration are allowed to use.", + "description": "Optional. A list of the boost configurations that workstations created using this workstation configuration are allowed to use. If specified, users will have the option to choose from the list of boost configs when starting a workstation.", "items": { "$ref": "BoostConfig" }, @@ -2268,6 +2268,13 @@ "description": "Immutable. Name of the Compute Engine subnetwork in which instances associated with this workstation cluster will be created. Must be part of the subnetwork specified for this workstation cluster.", "type": "string" }, + "tags": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Tag keys/values directly bound to this resource. For example: \"123/environment\": \"production\", \"123/costCenter\": \"marketing\"", + "type": "object" + }, "uid": { "description": "Output only. A system-assigned unique identifier for this workstation cluster.", "readOnly": true, diff --git a/src/apis/workstations/v1.ts b/src/apis/workstations/v1.ts index a5096cb444..68dddba647 100644 --- a/src/apis/workstations/v1.ts +++ b/src/apis/workstations/v1.ts @@ -180,6 +180,35 @@ export namespace workstations_v1 { */ role?: string | null; } + /** + * A boost configuration is a set of resources that a workstation can use to increase its performance. If a boost configuration is specified, when starting a workstation, users can choose to use a VM provisioned under the boost config by passing the boost config id in the start request. If no boost config id is provided in the start request, the system will choose a VM from the pool provisioned under the default config. + */ + export interface Schema$BoostConfig { + /** + * Optional. A list of the type and count of accelerator cards attached to the boost instance. Defaults to `none`. + */ + accelerators?: Schema$Accelerator[]; + /** + * Optional. The size of the boot disk for the VM in gigabytes (GB). The minimum boot disk size is `30` GB. Defaults to `50` GB. + */ + bootDiskSizeGb?: number | null; + /** + * Optional. Whether to enable nested virtualization on boosted Cloud Workstations VMs running using this boost configuration. Defaults to false. Nested virtualization lets you run virtual machine (VM) instances inside your workstation. Before enabling nested virtualization, consider the following important considerations. Cloud Workstations instances are subject to the [same restrictions as Compute Engine instances](https://cloud.google.com/compute/docs/instances/nested-virtualization/overview#restrictions): * **Organization policy**: projects, folders, or organizations may be restricted from creating nested VMs if the **Disable VM nested virtualization** constraint is enforced in the organization policy. For more information, see the Compute Engine section, [Checking whether nested virtualization is allowed](https://cloud.google.com/compute/docs/instances/nested-virtualization/managing-constraint#checking_whether_nested_virtualization_is_allowed). * **Performance**: nested VMs might experience a 10% or greater decrease in performance for workloads that are CPU-bound and possibly greater than a 10% decrease for workloads that are input/output bound. * **Machine Type**: nested virtualization can only be enabled on boost configurations that specify a machine_type in the N1 or N2 machine series. + */ + enableNestedVirtualization?: boolean | null; + /** + * Required. The id to be used for the boost configuration. + */ + id?: string | null; + /** + * Optional. The type of machine that boosted VM instances will use—for example, `e2-standard-4`. For more information about machine types that Cloud Workstations supports, see the list of [available machine types](https://cloud.google.com/workstations/docs/available-machine-types). Defaults to `e2-standard-4`. + */ + machineType?: string | null; + /** + * Optional. The number of boost VMs that the system should keep idle so that workstations can be boosted quickly. Defaults to `0`. + */ + poolSize?: number | null; + } /** * The request message for Operations.CancelOperation. */ @@ -286,6 +315,10 @@ export namespace workstations_v1 { * Optional. A list of the type and count of accelerator cards attached to the instance. */ accelerators?: Schema$Accelerator[]; + /** + * Optional. A list of the boost configurations that workstations created using this workstation configuration are allowed to use. If specified, users will have the option to choose from the list of boost configs when starting a workstation. + */ + boostConfigs?: Schema$BoostConfig[]; /** * Optional. The size of the boot disk for the VM in gigabytes (GB). The minimum boot disk size is `30` GB. Defaults to `50` GB. */ @@ -923,6 +956,10 @@ export namespace workstations_v1 { * Immutable. Name of the Compute Engine subnetwork in which instances associated with this workstation cluster will be created. Must be part of the subnetwork specified for this workstation cluster. */ subnetwork?: string | null; + /** + * Optional. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" + */ + tags?: {[key: string]: string} | null; /** * Output only. A system-assigned unique identifier for this workstation cluster. */ @@ -1277,7 +1314,7 @@ export namespace workstations_v1 { } /** - * Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + * Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`. * * @param params - Parameters for request * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. @@ -3372,7 +3409,7 @@ export namespace workstations_v1 { } /** - * Returns a short-lived credential that can be used to send authenticated and authorized traffic to a workstation. + * Returns a short-lived credential that can be used to send authenticated and authorized traffic to a workstation. Once generated this token cannot be revoked and is good for the lifetime of the token. * * @param params - Parameters for request * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. diff --git a/src/apis/workstations/v1beta.ts b/src/apis/workstations/v1beta.ts index 94d1ed4dde..8b6d1d032f 100644 --- a/src/apis/workstations/v1beta.ts +++ b/src/apis/workstations/v1beta.ts @@ -181,7 +181,7 @@ export namespace workstations_v1beta { role?: string | null; } /** - * A configuration that workstations can boost to. + * A boost configuration is a set of resources that a workstation can use to increase its performance. If a boost configuration is specified, when starting a workstation, users can choose to use a VM provisioned under the boost config by passing the boost config id in the start request. If no boost config id is provided in the start request, the system will choose a VM from the pool provisioned under the default config. */ export interface Schema$BoostConfig { /** @@ -197,7 +197,7 @@ export namespace workstations_v1beta { */ enableNestedVirtualization?: boolean | null; /** - * Optional. Required. The id to be used for the boost configuration. + * Required. The id to be used for the boost configuration. */ id?: string | null; /** @@ -316,7 +316,7 @@ export namespace workstations_v1beta { */ accelerators?: Schema$Accelerator[]; /** - * Optional. A list of the boost configurations that workstations created using this workstation configuration are allowed to use. + * Optional. A list of the boost configurations that workstations created using this workstation configuration are allowed to use. If specified, users will have the option to choose from the list of boost configs when starting a workstation. */ boostConfigs?: Schema$BoostConfig[]; /** @@ -964,6 +964,10 @@ export namespace workstations_v1beta { * Immutable. Name of the Compute Engine subnetwork in which instances associated with this workstation cluster will be created. Must be part of the subnetwork specified for this workstation cluster. */ subnetwork?: string | null; + /** + * Optional. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" + */ + tags?: {[key: string]: string} | null; /** * Output only. A system-assigned unique identifier for this workstation cluster. */ @@ -1125,7 +1129,7 @@ export namespace workstations_v1beta { } /** - * Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + * Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`. * * @param params - Parameters for request * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. @@ -3223,7 +3227,7 @@ export namespace workstations_v1beta { } /** - * Returns a short-lived credential that can be used to send authenticated and authorized traffic to a workstation. + * Returns a short-lived credential that can be used to send authenticated and authorized traffic to a workstation. Once generated this token cannot be revoked and is good for the lifetime of the token. * * @param params - Parameters for request * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.