@googleapis/tpu 2.0.0 → 2.1.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.
@@ -71,19 +71,41 @@ export declare namespace tpu_v2alpha1 {
71
71
  projects: Resource$Projects;
72
72
  constructor(options: GlobalOptions, google?: GoogleConfigurable);
73
73
  }
74
+ /**
75
+ * A TPU accelerator configuration.
76
+ */
77
+ export interface Schema$AcceleratorConfig {
78
+ /**
79
+ * Required. Topology of TPU in chips.
80
+ */
81
+ topology?: string | null;
82
+ /**
83
+ * Required. Type of TPU.
84
+ */
85
+ type?: string | null;
86
+ }
74
87
  /**
75
88
  * A accelerator type that a Node can be configured with.
76
89
  */
77
90
  export interface Schema$AcceleratorType {
91
+ /**
92
+ * The accelerator config.
93
+ */
94
+ acceleratorConfigs?: Schema$AcceleratorConfig[];
78
95
  /**
79
96
  * The resource name.
80
97
  */
81
98
  name?: string | null;
82
99
  /**
83
- * the accelerator type.
100
+ * The accelerator type.
84
101
  */
85
102
  type?: string | null;
86
103
  }
104
+ /**
105
+ * Further data for the accepted state.
106
+ */
107
+ export interface Schema$AcceptedData {
108
+ }
87
109
  /**
88
110
  * An access config attached to the TPU worker.
89
111
  */
@@ -93,6 +115,11 @@ export declare namespace tpu_v2alpha1 {
93
115
  */
94
116
  externalIp?: string | null;
95
117
  }
118
+ /**
119
+ * Further data for the active state.
120
+ */
121
+ export interface Schema$ActiveData {
122
+ }
96
123
  /**
97
124
  * A node-attached disk resource. Next ID: 8;
98
125
  */
@@ -106,11 +133,35 @@ export declare namespace tpu_v2alpha1 {
106
133
  */
107
134
  sourceDisk?: string | null;
108
135
  }
136
+ /**
137
+ * BestEffort tier definition.
138
+ */
139
+ export interface Schema$BestEffort {
140
+ }
141
+ /**
142
+ * Further data for the creating state.
143
+ */
144
+ export interface Schema$CreatingData {
145
+ }
146
+ /**
147
+ * Further data for the deleting state.
148
+ */
149
+ export interface Schema$DeletingData {
150
+ }
109
151
  /**
110
152
  * A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); \}
111
153
  */
112
154
  export interface Schema$Empty {
113
155
  }
156
+ /**
157
+ * Further data for the failed state.
158
+ */
159
+ export interface Schema$FailedData {
160
+ /**
161
+ * The error that caused the queued resource to enter the FAILED state.
162
+ */
163
+ error?: Schema$Status;
164
+ }
114
165
  /**
115
166
  * Request for GenerateServiceIdentity.
116
167
  */
@@ -147,6 +198,19 @@ export declare namespace tpu_v2alpha1 {
147
198
  */
148
199
  guestAttributes?: Schema$GuestAttributes[];
149
200
  }
201
+ /**
202
+ * Guaranteed tier definition.
203
+ */
204
+ export interface Schema$Guaranteed {
205
+ /**
206
+ * Optional. Defines the minimum duration of the guarantee. If specified, the requested resources will only be provisioned if they can be allocated for at least the given duration.
207
+ */
208
+ minDuration?: string | null;
209
+ /**
210
+ * Optional. Specifies the request should be scheduled on reserved capacity.
211
+ */
212
+ reserved?: boolean | null;
213
+ }
150
214
  /**
151
215
  * A guest attributes.
152
216
  */
@@ -186,6 +250,19 @@ export declare namespace tpu_v2alpha1 {
186
250
  */
187
251
  items?: Schema$GuestAttributesEntry[];
188
252
  }
253
+ /**
254
+ * Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time.
255
+ */
256
+ export interface Schema$Interval {
257
+ /**
258
+ * Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end.
259
+ */
260
+ endTime?: string | null;
261
+ /**
262
+ * Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start.
263
+ */
264
+ startTime?: string | null;
265
+ }
189
266
  /**
190
267
  * Response for ListAcceleratorTypes.
191
268
  */
@@ -246,6 +323,23 @@ export declare namespace tpu_v2alpha1 {
246
323
  */
247
324
  operations?: Schema$Operation[];
248
325
  }
326
+ /**
327
+ * Response for ListQueuedResources.
328
+ */
329
+ export interface Schema$ListQueuedResourcesResponse {
330
+ /**
331
+ * The next page token or empty if none.
332
+ */
333
+ nextPageToken?: string | null;
334
+ /**
335
+ * The listed queued resources.
336
+ */
337
+ queuedResources?: Schema$QueuedResource[];
338
+ /**
339
+ * Locations that could not be reached.
340
+ */
341
+ unreachable?: string[] | null;
342
+ }
249
343
  /**
250
344
  * Response for ListRuntimeVersions.
251
345
  */
@@ -264,7 +358,7 @@ export declare namespace tpu_v2alpha1 {
264
358
  unreachable?: string[] | null;
265
359
  }
266
360
  /**
267
- * A resource that represents Google Cloud Platform location.
361
+ * A resource that represents a Google Cloud location.
268
362
  */
269
363
  export interface Schema$Location {
270
364
  /**
@@ -292,6 +386,19 @@ export declare namespace tpu_v2alpha1 {
292
386
  */
293
387
  name?: string | null;
294
388
  }
389
+ /**
390
+ * Parameters to specify for multi-node QueuedResource requests. This field must be populated in case of multi-node requests instead of node_id. It's an error to specify both node_id and multi_node_params.
391
+ */
392
+ export interface Schema$MultiNodeParams {
393
+ /**
394
+ * Required. Number of nodes with this spec. The system will attempt to provison "node_count" nodes as part of the request. This needs to be \> 1.
395
+ */
396
+ nodeCount?: number | null;
397
+ /**
398
+ * Prefix of node_ids in case of multi-node request Should follow the `^[A-Za-z0-9_.~+%-]+$` regex format. If node_count = 3 and node_id_prefix = "np", node ids of nodes created will be "np-0", "np-1", "np-2". If this field is not provided we use queued_resource_id as the node_id_prefix.
399
+ */
400
+ nodeIdPrefix?: string | null;
401
+ }
295
402
  /**
296
403
  * Network related configurations.
297
404
  */
