@googleapis/tpu 5.5.0 → 7.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.
- package/CHANGELOG.md +48 -0
- package/build/index.d.ts +1 -1
- package/build/index.js.map +1 -1
- package/build/v1.d.ts +951 -35
- package/build/v1.js.map +1 -1
- package/build/v1alpha1.d.ts +955 -35
- package/build/v1alpha1.js.map +1 -1
- package/build/v2.d.ts +1398 -49
- package/build/v2.js.map +1 -1
- package/build/v2alpha1.d.ts +1652 -57
- package/build/v2alpha1.js.map +1 -1
- package/index.ts +0 -1
- package/package.json +2 -2
- package/v1.ts +1007 -58
- package/v1alpha1.ts +1011 -58
- package/v2.ts +1478 -81
- package/v2alpha1.ts +1746 -94
package/v1.ts
CHANGED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
Compute,
|
|
24
24
|
UserRefreshClient,
|
|
25
25
|
BaseExternalAccountClient,
|
|
26
|
-
|
|
26
|
+
GaxiosResponseWithHTTP2,
|
|
27
27
|
GoogleConfigurable,
|
|
28
28
|
createAPIRequest,
|
|
29
29
|
MethodOptions,
|
|
@@ -507,6 +507,56 @@ export namespace tpu_v1 {
|
|
|
507
507
|
|
|
508
508
|
/**
|
|
509
509
|
* Gets information about a location.
|
|
510
|
+
* @example
|
|
511
|
+
* ```js
|
|
512
|
+
* // Before running the sample:
|
|
513
|
+
* // - Enable the API at:
|
|
514
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
515
|
+
* // - Login into gcloud by running:
|
|
516
|
+
* // ```sh
|
|
517
|
+
* // $ gcloud auth application-default login
|
|
518
|
+
* // ```
|
|
519
|
+
* // - Install the npm module by running:
|
|
520
|
+
* // ```sh
|
|
521
|
+
* // $ npm install googleapis
|
|
522
|
+
* // ```
|
|
523
|
+
*
|
|
524
|
+
* const {google} = require('googleapis');
|
|
525
|
+
* const tpu = google.tpu('v1');
|
|
526
|
+
*
|
|
527
|
+
* async function main() {
|
|
528
|
+
* const auth = new google.auth.GoogleAuth({
|
|
529
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
530
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
531
|
+
* });
|
|
532
|
+
*
|
|
533
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
534
|
+
* const authClient = await auth.getClient();
|
|
535
|
+
* google.options({auth: authClient});
|
|
536
|
+
*
|
|
537
|
+
* // Do the magic
|
|
538
|
+
* const res = await tpu.projects.locations.get({
|
|
539
|
+
* // Resource name for the location.
|
|
540
|
+
* name: 'projects/my-project/locations/my-location',
|
|
541
|
+
* });
|
|
542
|
+
* console.log(res.data);
|
|
543
|
+
*
|
|
544
|
+
* // Example response
|
|
545
|
+
* // {
|
|
546
|
+
* // "displayName": "my_displayName",
|
|
547
|
+
* // "labels": {},
|
|
548
|
+
* // "locationId": "my_locationId",
|
|
549
|
+
* // "metadata": {},
|
|
550
|
+
* // "name": "my_name"
|
|
551
|
+
* // }
|
|
552
|
+
* }
|
|
553
|
+
*
|
|
554
|
+
* main().catch(e => {
|
|
555
|
+
* console.error(e);
|
|
556
|
+
* throw e;
|
|
557
|
+
* });
|
|
558
|
+
*
|
|
559
|
+
* ```
|
|
510
560
|
*
|
|
511
561
|
* @param params - Parameters for request
|
|
512
562
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -516,11 +566,11 @@ export namespace tpu_v1 {
|
|
|
516
566
|
get(
|
|
517
567
|
params: Params$Resource$Projects$Locations$Get,
|
|
518
568
|
options: StreamMethodOptions
|
|
519
|
-
):
|
|
569
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
520
570
|
get(
|
|
521
571
|
params?: Params$Resource$Projects$Locations$Get,
|
|
522
572
|
options?: MethodOptions
|
|
523
|
-
):
|
|
573
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Location>>;
|
|
524
574
|
get(
|
|
525
575
|
params: Params$Resource$Projects$Locations$Get,
|
|
526
576
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -549,7 +599,10 @@ export namespace tpu_v1 {
|
|
|
549
599
|
callback?:
|
|
550
600
|
| BodyResponseCallback<Schema$Location>
|
|
551
601
|
| BodyResponseCallback<Readable>
|
|
552
|
-
):
|
|
602
|
+
):
|
|
603
|
+
| void
|
|
604
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Location>>
|
|
605
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
553
606
|
let params = (paramsOrCallback ||
|
|
554
607
|
{}) as Params$Resource$Projects$Locations$Get;
|
|
555
608
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -592,6 +645,61 @@ export namespace tpu_v1 {
|
|
|
592
645
|
|
|
593
646
|
/**
|
|
594
647
|
* Lists information about the supported locations for this service.
|
|
648
|
+
* @example
|
|
649
|
+
* ```js
|
|
650
|
+
* // Before running the sample:
|
|
651
|
+
* // - Enable the API at:
|
|
652
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
653
|
+
* // - Login into gcloud by running:
|
|
654
|
+
* // ```sh
|
|
655
|
+
* // $ gcloud auth application-default login
|
|
656
|
+
* // ```
|
|
657
|
+
* // - Install the npm module by running:
|
|
658
|
+
* // ```sh
|
|
659
|
+
* // $ npm install googleapis
|
|
660
|
+
* // ```
|
|
661
|
+
*
|
|
662
|
+
* const {google} = require('googleapis');
|
|
663
|
+
* const tpu = google.tpu('v1');
|
|
664
|
+
*
|
|
665
|
+
* async function main() {
|
|
666
|
+
* const auth = new google.auth.GoogleAuth({
|
|
667
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
668
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
669
|
+
* });
|
|
670
|
+
*
|
|
671
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
672
|
+
* const authClient = await auth.getClient();
|
|
673
|
+
* google.options({auth: authClient});
|
|
674
|
+
*
|
|
675
|
+
* // Do the magic
|
|
676
|
+
* const res = await tpu.projects.locations.list({
|
|
677
|
+
* // Optional. A list of extra location types that should be used as conditions for controlling the visibility of the locations.
|
|
678
|
+
* extraLocationTypes: 'placeholder-value',
|
|
679
|
+
* // 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).
|
|
680
|
+
* filter: 'placeholder-value',
|
|
681
|
+
* // The resource that owns the locations collection, if applicable.
|
|
682
|
+
* name: 'projects/my-project',
|
|
683
|
+
* // The maximum number of results to return. If not set, the service selects a default.
|
|
684
|
+
* pageSize: 'placeholder-value',
|
|
685
|
+
* // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.
|
|
686
|
+
* pageToken: 'placeholder-value',
|
|
687
|
+
* });
|
|
688
|
+
* console.log(res.data);
|
|
689
|
+
*
|
|
690
|
+
* // Example response
|
|
691
|
+
* // {
|
|
692
|
+
* // "locations": [],
|
|
693
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
694
|
+
* // }
|
|
695
|
+
* }
|
|
696
|
+
*
|
|
697
|
+
* main().catch(e => {
|
|
698
|
+
* console.error(e);
|
|
699
|
+
* throw e;
|
|
700
|
+
* });
|
|
701
|
+
*
|
|
702
|
+
* ```
|
|
595
703
|
*
|
|
596
704
|
* @param params - Parameters for request
|
|
597
705
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -601,11 +709,11 @@ export namespace tpu_v1 {
|
|
|
601
709
|
list(
|
|
602
710
|
params: Params$Resource$Projects$Locations$List,
|
|
603
711
|
options: StreamMethodOptions
|
|
604
|
-
):
|
|
712
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
605
713
|
list(
|
|
606
714
|
params?: Params$Resource$Projects$Locations$List,
|
|
607
715
|
options?: MethodOptions
|
|
608
|
-
):
|
|
716
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$ListLocationsResponse>>;
|
|
609
717
|
list(
|
|
610
718
|
params: Params$Resource$Projects$Locations$List,
|
|
611
719
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -638,8 +746,8 @@ export namespace tpu_v1 {
|
|
|
638
746
|
| BodyResponseCallback<Readable>
|
|
639
747
|
):
|
|
640
748
|
| void
|
|
641
|
-
|
|
|
642
|
-
|
|
|
749
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$ListLocationsResponse>>
|
|
750
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
643
751
|
let params = (paramsOrCallback ||
|
|
644
752
|
{}) as Params$Resource$Projects$Locations$List;
|
|
645
753
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -723,6 +831,53 @@ export namespace tpu_v1 {
|
|
|
723
831
|
|
|
724
832
|
/**
|
|
725
833
|
* Gets AcceleratorType.
|
|
834
|
+
* @example
|
|
835
|
+
* ```js
|
|
836
|
+
* // Before running the sample:
|
|
837
|
+
* // - Enable the API at:
|
|
838
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
839
|
+
* // - Login into gcloud by running:
|
|
840
|
+
* // ```sh
|
|
841
|
+
* // $ gcloud auth application-default login
|
|
842
|
+
* // ```
|
|
843
|
+
* // - Install the npm module by running:
|
|
844
|
+
* // ```sh
|
|
845
|
+
* // $ npm install googleapis
|
|
846
|
+
* // ```
|
|
847
|
+
*
|
|
848
|
+
* const {google} = require('googleapis');
|
|
849
|
+
* const tpu = google.tpu('v1');
|
|
850
|
+
*
|
|
851
|
+
* async function main() {
|
|
852
|
+
* const auth = new google.auth.GoogleAuth({
|
|
853
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
854
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
855
|
+
* });
|
|
856
|
+
*
|
|
857
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
858
|
+
* const authClient = await auth.getClient();
|
|
859
|
+
* google.options({auth: authClient});
|
|
860
|
+
*
|
|
861
|
+
* // Do the magic
|
|
862
|
+
* const res = await tpu.projects.locations.acceleratorTypes.get({
|
|
863
|
+
* // Required. The resource name.
|
|
864
|
+
* name: 'projects/my-project/locations/my-location/acceleratorTypes/my-acceleratorType',
|
|
865
|
+
* });
|
|
866
|
+
* console.log(res.data);
|
|
867
|
+
*
|
|
868
|
+
* // Example response
|
|
869
|
+
* // {
|
|
870
|
+
* // "name": "my_name",
|
|
871
|
+
* // "type": "my_type"
|
|
872
|
+
* // }
|
|
873
|
+
* }
|
|
874
|
+
*
|
|
875
|
+
* main().catch(e => {
|
|
876
|
+
* console.error(e);
|
|
877
|
+
* throw e;
|
|
878
|
+
* });
|
|
879
|
+
*
|
|
880
|
+
* ```
|
|
726
881
|
*
|
|
727
882
|
* @param params - Parameters for request
|
|
728
883
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -732,11 +887,11 @@ export namespace tpu_v1 {
|
|
|
732
887
|
get(
|
|
733
888
|
params: Params$Resource$Projects$Locations$Acceleratortypes$Get,
|
|
734
889
|
options: StreamMethodOptions
|
|
735
|
-
):
|
|
890
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
736
891
|
get(
|
|
737
892
|
params?: Params$Resource$Projects$Locations$Acceleratortypes$Get,
|
|
738
893
|
options?: MethodOptions
|
|
739
|
-
):
|
|
894
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$AcceleratorType>>;
|
|
740
895
|
get(
|
|
741
896
|
params: Params$Resource$Projects$Locations$Acceleratortypes$Get,
|
|
742
897
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -765,7 +920,10 @@ export namespace tpu_v1 {
|
|
|
765
920
|
callback?:
|
|
766
921
|
| BodyResponseCallback<Schema$AcceleratorType>
|
|
767
922
|
| BodyResponseCallback<Readable>
|
|
768
|
-
):
|
|
923
|
+
):
|
|
924
|
+
| void
|
|
925
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$AcceleratorType>>
|
|
926
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
769
927
|
let params = (paramsOrCallback ||
|
|
770
928
|
{}) as Params$Resource$Projects$Locations$Acceleratortypes$Get;
|
|
771
929
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -808,6 +966,62 @@ export namespace tpu_v1 {
|
|
|
808
966
|
|
|
809
967
|
/**
|
|
810
968
|
* Lists accelerator types supported by this API.
|
|
969
|
+
* @example
|
|
970
|
+
* ```js
|
|
971
|
+
* // Before running the sample:
|
|
972
|
+
* // - Enable the API at:
|
|
973
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
974
|
+
* // - Login into gcloud by running:
|
|
975
|
+
* // ```sh
|
|
976
|
+
* // $ gcloud auth application-default login
|
|
977
|
+
* // ```
|
|
978
|
+
* // - Install the npm module by running:
|
|
979
|
+
* // ```sh
|
|
980
|
+
* // $ npm install googleapis
|
|
981
|
+
* // ```
|
|
982
|
+
*
|
|
983
|
+
* const {google} = require('googleapis');
|
|
984
|
+
* const tpu = google.tpu('v1');
|
|
985
|
+
*
|
|
986
|
+
* async function main() {
|
|
987
|
+
* const auth = new google.auth.GoogleAuth({
|
|
988
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
989
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
990
|
+
* });
|
|
991
|
+
*
|
|
992
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
993
|
+
* const authClient = await auth.getClient();
|
|
994
|
+
* google.options({auth: authClient});
|
|
995
|
+
*
|
|
996
|
+
* // Do the magic
|
|
997
|
+
* const res = await tpu.projects.locations.acceleratorTypes.list({
|
|
998
|
+
* // List filter.
|
|
999
|
+
* filter: 'placeholder-value',
|
|
1000
|
+
* // Sort results.
|
|
1001
|
+
* orderBy: 'placeholder-value',
|
|
1002
|
+
* // The maximum number of items to return.
|
|
1003
|
+
* pageSize: 'placeholder-value',
|
|
1004
|
+
* // The next_page_token value returned from a previous List request, if any.
|
|
1005
|
+
* pageToken: 'placeholder-value',
|
|
1006
|
+
* // Required. The parent resource name.
|
|
1007
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
1008
|
+
* });
|
|
1009
|
+
* console.log(res.data);
|
|
1010
|
+
*
|
|
1011
|
+
* // Example response
|
|
1012
|
+
* // {
|
|
1013
|
+
* // "acceleratorTypes": [],
|
|
1014
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
1015
|
+
* // "unreachable": []
|
|
1016
|
+
* // }
|
|
1017
|
+
* }
|
|
1018
|
+
*
|
|
1019
|
+
* main().catch(e => {
|
|
1020
|
+
* console.error(e);
|
|
1021
|
+
* throw e;
|
|
1022
|
+
* });
|
|
1023
|
+
*
|
|
1024
|
+
* ```
|
|
811
1025
|
*
|
|
812
1026
|
* @param params - Parameters for request
|
|
813
1027
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -817,11 +1031,11 @@ export namespace tpu_v1 {
|
|
|
817
1031
|
list(
|
|
818
1032
|
params: Params$Resource$Projects$Locations$Acceleratortypes$List,
|
|
819
1033
|
options: StreamMethodOptions
|
|
820
|
-
):
|
|
1034
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
821
1035
|
list(
|
|
822
1036
|
params?: Params$Resource$Projects$Locations$Acceleratortypes$List,
|
|
823
1037
|
options?: MethodOptions
|
|
824
|
-
):
|
|
1038
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$ListAcceleratorTypesResponse>>;
|
|
825
1039
|
list(
|
|
826
1040
|
params: Params$Resource$Projects$Locations$Acceleratortypes$List,
|
|
827
1041
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -856,8 +1070,8 @@ export namespace tpu_v1 {
|
|
|
856
1070
|
| BodyResponseCallback<Readable>
|
|
857
1071
|
):
|
|
858
1072
|
| void
|
|
859
|
-
|
|
|
860
|
-
|
|
|
1073
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$ListAcceleratorTypesResponse>>
|
|
1074
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
861
1075
|
let params = (paramsOrCallback ||
|
|
862
1076
|
{}) as Params$Resource$Projects$Locations$Acceleratortypes$List;
|
|
863
1077
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -943,6 +1157,84 @@ export namespace tpu_v1 {
|
|
|
943
1157
|
|
|
944
1158
|
/**
|
|
945
1159
|
* Creates a node.
|
|
1160
|
+
* @example
|
|
1161
|
+
* ```js
|
|
1162
|
+
* // Before running the sample:
|
|
1163
|
+
* // - Enable the API at:
|
|
1164
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1165
|
+
* // - Login into gcloud by running:
|
|
1166
|
+
* // ```sh
|
|
1167
|
+
* // $ gcloud auth application-default login
|
|
1168
|
+
* // ```
|
|
1169
|
+
* // - Install the npm module by running:
|
|
1170
|
+
* // ```sh
|
|
1171
|
+
* // $ npm install googleapis
|
|
1172
|
+
* // ```
|
|
1173
|
+
*
|
|
1174
|
+
* const {google} = require('googleapis');
|
|
1175
|
+
* const tpu = google.tpu('v1');
|
|
1176
|
+
*
|
|
1177
|
+
* async function main() {
|
|
1178
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1179
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1180
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1181
|
+
* });
|
|
1182
|
+
*
|
|
1183
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1184
|
+
* const authClient = await auth.getClient();
|
|
1185
|
+
* google.options({auth: authClient});
|
|
1186
|
+
*
|
|
1187
|
+
* // Do the magic
|
|
1188
|
+
* const res = await tpu.projects.locations.nodes.create({
|
|
1189
|
+
* // The unqualified resource name.
|
|
1190
|
+
* nodeId: 'placeholder-value',
|
|
1191
|
+
* // Required. The parent resource name.
|
|
1192
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
1193
|
+
*
|
|
1194
|
+
* // Request body metadata
|
|
1195
|
+
* requestBody: {
|
|
1196
|
+
* // request body parameters
|
|
1197
|
+
* // {
|
|
1198
|
+
* // "acceleratorType": "my_acceleratorType",
|
|
1199
|
+
* // "apiVersion": "my_apiVersion",
|
|
1200
|
+
* // "cidrBlock": "my_cidrBlock",
|
|
1201
|
+
* // "createTime": "my_createTime",
|
|
1202
|
+
* // "description": "my_description",
|
|
1203
|
+
* // "health": "my_health",
|
|
1204
|
+
* // "healthDescription": "my_healthDescription",
|
|
1205
|
+
* // "ipAddress": "my_ipAddress",
|
|
1206
|
+
* // "labels": {},
|
|
1207
|
+
* // "name": "my_name",
|
|
1208
|
+
* // "network": "my_network",
|
|
1209
|
+
* // "networkEndpoints": [],
|
|
1210
|
+
* // "port": "my_port",
|
|
1211
|
+
* // "schedulingConfig": {},
|
|
1212
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
1213
|
+
* // "state": "my_state",
|
|
1214
|
+
* // "symptoms": [],
|
|
1215
|
+
* // "tensorflowVersion": "my_tensorflowVersion",
|
|
1216
|
+
* // "useServiceNetworking": false
|
|
1217
|
+
* // }
|
|
1218
|
+
* },
|
|
1219
|
+
* });
|
|
1220
|
+
* console.log(res.data);
|
|
1221
|
+
*
|
|
1222
|
+
* // Example response
|
|
1223
|
+
* // {
|
|
1224
|
+
* // "done": false,
|
|
1225
|
+
* // "error": {},
|
|
1226
|
+
* // "metadata": {},
|
|
1227
|
+
* // "name": "my_name",
|
|
1228
|
+
* // "response": {}
|
|
1229
|
+
* // }
|
|
1230
|
+
* }
|
|
1231
|
+
*
|
|
1232
|
+
* main().catch(e => {
|
|
1233
|
+
* console.error(e);
|
|
1234
|
+
* throw e;
|
|
1235
|
+
* });
|
|
1236
|
+
*
|
|
1237
|
+
* ```
|
|
946
1238
|
*
|
|
947
1239
|
* @param params - Parameters for request
|
|
948
1240
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -952,11 +1244,11 @@ export namespace tpu_v1 {
|
|
|
952
1244
|
create(
|
|
953
1245
|
params: Params$Resource$Projects$Locations$Nodes$Create,
|
|
954
1246
|
options: StreamMethodOptions
|
|
955
|
-
):
|
|
1247
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
956
1248
|
create(
|
|
957
1249
|
params?: Params$Resource$Projects$Locations$Nodes$Create,
|
|
958
1250
|
options?: MethodOptions
|
|
959
|
-
):
|
|
1251
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
960
1252
|
create(
|
|
961
1253
|
params: Params$Resource$Projects$Locations$Nodes$Create,
|
|
962
1254
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -985,7 +1277,10 @@ export namespace tpu_v1 {
|
|
|
985
1277
|
callback?:
|
|
986
1278
|
| BodyResponseCallback<Schema$Operation>
|
|
987
1279
|
| BodyResponseCallback<Readable>
|
|
988
|
-
):
|
|
1280
|
+
):
|
|
1281
|
+
| void
|
|
1282
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
|
|
1283
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
989
1284
|
let params = (paramsOrCallback ||
|
|
990
1285
|
{}) as Params$Resource$Projects$Locations$Nodes$Create;
|
|
991
1286
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1031,6 +1326,56 @@ export namespace tpu_v1 {
|
|
|
1031
1326
|
|
|
1032
1327
|
/**
|
|
1033
1328
|
* Deletes a node.
|
|
1329
|
+
* @example
|
|
1330
|
+
* ```js
|
|
1331
|
+
* // Before running the sample:
|
|
1332
|
+
* // - Enable the API at:
|
|
1333
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1334
|
+
* // - Login into gcloud by running:
|
|
1335
|
+
* // ```sh
|
|
1336
|
+
* // $ gcloud auth application-default login
|
|
1337
|
+
* // ```
|
|
1338
|
+
* // - Install the npm module by running:
|
|
1339
|
+
* // ```sh
|
|
1340
|
+
* // $ npm install googleapis
|
|
1341
|
+
* // ```
|
|
1342
|
+
*
|
|
1343
|
+
* const {google} = require('googleapis');
|
|
1344
|
+
* const tpu = google.tpu('v1');
|
|
1345
|
+
*
|
|
1346
|
+
* async function main() {
|
|
1347
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1348
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1349
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1350
|
+
* });
|
|
1351
|
+
*
|
|
1352
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1353
|
+
* const authClient = await auth.getClient();
|
|
1354
|
+
* google.options({auth: authClient});
|
|
1355
|
+
*
|
|
1356
|
+
* // Do the magic
|
|
1357
|
+
* const res = await tpu.projects.locations.nodes.delete({
|
|
1358
|
+
* // Required. The resource name.
|
|
1359
|
+
* name: 'projects/my-project/locations/my-location/nodes/my-node',
|
|
1360
|
+
* });
|
|
1361
|
+
* console.log(res.data);
|
|
1362
|
+
*
|
|
1363
|
+
* // Example response
|
|
1364
|
+
* // {
|
|
1365
|
+
* // "done": false,
|
|
1366
|
+
* // "error": {},
|
|
1367
|
+
* // "metadata": {},
|
|
1368
|
+
* // "name": "my_name",
|
|
1369
|
+
* // "response": {}
|
|
1370
|
+
* // }
|
|
1371
|
+
* }
|
|
1372
|
+
*
|
|
1373
|
+
* main().catch(e => {
|
|
1374
|
+
* console.error(e);
|
|
1375
|
+
* throw e;
|
|
1376
|
+
* });
|
|
1377
|
+
*
|
|
1378
|
+
* ```
|
|
1034
1379
|
*
|
|
1035
1380
|
* @param params - Parameters for request
|
|
1036
1381
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1040,11 +1385,11 @@ export namespace tpu_v1 {
|
|
|
1040
1385
|
delete(
|
|
1041
1386
|
params: Params$Resource$Projects$Locations$Nodes$Delete,
|
|
1042
1387
|
options: StreamMethodOptions
|
|
1043
|
-
):
|
|
1388
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1044
1389
|
delete(
|
|
1045
1390
|
params?: Params$Resource$Projects$Locations$Nodes$Delete,
|
|
1046
1391
|
options?: MethodOptions
|
|
1047
|
-
):
|
|
1392
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
1048
1393
|
delete(
|
|
1049
1394
|
params: Params$Resource$Projects$Locations$Nodes$Delete,
|
|
1050
1395
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1073,7 +1418,10 @@ export namespace tpu_v1 {
|
|
|
1073
1418
|
callback?:
|
|
1074
1419
|
| BodyResponseCallback<Schema$Operation>
|
|
1075
1420
|
| BodyResponseCallback<Readable>
|
|
1076
|
-
):
|
|
1421
|
+
):
|
|
1422
|
+
| void
|
|
1423
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
|
|
1424
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1077
1425
|
let params = (paramsOrCallback ||
|
|
1078
1426
|
{}) as Params$Resource$Projects$Locations$Nodes$Delete;
|
|
1079
1427
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1116,6 +1464,70 @@ export namespace tpu_v1 {
|
|
|
1116
1464
|
|
|
1117
1465
|
/**
|
|
1118
1466
|
* Gets the details of a node.
|
|
1467
|
+
* @example
|
|
1468
|
+
* ```js
|
|
1469
|
+
* // Before running the sample:
|
|
1470
|
+
* // - Enable the API at:
|
|
1471
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1472
|
+
* // - Login into gcloud by running:
|
|
1473
|
+
* // ```sh
|
|
1474
|
+
* // $ gcloud auth application-default login
|
|
1475
|
+
* // ```
|
|
1476
|
+
* // - Install the npm module by running:
|
|
1477
|
+
* // ```sh
|
|
1478
|
+
* // $ npm install googleapis
|
|
1479
|
+
* // ```
|
|
1480
|
+
*
|
|
1481
|
+
* const {google} = require('googleapis');
|
|
1482
|
+
* const tpu = google.tpu('v1');
|
|
1483
|
+
*
|
|
1484
|
+
* async function main() {
|
|
1485
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1486
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1487
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1488
|
+
* });
|
|
1489
|
+
*
|
|
1490
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1491
|
+
* const authClient = await auth.getClient();
|
|
1492
|
+
* google.options({auth: authClient});
|
|
1493
|
+
*
|
|
1494
|
+
* // Do the magic
|
|
1495
|
+
* const res = await tpu.projects.locations.nodes.get({
|
|
1496
|
+
* // Required. The resource name.
|
|
1497
|
+
* name: 'projects/my-project/locations/my-location/nodes/my-node',
|
|
1498
|
+
* });
|
|
1499
|
+
* console.log(res.data);
|
|
1500
|
+
*
|
|
1501
|
+
* // Example response
|
|
1502
|
+
* // {
|
|
1503
|
+
* // "acceleratorType": "my_acceleratorType",
|
|
1504
|
+
* // "apiVersion": "my_apiVersion",
|
|
1505
|
+
* // "cidrBlock": "my_cidrBlock",
|
|
1506
|
+
* // "createTime": "my_createTime",
|
|
1507
|
+
* // "description": "my_description",
|
|
1508
|
+
* // "health": "my_health",
|
|
1509
|
+
* // "healthDescription": "my_healthDescription",
|
|
1510
|
+
* // "ipAddress": "my_ipAddress",
|
|
1511
|
+
* // "labels": {},
|
|
1512
|
+
* // "name": "my_name",
|
|
1513
|
+
* // "network": "my_network",
|
|
1514
|
+
* // "networkEndpoints": [],
|
|
1515
|
+
* // "port": "my_port",
|
|
1516
|
+
* // "schedulingConfig": {},
|
|
1517
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
1518
|
+
* // "state": "my_state",
|
|
1519
|
+
* // "symptoms": [],
|
|
1520
|
+
* // "tensorflowVersion": "my_tensorflowVersion",
|
|
1521
|
+
* // "useServiceNetworking": false
|
|
1522
|
+
* // }
|
|
1523
|
+
* }
|
|
1524
|
+
*
|
|
1525
|
+
* main().catch(e => {
|
|
1526
|
+
* console.error(e);
|
|
1527
|
+
* throw e;
|
|
1528
|
+
* });
|
|
1529
|
+
*
|
|
1530
|
+
* ```
|
|
1119
1531
|
*
|
|
1120
1532
|
* @param params - Parameters for request
|
|
1121
1533
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1125,11 +1537,11 @@ export namespace tpu_v1 {
|
|
|
1125
1537
|
get(
|
|
1126
1538
|
params: Params$Resource$Projects$Locations$Nodes$Get,
|
|
1127
1539
|
options: StreamMethodOptions
|
|
1128
|
-
):
|
|
1540
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1129
1541
|
get(
|
|
1130
1542
|
params?: Params$Resource$Projects$Locations$Nodes$Get,
|
|
1131
1543
|
options?: MethodOptions
|
|
1132
|
-
):
|
|
1544
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Node>>;
|
|
1133
1545
|
get(
|
|
1134
1546
|
params: Params$Resource$Projects$Locations$Nodes$Get,
|
|
1135
1547
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1158,7 +1570,10 @@ export namespace tpu_v1 {
|
|
|
1158
1570
|
callback?:
|
|
1159
1571
|
| BodyResponseCallback<Schema$Node>
|
|
1160
1572
|
| BodyResponseCallback<Readable>
|
|
1161
|
-
):
|
|
1573
|
+
):
|
|
1574
|
+
| void
|
|
1575
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Node>>
|
|
1576
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1162
1577
|
let params = (paramsOrCallback ||
|
|
1163
1578
|
{}) as Params$Resource$Projects$Locations$Nodes$Get;
|
|
1164
1579
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1201,6 +1616,58 @@ export namespace tpu_v1 {
|
|
|
1201
1616
|
|
|
1202
1617
|
/**
|
|
1203
1618
|
* Lists nodes.
|
|
1619
|
+
* @example
|
|
1620
|
+
* ```js
|
|
1621
|
+
* // Before running the sample:
|
|
1622
|
+
* // - Enable the API at:
|
|
1623
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1624
|
+
* // - Login into gcloud by running:
|
|
1625
|
+
* // ```sh
|
|
1626
|
+
* // $ gcloud auth application-default login
|
|
1627
|
+
* // ```
|
|
1628
|
+
* // - Install the npm module by running:
|
|
1629
|
+
* // ```sh
|
|
1630
|
+
* // $ npm install googleapis
|
|
1631
|
+
* // ```
|
|
1632
|
+
*
|
|
1633
|
+
* const {google} = require('googleapis');
|
|
1634
|
+
* const tpu = google.tpu('v1');
|
|
1635
|
+
*
|
|
1636
|
+
* async function main() {
|
|
1637
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1638
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1639
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1640
|
+
* });
|
|
1641
|
+
*
|
|
1642
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1643
|
+
* const authClient = await auth.getClient();
|
|
1644
|
+
* google.options({auth: authClient});
|
|
1645
|
+
*
|
|
1646
|
+
* // Do the magic
|
|
1647
|
+
* const res = await tpu.projects.locations.nodes.list({
|
|
1648
|
+
* // The maximum number of items to return.
|
|
1649
|
+
* pageSize: 'placeholder-value',
|
|
1650
|
+
* // The next_page_token value returned from a previous List request, if any.
|
|
1651
|
+
* pageToken: 'placeholder-value',
|
|
1652
|
+
* // Required. The parent resource name.
|
|
1653
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
1654
|
+
* });
|
|
1655
|
+
* console.log(res.data);
|
|
1656
|
+
*
|
|
1657
|
+
* // Example response
|
|
1658
|
+
* // {
|
|
1659
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
1660
|
+
* // "nodes": [],
|
|
1661
|
+
* // "unreachable": []
|
|
1662
|
+
* // }
|
|
1663
|
+
* }
|
|
1664
|
+
*
|
|
1665
|
+
* main().catch(e => {
|
|
1666
|
+
* console.error(e);
|
|
1667
|
+
* throw e;
|
|
1668
|
+
* });
|
|
1669
|
+
*
|
|
1670
|
+
* ```
|
|
1204
1671
|
*
|
|
1205
1672
|
* @param params - Parameters for request
|
|
1206
1673
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1210,11 +1677,11 @@ export namespace tpu_v1 {
|
|
|
1210
1677
|
list(
|
|
1211
1678
|
params: Params$Resource$Projects$Locations$Nodes$List,
|
|
1212
1679
|
options: StreamMethodOptions
|
|
1213
|
-
):
|
|
1680
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1214
1681
|
list(
|
|
1215
1682
|
params?: Params$Resource$Projects$Locations$Nodes$List,
|
|
1216
1683
|
options?: MethodOptions
|
|
1217
|
-
):
|
|
1684
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$ListNodesResponse>>;
|
|
1218
1685
|
list(
|
|
1219
1686
|
params: Params$Resource$Projects$Locations$Nodes$List,
|
|
1220
1687
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1245,8 +1712,8 @@ export namespace tpu_v1 {
|
|
|
1245
1712
|
| BodyResponseCallback<Readable>
|
|
1246
1713
|
):
|
|
1247
1714
|
| void
|
|
1248
|
-
|
|
|
1249
|
-
|
|
|
1715
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$ListNodesResponse>>
|
|
1716
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1250
1717
|
let params = (paramsOrCallback ||
|
|
1251
1718
|
{}) as Params$Resource$Projects$Locations$Nodes$List;
|
|
1252
1719
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1292,6 +1759,64 @@ export namespace tpu_v1 {
|
|
|
1292
1759
|
|
|
1293
1760
|
/**
|
|
1294
1761
|
* Reimages a node's OS.
|
|
1762
|
+
* @example
|
|
1763
|
+
* ```js
|
|
1764
|
+
* // Before running the sample:
|
|
1765
|
+
* // - Enable the API at:
|
|
1766
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1767
|
+
* // - Login into gcloud by running:
|
|
1768
|
+
* // ```sh
|
|
1769
|
+
* // $ gcloud auth application-default login
|
|
1770
|
+
* // ```
|
|
1771
|
+
* // - Install the npm module by running:
|
|
1772
|
+
* // ```sh
|
|
1773
|
+
* // $ npm install googleapis
|
|
1774
|
+
* // ```
|
|
1775
|
+
*
|
|
1776
|
+
* const {google} = require('googleapis');
|
|
1777
|
+
* const tpu = google.tpu('v1');
|
|
1778
|
+
*
|
|
1779
|
+
* async function main() {
|
|
1780
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1781
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1782
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1783
|
+
* });
|
|
1784
|
+
*
|
|
1785
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1786
|
+
* const authClient = await auth.getClient();
|
|
1787
|
+
* google.options({auth: authClient});
|
|
1788
|
+
*
|
|
1789
|
+
* // Do the magic
|
|
1790
|
+
* const res = await tpu.projects.locations.nodes.reimage({
|
|
1791
|
+
* // The resource name.
|
|
1792
|
+
* name: 'projects/my-project/locations/my-location/nodes/my-node',
|
|
1793
|
+
*
|
|
1794
|
+
* // Request body metadata
|
|
1795
|
+
* requestBody: {
|
|
1796
|
+
* // request body parameters
|
|
1797
|
+
* // {
|
|
1798
|
+
* // "tensorflowVersion": "my_tensorflowVersion"
|
|
1799
|
+
* // }
|
|
1800
|
+
* },
|
|
1801
|
+
* });
|
|
1802
|
+
* console.log(res.data);
|
|
1803
|
+
*
|
|
1804
|
+
* // Example response
|
|
1805
|
+
* // {
|
|
1806
|
+
* // "done": false,
|
|
1807
|
+
* // "error": {},
|
|
1808
|
+
* // "metadata": {},
|
|
1809
|
+
* // "name": "my_name",
|
|
1810
|
+
* // "response": {}
|
|
1811
|
+
* // }
|
|
1812
|
+
* }
|
|
1813
|
+
*
|
|
1814
|
+
* main().catch(e => {
|
|
1815
|
+
* console.error(e);
|
|
1816
|
+
* throw e;
|
|
1817
|
+
* });
|
|
1818
|
+
*
|
|
1819
|
+
* ```
|
|
1295
1820
|
*
|
|
1296
1821
|
* @param params - Parameters for request
|
|
1297
1822
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1301,11 +1826,11 @@ export namespace tpu_v1 {
|
|
|
1301
1826
|
reimage(
|
|
1302
1827
|
params: Params$Resource$Projects$Locations$Nodes$Reimage,
|
|
1303
1828
|
options: StreamMethodOptions
|
|
1304
|
-
):
|
|
1829
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1305
1830
|
reimage(
|
|
1306
1831
|
params?: Params$Resource$Projects$Locations$Nodes$Reimage,
|
|
1307
1832
|
options?: MethodOptions
|
|
1308
|
-
):
|
|
1833
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
1309
1834
|
reimage(
|
|
1310
1835
|
params: Params$Resource$Projects$Locations$Nodes$Reimage,
|
|
1311
1836
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1334,7 +1859,10 @@ export namespace tpu_v1 {
|
|
|
1334
1859
|
callback?:
|
|
1335
1860
|
| BodyResponseCallback<Schema$Operation>
|
|
1336
1861
|
| BodyResponseCallback<Readable>
|
|
1337
|
-
):
|
|
1862
|
+
):
|
|
1863
|
+
| void
|
|
1864
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
|
|
1865
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1338
1866
|
let params = (paramsOrCallback ||
|
|
1339
1867
|
{}) as Params$Resource$Projects$Locations$Nodes$Reimage;
|
|
1340
1868
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1380,6 +1908,62 @@ export namespace tpu_v1 {
|
|
|
1380
1908
|
|
|
1381
1909
|
/**
|
|
1382
1910
|
* Starts a node.
|
|
1911
|
+
* @example
|
|
1912
|
+
* ```js
|
|
1913
|
+
* // Before running the sample:
|
|
1914
|
+
* // - Enable the API at:
|
|
1915
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1916
|
+
* // - Login into gcloud by running:
|
|
1917
|
+
* // ```sh
|
|
1918
|
+
* // $ gcloud auth application-default login
|
|
1919
|
+
* // ```
|
|
1920
|
+
* // - Install the npm module by running:
|
|
1921
|
+
* // ```sh
|
|
1922
|
+
* // $ npm install googleapis
|
|
1923
|
+
* // ```
|
|
1924
|
+
*
|
|
1925
|
+
* const {google} = require('googleapis');
|
|
1926
|
+
* const tpu = google.tpu('v1');
|
|
1927
|
+
*
|
|
1928
|
+
* async function main() {
|
|
1929
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1930
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1931
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1932
|
+
* });
|
|
1933
|
+
*
|
|
1934
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1935
|
+
* const authClient = await auth.getClient();
|
|
1936
|
+
* google.options({auth: authClient});
|
|
1937
|
+
*
|
|
1938
|
+
* // Do the magic
|
|
1939
|
+
* const res = await tpu.projects.locations.nodes.start({
|
|
1940
|
+
* // The resource name.
|
|
1941
|
+
* name: 'projects/my-project/locations/my-location/nodes/my-node',
|
|
1942
|
+
*
|
|
1943
|
+
* // Request body metadata
|
|
1944
|
+
* requestBody: {
|
|
1945
|
+
* // request body parameters
|
|
1946
|
+
* // {}
|
|
1947
|
+
* },
|
|
1948
|
+
* });
|
|
1949
|
+
* console.log(res.data);
|
|
1950
|
+
*
|
|
1951
|
+
* // Example response
|
|
1952
|
+
* // {
|
|
1953
|
+
* // "done": false,
|
|
1954
|
+
* // "error": {},
|
|
1955
|
+
* // "metadata": {},
|
|
1956
|
+
* // "name": "my_name",
|
|
1957
|
+
* // "response": {}
|
|
1958
|
+
* // }
|
|
1959
|
+
* }
|
|
1960
|
+
*
|
|
1961
|
+
* main().catch(e => {
|
|
1962
|
+
* console.error(e);
|
|
1963
|
+
* throw e;
|
|
1964
|
+
* });
|
|
1965
|
+
*
|
|
1966
|
+
* ```
|
|
1383
1967
|
*
|
|
1384
1968
|
* @param params - Parameters for request
|
|
1385
1969
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1389,11 +1973,11 @@ export namespace tpu_v1 {
|
|
|
1389
1973
|
start(
|
|
1390
1974
|
params: Params$Resource$Projects$Locations$Nodes$Start,
|
|
1391
1975
|
options: StreamMethodOptions
|
|
1392
|
-
):
|
|
1976
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1393
1977
|
start(
|
|
1394
1978
|
params?: Params$Resource$Projects$Locations$Nodes$Start,
|
|
1395
1979
|
options?: MethodOptions
|
|
1396
|
-
):
|
|
1980
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
1397
1981
|
start(
|
|
1398
1982
|
params: Params$Resource$Projects$Locations$Nodes$Start,
|
|
1399
1983
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1422,7 +2006,10 @@ export namespace tpu_v1 {
|
|
|
1422
2006
|
callback?:
|
|
1423
2007
|
| BodyResponseCallback<Schema$Operation>
|
|
1424
2008
|
| BodyResponseCallback<Readable>
|
|
1425
|
-
):
|
|
2009
|
+
):
|
|
2010
|
+
| void
|
|
2011
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
|
|
2012
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1426
2013
|
let params = (paramsOrCallback ||
|
|
1427
2014
|
{}) as Params$Resource$Projects$Locations$Nodes$Start;
|
|
1428
2015
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1465,6 +2052,62 @@ export namespace tpu_v1 {
|
|
|
1465
2052
|
|
|
1466
2053
|
/**
|
|
1467
2054
|
* Stops a node, this operation is only available with single TPU nodes.
|
|
2055
|
+
* @example
|
|
2056
|
+
* ```js
|
|
2057
|
+
* // Before running the sample:
|
|
2058
|
+
* // - Enable the API at:
|
|
2059
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
2060
|
+
* // - Login into gcloud by running:
|
|
2061
|
+
* // ```sh
|
|
2062
|
+
* // $ gcloud auth application-default login
|
|
2063
|
+
* // ```
|
|
2064
|
+
* // - Install the npm module by running:
|
|
2065
|
+
* // ```sh
|
|
2066
|
+
* // $ npm install googleapis
|
|
2067
|
+
* // ```
|
|
2068
|
+
*
|
|
2069
|
+
* const {google} = require('googleapis');
|
|
2070
|
+
* const tpu = google.tpu('v1');
|
|
2071
|
+
*
|
|
2072
|
+
* async function main() {
|
|
2073
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2074
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2075
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2076
|
+
* });
|
|
2077
|
+
*
|
|
2078
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2079
|
+
* const authClient = await auth.getClient();
|
|
2080
|
+
* google.options({auth: authClient});
|
|
2081
|
+
*
|
|
2082
|
+
* // Do the magic
|
|
2083
|
+
* const res = await tpu.projects.locations.nodes.stop({
|
|
2084
|
+
* // The resource name.
|
|
2085
|
+
* name: 'projects/my-project/locations/my-location/nodes/my-node',
|
|
2086
|
+
*
|
|
2087
|
+
* // Request body metadata
|
|
2088
|
+
* requestBody: {
|
|
2089
|
+
* // request body parameters
|
|
2090
|
+
* // {}
|
|
2091
|
+
* },
|
|
2092
|
+
* });
|
|
2093
|
+
* console.log(res.data);
|
|
2094
|
+
*
|
|
2095
|
+
* // Example response
|
|
2096
|
+
* // {
|
|
2097
|
+
* // "done": false,
|
|
2098
|
+
* // "error": {},
|
|
2099
|
+
* // "metadata": {},
|
|
2100
|
+
* // "name": "my_name",
|
|
2101
|
+
* // "response": {}
|
|
2102
|
+
* // }
|
|
2103
|
+
* }
|
|
2104
|
+
*
|
|
2105
|
+
* main().catch(e => {
|
|
2106
|
+
* console.error(e);
|
|
2107
|
+
* throw e;
|
|
2108
|
+
* });
|
|
2109
|
+
*
|
|
2110
|
+
* ```
|
|
1468
2111
|
*
|
|
1469
2112
|
* @param params - Parameters for request
|
|
1470
2113
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1474,11 +2117,11 @@ export namespace tpu_v1 {
|
|
|
1474
2117
|
stop(
|
|
1475
2118
|
params: Params$Resource$Projects$Locations$Nodes$Stop,
|
|
1476
2119
|
options: StreamMethodOptions
|
|
1477
|
-
):
|
|
2120
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1478
2121
|
stop(
|
|
1479
2122
|
params?: Params$Resource$Projects$Locations$Nodes$Stop,
|
|
1480
2123
|
options?: MethodOptions
|
|
1481
|
-
):
|
|
2124
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
1482
2125
|
stop(
|
|
1483
2126
|
params: Params$Resource$Projects$Locations$Nodes$Stop,
|
|
1484
2127
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1507,7 +2150,10 @@ export namespace tpu_v1 {
|
|
|
1507
2150
|
callback?:
|
|
1508
2151
|
| BodyResponseCallback<Schema$Operation>
|
|
1509
2152
|
| BodyResponseCallback<Readable>
|
|
1510
|
-
):
|
|
2153
|
+
):
|
|
2154
|
+
| void
|
|
2155
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
|
|
2156
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1511
2157
|
let params = (paramsOrCallback ||
|
|
1512
2158
|
{}) as Params$Resource$Projects$Locations$Nodes$Stop;
|
|
1513
2159
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1639,6 +2285,50 @@ export namespace tpu_v1 {
|
|
|
1639
2285
|
|
|
1640
2286
|
/**
|
|
1641
2287
|
* 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`.
|
|
2288
|
+
* @example
|
|
2289
|
+
* ```js
|
|
2290
|
+
* // Before running the sample:
|
|
2291
|
+
* // - Enable the API at:
|
|
2292
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
2293
|
+
* // - Login into gcloud by running:
|
|
2294
|
+
* // ```sh
|
|
2295
|
+
* // $ gcloud auth application-default login
|
|
2296
|
+
* // ```
|
|
2297
|
+
* // - Install the npm module by running:
|
|
2298
|
+
* // ```sh
|
|
2299
|
+
* // $ npm install googleapis
|
|
2300
|
+
* // ```
|
|
2301
|
+
*
|
|
2302
|
+
* const {google} = require('googleapis');
|
|
2303
|
+
* const tpu = google.tpu('v1');
|
|
2304
|
+
*
|
|
2305
|
+
* async function main() {
|
|
2306
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2307
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2308
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2309
|
+
* });
|
|
2310
|
+
*
|
|
2311
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2312
|
+
* const authClient = await auth.getClient();
|
|
2313
|
+
* google.options({auth: authClient});
|
|
2314
|
+
*
|
|
2315
|
+
* // Do the magic
|
|
2316
|
+
* const res = await tpu.projects.locations.operations.cancel({
|
|
2317
|
+
* // The name of the operation resource to be cancelled.
|
|
2318
|
+
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
2319
|
+
* });
|
|
2320
|
+
* console.log(res.data);
|
|
2321
|
+
*
|
|
2322
|
+
* // Example response
|
|
2323
|
+
* // {}
|
|
2324
|
+
* }
|
|
2325
|
+
*
|
|
2326
|
+
* main().catch(e => {
|
|
2327
|
+
* console.error(e);
|
|
2328
|
+
* throw e;
|
|
2329
|
+
* });
|
|
2330
|
+
*
|
|
2331
|
+
* ```
|
|
1642
2332
|
*
|
|
1643
2333
|
* @param params - Parameters for request
|
|
1644
2334
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1648,11 +2338,11 @@ export namespace tpu_v1 {
|
|
|
1648
2338
|
cancel(
|
|
1649
2339
|
params: Params$Resource$Projects$Locations$Operations$Cancel,
|
|
1650
2340
|
options: StreamMethodOptions
|
|
1651
|
-
):
|
|
2341
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1652
2342
|
cancel(
|
|
1653
2343
|
params?: Params$Resource$Projects$Locations$Operations$Cancel,
|
|
1654
2344
|
options?: MethodOptions
|
|
1655
|
-
):
|
|
2345
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
|
|
1656
2346
|
cancel(
|
|
1657
2347
|
params: Params$Resource$Projects$Locations$Operations$Cancel,
|
|
1658
2348
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1681,7 +2371,10 @@ export namespace tpu_v1 {
|
|
|
1681
2371
|
callback?:
|
|
1682
2372
|
| BodyResponseCallback<Schema$Empty>
|
|
1683
2373
|
| BodyResponseCallback<Readable>
|
|
1684
|
-
):
|
|
2374
|
+
):
|
|
2375
|
+
| void
|
|
2376
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Empty>>
|
|
2377
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1685
2378
|
let params = (paramsOrCallback ||
|
|
1686
2379
|
{}) as Params$Resource$Projects$Locations$Operations$Cancel;
|
|
1687
2380
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1724,6 +2417,50 @@ export namespace tpu_v1 {
|
|
|
1724
2417
|
|
|
1725
2418
|
/**
|
|
1726
2419
|
* 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`.
|
|
2420
|
+
* @example
|
|
2421
|
+
* ```js
|
|
2422
|
+
* // Before running the sample:
|
|
2423
|
+
* // - Enable the API at:
|
|
2424
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
2425
|
+
* // - Login into gcloud by running:
|
|
2426
|
+
* // ```sh
|
|
2427
|
+
* // $ gcloud auth application-default login
|
|
2428
|
+
* // ```
|
|
2429
|
+
* // - Install the npm module by running:
|
|
2430
|
+
* // ```sh
|
|
2431
|
+
* // $ npm install googleapis
|
|
2432
|
+
* // ```
|
|
2433
|
+
*
|
|
2434
|
+
* const {google} = require('googleapis');
|
|
2435
|
+
* const tpu = google.tpu('v1');
|
|
2436
|
+
*
|
|
2437
|
+
* async function main() {
|
|
2438
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2439
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2440
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2441
|
+
* });
|
|
2442
|
+
*
|
|
2443
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2444
|
+
* const authClient = await auth.getClient();
|
|
2445
|
+
* google.options({auth: authClient});
|
|
2446
|
+
*
|
|
2447
|
+
* // Do the magic
|
|
2448
|
+
* const res = await tpu.projects.locations.operations.delete({
|
|
2449
|
+
* // The name of the operation resource to be deleted.
|
|
2450
|
+
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
2451
|
+
* });
|
|
2452
|
+
* console.log(res.data);
|
|
2453
|
+
*
|
|
2454
|
+
* // Example response
|
|
2455
|
+
* // {}
|
|
2456
|
+
* }
|
|
2457
|
+
*
|
|
2458
|
+
* main().catch(e => {
|
|
2459
|
+
* console.error(e);
|
|
2460
|
+
* throw e;
|
|
2461
|
+
* });
|
|
2462
|
+
*
|
|
2463
|
+
* ```
|
|
1727
2464
|
*
|
|
1728
2465
|
* @param params - Parameters for request
|
|
1729
2466
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1733,11 +2470,11 @@ export namespace tpu_v1 {
|
|
|
1733
2470
|
delete(
|
|
1734
2471
|
params: Params$Resource$Projects$Locations$Operations$Delete,
|
|
1735
2472
|
options: StreamMethodOptions
|
|
1736
|
-
):
|
|
2473
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1737
2474
|
delete(
|
|
1738
2475
|
params?: Params$Resource$Projects$Locations$Operations$Delete,
|
|
1739
2476
|
options?: MethodOptions
|
|
1740
|
-
):
|
|
2477
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
|
|
1741
2478
|
delete(
|
|
1742
2479
|
params: Params$Resource$Projects$Locations$Operations$Delete,
|
|
1743
2480
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1766,7 +2503,10 @@ export namespace tpu_v1 {
|
|
|
1766
2503
|
callback?:
|
|
1767
2504
|
| BodyResponseCallback<Schema$Empty>
|
|
1768
2505
|
| BodyResponseCallback<Readable>
|
|
1769
|
-
):
|
|
2506
|
+
):
|
|
2507
|
+
| void
|
|
2508
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Empty>>
|
|
2509
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1770
2510
|
let params = (paramsOrCallback ||
|
|
1771
2511
|
{}) as Params$Resource$Projects$Locations$Operations$Delete;
|
|
1772
2512
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1809,6 +2549,56 @@ export namespace tpu_v1 {
|
|
|
1809
2549
|
|
|
1810
2550
|
/**
|
|
1811
2551
|
* 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.
|
|
2552
|
+
* @example
|
|
2553
|
+
* ```js
|
|
2554
|
+
* // Before running the sample:
|
|
2555
|
+
* // - Enable the API at:
|
|
2556
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
2557
|
+
* // - Login into gcloud by running:
|
|
2558
|
+
* // ```sh
|
|
2559
|
+
* // $ gcloud auth application-default login
|
|
2560
|
+
* // ```
|
|
2561
|
+
* // - Install the npm module by running:
|
|
2562
|
+
* // ```sh
|
|
2563
|
+
* // $ npm install googleapis
|
|
2564
|
+
* // ```
|
|
2565
|
+
*
|
|
2566
|
+
* const {google} = require('googleapis');
|
|
2567
|
+
* const tpu = google.tpu('v1');
|
|
2568
|
+
*
|
|
2569
|
+
* async function main() {
|
|
2570
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2571
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2572
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2573
|
+
* });
|
|
2574
|
+
*
|
|
2575
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2576
|
+
* const authClient = await auth.getClient();
|
|
2577
|
+
* google.options({auth: authClient});
|
|
2578
|
+
*
|
|
2579
|
+
* // Do the magic
|
|
2580
|
+
* const res = await tpu.projects.locations.operations.get({
|
|
2581
|
+
* // The name of the operation resource.
|
|
2582
|
+
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
2583
|
+
* });
|
|
2584
|
+
* console.log(res.data);
|
|
2585
|
+
*
|
|
2586
|
+
* // Example response
|
|
2587
|
+
* // {
|
|
2588
|
+
* // "done": false,
|
|
2589
|
+
* // "error": {},
|
|
2590
|
+
* // "metadata": {},
|
|
2591
|
+
* // "name": "my_name",
|
|
2592
|
+
* // "response": {}
|
|
2593
|
+
* // }
|
|
2594
|
+
* }
|
|
2595
|
+
*
|
|
2596
|
+
* main().catch(e => {
|
|
2597
|
+
* console.error(e);
|
|
2598
|
+
* throw e;
|
|
2599
|
+
* });
|
|
2600
|
+
*
|
|
2601
|
+
* ```
|
|
1812
2602
|
*
|
|
1813
2603
|
* @param params - Parameters for request
|
|
1814
2604
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1818,11 +2608,11 @@ export namespace tpu_v1 {
|
|
|
1818
2608
|
get(
|
|
1819
2609
|
params: Params$Resource$Projects$Locations$Operations$Get,
|
|
1820
2610
|
options: StreamMethodOptions
|
|
1821
|
-
):
|
|
2611
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1822
2612
|
get(
|
|
1823
2613
|
params?: Params$Resource$Projects$Locations$Operations$Get,
|
|
1824
2614
|
options?: MethodOptions
|
|
1825
|
-
):
|
|
2615
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
1826
2616
|
get(
|
|
1827
2617
|
params: Params$Resource$Projects$Locations$Operations$Get,
|
|
1828
2618
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1851,7 +2641,10 @@ export namespace tpu_v1 {
|
|
|
1851
2641
|
callback?:
|
|
1852
2642
|
| BodyResponseCallback<Schema$Operation>
|
|
1853
2643
|
| BodyResponseCallback<Readable>
|
|
1854
|
-
):
|
|
2644
|
+
):
|
|
2645
|
+
| void
|
|
2646
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
|
|
2647
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1855
2648
|
let params = (paramsOrCallback ||
|
|
1856
2649
|
{}) as Params$Resource$Projects$Locations$Operations$Get;
|
|
1857
2650
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1894,6 +2687,59 @@ export namespace tpu_v1 {
|
|
|
1894
2687
|
|
|
1895
2688
|
/**
|
|
1896
2689
|
* Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
|
|
2690
|
+
* @example
|
|
2691
|
+
* ```js
|
|
2692
|
+
* // Before running the sample:
|
|
2693
|
+
* // - Enable the API at:
|
|
2694
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
2695
|
+
* // - Login into gcloud by running:
|
|
2696
|
+
* // ```sh
|
|
2697
|
+
* // $ gcloud auth application-default login
|
|
2698
|
+
* // ```
|
|
2699
|
+
* // - Install the npm module by running:
|
|
2700
|
+
* // ```sh
|
|
2701
|
+
* // $ npm install googleapis
|
|
2702
|
+
* // ```
|
|
2703
|
+
*
|
|
2704
|
+
* const {google} = require('googleapis');
|
|
2705
|
+
* const tpu = google.tpu('v1');
|
|
2706
|
+
*
|
|
2707
|
+
* async function main() {
|
|
2708
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2709
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2710
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2711
|
+
* });
|
|
2712
|
+
*
|
|
2713
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2714
|
+
* const authClient = await auth.getClient();
|
|
2715
|
+
* google.options({auth: authClient});
|
|
2716
|
+
*
|
|
2717
|
+
* // Do the magic
|
|
2718
|
+
* const res = await tpu.projects.locations.operations.list({
|
|
2719
|
+
* // The standard list filter.
|
|
2720
|
+
* filter: 'placeholder-value',
|
|
2721
|
+
* // The name of the operation's parent resource.
|
|
2722
|
+
* name: 'projects/my-project/locations/my-location',
|
|
2723
|
+
* // The standard list page size.
|
|
2724
|
+
* pageSize: 'placeholder-value',
|
|
2725
|
+
* // The standard list page token.
|
|
2726
|
+
* pageToken: 'placeholder-value',
|
|
2727
|
+
* });
|
|
2728
|
+
* console.log(res.data);
|
|
2729
|
+
*
|
|
2730
|
+
* // Example response
|
|
2731
|
+
* // {
|
|
2732
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
2733
|
+
* // "operations": []
|
|
2734
|
+
* // }
|
|
2735
|
+
* }
|
|
2736
|
+
*
|
|
2737
|
+
* main().catch(e => {
|
|
2738
|
+
* console.error(e);
|
|
2739
|
+
* throw e;
|
|
2740
|
+
* });
|
|
2741
|
+
*
|
|
2742
|
+
* ```
|
|
1897
2743
|
*
|
|
1898
2744
|
* @param params - Parameters for request
|
|
1899
2745
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1903,11 +2749,11 @@ export namespace tpu_v1 {
|
|
|
1903
2749
|
list(
|
|
1904
2750
|
params: Params$Resource$Projects$Locations$Operations$List,
|
|
1905
2751
|
options: StreamMethodOptions
|
|
1906
|
-
):
|
|
2752
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1907
2753
|
list(
|
|
1908
2754
|
params?: Params$Resource$Projects$Locations$Operations$List,
|
|
1909
2755
|
options?: MethodOptions
|
|
1910
|
-
):
|
|
2756
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$ListOperationsResponse>>;
|
|
1911
2757
|
list(
|
|
1912
2758
|
params: Params$Resource$Projects$Locations$Operations$List,
|
|
1913
2759
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1940,8 +2786,8 @@ export namespace tpu_v1 {
|
|
|
1940
2786
|
| BodyResponseCallback<Readable>
|
|
1941
2787
|
):
|
|
1942
2788
|
| void
|
|
1943
|
-
|
|
|
1944
|
-
|
|
|
2789
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$ListOperationsResponse>>
|
|
2790
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1945
2791
|
let params = (paramsOrCallback ||
|
|
1946
2792
|
{}) as Params$Resource$Projects$Locations$Operations$List;
|
|
1947
2793
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -2035,6 +2881,53 @@ export namespace tpu_v1 {
|
|
|
2035
2881
|
|
|
2036
2882
|
/**
|
|
2037
2883
|
* Gets TensorFlow Version.
|
|
2884
|
+
* @example
|
|
2885
|
+
* ```js
|
|
2886
|
+
* // Before running the sample:
|
|
2887
|
+
* // - Enable the API at:
|
|
2888
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
2889
|
+
* // - Login into gcloud by running:
|
|
2890
|
+
* // ```sh
|
|
2891
|
+
* // $ gcloud auth application-default login
|
|
2892
|
+
* // ```
|
|
2893
|
+
* // - Install the npm module by running:
|
|
2894
|
+
* // ```sh
|
|
2895
|
+
* // $ npm install googleapis
|
|
2896
|
+
* // ```
|
|
2897
|
+
*
|
|
2898
|
+
* const {google} = require('googleapis');
|
|
2899
|
+
* const tpu = google.tpu('v1');
|
|
2900
|
+
*
|
|
2901
|
+
* async function main() {
|
|
2902
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2903
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2904
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2905
|
+
* });
|
|
2906
|
+
*
|
|
2907
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2908
|
+
* const authClient = await auth.getClient();
|
|
2909
|
+
* google.options({auth: authClient});
|
|
2910
|
+
*
|
|
2911
|
+
* // Do the magic
|
|
2912
|
+
* const res = await tpu.projects.locations.tensorflowVersions.get({
|
|
2913
|
+
* // Required. The resource name.
|
|
2914
|
+
* name: 'projects/my-project/locations/my-location/tensorflowVersions/my-tensorflowVersion',
|
|
2915
|
+
* });
|
|
2916
|
+
* console.log(res.data);
|
|
2917
|
+
*
|
|
2918
|
+
* // Example response
|
|
2919
|
+
* // {
|
|
2920
|
+
* // "name": "my_name",
|
|
2921
|
+
* // "version": "my_version"
|
|
2922
|
+
* // }
|
|
2923
|
+
* }
|
|
2924
|
+
*
|
|
2925
|
+
* main().catch(e => {
|
|
2926
|
+
* console.error(e);
|
|
2927
|
+
* throw e;
|
|
2928
|
+
* });
|
|
2929
|
+
*
|
|
2930
|
+
* ```
|
|
2038
2931
|
*
|
|
2039
2932
|
* @param params - Parameters for request
|
|
2040
2933
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2044,11 +2937,11 @@ export namespace tpu_v1 {
|
|
|
2044
2937
|
get(
|
|
2045
2938
|
params: Params$Resource$Projects$Locations$Tensorflowversions$Get,
|
|
2046
2939
|
options: StreamMethodOptions
|
|
2047
|
-
):
|
|
2940
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2048
2941
|
get(
|
|
2049
2942
|
params?: Params$Resource$Projects$Locations$Tensorflowversions$Get,
|
|
2050
2943
|
options?: MethodOptions
|
|
2051
|
-
):
|
|
2944
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$TensorFlowVersion>>;
|
|
2052
2945
|
get(
|
|
2053
2946
|
params: Params$Resource$Projects$Locations$Tensorflowversions$Get,
|
|
2054
2947
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -2079,8 +2972,8 @@ export namespace tpu_v1 {
|
|
|
2079
2972
|
| BodyResponseCallback<Readable>
|
|
2080
2973
|
):
|
|
2081
2974
|
| void
|
|
2082
|
-
|
|
|
2083
|
-
|
|
|
2975
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$TensorFlowVersion>>
|
|
2976
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
2084
2977
|
let params = (paramsOrCallback ||
|
|
2085
2978
|
{}) as Params$Resource$Projects$Locations$Tensorflowversions$Get;
|
|
2086
2979
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -2124,6 +3017,62 @@ export namespace tpu_v1 {
|
|
|
2124
3017
|
|
|
2125
3018
|
/**
|
|
2126
3019
|
* List TensorFlow versions supported by this API.
|
|
3020
|
+
* @example
|
|
3021
|
+
* ```js
|
|
3022
|
+
* // Before running the sample:
|
|
3023
|
+
* // - Enable the API at:
|
|
3024
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
3025
|
+
* // - Login into gcloud by running:
|
|
3026
|
+
* // ```sh
|
|
3027
|
+
* // $ gcloud auth application-default login
|
|
3028
|
+
* // ```
|
|
3029
|
+
* // - Install the npm module by running:
|
|
3030
|
+
* // ```sh
|
|
3031
|
+
* // $ npm install googleapis
|
|
3032
|
+
* // ```
|
|
3033
|
+
*
|
|
3034
|
+
* const {google} = require('googleapis');
|
|
3035
|
+
* const tpu = google.tpu('v1');
|
|
3036
|
+
*
|
|
3037
|
+
* async function main() {
|
|
3038
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3039
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3040
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3041
|
+
* });
|
|
3042
|
+
*
|
|
3043
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3044
|
+
* const authClient = await auth.getClient();
|
|
3045
|
+
* google.options({auth: authClient});
|
|
3046
|
+
*
|
|
3047
|
+
* // Do the magic
|
|
3048
|
+
* const res = await tpu.projects.locations.tensorflowVersions.list({
|
|
3049
|
+
* // List filter.
|
|
3050
|
+
* filter: 'placeholder-value',
|
|
3051
|
+
* // Sort results.
|
|
3052
|
+
* orderBy: 'placeholder-value',
|
|
3053
|
+
* // The maximum number of items to return.
|
|
3054
|
+
* pageSize: 'placeholder-value',
|
|
3055
|
+
* // The next_page_token value returned from a previous List request, if any.
|
|
3056
|
+
* pageToken: 'placeholder-value',
|
|
3057
|
+
* // Required. The parent resource name.
|
|
3058
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
3059
|
+
* });
|
|
3060
|
+
* console.log(res.data);
|
|
3061
|
+
*
|
|
3062
|
+
* // Example response
|
|
3063
|
+
* // {
|
|
3064
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
3065
|
+
* // "tensorflowVersions": [],
|
|
3066
|
+
* // "unreachable": []
|
|
3067
|
+
* // }
|
|
3068
|
+
* }
|
|
3069
|
+
*
|
|
3070
|
+
* main().catch(e => {
|
|
3071
|
+
* console.error(e);
|
|
3072
|
+
* throw e;
|
|
3073
|
+
* });
|
|
3074
|
+
*
|
|
3075
|
+
* ```
|
|
2127
3076
|
*
|
|
2128
3077
|
* @param params - Parameters for request
|
|
2129
3078
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2133,11 +3082,11 @@ export namespace tpu_v1 {
|
|
|
2133
3082
|
list(
|
|
2134
3083
|
params: Params$Resource$Projects$Locations$Tensorflowversions$List,
|
|
2135
3084
|
options: StreamMethodOptions
|
|
2136
|
-
):
|
|
3085
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2137
3086
|
list(
|
|
2138
3087
|
params?: Params$Resource$Projects$Locations$Tensorflowversions$List,
|
|
2139
3088
|
options?: MethodOptions
|
|
2140
|
-
):
|
|
3089
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$ListTensorFlowVersionsResponse>>;
|
|
2141
3090
|
list(
|
|
2142
3091
|
params: Params$Resource$Projects$Locations$Tensorflowversions$List,
|
|
2143
3092
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -2172,8 +3121,8 @@ export namespace tpu_v1 {
|
|
|
2172
3121
|
| BodyResponseCallback<Readable>
|
|
2173
3122
|
):
|
|
2174
3123
|
| void
|
|
2175
|
-
|
|
|
2176
|
-
|
|
|
3124
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$ListTensorFlowVersionsResponse>>
|
|
3125
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
2177
3126
|
let params = (paramsOrCallback ||
|
|
2178
3127
|
{}) as Params$Resource$Projects$Locations$Tensorflowversions$List;
|
|
2179
3128
|
let options = (optionsOrCallback || {}) as MethodOptions;
|