@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/v1alpha1.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_v1alpha1 {
|
|
|
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('v1alpha1');
|
|
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_v1alpha1 {
|
|
|
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_v1alpha1 {
|
|
|
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_v1alpha1 {
|
|
|
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('v1alpha1');
|
|
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_v1alpha1 {
|
|
|
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_v1alpha1 {
|
|
|
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_v1alpha1 {
|
|
|
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('v1alpha1');
|
|
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_v1alpha1 {
|
|
|
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_v1alpha1 {
|
|
|
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_v1alpha1 {
|
|
|
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('v1alpha1');
|
|
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_v1alpha1 {
|
|
|
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_v1alpha1 {
|
|
|
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,86 @@ export namespace tpu_v1alpha1 {
|
|
|
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('v1alpha1');
|
|
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
|
+
* // Idempotent request UUID.
|
|
1194
|
+
* requestId: 'placeholder-value',
|
|
1195
|
+
*
|
|
1196
|
+
* // Request body metadata
|
|
1197
|
+
* requestBody: {
|
|
1198
|
+
* // request body parameters
|
|
1199
|
+
* // {
|
|
1200
|
+
* // "acceleratorType": "my_acceleratorType",
|
|
1201
|
+
* // "apiVersion": "my_apiVersion",
|
|
1202
|
+
* // "cidrBlock": "my_cidrBlock",
|
|
1203
|
+
* // "createTime": "my_createTime",
|
|
1204
|
+
* // "description": "my_description",
|
|
1205
|
+
* // "health": "my_health",
|
|
1206
|
+
* // "healthDescription": "my_healthDescription",
|
|
1207
|
+
* // "ipAddress": "my_ipAddress",
|
|
1208
|
+
* // "labels": {},
|
|
1209
|
+
* // "name": "my_name",
|
|
1210
|
+
* // "network": "my_network",
|
|
1211
|
+
* // "networkEndpoints": [],
|
|
1212
|
+
* // "port": "my_port",
|
|
1213
|
+
* // "schedulingConfig": {},
|
|
1214
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
1215
|
+
* // "state": "my_state",
|
|
1216
|
+
* // "symptoms": [],
|
|
1217
|
+
* // "tensorflowVersion": "my_tensorflowVersion",
|
|
1218
|
+
* // "useServiceNetworking": false
|
|
1219
|
+
* // }
|
|
1220
|
+
* },
|
|
1221
|
+
* });
|
|
1222
|
+
* console.log(res.data);
|
|
1223
|
+
*
|
|
1224
|
+
* // Example response
|
|
1225
|
+
* // {
|
|
1226
|
+
* // "done": false,
|
|
1227
|
+
* // "error": {},
|
|
1228
|
+
* // "metadata": {},
|
|
1229
|
+
* // "name": "my_name",
|
|
1230
|
+
* // "response": {}
|
|
1231
|
+
* // }
|
|
1232
|
+
* }
|
|
1233
|
+
*
|
|
1234
|
+
* main().catch(e => {
|
|
1235
|
+
* console.error(e);
|
|
1236
|
+
* throw e;
|
|
1237
|
+
* });
|
|
1238
|
+
*
|
|
1239
|
+
* ```
|
|
946
1240
|
*
|
|
947
1241
|
* @param params - Parameters for request
|
|
948
1242
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -952,11 +1246,11 @@ export namespace tpu_v1alpha1 {
|
|
|
952
1246
|
create(
|
|
953
1247
|
params: Params$Resource$Projects$Locations$Nodes$Create,
|
|
954
1248
|
options: StreamMethodOptions
|
|
955
|
-
):
|
|
1249
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
956
1250
|
create(
|
|
957
1251
|
params?: Params$Resource$Projects$Locations$Nodes$Create,
|
|
958
1252
|
options?: MethodOptions
|
|
959
|
-
):
|
|
1253
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
960
1254
|
create(
|
|
961
1255
|
params: Params$Resource$Projects$Locations$Nodes$Create,
|
|
962
1256
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -985,7 +1279,10 @@ export namespace tpu_v1alpha1 {
|
|
|
985
1279
|
callback?:
|
|
986
1280
|
| BodyResponseCallback<Schema$Operation>
|
|
987
1281
|
| BodyResponseCallback<Readable>
|
|
988
|
-
):
|
|
1282
|
+
):
|
|
1283
|
+
| void
|
|
1284
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
|
|
1285
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
989
1286
|
let params = (paramsOrCallback ||
|
|
990
1287
|
{}) as Params$Resource$Projects$Locations$Nodes$Create;
|
|
991
1288
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1031,6 +1328,58 @@ export namespace tpu_v1alpha1 {
|
|
|
1031
1328
|
|
|
1032
1329
|
/**
|
|
1033
1330
|
* Deletes a node.
|
|
1331
|
+
* @example
|
|
1332
|
+
* ```js
|
|
1333
|
+
* // Before running the sample:
|
|
1334
|
+
* // - Enable the API at:
|
|
1335
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1336
|
+
* // - Login into gcloud by running:
|
|
1337
|
+
* // ```sh
|
|
1338
|
+
* // $ gcloud auth application-default login
|
|
1339
|
+
* // ```
|
|
1340
|
+
* // - Install the npm module by running:
|
|
1341
|
+
* // ```sh
|
|
1342
|
+
* // $ npm install googleapis
|
|
1343
|
+
* // ```
|
|
1344
|
+
*
|
|
1345
|
+
* const {google} = require('googleapis');
|
|
1346
|
+
* const tpu = google.tpu('v1alpha1');
|
|
1347
|
+
*
|
|
1348
|
+
* async function main() {
|
|
1349
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1350
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1351
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1352
|
+
* });
|
|
1353
|
+
*
|
|
1354
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1355
|
+
* const authClient = await auth.getClient();
|
|
1356
|
+
* google.options({auth: authClient});
|
|
1357
|
+
*
|
|
1358
|
+
* // Do the magic
|
|
1359
|
+
* const res = await tpu.projects.locations.nodes.delete({
|
|
1360
|
+
* // Required. The resource name.
|
|
1361
|
+
* name: 'projects/my-project/locations/my-location/nodes/my-node',
|
|
1362
|
+
* // Idempotent request UUID.
|
|
1363
|
+
* requestId: 'placeholder-value',
|
|
1364
|
+
* });
|
|
1365
|
+
* console.log(res.data);
|
|
1366
|
+
*
|
|
1367
|
+
* // Example response
|
|
1368
|
+
* // {
|
|
1369
|
+
* // "done": false,
|
|
1370
|
+
* // "error": {},
|
|
1371
|
+
* // "metadata": {},
|
|
1372
|
+
* // "name": "my_name",
|
|
1373
|
+
* // "response": {}
|
|
1374
|
+
* // }
|
|
1375
|
+
* }
|
|
1376
|
+
*
|
|
1377
|
+
* main().catch(e => {
|
|
1378
|
+
* console.error(e);
|
|
1379
|
+
* throw e;
|
|
1380
|
+
* });
|
|
1381
|
+
*
|
|
1382
|
+
* ```
|
|
1034
1383
|
*
|
|
1035
1384
|
* @param params - Parameters for request
|
|
1036
1385
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1040,11 +1389,11 @@ export namespace tpu_v1alpha1 {
|
|
|
1040
1389
|
delete(
|
|
1041
1390
|
params: Params$Resource$Projects$Locations$Nodes$Delete,
|
|
1042
1391
|
options: StreamMethodOptions
|
|
1043
|
-
):
|
|
1392
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1044
1393
|
delete(
|
|
1045
1394
|
params?: Params$Resource$Projects$Locations$Nodes$Delete,
|
|
1046
1395
|
options?: MethodOptions
|
|
1047
|
-
):
|
|
1396
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
1048
1397
|
delete(
|
|
1049
1398
|
params: Params$Resource$Projects$Locations$Nodes$Delete,
|
|
1050
1399
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1073,7 +1422,10 @@ export namespace tpu_v1alpha1 {
|
|
|
1073
1422
|
callback?:
|
|
1074
1423
|
| BodyResponseCallback<Schema$Operation>
|
|
1075
1424
|
| BodyResponseCallback<Readable>
|
|
1076
|
-
):
|
|
1425
|
+
):
|
|
1426
|
+
| void
|
|
1427
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
|
|
1428
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1077
1429
|
let params = (paramsOrCallback ||
|
|
1078
1430
|
{}) as Params$Resource$Projects$Locations$Nodes$Delete;
|
|
1079
1431
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1116,6 +1468,70 @@ export namespace tpu_v1alpha1 {
|
|
|
1116
1468
|
|
|
1117
1469
|
/**
|
|
1118
1470
|
* Gets the details of a node.
|
|
1471
|
+
* @example
|
|
1472
|
+
* ```js
|
|
1473
|
+
* // Before running the sample:
|
|
1474
|
+
* // - Enable the API at:
|
|
1475
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1476
|
+
* // - Login into gcloud by running:
|
|
1477
|
+
* // ```sh
|
|
1478
|
+
* // $ gcloud auth application-default login
|
|
1479
|
+
* // ```
|
|
1480
|
+
* // - Install the npm module by running:
|
|
1481
|
+
* // ```sh
|
|
1482
|
+
* // $ npm install googleapis
|
|
1483
|
+
* // ```
|
|
1484
|
+
*
|
|
1485
|
+
* const {google} = require('googleapis');
|
|
1486
|
+
* const tpu = google.tpu('v1alpha1');
|
|
1487
|
+
*
|
|
1488
|
+
* async function main() {
|
|
1489
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1490
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1491
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1492
|
+
* });
|
|
1493
|
+
*
|
|
1494
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1495
|
+
* const authClient = await auth.getClient();
|
|
1496
|
+
* google.options({auth: authClient});
|
|
1497
|
+
*
|
|
1498
|
+
* // Do the magic
|
|
1499
|
+
* const res = await tpu.projects.locations.nodes.get({
|
|
1500
|
+
* // Required. The resource name.
|
|
1501
|
+
* name: 'projects/my-project/locations/my-location/nodes/my-node',
|
|
1502
|
+
* });
|
|
1503
|
+
* console.log(res.data);
|
|
1504
|
+
*
|
|
1505
|
+
* // Example response
|
|
1506
|
+
* // {
|
|
1507
|
+
* // "acceleratorType": "my_acceleratorType",
|
|
1508
|
+
* // "apiVersion": "my_apiVersion",
|
|
1509
|
+
* // "cidrBlock": "my_cidrBlock",
|
|
1510
|
+
* // "createTime": "my_createTime",
|
|
1511
|
+
* // "description": "my_description",
|
|
1512
|
+
* // "health": "my_health",
|
|
1513
|
+
* // "healthDescription": "my_healthDescription",
|
|
1514
|
+
* // "ipAddress": "my_ipAddress",
|
|
1515
|
+
* // "labels": {},
|
|
1516
|
+
* // "name": "my_name",
|
|
1517
|
+
* // "network": "my_network",
|
|
1518
|
+
* // "networkEndpoints": [],
|
|
1519
|
+
* // "port": "my_port",
|
|
1520
|
+
* // "schedulingConfig": {},
|
|
1521
|
+
* // "serviceAccount": "my_serviceAccount",
|
|
1522
|
+
* // "state": "my_state",
|
|
1523
|
+
* // "symptoms": [],
|
|
1524
|
+
* // "tensorflowVersion": "my_tensorflowVersion",
|
|
1525
|
+
* // "useServiceNetworking": false
|
|
1526
|
+
* // }
|
|
1527
|
+
* }
|
|
1528
|
+
*
|
|
1529
|
+
* main().catch(e => {
|
|
1530
|
+
* console.error(e);
|
|
1531
|
+
* throw e;
|
|
1532
|
+
* });
|
|
1533
|
+
*
|
|
1534
|
+
* ```
|
|
1119
1535
|
*
|
|
1120
1536
|
* @param params - Parameters for request
|
|
1121
1537
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1125,11 +1541,11 @@ export namespace tpu_v1alpha1 {
|
|
|
1125
1541
|
get(
|
|
1126
1542
|
params: Params$Resource$Projects$Locations$Nodes$Get,
|
|
1127
1543
|
options: StreamMethodOptions
|
|
1128
|
-
):
|
|
1544
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1129
1545
|
get(
|
|
1130
1546
|
params?: Params$Resource$Projects$Locations$Nodes$Get,
|
|
1131
1547
|
options?: MethodOptions
|
|
1132
|
-
):
|
|
1548
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Node>>;
|
|
1133
1549
|
get(
|
|
1134
1550
|
params: Params$Resource$Projects$Locations$Nodes$Get,
|
|
1135
1551
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1158,7 +1574,10 @@ export namespace tpu_v1alpha1 {
|
|
|
1158
1574
|
callback?:
|
|
1159
1575
|
| BodyResponseCallback<Schema$Node>
|
|
1160
1576
|
| BodyResponseCallback<Readable>
|
|
1161
|
-
):
|
|
1577
|
+
):
|
|
1578
|
+
| void
|
|
1579
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Node>>
|
|
1580
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1162
1581
|
let params = (paramsOrCallback ||
|
|
1163
1582
|
{}) as Params$Resource$Projects$Locations$Nodes$Get;
|
|
1164
1583
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1201,6 +1620,58 @@ export namespace tpu_v1alpha1 {
|
|
|
1201
1620
|
|
|
1202
1621
|
/**
|
|
1203
1622
|
* Lists nodes.
|
|
1623
|
+
* @example
|
|
1624
|
+
* ```js
|
|
1625
|
+
* // Before running the sample:
|
|
1626
|
+
* // - Enable the API at:
|
|
1627
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1628
|
+
* // - Login into gcloud by running:
|
|
1629
|
+
* // ```sh
|
|
1630
|
+
* // $ gcloud auth application-default login
|
|
1631
|
+
* // ```
|
|
1632
|
+
* // - Install the npm module by running:
|
|
1633
|
+
* // ```sh
|
|
1634
|
+
* // $ npm install googleapis
|
|
1635
|
+
* // ```
|
|
1636
|
+
*
|
|
1637
|
+
* const {google} = require('googleapis');
|
|
1638
|
+
* const tpu = google.tpu('v1alpha1');
|
|
1639
|
+
*
|
|
1640
|
+
* async function main() {
|
|
1641
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1642
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1643
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1644
|
+
* });
|
|
1645
|
+
*
|
|
1646
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1647
|
+
* const authClient = await auth.getClient();
|
|
1648
|
+
* google.options({auth: authClient});
|
|
1649
|
+
*
|
|
1650
|
+
* // Do the magic
|
|
1651
|
+
* const res = await tpu.projects.locations.nodes.list({
|
|
1652
|
+
* // The maximum number of items to return.
|
|
1653
|
+
* pageSize: 'placeholder-value',
|
|
1654
|
+
* // The next_page_token value returned from a previous List request, if any.
|
|
1655
|
+
* pageToken: 'placeholder-value',
|
|
1656
|
+
* // Required. The parent resource name.
|
|
1657
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
1658
|
+
* });
|
|
1659
|
+
* console.log(res.data);
|
|
1660
|
+
*
|
|
1661
|
+
* // Example response
|
|
1662
|
+
* // {
|
|
1663
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
1664
|
+
* // "nodes": [],
|
|
1665
|
+
* // "unreachable": []
|
|
1666
|
+
* // }
|
|
1667
|
+
* }
|
|
1668
|
+
*
|
|
1669
|
+
* main().catch(e => {
|
|
1670
|
+
* console.error(e);
|
|
1671
|
+
* throw e;
|
|
1672
|
+
* });
|
|
1673
|
+
*
|
|
1674
|
+
* ```
|
|
1204
1675
|
*
|
|
1205
1676
|
* @param params - Parameters for request
|
|
1206
1677
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1210,11 +1681,11 @@ export namespace tpu_v1alpha1 {
|
|
|
1210
1681
|
list(
|
|
1211
1682
|
params: Params$Resource$Projects$Locations$Nodes$List,
|
|
1212
1683
|
options: StreamMethodOptions
|
|
1213
|
-
):
|
|
1684
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1214
1685
|
list(
|
|
1215
1686
|
params?: Params$Resource$Projects$Locations$Nodes$List,
|
|
1216
1687
|
options?: MethodOptions
|
|
1217
|
-
):
|
|
1688
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$ListNodesResponse>>;
|
|
1218
1689
|
list(
|
|
1219
1690
|
params: Params$Resource$Projects$Locations$Nodes$List,
|
|
1220
1691
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1245,8 +1716,8 @@ export namespace tpu_v1alpha1 {
|
|
|
1245
1716
|
| BodyResponseCallback<Readable>
|
|
1246
1717
|
):
|
|
1247
1718
|
| void
|
|
1248
|
-
|
|
|
1249
|
-
|
|
|
1719
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$ListNodesResponse>>
|
|
1720
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1250
1721
|
let params = (paramsOrCallback ||
|
|
1251
1722
|
{}) as Params$Resource$Projects$Locations$Nodes$List;
|
|
1252
1723
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1292,6 +1763,64 @@ export namespace tpu_v1alpha1 {
|
|
|
1292
1763
|
|
|
1293
1764
|
/**
|
|
1294
1765
|
* Reimages a node's OS.
|
|
1766
|
+
* @example
|
|
1767
|
+
* ```js
|
|
1768
|
+
* // Before running the sample:
|
|
1769
|
+
* // - Enable the API at:
|
|
1770
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1771
|
+
* // - Login into gcloud by running:
|
|
1772
|
+
* // ```sh
|
|
1773
|
+
* // $ gcloud auth application-default login
|
|
1774
|
+
* // ```
|
|
1775
|
+
* // - Install the npm module by running:
|
|
1776
|
+
* // ```sh
|
|
1777
|
+
* // $ npm install googleapis
|
|
1778
|
+
* // ```
|
|
1779
|
+
*
|
|
1780
|
+
* const {google} = require('googleapis');
|
|
1781
|
+
* const tpu = google.tpu('v1alpha1');
|
|
1782
|
+
*
|
|
1783
|
+
* async function main() {
|
|
1784
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1785
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1786
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1787
|
+
* });
|
|
1788
|
+
*
|
|
1789
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1790
|
+
* const authClient = await auth.getClient();
|
|
1791
|
+
* google.options({auth: authClient});
|
|
1792
|
+
*
|
|
1793
|
+
* // Do the magic
|
|
1794
|
+
* const res = await tpu.projects.locations.nodes.reimage({
|
|
1795
|
+
* // The resource name.
|
|
1796
|
+
* name: 'projects/my-project/locations/my-location/nodes/my-node',
|
|
1797
|
+
*
|
|
1798
|
+
* // Request body metadata
|
|
1799
|
+
* requestBody: {
|
|
1800
|
+
* // request body parameters
|
|
1801
|
+
* // {
|
|
1802
|
+
* // "tensorflowVersion": "my_tensorflowVersion"
|
|
1803
|
+
* // }
|
|
1804
|
+
* },
|
|
1805
|
+
* });
|
|
1806
|
+
* console.log(res.data);
|
|
1807
|
+
*
|
|
1808
|
+
* // Example response
|
|
1809
|
+
* // {
|
|
1810
|
+
* // "done": false,
|
|
1811
|
+
* // "error": {},
|
|
1812
|
+
* // "metadata": {},
|
|
1813
|
+
* // "name": "my_name",
|
|
1814
|
+
* // "response": {}
|
|
1815
|
+
* // }
|
|
1816
|
+
* }
|
|
1817
|
+
*
|
|
1818
|
+
* main().catch(e => {
|
|
1819
|
+
* console.error(e);
|
|
1820
|
+
* throw e;
|
|
1821
|
+
* });
|
|
1822
|
+
*
|
|
1823
|
+
* ```
|
|
1295
1824
|
*
|
|
1296
1825
|
* @param params - Parameters for request
|
|
1297
1826
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1301,11 +1830,11 @@ export namespace tpu_v1alpha1 {
|
|
|
1301
1830
|
reimage(
|
|
1302
1831
|
params: Params$Resource$Projects$Locations$Nodes$Reimage,
|
|
1303
1832
|
options: StreamMethodOptions
|
|
1304
|
-
):
|
|
1833
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1305
1834
|
reimage(
|
|
1306
1835
|
params?: Params$Resource$Projects$Locations$Nodes$Reimage,
|
|
1307
1836
|
options?: MethodOptions
|
|
1308
|
-
):
|
|
1837
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
1309
1838
|
reimage(
|
|
1310
1839
|
params: Params$Resource$Projects$Locations$Nodes$Reimage,
|
|
1311
1840
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1334,7 +1863,10 @@ export namespace tpu_v1alpha1 {
|
|
|
1334
1863
|
callback?:
|
|
1335
1864
|
| BodyResponseCallback<Schema$Operation>
|
|
1336
1865
|
| BodyResponseCallback<Readable>
|
|
1337
|
-
):
|
|
1866
|
+
):
|
|
1867
|
+
| void
|
|
1868
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
|
|
1869
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1338
1870
|
let params = (paramsOrCallback ||
|
|
1339
1871
|
{}) as Params$Resource$Projects$Locations$Nodes$Reimage;
|
|
1340
1872
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1380,6 +1912,62 @@ export namespace tpu_v1alpha1 {
|
|
|
1380
1912
|
|
|
1381
1913
|
/**
|
|
1382
1914
|
* Starts a node.
|
|
1915
|
+
* @example
|
|
1916
|
+
* ```js
|
|
1917
|
+
* // Before running the sample:
|
|
1918
|
+
* // - Enable the API at:
|
|
1919
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1920
|
+
* // - Login into gcloud by running:
|
|
1921
|
+
* // ```sh
|
|
1922
|
+
* // $ gcloud auth application-default login
|
|
1923
|
+
* // ```
|
|
1924
|
+
* // - Install the npm module by running:
|
|
1925
|
+
* // ```sh
|
|
1926
|
+
* // $ npm install googleapis
|
|
1927
|
+
* // ```
|
|
1928
|
+
*
|
|
1929
|
+
* const {google} = require('googleapis');
|
|
1930
|
+
* const tpu = google.tpu('v1alpha1');
|
|
1931
|
+
*
|
|
1932
|
+
* async function main() {
|
|
1933
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1934
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1935
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1936
|
+
* });
|
|
1937
|
+
*
|
|
1938
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1939
|
+
* const authClient = await auth.getClient();
|
|
1940
|
+
* google.options({auth: authClient});
|
|
1941
|
+
*
|
|
1942
|
+
* // Do the magic
|
|
1943
|
+
* const res = await tpu.projects.locations.nodes.start({
|
|
1944
|
+
* // The resource name.
|
|
1945
|
+
* name: 'projects/my-project/locations/my-location/nodes/my-node',
|
|
1946
|
+
*
|
|
1947
|
+
* // Request body metadata
|
|
1948
|
+
* requestBody: {
|
|
1949
|
+
* // request body parameters
|
|
1950
|
+
* // {}
|
|
1951
|
+
* },
|
|
1952
|
+
* });
|
|
1953
|
+
* console.log(res.data);
|
|
1954
|
+
*
|
|
1955
|
+
* // Example response
|
|
1956
|
+
* // {
|
|
1957
|
+
* // "done": false,
|
|
1958
|
+
* // "error": {},
|
|
1959
|
+
* // "metadata": {},
|
|
1960
|
+
* // "name": "my_name",
|
|
1961
|
+
* // "response": {}
|
|
1962
|
+
* // }
|
|
1963
|
+
* }
|
|
1964
|
+
*
|
|
1965
|
+
* main().catch(e => {
|
|
1966
|
+
* console.error(e);
|
|
1967
|
+
* throw e;
|
|
1968
|
+
* });
|
|
1969
|
+
*
|
|
1970
|
+
* ```
|
|
1383
1971
|
*
|
|
1384
1972
|
* @param params - Parameters for request
|
|
1385
1973
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1389,11 +1977,11 @@ export namespace tpu_v1alpha1 {
|
|
|
1389
1977
|
start(
|
|
1390
1978
|
params: Params$Resource$Projects$Locations$Nodes$Start,
|
|
1391
1979
|
options: StreamMethodOptions
|
|
1392
|
-
):
|
|
1980
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1393
1981
|
start(
|
|
1394
1982
|
params?: Params$Resource$Projects$Locations$Nodes$Start,
|
|
1395
1983
|
options?: MethodOptions
|
|
1396
|
-
):
|
|
1984
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
1397
1985
|
start(
|
|
1398
1986
|
params: Params$Resource$Projects$Locations$Nodes$Start,
|
|
1399
1987
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1422,7 +2010,10 @@ export namespace tpu_v1alpha1 {
|
|
|
1422
2010
|
callback?:
|
|
1423
2011
|
| BodyResponseCallback<Schema$Operation>
|
|
1424
2012
|
| BodyResponseCallback<Readable>
|
|
1425
|
-
):
|
|
2013
|
+
):
|
|
2014
|
+
| void
|
|
2015
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
|
|
2016
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1426
2017
|
let params = (paramsOrCallback ||
|
|
1427
2018
|
{}) as Params$Resource$Projects$Locations$Nodes$Start;
|
|
1428
2019
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1468,6 +2059,62 @@ export namespace tpu_v1alpha1 {
|
|
|
1468
2059
|
|
|
1469
2060
|
/**
|
|
1470
2061
|
* Stops a node. This operation is only available with single TPU nodes.
|
|
2062
|
+
* @example
|
|
2063
|
+
* ```js
|
|
2064
|
+
* // Before running the sample:
|
|
2065
|
+
* // - Enable the API at:
|
|
2066
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
2067
|
+
* // - Login into gcloud by running:
|
|
2068
|
+
* // ```sh
|
|
2069
|
+
* // $ gcloud auth application-default login
|
|
2070
|
+
* // ```
|
|
2071
|
+
* // - Install the npm module by running:
|
|
2072
|
+
* // ```sh
|
|
2073
|
+
* // $ npm install googleapis
|
|
2074
|
+
* // ```
|
|
2075
|
+
*
|
|
2076
|
+
* const {google} = require('googleapis');
|
|
2077
|
+
* const tpu = google.tpu('v1alpha1');
|
|
2078
|
+
*
|
|
2079
|
+
* async function main() {
|
|
2080
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2081
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2082
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2083
|
+
* });
|
|
2084
|
+
*
|
|
2085
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2086
|
+
* const authClient = await auth.getClient();
|
|
2087
|
+
* google.options({auth: authClient});
|
|
2088
|
+
*
|
|
2089
|
+
* // Do the magic
|
|
2090
|
+
* const res = await tpu.projects.locations.nodes.stop({
|
|
2091
|
+
* // The resource name.
|
|
2092
|
+
* name: 'projects/my-project/locations/my-location/nodes/my-node',
|
|
2093
|
+
*
|
|
2094
|
+
* // Request body metadata
|
|
2095
|
+
* requestBody: {
|
|
2096
|
+
* // request body parameters
|
|
2097
|
+
* // {}
|
|
2098
|
+
* },
|
|
2099
|
+
* });
|
|
2100
|
+
* console.log(res.data);
|
|
2101
|
+
*
|
|
2102
|
+
* // Example response
|
|
2103
|
+
* // {
|
|
2104
|
+
* // "done": false,
|
|
2105
|
+
* // "error": {},
|
|
2106
|
+
* // "metadata": {},
|
|
2107
|
+
* // "name": "my_name",
|
|
2108
|
+
* // "response": {}
|
|
2109
|
+
* // }
|
|
2110
|
+
* }
|
|
2111
|
+
*
|
|
2112
|
+
* main().catch(e => {
|
|
2113
|
+
* console.error(e);
|
|
2114
|
+
* throw e;
|
|
2115
|
+
* });
|
|
2116
|
+
*
|
|
2117
|
+
* ```
|
|
1471
2118
|
*
|
|
1472
2119
|
* @param params - Parameters for request
|
|
1473
2120
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1477,11 +2124,11 @@ export namespace tpu_v1alpha1 {
|
|
|
1477
2124
|
stop(
|
|
1478
2125
|
params: Params$Resource$Projects$Locations$Nodes$Stop,
|
|
1479
2126
|
options: StreamMethodOptions
|
|
1480
|
-
):
|
|
2127
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1481
2128
|
stop(
|
|
1482
2129
|
params?: Params$Resource$Projects$Locations$Nodes$Stop,
|
|
1483
2130
|
options?: MethodOptions
|
|
1484
|
-
):
|
|
2131
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
1485
2132
|
stop(
|
|
1486
2133
|
params: Params$Resource$Projects$Locations$Nodes$Stop,
|
|
1487
2134
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1510,7 +2157,10 @@ export namespace tpu_v1alpha1 {
|
|
|
1510
2157
|
callback?:
|
|
1511
2158
|
| BodyResponseCallback<Schema$Operation>
|
|
1512
2159
|
| BodyResponseCallback<Readable>
|
|
1513
|
-
):
|
|
2160
|
+
):
|
|
2161
|
+
| void
|
|
2162
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
|
|
2163
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1514
2164
|
let params = (paramsOrCallback ||
|
|
1515
2165
|
{}) as Params$Resource$Projects$Locations$Nodes$Stop;
|
|
1516
2166
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1653,6 +2303,50 @@ export namespace tpu_v1alpha1 {
|
|
|
1653
2303
|
|
|
1654
2304
|
/**
|
|
1655
2305
|
* 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`.
|
|
2306
|
+
* @example
|
|
2307
|
+
* ```js
|
|
2308
|
+
* // Before running the sample:
|
|
2309
|
+
* // - Enable the API at:
|
|
2310
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
2311
|
+
* // - Login into gcloud by running:
|
|
2312
|
+
* // ```sh
|
|
2313
|
+
* // $ gcloud auth application-default login
|
|
2314
|
+
* // ```
|
|
2315
|
+
* // - Install the npm module by running:
|
|
2316
|
+
* // ```sh
|
|
2317
|
+
* // $ npm install googleapis
|
|
2318
|
+
* // ```
|
|
2319
|
+
*
|
|
2320
|
+
* const {google} = require('googleapis');
|
|
2321
|
+
* const tpu = google.tpu('v1alpha1');
|
|
2322
|
+
*
|
|
2323
|
+
* async function main() {
|
|
2324
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2325
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2326
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2327
|
+
* });
|
|
2328
|
+
*
|
|
2329
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2330
|
+
* const authClient = await auth.getClient();
|
|
2331
|
+
* google.options({auth: authClient});
|
|
2332
|
+
*
|
|
2333
|
+
* // Do the magic
|
|
2334
|
+
* const res = await tpu.projects.locations.operations.cancel({
|
|
2335
|
+
* // The name of the operation resource to be cancelled.
|
|
2336
|
+
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
2337
|
+
* });
|
|
2338
|
+
* console.log(res.data);
|
|
2339
|
+
*
|
|
2340
|
+
* // Example response
|
|
2341
|
+
* // {}
|
|
2342
|
+
* }
|
|
2343
|
+
*
|
|
2344
|
+
* main().catch(e => {
|
|
2345
|
+
* console.error(e);
|
|
2346
|
+
* throw e;
|
|
2347
|
+
* });
|
|
2348
|
+
*
|
|
2349
|
+
* ```
|
|
1656
2350
|
*
|
|
1657
2351
|
* @param params - Parameters for request
|
|
1658
2352
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1662,11 +2356,11 @@ export namespace tpu_v1alpha1 {
|
|
|
1662
2356
|
cancel(
|
|
1663
2357
|
params: Params$Resource$Projects$Locations$Operations$Cancel,
|
|
1664
2358
|
options: StreamMethodOptions
|
|
1665
|
-
):
|
|
2359
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1666
2360
|
cancel(
|
|
1667
2361
|
params?: Params$Resource$Projects$Locations$Operations$Cancel,
|
|
1668
2362
|
options?: MethodOptions
|
|
1669
|
-
):
|
|
2363
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
|
|
1670
2364
|
cancel(
|
|
1671
2365
|
params: Params$Resource$Projects$Locations$Operations$Cancel,
|
|
1672
2366
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1695,7 +2389,10 @@ export namespace tpu_v1alpha1 {
|
|
|
1695
2389
|
callback?:
|
|
1696
2390
|
| BodyResponseCallback<Schema$Empty>
|
|
1697
2391
|
| BodyResponseCallback<Readable>
|
|
1698
|
-
):
|
|
2392
|
+
):
|
|
2393
|
+
| void
|
|
2394
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Empty>>
|
|
2395
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1699
2396
|
let params = (paramsOrCallback ||
|
|
1700
2397
|
{}) as Params$Resource$Projects$Locations$Operations$Cancel;
|
|
1701
2398
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1741,6 +2438,50 @@ export namespace tpu_v1alpha1 {
|
|
|
1741
2438
|
|
|
1742
2439
|
/**
|
|
1743
2440
|
* 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`.
|
|
2441
|
+
* @example
|
|
2442
|
+
* ```js
|
|
2443
|
+
* // Before running the sample:
|
|
2444
|
+
* // - Enable the API at:
|
|
2445
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
2446
|
+
* // - Login into gcloud by running:
|
|
2447
|
+
* // ```sh
|
|
2448
|
+
* // $ gcloud auth application-default login
|
|
2449
|
+
* // ```
|
|
2450
|
+
* // - Install the npm module by running:
|
|
2451
|
+
* // ```sh
|
|
2452
|
+
* // $ npm install googleapis
|
|
2453
|
+
* // ```
|
|
2454
|
+
*
|
|
2455
|
+
* const {google} = require('googleapis');
|
|
2456
|
+
* const tpu = google.tpu('v1alpha1');
|
|
2457
|
+
*
|
|
2458
|
+
* async function main() {
|
|
2459
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2460
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2461
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2462
|
+
* });
|
|
2463
|
+
*
|
|
2464
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2465
|
+
* const authClient = await auth.getClient();
|
|
2466
|
+
* google.options({auth: authClient});
|
|
2467
|
+
*
|
|
2468
|
+
* // Do the magic
|
|
2469
|
+
* const res = await tpu.projects.locations.operations.delete({
|
|
2470
|
+
* // The name of the operation resource to be deleted.
|
|
2471
|
+
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
2472
|
+
* });
|
|
2473
|
+
* console.log(res.data);
|
|
2474
|
+
*
|
|
2475
|
+
* // Example response
|
|
2476
|
+
* // {}
|
|
2477
|
+
* }
|
|
2478
|
+
*
|
|
2479
|
+
* main().catch(e => {
|
|
2480
|
+
* console.error(e);
|
|
2481
|
+
* throw e;
|
|
2482
|
+
* });
|
|
2483
|
+
*
|
|
2484
|
+
* ```
|
|
1744
2485
|
*
|
|
1745
2486
|
* @param params - Parameters for request
|
|
1746
2487
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1750,11 +2491,11 @@ export namespace tpu_v1alpha1 {
|
|
|
1750
2491
|
delete(
|
|
1751
2492
|
params: Params$Resource$Projects$Locations$Operations$Delete,
|
|
1752
2493
|
options: StreamMethodOptions
|
|
1753
|
-
):
|
|
2494
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1754
2495
|
delete(
|
|
1755
2496
|
params?: Params$Resource$Projects$Locations$Operations$Delete,
|
|
1756
2497
|
options?: MethodOptions
|
|
1757
|
-
):
|
|
2498
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
|
|
1758
2499
|
delete(
|
|
1759
2500
|
params: Params$Resource$Projects$Locations$Operations$Delete,
|
|
1760
2501
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1783,7 +2524,10 @@ export namespace tpu_v1alpha1 {
|
|
|
1783
2524
|
callback?:
|
|
1784
2525
|
| BodyResponseCallback<Schema$Empty>
|
|
1785
2526
|
| BodyResponseCallback<Readable>
|
|
1786
|
-
):
|
|
2527
|
+
):
|
|
2528
|
+
| void
|
|
2529
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Empty>>
|
|
2530
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1787
2531
|
let params = (paramsOrCallback ||
|
|
1788
2532
|
{}) as Params$Resource$Projects$Locations$Operations$Delete;
|
|
1789
2533
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1826,6 +2570,56 @@ export namespace tpu_v1alpha1 {
|
|
|
1826
2570
|
|
|
1827
2571
|
/**
|
|
1828
2572
|
* 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.
|
|
2573
|
+
* @example
|
|
2574
|
+
* ```js
|
|
2575
|
+
* // Before running the sample:
|
|
2576
|
+
* // - Enable the API at:
|
|
2577
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
2578
|
+
* // - Login into gcloud by running:
|
|
2579
|
+
* // ```sh
|
|
2580
|
+
* // $ gcloud auth application-default login
|
|
2581
|
+
* // ```
|
|
2582
|
+
* // - Install the npm module by running:
|
|
2583
|
+
* // ```sh
|
|
2584
|
+
* // $ npm install googleapis
|
|
2585
|
+
* // ```
|
|
2586
|
+
*
|
|
2587
|
+
* const {google} = require('googleapis');
|
|
2588
|
+
* const tpu = google.tpu('v1alpha1');
|
|
2589
|
+
*
|
|
2590
|
+
* async function main() {
|
|
2591
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2592
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2593
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2594
|
+
* });
|
|
2595
|
+
*
|
|
2596
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2597
|
+
* const authClient = await auth.getClient();
|
|
2598
|
+
* google.options({auth: authClient});
|
|
2599
|
+
*
|
|
2600
|
+
* // Do the magic
|
|
2601
|
+
* const res = await tpu.projects.locations.operations.get({
|
|
2602
|
+
* // The name of the operation resource.
|
|
2603
|
+
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
2604
|
+
* });
|
|
2605
|
+
* console.log(res.data);
|
|
2606
|
+
*
|
|
2607
|
+
* // Example response
|
|
2608
|
+
* // {
|
|
2609
|
+
* // "done": false,
|
|
2610
|
+
* // "error": {},
|
|
2611
|
+
* // "metadata": {},
|
|
2612
|
+
* // "name": "my_name",
|
|
2613
|
+
* // "response": {}
|
|
2614
|
+
* // }
|
|
2615
|
+
* }
|
|
2616
|
+
*
|
|
2617
|
+
* main().catch(e => {
|
|
2618
|
+
* console.error(e);
|
|
2619
|
+
* throw e;
|
|
2620
|
+
* });
|
|
2621
|
+
*
|
|
2622
|
+
* ```
|
|
1829
2623
|
*
|
|
1830
2624
|
* @param params - Parameters for request
|
|
1831
2625
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1835,11 +2629,11 @@ export namespace tpu_v1alpha1 {
|
|
|
1835
2629
|
get(
|
|
1836
2630
|
params: Params$Resource$Projects$Locations$Operations$Get,
|
|
1837
2631
|
options: StreamMethodOptions
|
|
1838
|
-
):
|
|
2632
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1839
2633
|
get(
|
|
1840
2634
|
params?: Params$Resource$Projects$Locations$Operations$Get,
|
|
1841
2635
|
options?: MethodOptions
|
|
1842
|
-
):
|
|
2636
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
1843
2637
|
get(
|
|
1844
2638
|
params: Params$Resource$Projects$Locations$Operations$Get,
|
|
1845
2639
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1868,7 +2662,10 @@ export namespace tpu_v1alpha1 {
|
|
|
1868
2662
|
callback?:
|
|
1869
2663
|
| BodyResponseCallback<Schema$Operation>
|
|
1870
2664
|
| BodyResponseCallback<Readable>
|
|
1871
|
-
):
|
|
2665
|
+
):
|
|
2666
|
+
| void
|
|
2667
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
|
|
2668
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1872
2669
|
let params = (paramsOrCallback ||
|
|
1873
2670
|
{}) as Params$Resource$Projects$Locations$Operations$Get;
|
|
1874
2671
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1911,6 +2708,59 @@ export namespace tpu_v1alpha1 {
|
|
|
1911
2708
|
|
|
1912
2709
|
/**
|
|
1913
2710
|
* Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
|
|
2711
|
+
* @example
|
|
2712
|
+
* ```js
|
|
2713
|
+
* // Before running the sample:
|
|
2714
|
+
* // - Enable the API at:
|
|
2715
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
2716
|
+
* // - Login into gcloud by running:
|
|
2717
|
+
* // ```sh
|
|
2718
|
+
* // $ gcloud auth application-default login
|
|
2719
|
+
* // ```
|
|
2720
|
+
* // - Install the npm module by running:
|
|
2721
|
+
* // ```sh
|
|
2722
|
+
* // $ npm install googleapis
|
|
2723
|
+
* // ```
|
|
2724
|
+
*
|
|
2725
|
+
* const {google} = require('googleapis');
|
|
2726
|
+
* const tpu = google.tpu('v1alpha1');
|
|
2727
|
+
*
|
|
2728
|
+
* async function main() {
|
|
2729
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2730
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2731
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2732
|
+
* });
|
|
2733
|
+
*
|
|
2734
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2735
|
+
* const authClient = await auth.getClient();
|
|
2736
|
+
* google.options({auth: authClient});
|
|
2737
|
+
*
|
|
2738
|
+
* // Do the magic
|
|
2739
|
+
* const res = await tpu.projects.locations.operations.list({
|
|
2740
|
+
* // The standard list filter.
|
|
2741
|
+
* filter: 'placeholder-value',
|
|
2742
|
+
* // The name of the operation's parent resource.
|
|
2743
|
+
* name: 'projects/my-project/locations/my-location',
|
|
2744
|
+
* // The standard list page size.
|
|
2745
|
+
* pageSize: 'placeholder-value',
|
|
2746
|
+
* // The standard list page token.
|
|
2747
|
+
* pageToken: 'placeholder-value',
|
|
2748
|
+
* });
|
|
2749
|
+
* console.log(res.data);
|
|
2750
|
+
*
|
|
2751
|
+
* // Example response
|
|
2752
|
+
* // {
|
|
2753
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
2754
|
+
* // "operations": []
|
|
2755
|
+
* // }
|
|
2756
|
+
* }
|
|
2757
|
+
*
|
|
2758
|
+
* main().catch(e => {
|
|
2759
|
+
* console.error(e);
|
|
2760
|
+
* throw e;
|
|
2761
|
+
* });
|
|
2762
|
+
*
|
|
2763
|
+
* ```
|
|
1914
2764
|
*
|
|
1915
2765
|
* @param params - Parameters for request
|
|
1916
2766
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1920,11 +2770,11 @@ export namespace tpu_v1alpha1 {
|
|
|
1920
2770
|
list(
|
|
1921
2771
|
params: Params$Resource$Projects$Locations$Operations$List,
|
|
1922
2772
|
options: StreamMethodOptions
|
|
1923
|
-
):
|
|
2773
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1924
2774
|
list(
|
|
1925
2775
|
params?: Params$Resource$Projects$Locations$Operations$List,
|
|
1926
2776
|
options?: MethodOptions
|
|
1927
|
-
):
|
|
2777
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$ListOperationsResponse>>;
|
|
1928
2778
|
list(
|
|
1929
2779
|
params: Params$Resource$Projects$Locations$Operations$List,
|
|
1930
2780
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1957,8 +2807,8 @@ export namespace tpu_v1alpha1 {
|
|
|
1957
2807
|
| BodyResponseCallback<Readable>
|
|
1958
2808
|
):
|
|
1959
2809
|
| void
|
|
1960
|
-
|
|
|
1961
|
-
|
|
|
2810
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$ListOperationsResponse>>
|
|
2811
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1962
2812
|
let params = (paramsOrCallback ||
|
|
1963
2813
|
{}) as Params$Resource$Projects$Locations$Operations$List;
|
|
1964
2814
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -2052,6 +2902,53 @@ export namespace tpu_v1alpha1 {
|
|
|
2052
2902
|
|
|
2053
2903
|
/**
|
|
2054
2904
|
* Gets TensorFlow Version.
|
|
2905
|
+
* @example
|
|
2906
|
+
* ```js
|
|
2907
|
+
* // Before running the sample:
|
|
2908
|
+
* // - Enable the API at:
|
|
2909
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
2910
|
+
* // - Login into gcloud by running:
|
|
2911
|
+
* // ```sh
|
|
2912
|
+
* // $ gcloud auth application-default login
|
|
2913
|
+
* // ```
|
|
2914
|
+
* // - Install the npm module by running:
|
|
2915
|
+
* // ```sh
|
|
2916
|
+
* // $ npm install googleapis
|
|
2917
|
+
* // ```
|
|
2918
|
+
*
|
|
2919
|
+
* const {google} = require('googleapis');
|
|
2920
|
+
* const tpu = google.tpu('v1alpha1');
|
|
2921
|
+
*
|
|
2922
|
+
* async function main() {
|
|
2923
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2924
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2925
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2926
|
+
* });
|
|
2927
|
+
*
|
|
2928
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2929
|
+
* const authClient = await auth.getClient();
|
|
2930
|
+
* google.options({auth: authClient});
|
|
2931
|
+
*
|
|
2932
|
+
* // Do the magic
|
|
2933
|
+
* const res = await tpu.projects.locations.tensorflowVersions.get({
|
|
2934
|
+
* // Required. The resource name.
|
|
2935
|
+
* name: 'projects/my-project/locations/my-location/tensorflowVersions/my-tensorflowVersion',
|
|
2936
|
+
* });
|
|
2937
|
+
* console.log(res.data);
|
|
2938
|
+
*
|
|
2939
|
+
* // Example response
|
|
2940
|
+
* // {
|
|
2941
|
+
* // "name": "my_name",
|
|
2942
|
+
* // "version": "my_version"
|
|
2943
|
+
* // }
|
|
2944
|
+
* }
|
|
2945
|
+
*
|
|
2946
|
+
* main().catch(e => {
|
|
2947
|
+
* console.error(e);
|
|
2948
|
+
* throw e;
|
|
2949
|
+
* });
|
|
2950
|
+
*
|
|
2951
|
+
* ```
|
|
2055
2952
|
*
|
|
2056
2953
|
* @param params - Parameters for request
|
|
2057
2954
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2061,11 +2958,11 @@ export namespace tpu_v1alpha1 {
|
|
|
2061
2958
|
get(
|
|
2062
2959
|
params: Params$Resource$Projects$Locations$Tensorflowversions$Get,
|
|
2063
2960
|
options: StreamMethodOptions
|
|
2064
|
-
):
|
|
2961
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2065
2962
|
get(
|
|
2066
2963
|
params?: Params$Resource$Projects$Locations$Tensorflowversions$Get,
|
|
2067
2964
|
options?: MethodOptions
|
|
2068
|
-
):
|
|
2965
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$TensorFlowVersion>>;
|
|
2069
2966
|
get(
|
|
2070
2967
|
params: Params$Resource$Projects$Locations$Tensorflowversions$Get,
|
|
2071
2968
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -2096,8 +2993,8 @@ export namespace tpu_v1alpha1 {
|
|
|
2096
2993
|
| BodyResponseCallback<Readable>
|
|
2097
2994
|
):
|
|
2098
2995
|
| void
|
|
2099
|
-
|
|
|
2100
|
-
|
|
|
2996
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$TensorFlowVersion>>
|
|
2997
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
2101
2998
|
let params = (paramsOrCallback ||
|
|
2102
2999
|
{}) as Params$Resource$Projects$Locations$Tensorflowversions$Get;
|
|
2103
3000
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -2141,6 +3038,62 @@ export namespace tpu_v1alpha1 {
|
|
|
2141
3038
|
|
|
2142
3039
|
/**
|
|
2143
3040
|
* Lists TensorFlow versions supported by this API.
|
|
3041
|
+
* @example
|
|
3042
|
+
* ```js
|
|
3043
|
+
* // Before running the sample:
|
|
3044
|
+
* // - Enable the API at:
|
|
3045
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
3046
|
+
* // - Login into gcloud by running:
|
|
3047
|
+
* // ```sh
|
|
3048
|
+
* // $ gcloud auth application-default login
|
|
3049
|
+
* // ```
|
|
3050
|
+
* // - Install the npm module by running:
|
|
3051
|
+
* // ```sh
|
|
3052
|
+
* // $ npm install googleapis
|
|
3053
|
+
* // ```
|
|
3054
|
+
*
|
|
3055
|
+
* const {google} = require('googleapis');
|
|
3056
|
+
* const tpu = google.tpu('v1alpha1');
|
|
3057
|
+
*
|
|
3058
|
+
* async function main() {
|
|
3059
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3060
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3061
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3062
|
+
* });
|
|
3063
|
+
*
|
|
3064
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3065
|
+
* const authClient = await auth.getClient();
|
|
3066
|
+
* google.options({auth: authClient});
|
|
3067
|
+
*
|
|
3068
|
+
* // Do the magic
|
|
3069
|
+
* const res = await tpu.projects.locations.tensorflowVersions.list({
|
|
3070
|
+
* // List filter.
|
|
3071
|
+
* filter: 'placeholder-value',
|
|
3072
|
+
* // Sort results.
|
|
3073
|
+
* orderBy: 'placeholder-value',
|
|
3074
|
+
* // The maximum number of items to return.
|
|
3075
|
+
* pageSize: 'placeholder-value',
|
|
3076
|
+
* // The next_page_token value returned from a previous List request, if any.
|
|
3077
|
+
* pageToken: 'placeholder-value',
|
|
3078
|
+
* // Required. The parent resource name.
|
|
3079
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
3080
|
+
* });
|
|
3081
|
+
* console.log(res.data);
|
|
3082
|
+
*
|
|
3083
|
+
* // Example response
|
|
3084
|
+
* // {
|
|
3085
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
3086
|
+
* // "tensorflowVersions": [],
|
|
3087
|
+
* // "unreachable": []
|
|
3088
|
+
* // }
|
|
3089
|
+
* }
|
|
3090
|
+
*
|
|
3091
|
+
* main().catch(e => {
|
|
3092
|
+
* console.error(e);
|
|
3093
|
+
* throw e;
|
|
3094
|
+
* });
|
|
3095
|
+
*
|
|
3096
|
+
* ```
|
|
2144
3097
|
*
|
|
2145
3098
|
* @param params - Parameters for request
|
|
2146
3099
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2150,11 +3103,11 @@ export namespace tpu_v1alpha1 {
|
|
|
2150
3103
|
list(
|
|
2151
3104
|
params: Params$Resource$Projects$Locations$Tensorflowversions$List,
|
|
2152
3105
|
options: StreamMethodOptions
|
|
2153
|
-
):
|
|
3106
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2154
3107
|
list(
|
|
2155
3108
|
params?: Params$Resource$Projects$Locations$Tensorflowversions$List,
|
|
2156
3109
|
options?: MethodOptions
|
|
2157
|
-
):
|
|
3110
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$ListTensorFlowVersionsResponse>>;
|
|
2158
3111
|
list(
|
|
2159
3112
|
params: Params$Resource$Projects$Locations$Tensorflowversions$List,
|
|
2160
3113
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -2189,8 +3142,8 @@ export namespace tpu_v1alpha1 {
|
|
|
2189
3142
|
| BodyResponseCallback<Readable>
|
|
2190
3143
|
):
|
|
2191
3144
|
| void
|
|
2192
|
-
|
|
|
2193
|
-
|
|
|
3145
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$ListTensorFlowVersionsResponse>>
|
|
3146
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
2194
3147
|
let params = (paramsOrCallback ||
|
|
2195
3148
|
{}) as Params$Resource$Projects$Locations$Tensorflowversions$List;
|
|
2196
3149
|
let options = (optionsOrCallback || {}) as MethodOptions;
|