@googleapis/tpu 9.0.0 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/v2alpha1.ts CHANGED
@@ -220,6 +220,10 @@ export namespace tpu_v2alpha1 {
220
220
  * Optional. Image from which boot disk is to be created. If not specified, the default image for the runtime version will be used. Example: `projects/$PROJECT_ID/global/images/$IMAGE_NAME`.
221
221
  */
222
222
  sourceImage?: string | null;
223
+ /**
224
+ * Optional. The storage pool in which the boot disk is created. You can provide this as a partial or full URL to the resource.
225
+ */
226
+ storagePool?: string | null;
223
227
  }
224
228
  /**
225
229
  * Further data for the creating state.
@@ -286,6 +290,15 @@ export namespace tpu_v2alpha1 {
286
290
  */
287
291
  guestAttributes?: Schema$GuestAttributes[];
288
292
  }
293
+ /**
294
+ * Response for GetMaintenanceInfo.
295
+ */
296
+ export interface Schema$GetMaintenanceInfoResponse {
297
+ /**
298
+ * The list of upcoming maintenance entries.
299
+ */
300
+ nodeUpcomingMaintenances?: Schema$NodeUpcomingMaintenanceInfo[];
301
+ }
289
302
  /**
290
303
  * Guaranteed tier definition.
291
304
  */
@@ -680,6 +693,23 @@ export namespace tpu_v2alpha1 {
680
693
  */
681
694
  parent?: string | null;
682
695
  }
696
+ /**
697
+ * A tuple containing node name / ID and maintenance info.
698
+ */
699
+ export interface Schema$NodeUpcomingMaintenanceInfo {
700
+ /**
701
+ * Unqualified node name.
702
+ */
703
+ nodeName?: string | null;
704
+ /**
705
+ * UID of this node.
706
+ */
707
+ nodeUid?: string | null;
708
+ /**
709
+ * Upcoming maintenance info for this node.
710
+ */
711
+ upcomingMaintenance?: Schema$UpcomingMaintenance;
712
+ }
683
713
  /**
684
714
  * This resource represents a long-running operation that is the result of a network API call.
685
715
  */