@@ -334,6 +441,10 @@ export declare namespace tpu_v2alpha1 {
334
441
  * A TPU instance.
335
442
  */
336
443
  export interface Schema$Node {
444
+ /**
445
+ * The AccleratorConfig for the TPU Node.
446
+ */
447
+ acceleratorConfig?: Schema$AcceleratorConfig;
337
448
  /**
338
449
  * The type of hardware accelerators associated with this node.
339
450
  */
@@ -382,6 +493,10 @@ export declare namespace tpu_v2alpha1 {
382
493
  metadata?: {
383
494
  [key: string]: string;
384
495
  } | null;
496
+ /**
497
+ * Output only. Whether the Node belongs to a Multislice group.
498
+ */
499
+ multisliceNode?: boolean | null;
385
500
  /**
386
501
  * Output only. Immutable. The name of the TPU.
387
502
  */
@@ -394,6 +509,10 @@ export declare namespace tpu_v2alpha1 {
394
509
  * Output only. The network endpoints where TPU workers can be accessed and sent work. It is recommended that runtime clients of the node reach out to the 0th entry in this map first.
395
510
  */
396
511
  networkEndpoints?: Schema$NetworkEndpoint[];
512
+ /**
513
+ * Output only. The qualified name of the QueuedResource that requested this Node.
514
+ */
515
+ queuedResource?: string | null;
397
516
  /**
398
517
  * Required. The runtime version running in the Node.
399
518
  */
@@ -423,6 +542,27 @@ export declare namespace tpu_v2alpha1 {
423
542
  */
424
543
  tags?: string[] | null;
425
544
  }
545
+ /**
546
+ * Details of the TPU node(s) being requested. Users can request either a single node or multiple nodes. NodeSpec provides the specification for node(s) to be created.
547
+ */
548
+ export interface Schema$NodeSpec {
549
+ /**
550
+ * Optional. Fields to specify in case of multi-node request.
551
+ */
552
+ multiNodeParams?: Schema$MultiNodeParams;
553
+ /**
554
+ * Required. The node.
555
+ */
556
+ node?: Schema$Node;
557
+ /**
558
+ * The unqualified resource name. Should follow the `^[A-Za-z0-9_.~+%-]+$` regex format. This is only specified when requesting a single node. In case of multi-node requests, multi_node_params must be populated instead. It's an error to specify both node_id and multi_node_params.
559
+ */
560
+ nodeId?: string | null;
561
+ /**
562
+ * Required. The parent resource name.
563
+ */
564
+ parent?: string | null;
565
+ }
426
566
  /**
427
567
  * This resource represents a long-running operation that is the result of a network API call.
428
568
  */
@@ -446,7 +586,7 @@ export declare namespace tpu_v2alpha1 {
446
586
  */
447
587
  name?: string | null;
448
588
  /**
449
- * The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
589
+ * The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
450
590
  */
451
591
  response?: {
452
592
  [key: string]: any;
@@ -485,6 +625,123 @@ export declare namespace tpu_v2alpha1 {
485
625
  */
486
626
  verb?: string | null;
487
627
  }
628
+ /**
629
+ * Further data for the provisioning state.
630
+ */
631
+ export interface Schema$ProvisioningData {
632
+ }
633
+ /**
634
+ * A QueuedResource represents a request for resources that will be placed in a queue and fulfilled when the necessary resources are available.
635
+ */
636
+ export interface Schema$QueuedResource {
637
+ /**
638
+ * The BestEffort tier.
639
+ */
640
+ bestEffort?: Schema$BestEffort;
641
+ /**
642
+ * The Guaranteed tier.
643
+ */
644
+ guaranteed?: Schema$Guaranteed;
645
+ /**
646
+ * Output only. Immutable. The name of the QueuedResource.
647
+ */
648
+ name?: string | null;
649
+ /**
650
+ * The queueing policy of the QueuedRequest.
651
+ */
652
+ queueingPolicy?: Schema$QueueingPolicy;
653
+ /**
654
+ * Name of the reservation in which the resource should be provisioned. Format: projects/{project\}/locations/{zone\}/reservations/{reservation\}
655
+ */
656
+ reservationName?: string | null;
657
+ /**
658
+ * Optional. The Spot tier.
659
+ */
660
+ spot?: Schema$Spot;
661
+ /**
662
+ * Output only. State of the QueuedResource request.
663
+ */
664
+ state?: Schema$QueuedResourceState;
665
+ /**
666
+ * Defines a TPU resource.
667
+ */
668
+ tpu?: Schema$Tpu;
669
+ }
670
+ /**
671
+ * QueuedResourceState defines the details of the QueuedResource request.
672
+ */
673
+ export interface Schema$QueuedResourceState {
674
+ /**
675
+ * Further data for the accepted state.
676
+ */
677
+ acceptedData?: Schema$AcceptedData;
678
+ /**
679
+ * Further data for the active state.
680
+ */
681
+ activeData?: Schema$ActiveData;
682
+ /**
683
+ * Further data for the creating state.
684
+ */
685
+ creatingData?: Schema$CreatingData;
686
+ /**
687
+ * Further data for the deleting state.
688
+ */
689
+ deletingData?: Schema$DeletingData;
690
+ /**
691
+ * Further data for the failed state.
692
+ */
693
+ failedData?: Schema$FailedData;
694
+ /**
695
+ * Further data for the provisioning state.
696
+ */
697
+ provisioningData?: Schema$ProvisioningData;
698
+ /**
699
+ * State of the QueuedResource request.
700
+ */
701
+ state?: string | null;
702
+ /**
703
+ * Output only. The initiator of the QueuedResources's current state.
704
+ */
705
+ stateInitiator?: string | null;
706
+ /**
707
+ * Further data for the suspended state.
708
+ */
709
+ suspendedData?: Schema$SuspendedData;
710
+ /**
711
+ * Further data for the suspending state.
712
+ */
713
+ suspendingData?: Schema$SuspendingData;
714
+ }
715
+ /**
716
+ * Defines the policy of the QueuedRequest.
717
+ */
718
+ export interface Schema$QueueingPolicy {
719
+ /**
720
+ * A relative time after which resources may be created.
721
+ */
722
+ validAfterDuration?: string | null;
723
+ /**
724
+ * An absolute time at which resources may be created.
725
+ */
726
+ validAfterTime?: string | null;
727
+ /**
728
+ * An absolute time interval within which resources may be created.
729
+ */
730
+ validInterval?: Schema$Interval;
731
+ /**
732
+ * A relative time after which resources should not be created. If the request cannot be fulfilled by this time the request will be failed.
733
+ */
734
+ validUntilDuration?: string | null;
735
+ /**
736
+ * An absolute time after which resources should not be created. If the request cannot be fulfilled by this time the request will be failed.
737
+ */
738
+ validUntilTime?: string | null;
739
+ }
740
+ /**
741
+ * Request for ResetQueuedResource.
742
+ */
743
+ export interface Schema$ResetQueuedResourceRequest {
744
+ }
488
745
  /**
489
746
  * A runtime version that a Node can be configured with.
490
747
  */
@@ -551,6 +808,11 @@ export declare namespace tpu_v2alpha1 {
551
808
  */
552
809
  workerIds?: string[] | null;
553
810
  }
811
+ /**
812
+ * Spot tier definition.
813
+ */
814
+ export interface Schema$Spot {
815
+ }
554
816
  /**
555
817
  * Request for StartNode.
556
818
  */
@@ -580,6 +842,16 @@ export declare namespace tpu_v2alpha1 {
580
842
  */
581
843
  export interface Schema$StopNodeRequest {
582
844
  }
845
+ /**
846
+ * Further data for the suspended state.
847
+ */
848
+ export interface Schema$SuspendedData {
849
+ }
850
+ /**
851
+ * Further data for the suspending state.
852
+ */
853
+ export interface Schema$SuspendingData {
854
+ }
583
855
  /**
584
856
  * A Symptom instance.
585
857
  */
@@ -601,6 +873,15 @@ export declare namespace tpu_v2alpha1 {
601
873
  */
602
874
  workerId?: string | null;
603
875
  }
876
+ /**
877
+ * Details of the TPU resource(s) being requested.
878
+ */
879
+ export interface Schema$Tpu {
880
+ /**
881
+ * The TPU node(s) being requested.
882
+ */
883
+ nodeSpec?: Schema$NodeSpec[];
884
+ }
604
885
  export class Resource$Projects {
605
886
  context: APIRequestContext;
606
887
  locations: Resource$Projects$Locations;
@@ -611,58 +892,11 @@ export declare namespace tpu_v2alpha1 {
611
892
  acceleratorTypes: Resource$Projects$Locations$Acceleratortypes;
612
893
  nodes: Resource$Projects$Locations$Nodes;
613
894
  operations: Resource$Projects$Locations$Operations;
895
+ queuedResources: Resource$Projects$Locations$Queuedresources;
614
896
  runtimeVersions: Resource$Projects$Locations$Runtimeversions;
615
897
  constructor(context: APIRequestContext);
616
898
  /**
617
899
  * Generates the Cloud TPU service identity for the project.
618
- * @example
619
- * ```js
620
- * // Before running the sample:
621
- * // - Enable the API at:
622
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
623
- * // - Login into gcloud by running:
624
- * // `$ gcloud auth application-default login`
625
- * // - Install the npm module by running:
626
- * // `$ npm install googleapis`
627
- *
628
- * const {google} = require('googleapis');
629
- * const tpu = google.tpu('v2alpha1');
630
- *
631
- * async function main() {
632
- * const auth = new google.auth.GoogleAuth({
633
- * // Scopes can be specified either as an array or as a single, space-delimited string.
634
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
635
- * });
636
- *
637
- * // Acquire an auth client, and bind it to all future calls
638
- * const authClient = await auth.getClient();
639
- * google.options({auth: authClient});
640
- *
641
- * // Do the magic
642
- * const res = await tpu.projects.locations.generateServiceIdentity({
643
- * // Required. The parent resource name.
644
- * parent: 'projects/my-project/locations/my-location',
645
- *
646
- * // Request body metadata
647
- * requestBody: {
648
- * // request body parameters
649
- * // {}
650
- * },
651
- * });
652
- * console.log(res.data);
653
- *
654
- * // Example response
655
- * // {
656
- * // "identity": {}
657
- * // }
658
- * }
659
- *
660
- * main().catch(e => {
661
- * console.error(e);
662
- * throw e;
663
- * });
664
- *
665
- * ```
666
900
  *
667
901
  * @param params - Parameters for request
668
902
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -677,52 +911,6 @@ export declare namespace tpu_v2alpha1 {
677
911
  generateServiceIdentity(callback: BodyResponseCallback<Schema$GenerateServiceIdentityResponse>): void;
678
912
  /**
679
913
  * Gets information about a location.
680
- * @example
681
- * ```js
682
- * // Before running the sample:
683
- * // - Enable the API at:
684
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
685
- * // - Login into gcloud by running:
686
- * // `$ gcloud auth application-default login`
687
- * // - Install the npm module by running:
688
- * // `$ npm install googleapis`
689
- *
690
- * const {google} = require('googleapis');
691
- * const tpu = google.tpu('v2alpha1');
692
- *
693
- * async function main() {
694
- * const auth = new google.auth.GoogleAuth({
695
- * // Scopes can be specified either as an array or as a single, space-delimited string.
696
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
697
- * });
698
- *
699
- * // Acquire an auth client, and bind it to all future calls
700
- * const authClient = await auth.getClient();
701
- * google.options({auth: authClient});
702
- *
703
- * // Do the magic
704
- * const res = await tpu.projects.locations.get({
705
- * // Resource name for the location.
706
- * name: 'projects/my-project/locations/my-location',
707
- * });
708
- * console.log(res.data);
709
- *
710
- * // Example response
711
- * // {
712
- * // "displayName": "my_displayName",
713
- * // "labels": {},
714
- * // "locationId": "my_locationId",
715
- * // "metadata": {},
716
- * // "name": "my_name"
717
- * // }
718
- * }
719
- *
720
- * main().catch(e => {
721
- * console.error(e);
722
- * throw e;
723
- * });
724
- *
725
- * ```
726
914
  *
727
915
  * @param params - Parameters for request
728
916
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -737,55 +925,6 @@ export declare namespace tpu_v2alpha1 {
737
925
  get(callback: BodyResponseCallback<Schema$Location>): void;
738
926
  /**
739
927
  * Lists information about the supported locations for this service.
740
- * @example
741
- * ```js
742
- * // Before running the sample:
743
- * // - Enable the API at:
744
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
745
- * // - Login into gcloud by running:
746
- * // `$ gcloud auth application-default login`
747
- * // - Install the npm module by running:
748
- * // `$ npm install googleapis`
749
- *
750
- * const {google} = require('googleapis');
751
- * const tpu = google.tpu('v2alpha1');
752
- *
753
- * async function main() {
754
- * const auth = new google.auth.GoogleAuth({
755
- * // Scopes can be specified either as an array or as a single, space-delimited string.
756
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
757
- * });
758
- *
759
- * // Acquire an auth client, and bind it to all future calls
760
- * const authClient = await auth.getClient();
761
- * google.options({auth: authClient});
762
- *
763
- * // Do the magic
764
- * const res = await tpu.projects.locations.list({
765
- * // 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).
766
- * filter: 'placeholder-value',
767
- * // The resource that owns the locations collection, if applicable.
768
- * name: 'projects/my-project',
769
- * // The maximum number of results to return. If not set, the service selects a default.
770
- * pageSize: 'placeholder-value',
771
- * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.
772
- * pageToken: 'placeholder-value',
773
- * });
774
- * console.log(res.data);
775
- *
776
- * // Example response
777
- * // {
778
- * // "locations": [],
779
- * // "nextPageToken": "my_nextPageToken"
780
- * // }
781
- * }
782
- *
783
- * main().catch(e => {
784
- * console.error(e);
785
- * throw e;
786
- * });
787
- *
788
- * ```
789
928
  *
790
929
  * @param params - Parameters for request
791
930
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -838,49 +977,6 @@ export declare namespace tpu_v2alpha1 {
838
977
  constructor(context: APIRequestContext);
839
978
  /**
840
979
  * Gets AcceleratorType.
841
- * @example
842
- * ```js
843
- * // Before running the sample:
844
- * // - Enable the API at:
845
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
846
- * // - Login into gcloud by running:
847
- * // `$ gcloud auth application-default login`
848
- * // - Install the npm module by running:
849
- * // `$ npm install googleapis`
850
- *
851
- * const {google} = require('googleapis');
852
- * const tpu = google.tpu('v2alpha1');
853
- *
854
- * async function main() {
855
- * const auth = new google.auth.GoogleAuth({
856
- * // Scopes can be specified either as an array or as a single, space-delimited string.
857
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
858
- * });
859
- *
860
- * // Acquire an auth client, and bind it to all future calls
861
- * const authClient = await auth.getClient();
862
- * google.options({auth: authClient});
863
- *
864
- * // Do the magic
865
- * const res = await tpu.projects.locations.acceleratorTypes.get({
866
- * // Required. The resource name.
867
- * name: 'projects/my-project/locations/my-location/acceleratorTypes/my-acceleratorType',
868
- * });
869
- * console.log(res.data);
870
- *
871
- * // Example response
872
- * // {
873
- * // "name": "my_name",
874
- * // "type": "my_type"
875
- * // }
876
- * }
877
- *
878
- * main().catch(e => {
879
- * console.error(e);
880
- * throw e;
881
- * });
882
- *
883
- * ```
884
980
  *
885
981
  * @param params - Parameters for request
886
982
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -895,58 +991,6 @@ export declare namespace tpu_v2alpha1 {
895
991
  get(callback: BodyResponseCallback<Schema$AcceleratorType>): void;
896
992
  /**
897
993
  * Lists accelerator types supported by this API.
898
- * @example
899
- * ```js
900
- * // Before running the sample:
901
- * // - Enable the API at:
902
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
903
- * // - Login into gcloud by running:
904
- * // `$ gcloud auth application-default login`
905
- * // - Install the npm module by running:
906
- * // `$ npm install googleapis`
907
- *
908
- * const {google} = require('googleapis');
909
- * const tpu = google.tpu('v2alpha1');
910
- *
911
- * async function main() {
912
- * const auth = new google.auth.GoogleAuth({
913
- * // Scopes can be specified either as an array or as a single, space-delimited string.
914
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
915
- * });
916
- *
917
- * // Acquire an auth client, and bind it to all future calls
918
- * const authClient = await auth.getClient();
919
- * google.options({auth: authClient});
920
- *
921
- * // Do the magic
922
- * const res = await tpu.projects.locations.acceleratorTypes.list({
923
- * // List filter.
924
- * filter: 'placeholder-value',
925
- * // Sort results.
926
- * orderBy: 'placeholder-value',
927
- * // The maximum number of items to return.
928
- * pageSize: 'placeholder-value',
929
- * // The next_page_token value returned from a previous List request, if any.
930
- * pageToken: 'placeholder-value',
931
- * // Required. The parent resource name.
932
- * parent: 'projects/my-project/locations/my-location',
933
- * });
934
- * console.log(res.data);
935
- *
936
- * // Example response
937
- * // {
938
- * // "acceleratorTypes": [],
939
- * // "nextPageToken": "my_nextPageToken",
940
- * // "unreachable": []
941
- * // }
942
- * }
943
- *
944
- * main().catch(e => {
945
- * console.error(e);
946
- * throw e;
947
- * });
948
- *
949
- * ```
950
994
  *
951
995
  * @param params - Parameters for request
952
996
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -993,84 +1037,6 @@ export declare namespace tpu_v2alpha1 {
993
1037
  constructor(context: APIRequestContext);
994
1038
  /**
995
1039
  * Creates a node.
996
- * @example
997
- * ```js
998
- * // Before running the sample:
999
- * // - Enable the API at:
1000
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1001
- * // - Login into gcloud by running:
1002
- * // `$ gcloud auth application-default login`
1003
- * // - Install the npm module by running:
1004
- * // `$ npm install googleapis`
1005
- *
1006
- * const {google} = require('googleapis');
1007
- * const tpu = google.tpu('v2alpha1');
1008
- *
1009
- * async function main() {
1010
- * const auth = new google.auth.GoogleAuth({
1011
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1012
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1013
- * });
1014
- *
1015
- * // Acquire an auth client, and bind it to all future calls
1016
- * const authClient = await auth.getClient();
1017
- * google.options({auth: authClient});
1018
- *
1019
- * // Do the magic
1020
- * const res = await tpu.projects.locations.nodes.create({
1021
- * // The unqualified resource name.
1022
- * nodeId: 'placeholder-value',
1023
- * // Required. The parent resource name.
1024
- * parent: 'projects/my-project/locations/my-location',
1025
- * // Idempotent request UUID.
1026
- * requestId: 'placeholder-value',
1027
- *
1028
- * // Request body metadata
1029
- * requestBody: {
1030
- * // request body parameters
1031
- * // {
1032
- * // "acceleratorType": "my_acceleratorType",
1033
- * // "apiVersion": "my_apiVersion",
1034
- * // "cidrBlock": "my_cidrBlock",
1035
- * // "createTime": "my_createTime",
1036
- * // "dataDisks": [],
1037
- * // "description": "my_description",
1038
- * // "health": "my_health",
1039
- * // "healthDescription": "my_healthDescription",
1040
- * // "id": "my_id",
1041
- * // "labels": {},
1042
- * // "metadata": {},
1043
- * // "name": "my_name",
1044
- * // "networkConfig": {},
1045
- * // "networkEndpoints": [],
1046
- * // "runtimeVersion": "my_runtimeVersion",
1047
- * // "schedulingConfig": {},
1048
- * // "serviceAccount": {},
1049
- * // "shieldedInstanceConfig": {},
1050
- * // "state": "my_state",
1051
- * // "symptoms": [],
1052
- * // "tags": []
1053
- * // }
1054
- * },
1055
- * });
1056
- * console.log(res.data);
1057
- *
1058
- * // Example response
1059
- * // {
1060
- * // "done": false,
1061
- * // "error": {},
1062
- * // "metadata": {},
1063
- * // "name": "my_name",
1064
- * // "response": {}
1065
- * // }
1066
- * }
1067
- *
1068
- * main().catch(e => {
1069
- * console.error(e);
1070
- * throw e;
1071
- * });
1072
- *
1073
- * ```
1074
1040
  *
1075
1041
  * @param params - Parameters for request
1076
1042
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1085,54 +1051,6 @@ export declare namespace tpu_v2alpha1 {
1085
1051
  create(callback: BodyResponseCallback<Schema$Operation>): void;
1086
1052
  /**
1087
1053
  * Deletes a node.
1088
- * @example
1089
- * ```js
1090
- * // Before running the sample:
1091
- * // - Enable the API at:
1092
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1093
- * // - Login into gcloud by running:
1094
- * // `$ gcloud auth application-default login`
1095
- * // - Install the npm module by running:
1096
- * // `$ npm install googleapis`
1097
- *
1098
- * const {google} = require('googleapis');
1099
- * const tpu = google.tpu('v2alpha1');
1100
- *
1101
- * async function main() {
1102
- * const auth = new google.auth.GoogleAuth({
1103
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1104
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1105
- * });
1106
- *
1107
- * // Acquire an auth client, and bind it to all future calls
1108
- * const authClient = await auth.getClient();
1109
- * google.options({auth: authClient});
1110
- *
1111
- * // Do the magic
1112
- * const res = await tpu.projects.locations.nodes.delete({
1113
- * // Required. The resource name.
1114
- * name: 'projects/my-project/locations/my-location/nodes/my-node',
1115
- * // Idempotent request UUID.
1116
- * requestId: 'placeholder-value',
1117
- * });
1118
- * console.log(res.data);
1119
- *
1120
- * // Example response
1121
- * // {
1122
- * // "done": false,
1123
- * // "error": {},
1124
- * // "metadata": {},
1125
- * // "name": "my_name",
1126
- * // "response": {}
1127
- * // }
1128
- * }
1129
- *
1130
- * main().catch(e => {
1131
- * console.error(e);
1132
- * throw e;
1133
- * });
1134
- *
1135
- * ```
1136
1054
  *
1137
1055
  * @param params - Parameters for request
1138
1056
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1147,68 +1065,6 @@ export declare namespace tpu_v2alpha1 {
1147
1065
  delete(callback: BodyResponseCallback<Schema$Operation>): void;
1148
1066
  /**
1149
1067
  * Gets the details of a node.
1150
- * @example
1151
- * ```js
1152
- * // Before running the sample:
1153
- * // - Enable the API at:
1154
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1155
- * // - Login into gcloud by running:
1156
- * // `$ gcloud auth application-default login`
1157
- * // - Install the npm module by running:
1158
- * // `$ npm install googleapis`
1159
- *
1160
- * const {google} = require('googleapis');
1161
- * const tpu = google.tpu('v2alpha1');
1162
- *
1163
- * async function main() {
1164
- * const auth = new google.auth.GoogleAuth({
1165
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1166
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1167
- * });
1168
- *
1169
- * // Acquire an auth client, and bind it to all future calls
1170
- * const authClient = await auth.getClient();
1171
- * google.options({auth: authClient});
1172
- *
1173
- * // Do the magic
1174
- * const res = await tpu.projects.locations.nodes.get({
1175
- * // Required. The resource name.
1176
- * name: 'projects/my-project/locations/my-location/nodes/my-node',
1177
- * });
1178
- * console.log(res.data);
1179
- *
1180
- * // Example response
1181
- * // {
1182
- * // "acceleratorType": "my_acceleratorType",
1183
- * // "apiVersion": "my_apiVersion",
1184
- * // "cidrBlock": "my_cidrBlock",
1185
- * // "createTime": "my_createTime",
1186
- * // "dataDisks": [],
1187
- * // "description": "my_description",
1188
- * // "health": "my_health",
1189
- * // "healthDescription": "my_healthDescription",
1190
- * // "id": "my_id",
1191
- * // "labels": {},
1192
- * // "metadata": {},
1193
- * // "name": "my_name",
1194
- * // "networkConfig": {},
1195
- * // "networkEndpoints": [],
1196
- * // "runtimeVersion": "my_runtimeVersion",
1197
- * // "schedulingConfig": {},
1198
- * // "serviceAccount": {},
1199
- * // "shieldedInstanceConfig": {},
1200
- * // "state": "my_state",
1201
- * // "symptoms": [],
1202
- * // "tags": []
1203
- * // }
1204
- * }
1205
- *
1206
- * main().catch(e => {
1207
- * console.error(e);
1208
- * throw e;
1209
- * });
1210
- *
1211
- * ```
1212
1068
  *
1213
1069
  * @param params - Parameters for request
1214
1070
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1223,57 +1079,6 @@ export declare namespace tpu_v2alpha1 {
1223
1079
  get(callback: BodyResponseCallback<Schema$Node>): void;
1224
1080
  /**
1225
1081
  * Retrieves the guest attributes for the node.
1226
- * @example
1227
- * ```js
1228
- * // Before running the sample:
1229
- * // - Enable the API at:
1230
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1231
- * // - Login into gcloud by running:
1232
- * // `$ gcloud auth application-default login`
1233
- * // - Install the npm module by running:
1234
- * // `$ npm install googleapis`
1235
- *
1236
- * const {google} = require('googleapis');
1237
- * const tpu = google.tpu('v2alpha1');
1238
- *
1239
- * async function main() {
1240
- * const auth = new google.auth.GoogleAuth({
1241
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1242
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1243
- * });
1244
- *
1245
- * // Acquire an auth client, and bind it to all future calls
1246
- * const authClient = await auth.getClient();
1247
- * google.options({auth: authClient});
1248
- *
1249
- * // Do the magic
1250
- * const res = await tpu.projects.locations.nodes.getGuestAttributes({
1251
- * // Required. The resource name.
1252
- * name: 'projects/my-project/locations/my-location/nodes/my-node',
1253
- *
1254
- * // Request body metadata
1255
- * requestBody: {
1256
- * // request body parameters
1257
- * // {
1258
- * // "queryPath": "my_queryPath",
1259
- * // "workerIds": []
1260
- * // }
1261
- * },
1262
- * });
1263
- * console.log(res.data);
1264
- *
1265
- * // Example response
1266
- * // {
1267
- * // "guestAttributes": []
1268
- * // }
1269
- * }
1270
- *
1271
- * main().catch(e => {
1272
- * console.error(e);
1273
- * throw e;
1274
- * });
1275
- *
1276
- * ```
1277
1082
  *
1278
1083
  * @param params - Parameters for request
1279
1084
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1288,54 +1093,6 @@ export declare namespace tpu_v2alpha1 {
1288
1093
  getGuestAttributes(callback: BodyResponseCallback<Schema$GetGuestAttributesResponse>): void;
1289
1094
  /**
1290
1095
  * Lists nodes.
1291
- * @example
1292
- * ```js
1293
- * // Before running the sample:
1294
- * // - Enable the API at:
1295
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1296
- * // - Login into gcloud by running:
1297
- * // `$ gcloud auth application-default login`
1298
- * // - Install the npm module by running:
1299
- * // `$ npm install googleapis`
1300
- *
1301
- * const {google} = require('googleapis');
1302
- * const tpu = google.tpu('v2alpha1');
1303
- *
1304
- * async function main() {
1305
- * const auth = new google.auth.GoogleAuth({
1306
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1307
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1308
- * });
1309
- *
1310
- * // Acquire an auth client, and bind it to all future calls
1311
- * const authClient = await auth.getClient();
1312
- * google.options({auth: authClient});
1313
- *
1314
- * // Do the magic
1315
- * const res = await tpu.projects.locations.nodes.list({
1316
- * // The maximum number of items to return.
1317
- * pageSize: 'placeholder-value',
1318
- * // The next_page_token value returned from a previous List request, if any.
1319
- * pageToken: 'placeholder-value',
1320
- * // Required. The parent resource name.
1321
- * parent: 'projects/my-project/locations/my-location',
1322
- * });
1323
- * console.log(res.data);
1324
- *
1325
- * // Example response
1326
- * // {
1327
- * // "nextPageToken": "my_nextPageToken",
1328
- * // "nodes": [],
1329
- * // "unreachable": []
1330
- * // }
1331
- * }
1332
- *
1333
- * main().catch(e => {
1334
- * console.error(e);
1335
- * throw e;
1336
- * });
1337
- *
1338
- * ```
1339
1096
  *
1340
1097
  * @param params - Parameters for request
1341
1098
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1350,82 +1107,6 @@ export declare namespace tpu_v2alpha1 {
1350
1107
  list(callback: BodyResponseCallback<Schema$ListNodesResponse>): void;
1351
1108
  /**
1352
1109
  * Updates the configurations of a node.
1353
- * @example
1354
- * ```js
1355
- * // Before running the sample:
1356
- * // - Enable the API at:
1357
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1358
- * // - Login into gcloud by running:
1359
- * // `$ gcloud auth application-default login`
1360
- * // - Install the npm module by running:
1361
- * // `$ npm install googleapis`
1362
- *
1363
- * const {google} = require('googleapis');
1364
- * const tpu = google.tpu('v2alpha1');
1365
- *
1366
- * async function main() {
1367
- * const auth = new google.auth.GoogleAuth({
1368
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1369
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1370
- * });
1371
- *
1372
- * // Acquire an auth client, and bind it to all future calls
1373
- * const authClient = await auth.getClient();
1374
- * google.options({auth: authClient});
1375
- *
1376
- * // Do the magic
1377
- * const res = await tpu.projects.locations.nodes.patch({
1378
- * // Output only. Immutable. The name of the TPU.
1379
- * name: 'projects/my-project/locations/my-location/nodes/my-node',
1380
- * // Required. Mask of fields from Node to update. Supported fields: [description, tags, labels, metadata, network_config.enable_external_ips].
1381
- * updateMask: 'placeholder-value',
1382
- *
1383
- * // Request body metadata
1384
- * requestBody: {
1385
- * // request body parameters
1386
- * // {
1387
- * // "acceleratorType": "my_acceleratorType",
1388
- * // "apiVersion": "my_apiVersion",
1389
- * // "cidrBlock": "my_cidrBlock",
1390
- * // "createTime": "my_createTime",
1391
- * // "dataDisks": [],
1392
- * // "description": "my_description",
1393
- * // "health": "my_health",
1394
- * // "healthDescription": "my_healthDescription",
1395
- * // "id": "my_id",
1396
- * // "labels": {},
1397
- * // "metadata": {},
1398
- * // "name": "my_name",
1399
- * // "networkConfig": {},
1400
- * // "networkEndpoints": [],
1401
- * // "runtimeVersion": "my_runtimeVersion",
1402
- * // "schedulingConfig": {},
1403
- * // "serviceAccount": {},
1404
- * // "shieldedInstanceConfig": {},
1405
- * // "state": "my_state",
1406
- * // "symptoms": [],
1407
- * // "tags": []
1408
- * // }
1409
- * },
1410
- * });
1411
- * console.log(res.data);
1412
- *
1413
- * // Example response
1414
- * // {
1415
- * // "done": false,
1416
- * // "error": {},
1417
- * // "metadata": {},
1418
- * // "name": "my_name",
1419
- * // "response": {}
1420
- * // }
1421
- * }
1422
- *
1423
- * main().catch(e => {
1424
- * console.error(e);
1425
- * throw e;
1426
- * });
1427
- *
1428
- * ```
1429
1110
  *
1430
1111
  * @param params - Parameters for request
1431
1112
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1440,60 +1121,6 @@ export declare namespace tpu_v2alpha1 {
1440
1121
  patch(callback: BodyResponseCallback<Schema$Operation>): void;
1441
1122
  /**
1442
1123
  * Simulates a maintenance event.
1443
- * @example
1444
- * ```js
1445
- * // Before running the sample:
1446
- * // - Enable the API at:
1447
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1448
- * // - Login into gcloud by running:
1449
- * // `$ gcloud auth application-default login`
1450
- * // - Install the npm module by running:
1451
- * // `$ npm install googleapis`
1452
- *
1453
- * const {google} = require('googleapis');
1454
- * const tpu = google.tpu('v2alpha1');
1455
- *
1456
- * async function main() {
1457
- * const auth = new google.auth.GoogleAuth({
1458
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1459
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1460
- * });
1461
- *
1462
- * // Acquire an auth client, and bind it to all future calls
1463
- * const authClient = await auth.getClient();
1464
- * google.options({auth: authClient});
1465
- *
1466
- * // Do the magic
1467
- * const res = await tpu.projects.locations.nodes.simulateMaintenanceEvent({
1468
- * // Required. The resource name.
1469
- * name: 'projects/my-project/locations/my-location/nodes/my-node',
1470
- *
1471
- * // Request body metadata
1472
- * requestBody: {
1473
- * // request body parameters
1474
- * // {
1475
- * // "workerIds": []
1476
- * // }
1477
- * },
1478
- * });
1479
- * console.log(res.data);
1480
- *
1481
- * // Example response
1482
- * // {
1483
- * // "done": false,
1484
- * // "error": {},
1485
- * // "metadata": {},
1486
- * // "name": "my_name",
1487
- * // "response": {}
1488
- * // }
1489
- * }
1490
- *
1491
- * main().catch(e => {
1492
- * console.error(e);
1493
- * throw e;
1494
- * });
1495
- *
1496
- * ```
1497
1124
  *
1498
1125
  * @param params - Parameters for request
1499
1126
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1508,58 +1135,6 @@ export declare namespace tpu_v2alpha1 {
1508
1135
  simulateMaintenanceEvent(callback: BodyResponseCallback<Schema$Operation>): void;
1509
1136
  /**
1510
1137
  * Starts a node.
1511
- * @example
1512
- * ```js
1513
- * // Before running the sample:
1514
- * // - Enable the API at:
1515
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1516
- * // - Login into gcloud by running:
1517
- * // `$ gcloud auth application-default login`
1518
- * // - Install the npm module by running:
1519
- * // `$ npm install googleapis`
1520
- *
1521
- * const {google} = require('googleapis');
1522
- * const tpu = google.tpu('v2alpha1');
1523
- *
1524
- * async function main() {
1525
- * const auth = new google.auth.GoogleAuth({
1526
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1527
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1528
- * });
1529
- *
1530
- * // Acquire an auth client, and bind it to all future calls
1531
- * const authClient = await auth.getClient();
1532
- * google.options({auth: authClient});
1533
- *
1534
- * // Do the magic
1535
- * const res = await tpu.projects.locations.nodes.start({
1536
- * // The resource name.
1537
- * name: 'projects/my-project/locations/my-location/nodes/my-node',
1538
- *
1539
- * // Request body metadata
1540
- * requestBody: {
1541
- * // request body parameters
1542
- * // {}
1543
- * },
1544
- * });
1545
- * console.log(res.data);
1546
- *
1547
- * // Example response
1548
- * // {
1549
- * // "done": false,
1550
- * // "error": {},
1551
- * // "metadata": {},
1552
- * // "name": "my_name",
1553
- * // "response": {}
1554
- * // }
1555
- * }
1556
- *
1557
- * main().catch(e => {
1558
- * console.error(e);
1559
- * throw e;
1560
- * });
1561
- *
1562
- * ```
1563
1138
  *
1564
1139
  * @param params - Parameters for request
1565
1140
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1574,58 +1149,6 @@ export declare namespace tpu_v2alpha1 {
1574
1149
  start(callback: BodyResponseCallback<Schema$Operation>): void;
1575
1150
  /**
1576
1151
  * Stops a node. This operation is only available with single TPU nodes.
1577
- * @example
1578
- * ```js
1579
- * // Before running the sample:
1580
- * // - Enable the API at:
1581
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1582
- * // - Login into gcloud by running:
1583
- * // `$ gcloud auth application-default login`
1584
- * // - Install the npm module by running:
1585
- * // `$ npm install googleapis`
1586
- *
1587
- * const {google} = require('googleapis');
1588
- * const tpu = google.tpu('v2alpha1');
1589
- *
1590
- * async function main() {
1591
- * const auth = new google.auth.GoogleAuth({
1592
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1593
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1594
- * });
1595
- *
1596
- * // Acquire an auth client, and bind it to all future calls
1597
- * const authClient = await auth.getClient();
1598
- * google.options({auth: authClient});
1599
- *
1600
- * // Do the magic
1601
- * const res = await tpu.projects.locations.nodes.stop({
1602
- * // The resource name.
1603
- * name: 'projects/my-project/locations/my-location/nodes/my-node',
1604
- *
1605
- * // Request body metadata
1606
- * requestBody: {
1607
- * // request body parameters
1608
- * // {}
1609
- * },
1610
- * });
1611
- * console.log(res.data);
1612
- *
1613
- * // Example response
1614
- * // {
1615
- * // "done": false,
1616
- * // "error": {},
1617
- * // "metadata": {},
1618
- * // "name": "my_name",
1619
- * // "response": {}
1620
- * // }
1621
- * }
1622
- *
1623
- * main().catch(e => {
1624
- * console.error(e);
1625
- * throw e;
1626
- * });
1627
- *
1628
- * ```
1629
1152
  *
1630
1153
  * @param params - Parameters for request
1631
1154
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1723,7 +1246,7 @@ export declare namespace tpu_v2alpha1 {
1723
1246
  }
1724
1247
  export interface Params$Resource$Projects$Locations$Nodes$Start extends StandardParameters {
1725
1248
  /**
1726
- * The resource name.
1249
+ * Required. The resource name.
1727
1250
  */
1728
1251
  name?: string;
1729
1252
  /**
@@ -1733,7 +1256,7 @@ export declare namespace tpu_v2alpha1 {
1733
1256
  }
1734
1257
  export interface Params$Resource$Projects$Locations$Nodes$Stop extends StandardParameters {
1735
1258
  /**
1736
- * The resource name.
1259
+ * Required. The resource name.
1737
1260
  */
1738
1261
  name?: string;
1739
1262
  /**
@@ -1746,46 +1269,6 @@ export declare namespace tpu_v2alpha1 {
1746
1269
  constructor(context: APIRequestContext);
1747
1270
  /**
1748
1271
  * 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`.
1749
- * @example
1750
- * ```js
1751
- * // Before running the sample:
1752
- * // - Enable the API at:
1753
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1754
- * // - Login into gcloud by running:
1755
- * // `$ gcloud auth application-default login`
1756
- * // - Install the npm module by running:
1757
- * // `$ npm install googleapis`
1758
- *
1759
- * const {google} = require('googleapis');
1760
- * const tpu = google.tpu('v2alpha1');
1761
- *
1762
- * async function main() {
1763
- * const auth = new google.auth.GoogleAuth({
1764
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1765
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1766
- * });
1767
- *
1768
- * // Acquire an auth client, and bind it to all future calls
1769
- * const authClient = await auth.getClient();
1770
- * google.options({auth: authClient});
1771
- *
1772
- * // Do the magic
1773
- * const res = await tpu.projects.locations.operations.cancel({
1774
- * // The name of the operation resource to be cancelled.
1775
- * name: 'projects/my-project/locations/my-location/operations/my-operation',
1776
- * });
1777
- * console.log(res.data);
1778
- *
1779
- * // Example response
1780
- * // {}
1781
- * }
1782
- *
1783
- * main().catch(e => {
1784
- * console.error(e);
1785
- * throw e;
1786
- * });
1787
- *
1788
- * ```
1789
1272
  *
1790
1273
  * @param params - Parameters for request
1791
1274
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1800,46 +1283,6 @@ export declare namespace tpu_v2alpha1 {
1800
1283
  cancel(callback: BodyResponseCallback<Schema$Empty>): void;
1801
1284
  /**
1802
1285
  * Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
1803
- * @example
1804
- * ```js
1805
- * // Before running the sample:
1806
- * // - Enable the API at:
1807
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1808
- * // - Login into gcloud by running:
1809
- * // `$ gcloud auth application-default login`
1810
- * // - Install the npm module by running:
1811
- * // `$ npm install googleapis`
1812
- *
1813
- * const {google} = require('googleapis');
1814
- * const tpu = google.tpu('v2alpha1');
1815
- *
1816
- * async function main() {
1817
- * const auth = new google.auth.GoogleAuth({
1818
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1819
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1820
- * });
1821
- *
1822
- * // Acquire an auth client, and bind it to all future calls
1823
- * const authClient = await auth.getClient();
1824
- * google.options({auth: authClient});
1825
- *
1826
- * // Do the magic
1827
- * const res = await tpu.projects.locations.operations.delete({
1828
- * // The name of the operation resource to be deleted.
1829
- * name: 'projects/my-project/locations/my-location/operations/my-operation',
1830
- * });
1831
- * console.log(res.data);
1832
- *
1833
- * // Example response
1834
- * // {}
1835
- * }
1836
- *
1837
- * main().catch(e => {
1838
- * console.error(e);
1839
- * throw e;
1840
- * });
1841
- *
1842
- * ```
1843
1286
  *
1844
1287
  * @param params - Parameters for request
1845
1288
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1854,52 +1297,6 @@ export declare namespace tpu_v2alpha1 {
1854
1297
  delete(callback: BodyResponseCallback<Schema$Empty>): void;
1855
1298
  /**
1856
1299
  * Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
1857
- * @example
1858
- * ```js
1859
- * // Before running the sample:
1860
- * // - Enable the API at:
1861
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1862
- * // - Login into gcloud by running:
1863
- * // `$ gcloud auth application-default login`
1864
- * // - Install the npm module by running:
1865
- * // `$ npm install googleapis`
1866
- *
1867
- * const {google} = require('googleapis');
1868
- * const tpu = google.tpu('v2alpha1');
1869
- *
1870
- * async function main() {
1871
- * const auth = new google.auth.GoogleAuth({
1872
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1873
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1874
- * });
1875
- *
1876
- * // Acquire an auth client, and bind it to all future calls
1877
- * const authClient = await auth.getClient();
1878
- * google.options({auth: authClient});
1879
- *
1880
- * // Do the magic
1881
- * const res = await tpu.projects.locations.operations.get({
1882
- * // The name of the operation resource.
1883
- * name: 'projects/my-project/locations/my-location/operations/my-operation',
1884
- * });
1885
- * console.log(res.data);
1886
- *
1887
- * // Example response
1888
- * // {
1889
- * // "done": false,
1890
- * // "error": {},
1891
- * // "metadata": {},
1892
- * // "name": "my_name",
1893
- * // "response": {}
1894
- * // }
1895
- * }
1896
- *
1897
- * main().catch(e => {
1898
- * console.error(e);
1899
- * throw e;
1900
- * });
1901
- *
1902
- * ```
1903
1300
  *
1904
1301
  * @param params - Parameters for request
1905
1302
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1913,56 +1310,7 @@ export declare namespace tpu_v2alpha1 {
1913
1310
  get(params: Params$Resource$Projects$Locations$Operations$Get, callback: BodyResponseCallback<Schema$Operation>): void;
1914
1311
  get(callback: BodyResponseCallback<Schema$Operation>): void;
1915
1312
  /**
1916
- * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/x/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/x\}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.
1917
- * @example
1918
- * ```js
1919
- * // Before running the sample:
1920
- * // - Enable the API at:
1921
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1922
- * // - Login into gcloud by running:
1923
- * // `$ gcloud auth application-default login`
1924
- * // - Install the npm module by running:
1925
- * // `$ npm install googleapis`
1926
- *
1927
- * const {google} = require('googleapis');
1928
- * const tpu = google.tpu('v2alpha1');
1929
- *
1930
- * async function main() {
1931
- * const auth = new google.auth.GoogleAuth({
1932
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1933
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1934
- * });
1935
- *
1936
- * // Acquire an auth client, and bind it to all future calls
1937
- * const authClient = await auth.getClient();
1938
- * google.options({auth: authClient});
1939
- *
1940
- * // Do the magic
1941
- * const res = await tpu.projects.locations.operations.list({
1942
- * // The standard list filter.
1943
- * filter: 'placeholder-value',
1944
- * // The name of the operation's parent resource.
1945
- * name: 'projects/my-project/locations/my-location',
1946
- * // The standard list page size.
1947
- * pageSize: 'placeholder-value',
1948
- * // The standard list page token.
1949
- * pageToken: 'placeholder-value',
1950
- * });
1951
- * console.log(res.data);
1952
- *
1953
- * // Example response
1954
- * // {
1955
- * // "nextPageToken": "my_nextPageToken",
1956
- * // "operations": []
1957
- * // }
1958
- * }
1959
- *
1960
- * main().catch(e => {
1961
- * console.error(e);
1962
- * throw e;
1963
- * });
1964
- *
1965
- * ```
1313
+ * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
1966
1314
  *
1967
1315
  * @param params - Parameters for request
1968
1316
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2012,54 +1360,147 @@ export declare namespace tpu_v2alpha1 {
2012
1360
  */
2013
1361
  pageToken?: string;
2014
1362
  }
2015
- export class Resource$Projects$Locations$Runtimeversions {
1363
+ export class Resource$Projects$Locations$Queuedresources {
2016
1364
  context: APIRequestContext;
2017
1365
  constructor(context: APIRequestContext);
2018
1366
  /**
2019
- * Gets a runtime version.
2020
- * @example
2021
- * ```js
2022
- * // Before running the sample:
2023
- * // - Enable the API at:
2024
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
2025
- * // - Login into gcloud by running:
2026
- * // `$ gcloud auth application-default login`
2027
- * // - Install the npm module by running:
2028
- * // `$ npm install googleapis`
2029
- *
2030
- * const {google} = require('googleapis');
2031
- * const tpu = google.tpu('v2alpha1');
1367
+ * Creates a QueuedResource TPU instance.
2032
1368
  *
2033
- * async function main() {
2034
- * const auth = new google.auth.GoogleAuth({
2035
- * // Scopes can be specified either as an array or as a single, space-delimited string.
2036
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2037
- * });
2038
- *
2039
- * // Acquire an auth client, and bind it to all future calls
2040
- * const authClient = await auth.getClient();
2041
- * google.options({auth: authClient});
1369
+ * @param params - Parameters for request
1370
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1371
+ * @param callback - Optional callback that handles the response.
1372
+ * @returns A promise if used with async/await, or void if used with a callback.
1373
+ */
1374
+ create(params: Params$Resource$Projects$Locations$Queuedresources$Create, options: StreamMethodOptions): GaxiosPromise<Readable>;
1375
+ create(params?: Params$Resource$Projects$Locations$Queuedresources$Create, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
1376
+ create(params: Params$Resource$Projects$Locations$Queuedresources$Create, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1377
+ create(params: Params$Resource$Projects$Locations$Queuedresources$Create, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
1378
+ create(params: Params$Resource$Projects$Locations$Queuedresources$Create, callback: BodyResponseCallback<Schema$Operation>): void;
1379
+ create(callback: BodyResponseCallback<Schema$Operation>): void;
1380
+ /**
1381
+ * Deletes a QueuedResource TPU instance.
2042
1382
  *
2043
- * // Do the magic
2044
- * const res = await tpu.projects.locations.runtimeVersions.get({
2045
- * // Required. The resource name.
2046
- * name: 'projects/my-project/locations/my-location/runtimeVersions/my-runtimeVersion',
2047
- * });
2048
- * console.log(res.data);
1383
+ * @param params - Parameters for request
1384
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1385
+ * @param callback - Optional callback that handles the response.
1386
+ * @returns A promise if used with async/await, or void if used with a callback.
1387
+ */
1388
+ delete(params: Params$Resource$Projects$Locations$Queuedresources$Delete, options: StreamMethodOptions): GaxiosPromise<Readable>;
1389
+ delete(params?: Params$Resource$Projects$Locations$Queuedresources$Delete, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
1390
+ delete(params: Params$Resource$Projects$Locations$Queuedresources$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1391
+ delete(params: Params$Resource$Projects$Locations$Queuedresources$Delete, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
1392
+ delete(params: Params$Resource$Projects$Locations$Queuedresources$Delete, callback: BodyResponseCallback<Schema$Operation>): void;
1393
+ delete(callback: BodyResponseCallback<Schema$Operation>): void;
1394
+ /**
1395
+ * Gets details of a queued resource.
2049
1396
  *
2050
- * // Example response
2051
- * // {
2052
- * // "name": "my_name",
2053
- * // "version": "my_version"
2054
- * // }
2055
- * }
1397
+ * @param params - Parameters for request
1398
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1399
+ * @param callback - Optional callback that handles the response.
1400
+ * @returns A promise if used with async/await, or void if used with a callback.
1401
+ */
1402
+ get(params: Params$Resource$Projects$Locations$Queuedresources$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
1403
+ get(params?: Params$Resource$Projects$Locations$Queuedresources$Get, options?: MethodOptions): GaxiosPromise<Schema$QueuedResource>;
1404
+ get(params: Params$Resource$Projects$Locations$Queuedresources$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1405
+ get(params: Params$Resource$Projects$Locations$Queuedresources$Get, options: MethodOptions | BodyResponseCallback<Schema$QueuedResource>, callback: BodyResponseCallback<Schema$QueuedResource>): void;
1406
+ get(params: Params$Resource$Projects$Locations$Queuedresources$Get, callback: BodyResponseCallback<Schema$QueuedResource>): void;
1407
+ get(callback: BodyResponseCallback<Schema$QueuedResource>): void;
1408
+ /**
1409
+ * Lists queued resources.
2056
1410
  *
2057
- * main().catch(e => {
2058
- * console.error(e);
2059
- * throw e;
2060
- * });
1411
+ * @param params - Parameters for request
1412
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1413
+ * @param callback - Optional callback that handles the response.
1414
+ * @returns A promise if used with async/await, or void if used with a callback.
1415
+ */
1416
+ list(params: Params$Resource$Projects$Locations$Queuedresources$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
1417
+ list(params?: Params$Resource$Projects$Locations$Queuedresources$List, options?: MethodOptions): GaxiosPromise<Schema$ListQueuedResourcesResponse>;
1418
+ list(params: Params$Resource$Projects$Locations$Queuedresources$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1419
+ list(params: Params$Resource$Projects$Locations$Queuedresources$List, options: MethodOptions | BodyResponseCallback<Schema$ListQueuedResourcesResponse>, callback: BodyResponseCallback<Schema$ListQueuedResourcesResponse>): void;
1420
+ list(params: Params$Resource$Projects$Locations$Queuedresources$List, callback: BodyResponseCallback<Schema$ListQueuedResourcesResponse>): void;
1421
+ list(callback: BodyResponseCallback<Schema$ListQueuedResourcesResponse>): void;
1422
+ /**
1423
+ * Resets a QueuedResource TPU instance
2061
1424
  *
2062
- * ```
1425
+ * @param params - Parameters for request
1426
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1427
+ * @param callback - Optional callback that handles the response.
1428
+ * @returns A promise if used with async/await, or void if used with a callback.
1429
+ */
1430
+ reset(params: Params$Resource$Projects$Locations$Queuedresources$Reset, options: StreamMethodOptions): GaxiosPromise<Readable>;
1431
+ reset(params?: Params$Resource$Projects$Locations$Queuedresources$Reset, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
1432
+ reset(params: Params$Resource$Projects$Locations$Queuedresources$Reset, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1433
+ reset(params: Params$Resource$Projects$Locations$Queuedresources$Reset, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
1434
+ reset(params: Params$Resource$Projects$Locations$Queuedresources$Reset, callback: BodyResponseCallback<Schema$Operation>): void;
1435
+ reset(callback: BodyResponseCallback<Schema$Operation>): void;
1436
+ }
1437
+ export interface Params$Resource$Projects$Locations$Queuedresources$Create extends StandardParameters {
1438
+ /**
1439
+ * Required. The parent resource name.
1440
+ */
1441
+ parent?: string;
1442
+ /**
1443
+ * The unqualified resource name. Should follow the `^[A-Za-z0-9_.~+%-]+$` regex format.
1444
+ */
1445
+ queuedResourceId?: string;
1446
+ /**
1447
+ * Idempotent request UUID.
1448
+ */
1449
+ requestId?: string;
1450
+ /**
1451
+ * Request body metadata
1452
+ */
1453
+ requestBody?: Schema$QueuedResource;
1454
+ }
1455
+ export interface Params$Resource$Projects$Locations$Queuedresources$Delete extends StandardParameters {
1456
+ /**
1457
+ * If set to true, all running nodes belonging to this queued resource will be deleted first and then the queued resource will be deleted. Otherwise (i.e. force=false), the queued resource will only be deleted if its nodes have already been deleted or the queued resource is in the ACCEPTED, FAILED, or SUSPENDED state.
1458
+ */
1459
+ force?: boolean;
1460
+ /**
1461
+ * Required. The resource name.
1462
+ */
1463
+ name?: string;
1464
+ /**
1465
+ * Idempotent request UUID.
1466
+ */
1467
+ requestId?: string;
1468
+ }
1469
+ export interface Params$Resource$Projects$Locations$Queuedresources$Get extends StandardParameters {
1470
+ /**
1471
+ * Required. The resource name.
1472
+ */
1473
+ name?: string;
1474
+ }
1475
+ export interface Params$Resource$Projects$Locations$Queuedresources$List extends StandardParameters {
1476
+ /**
1477
+ * The maximum number of items to return.
1478
+ */
1479
+ pageSize?: number;
1480
+ /**
1481
+ * The next_page_token value returned from a previous List request, if any.
1482
+ */
1483
+ pageToken?: string;
1484
+ /**
1485
+ * Required. The parent resource name.
1486
+ */
1487
+ parent?: string;
1488
+ }
1489
+ export interface Params$Resource$Projects$Locations$Queuedresources$Reset extends StandardParameters {
1490
+ /**
1491
+ * Required. The name of the queued resource.
1492
+ */
1493
+ name?: string;
1494
+ /**
1495
+ * Request body metadata
1496
+ */
1497
+ requestBody?: Schema$ResetQueuedResourceRequest;
1498
+ }
1499
+ export class Resource$Projects$Locations$Runtimeversions {
1500
+ context: APIRequestContext;
1501
+ constructor(context: APIRequestContext);
1502
+ /**
1503
+ * Gets a runtime version.
2063
1504
  *
2064
1505
  * @param params - Parameters for request
2065
1506
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2074,58 +1515,6 @@ export declare namespace tpu_v2alpha1 {
2074
1515
  get(callback: BodyResponseCallback<Schema$RuntimeVersion>): void;
2075
1516
  /**
2076
1517
  * Lists runtime versions supported by this API.
2077
- * @example
2078
- * ```js
2079
- * // Before running the sample:
2080
- * // - Enable the API at:
2081
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
2082
- * // - Login into gcloud by running:
2083
- * // `$ gcloud auth application-default login`
2084
- * // - Install the npm module by running:
2085
- * // `$ npm install googleapis`
2086
- *
2087
- * const {google} = require('googleapis');
2088
- * const tpu = google.tpu('v2alpha1');
2089
- *
2090
- * async function main() {
2091
- * const auth = new google.auth.GoogleAuth({
2092
- * // Scopes can be specified either as an array or as a single, space-delimited string.
2093
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2094
- * });
2095
- *
2096
- * // Acquire an auth client, and bind it to all future calls
2097
- * const authClient = await auth.getClient();
2098
- * google.options({auth: authClient});
2099
- *
2100
- * // Do the magic
2101
- * const res = await tpu.projects.locations.runtimeVersions.list({
2102
- * // List filter.
2103
- * filter: 'placeholder-value',
2104
- * // Sort results.
2105
- * orderBy: 'placeholder-value',
2106
- * // The maximum number of items to return.
2107
- * pageSize: 'placeholder-value',
2108
- * // The next_page_token value returned from a previous List request, if any.
2109
- * pageToken: 'placeholder-value',
2110
- * // Required. The parent resource name.
2111
- * parent: 'projects/my-project/locations/my-location',
2112
- * });
2113
- * console.log(res.data);
2114
- *
2115
- * // Example response
2116
- * // {
2117
- * // "nextPageToken": "my_nextPageToken",
2118
- * // "runtimeVersions": [],
2119
- * // "unreachable": []
2120
- * // }
2121
- * }
2122
- *
2123
- * main().catch(e => {
2124
- * console.error(e);
2125
- * throw e;
2126
- * });
2127
- *
2128
- * ```
2129
1518
  *
2130
1519
  * @param params - Parameters for request
2131
1520
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.