Skip to content

Commit

Permalink
feat(workstations): update the API
Browse files Browse the repository at this point in the history
#### 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
  • Loading branch information
yoshi-automation committed Jan 8, 2025
1 parent 8fc9a4b commit 3dd2a4c
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 16 deletions.
56 changes: 53 additions & 3 deletions discovery/workstations-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -1195,7 +1195,7 @@
}
}
},
"revision": "20240904",
"revision": "20241202",
"rootUrl": "https://workstations.googleapis.com/",
"schemas": {
"Accelerator": {
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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,
Expand Down
19 changes: 13 additions & 6 deletions discovery/workstations-v1beta.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -1127,7 +1127,7 @@
}
}
},
"revision": "20240904",
"revision": "20241202",
"rootUrl": "https://workstations.googleapis.com/",
"schemas": {
"Accelerator": {
Expand Down Expand Up @@ -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": {
Expand All @@ -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": {
Expand Down Expand Up @@ -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"
},
Expand Down Expand Up @@ -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,
Expand Down
41 changes: 39 additions & 2 deletions src/apis/workstations/v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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`.
Expand Down Expand Up @@ -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`.
Expand Down
Loading

0 comments on commit 3dd2a4c

Please sign in to comment.