@@ -1476,7 +1506,7 @@ export namespace tpu_v2alpha1 {
1476
1506
  *
1477
1507
  * // Do the magic
1478
1508
  * const res = await tpu.projects.locations.list({
1479
- * // Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage.
1509
+ * // Optional. Unless explicitly documented otherwise, don't use this unsupported field which is primarily intended for internal usage.
1480
1510
  * extraLocationTypes: 'placeholder-value',
1481
1511
  * // A filter to narrow down results to a preferred subset. The filtering language accepts strings like `"displayName=tokyo"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).
1482
1512
  * filter: 'placeholder-value',
@@ -1616,7 +1646,7 @@ export namespace tpu_v2alpha1 {
1616
1646
  export interface Params$Resource$Projects$Locations$List
1617
1647
  extends StandardParameters {
1618
1648
  /**
1619
- * Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage.
1649
+ * Optional. Unless explicitly documented otherwise, don't use this unsupported field which is primarily intended for internal usage.
1620
1650
  */
1621
1651
  extraLocationTypes?: string[];
1622
1652
  /**
@@ -4700,6 +4730,148 @@ export namespace tpu_v2alpha1 {
4700
4730
  }
4701
4731
  }
4702
4732
 
4733
+ /**
4734
+ * Gets the maintenance info for a queued resource.
4735
+ * @example
4736
+ * ```js
4737
+ * // Before running the sample:
4738
+ * // - Enable the API at:
4739
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
4740
+ * // - Login into gcloud by running:
4741
+ * // ```sh
4742
+ * // $ gcloud auth application-default login
4743
+ * // ```
4744
+ * // - Install the npm module by running:
4745
+ * // ```sh
4746
+ * // $ npm install googleapis
4747
+ * // ```
4748
+ *
4749
+ * const {google} = require('googleapis');
4750
+ * const tpu = google.tpu('v2alpha1');
4751
+ *
4752
+ * async function main() {
4753
+ * const auth = new google.auth.GoogleAuth({
4754
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4755
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
4756
+ * });
4757
+ *
4758
+ * // Acquire an auth client, and bind it to all future calls
4759
+ * const authClient = await auth.getClient();
4760
+ * google.options({auth: authClient});
4761
+ *
4762
+ * // Do the magic
4763
+ * const res = await tpu.projects.locations.queuedResources.getMaintenanceInfo({
4764
+ * // Required. The QueuedResource name.
4765
+ * name: 'projects/my-project/locations/my-location/queuedResources/my-queuedResource',
4766
+ * });
4767
+ * console.log(res.data);
4768
+ *
4769
+ * // Example response
4770
+ * // {
4771
+ * // "nodeUpcomingMaintenances": []
4772
+ * // }
4773
+ * }
4774
+ *
4775
+ * main().catch(e => {
4776
+ * console.error(e);
4777
+ * throw e;
4778
+ * });
4779
+ *
4780
+ * ```
4781
+ *
4782
+ * @param params - Parameters for request
4783
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
4784
+ * @param callback - Optional callback that handles the response.
4785
+ * @returns A promise if used with async/await, or void if used with a callback.
4786
+ */
4787
+ getMaintenanceInfo(
4788
+ params: Params$Resource$Projects$Locations$Queuedresources$Getmaintenanceinfo,
4789
+ options: StreamMethodOptions
4790
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
4791
+ getMaintenanceInfo(
4792
+ params?: Params$Resource$Projects$Locations$Queuedresources$Getmaintenanceinfo,
4793
+ options?: MethodOptions
4794
+ ): Promise<GaxiosResponseWithHTTP2<Schema$GetMaintenanceInfoResponse>>;
4795
+ getMaintenanceInfo(
4796
+ params: Params$Resource$Projects$Locations$Queuedresources$Getmaintenanceinfo,
4797
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
4798
+ callback: BodyResponseCallback<Readable>
4799
+ ): void;
4800
+ getMaintenanceInfo(
4801
+ params: Params$Resource$Projects$Locations$Queuedresources$Getmaintenanceinfo,
4802
+ options:
4803
+ | MethodOptions
4804
+ | BodyResponseCallback<Schema$GetMaintenanceInfoResponse>,
4805
+ callback: BodyResponseCallback<Schema$GetMaintenanceInfoResponse>
4806
+ ): void;
4807
+ getMaintenanceInfo(
4808
+ params: Params$Resource$Projects$Locations$Queuedresources$Getmaintenanceinfo,
4809
+ callback: BodyResponseCallback<Schema$GetMaintenanceInfoResponse>
4810
+ ): void;
4811
+ getMaintenanceInfo(
4812
+ callback: BodyResponseCallback<Schema$GetMaintenanceInfoResponse>
4813
+ ): void;
4814
+ getMaintenanceInfo(
4815
+ paramsOrCallback?:
4816
+ | Params$Resource$Projects$Locations$Queuedresources$Getmaintenanceinfo
4817
+ | BodyResponseCallback<Schema$GetMaintenanceInfoResponse>
4818
+ | BodyResponseCallback<Readable>,
4819
+ optionsOrCallback?:
4820
+ | MethodOptions
4821
+ | StreamMethodOptions
4822
+ | BodyResponseCallback<Schema$GetMaintenanceInfoResponse>
4823
+ | BodyResponseCallback<Readable>,
4824
+ callback?:
4825
+ | BodyResponseCallback<Schema$GetMaintenanceInfoResponse>
4826
+ | BodyResponseCallback<Readable>
4827
+ ):
4828
+ | void
4829
+ | Promise<GaxiosResponseWithHTTP2<Schema$GetMaintenanceInfoResponse>>
4830
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
4831
+ let params = (paramsOrCallback ||
4832
+ {}) as Params$Resource$Projects$Locations$Queuedresources$Getmaintenanceinfo;
4833
+ let options = (optionsOrCallback || {}) as MethodOptions;
4834
+
4835
+ if (typeof paramsOrCallback === 'function') {
4836
+ callback = paramsOrCallback;
4837
+ params =
4838
+ {} as Params$Resource$Projects$Locations$Queuedresources$Getmaintenanceinfo;
4839
+ options = {};
4840
+ }
4841
+
4842
+ if (typeof optionsOrCallback === 'function') {
4843
+ callback = optionsOrCallback;
4844
+ options = {};
4845
+ }
4846
+
4847
+ const rootUrl = options.rootUrl || 'https://tpu.googleapis.com/';
4848
+ const parameters = {
4849
+ options: Object.assign(
4850
+ {
4851
+ url: (rootUrl + '/v2alpha1/{+name}:getMaintenanceInfo').replace(
4852
+ /([^:]\/)\/+/g,
4853
+ '$1'
4854
+ ),
4855
+ method: 'GET',
4856
+ apiVersion: '',
4857
+ },
4858
+ options
4859
+ ),
4860
+ params,
4861
+ requiredParams: ['name'],
4862
+ pathParams: ['name'],
4863
+ context: this.context,
4864
+ };
4865
+ if (callback) {
4866
+ createAPIRequest<Schema$GetMaintenanceInfoResponse>(
4867
+ parameters,
4868
+ callback as BodyResponseCallback<unknown>
4869
+ );
4870
+ } else {
4871
+ return createAPIRequest<Schema$GetMaintenanceInfoResponse>(parameters);
4872
+ }
4873
+ }
4874
+
4703
4875
  /**
4704
4876
  * Lists queued resources.
4705
4877
  * @example
@@ -5191,6 +5363,13 @@ export namespace tpu_v2alpha1 {
5191
5363
  */
5192
5364
  name?: string;
5193
5365
  }
5366
+ export interface Params$Resource$Projects$Locations$Queuedresources$Getmaintenanceinfo
5367
+ extends StandardParameters {
5368
+ /**
5369
+ * Required. The QueuedResource name.
5370
+ */
5371
+ name?: string;
5372
+ }
5194
5373
  export interface Params$Resource$Projects$Locations$Queuedresources$List
5195
5374
  extends StandardParameters {
5196
5375
  /**