@googleapis/tpu 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/build/v1.d.ts +3 -849
- package/build/v1.js.map +1 -1
- package/build/v1alpha1.d.ts +3 -853
- package/build/v1alpha1.js.map +1 -1
- package/build/v2.d.ts +36 -978
- package/build/v2.js.map +1 -1
- package/build/v2alpha1.d.ts +421 -1032
- package/build/v2alpha1.js +164 -0
- package/build/v2alpha1.js.map +1 -1
- package/index.ts +1 -1
- package/package.json +2 -2
- package/v1.ts +3 -849
- package/v1alpha1.ts +3 -853
- package/v2.ts +36 -978
- package/v2alpha1.ts +793 -1032
package/v1alpha1.ts
CHANGED
|
@@ -219,7 +219,7 @@ export namespace tpu_v1alpha1 {
|
|
|
219
219
|
unreachable?: string[] | null;
|
|
220
220
|
}
|
|
221
221
|
/**
|
|
222
|
-
* A resource that represents Google Cloud
|
|
222
|
+
* A resource that represents a Google Cloud location.
|
|
223
223
|
*/
|
|
224
224
|
export interface Schema$Location {
|
|
225
225
|
/**
|
|
@@ -358,7 +358,7 @@ export namespace tpu_v1alpha1 {
|
|
|
358
358
|
*/
|
|
359
359
|
name?: string | null;
|
|
360
360
|
/**
|
|
361
|
-
* The normal response of the operation
|
|
361
|
+
* The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
|
|
362
362
|
*/
|
|
363
363
|
response?: {[key: string]: any} | null;
|
|
364
364
|
}
|
|
@@ -507,52 +507,6 @@ 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
|
-
* // `$ gcloud auth application-default login`
|
|
517
|
-
* // - Install the npm module by running:
|
|
518
|
-
* // `$ npm install googleapis`
|
|
519
|
-
*
|
|
520
|
-
* const {google} = require('googleapis');
|
|
521
|
-
* const tpu = google.tpu('v1alpha1');
|
|
522
|
-
*
|
|
523
|
-
* async function main() {
|
|
524
|
-
* const auth = new google.auth.GoogleAuth({
|
|
525
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
526
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
527
|
-
* });
|
|
528
|
-
*
|
|
529
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
530
|
-
* const authClient = await auth.getClient();
|
|
531
|
-
* google.options({auth: authClient});
|
|
532
|
-
*
|
|
533
|
-
* // Do the magic
|
|
534
|
-
* const res = await tpu.projects.locations.get({
|
|
535
|
-
* // Resource name for the location.
|
|
536
|
-
* name: 'projects/my-project/locations/my-location',
|
|
537
|
-
* });
|
|
538
|
-
* console.log(res.data);
|
|
539
|
-
*
|
|
540
|
-
* // Example response
|
|
541
|
-
* // {
|
|
542
|
-
* // "displayName": "my_displayName",
|
|
543
|
-
* // "labels": {},
|
|
544
|
-
* // "locationId": "my_locationId",
|
|
545
|
-
* // "metadata": {},
|
|
546
|
-
* // "name": "my_name"
|
|
547
|
-
* // }
|
|
548
|
-
* }
|
|
549
|
-
*
|
|
550
|
-
* main().catch(e => {
|
|
551
|
-
* console.error(e);
|
|
552
|
-
* throw e;
|
|
553
|
-
* });
|
|
554
|
-
*
|
|
555
|
-
* ```
|
|
556
510
|
*
|
|
557
511
|
* @param params - Parameters for request
|
|
558
512
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -637,55 +591,6 @@ export namespace tpu_v1alpha1 {
|
|
|
637
591
|
|
|
638
592
|
/**
|
|
639
593
|
* Lists information about the supported locations for this service.
|
|
640
|
-
* @example
|
|
641
|
-
* ```js
|
|
642
|
-
* // Before running the sample:
|
|
643
|
-
* // - Enable the API at:
|
|
644
|
-
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
645
|
-
* // - Login into gcloud by running:
|
|
646
|
-
* // `$ gcloud auth application-default login`
|
|
647
|
-
* // - Install the npm module by running:
|
|
648
|
-
* // `$ npm install googleapis`
|
|
649
|
-
*
|
|
650
|
-
* const {google} = require('googleapis');
|
|
651
|
-
* const tpu = google.tpu('v1alpha1');
|
|
652
|
-
*
|
|
653
|
-
* async function main() {
|
|
654
|
-
* const auth = new google.auth.GoogleAuth({
|
|
655
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
656
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
657
|
-
* });
|
|
658
|
-
*
|
|
659
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
660
|
-
* const authClient = await auth.getClient();
|
|
661
|
-
* google.options({auth: authClient});
|
|
662
|
-
*
|
|
663
|
-
* // Do the magic
|
|
664
|
-
* const res = await tpu.projects.locations.list({
|
|
665
|
-
* // 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).
|
|
666
|
-
* filter: 'placeholder-value',
|
|
667
|
-
* // The resource that owns the locations collection, if applicable.
|
|
668
|
-
* name: 'projects/my-project',
|
|
669
|
-
* // The maximum number of results to return. If not set, the service selects a default.
|
|
670
|
-
* pageSize: 'placeholder-value',
|
|
671
|
-
* // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.
|
|
672
|
-
* pageToken: 'placeholder-value',
|
|
673
|
-
* });
|
|
674
|
-
* console.log(res.data);
|
|
675
|
-
*
|
|
676
|
-
* // Example response
|
|
677
|
-
* // {
|
|
678
|
-
* // "locations": [],
|
|
679
|
-
* // "nextPageToken": "my_nextPageToken"
|
|
680
|
-
* // }
|
|
681
|
-
* }
|
|
682
|
-
*
|
|
683
|
-
* main().catch(e => {
|
|
684
|
-
* console.error(e);
|
|
685
|
-
* throw e;
|
|
686
|
-
* });
|
|
687
|
-
*
|
|
688
|
-
* ```
|
|
689
594
|
*
|
|
690
595
|
* @param params - Parameters for request
|
|
691
596
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -812,49 +717,6 @@ export namespace tpu_v1alpha1 {
|
|
|
812
717
|
|
|
813
718
|
/**
|
|
814
719
|
* Gets AcceleratorType.
|
|
815
|
-
* @example
|
|
816
|
-
* ```js
|
|
817
|
-
* // Before running the sample:
|
|
818
|
-
* // - Enable the API at:
|
|
819
|
-
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
820
|
-
* // - Login into gcloud by running:
|
|
821
|
-
* // `$ gcloud auth application-default login`
|
|
822
|
-
* // - Install the npm module by running:
|
|
823
|
-
* // `$ npm install googleapis`
|
|
824
|
-
*
|
|
825
|
-
* const {google} = require('googleapis');
|
|
826
|
-
* const tpu = google.tpu('v1alpha1');
|
|
827
|
-
*
|
|
828
|
-
* async function main() {
|
|
829
|
-
* const auth = new google.auth.GoogleAuth({
|
|
830
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
831
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
832
|
-
* });
|
|
833
|
-
*
|
|
834
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
835
|
-
* const authClient = await auth.getClient();
|
|
836
|
-
* google.options({auth: authClient});
|
|
837
|
-
*
|
|
838
|
-
* // Do the magic
|
|
839
|
-
* const res = await tpu.projects.locations.acceleratorTypes.get({
|
|
840
|
-
* // Required. The resource name.
|
|
841
|
-
* name: 'projects/my-project/locations/my-location/acceleratorTypes/my-acceleratorType',
|
|
842
|
-
* });
|
|
843
|
-
* console.log(res.data);
|
|
844
|
-
*
|
|
845
|
-
* // Example response
|
|
846
|
-
* // {
|
|
847
|
-
* // "name": "my_name",
|
|
848
|
-
* // "type": "my_type"
|
|
849
|
-
* // }
|
|
850
|
-
* }
|
|
851
|
-
*
|
|
852
|
-
* main().catch(e => {
|
|
853
|
-
* console.error(e);
|
|
854
|
-
* throw e;
|
|
855
|
-
* });
|
|
856
|
-
*
|
|
857
|
-
* ```
|
|
858
720
|
*
|
|
859
721
|
* @param params - Parameters for request
|
|
860
722
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -939,58 +801,6 @@ export namespace tpu_v1alpha1 {
|
|
|
939
801
|
|
|
940
802
|
/**
|
|
941
803
|
* Lists accelerator types supported by this API.
|
|
942
|
-
* @example
|
|
943
|
-
* ```js
|
|
944
|
-
* // Before running the sample:
|
|
945
|
-
* // - Enable the API at:
|
|
946
|
-
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
947
|
-
* // - Login into gcloud by running:
|
|
948
|
-
* // `$ gcloud auth application-default login`
|
|
949
|
-
* // - Install the npm module by running:
|
|
950
|
-
* // `$ npm install googleapis`
|
|
951
|
-
*
|
|
952
|
-
* const {google} = require('googleapis');
|
|
953
|
-
* const tpu = google.tpu('v1alpha1');
|
|
954
|
-
*
|
|
955
|
-
* async function main() {
|
|
956
|
-
* const auth = new google.auth.GoogleAuth({
|
|
957
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
958
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
959
|
-
* });
|
|
960
|
-
*
|
|
961
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
962
|
-
* const authClient = await auth.getClient();
|
|
963
|
-
* google.options({auth: authClient});
|
|
964
|
-
*
|
|
965
|
-
* // Do the magic
|
|
966
|
-
* const res = await tpu.projects.locations.acceleratorTypes.list({
|
|
967
|
-
* // List filter.
|
|
968
|
-
* filter: 'placeholder-value',
|
|
969
|
-
* // Sort results.
|
|
970
|
-
* orderBy: 'placeholder-value',
|
|
971
|
-
* // The maximum number of items to return.
|
|
972
|
-
* pageSize: 'placeholder-value',
|
|
973
|
-
* // The next_page_token value returned from a previous List request, if any.
|
|
974
|
-
* pageToken: 'placeholder-value',
|
|
975
|
-
* // Required. The parent resource name.
|
|
976
|
-
* parent: 'projects/my-project/locations/my-location',
|
|
977
|
-
* });
|
|
978
|
-
* console.log(res.data);
|
|
979
|
-
*
|
|
980
|
-
* // Example response
|
|
981
|
-
* // {
|
|
982
|
-
* // "acceleratorTypes": [],
|
|
983
|
-
* // "nextPageToken": "my_nextPageToken",
|
|
984
|
-
* // "unreachable": []
|
|
985
|
-
* // }
|
|
986
|
-
* }
|
|
987
|
-
*
|
|
988
|
-
* main().catch(e => {
|
|
989
|
-
* console.error(e);
|
|
990
|
-
* throw e;
|
|
991
|
-
* });
|
|
992
|
-
*
|
|
993
|
-
* ```
|
|
994
804
|
*
|
|
995
805
|
* @param params - Parameters for request
|
|
996
806
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1125,82 +935,6 @@ export namespace tpu_v1alpha1 {
|
|
|
1125
935
|
|
|
1126
936
|
/**
|
|
1127
937
|
* Creates a node.
|
|
1128
|
-
* @example
|
|
1129
|
-
* ```js
|
|
1130
|
-
* // Before running the sample:
|
|
1131
|
-
* // - Enable the API at:
|
|
1132
|
-
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1133
|
-
* // - Login into gcloud by running:
|
|
1134
|
-
* // `$ gcloud auth application-default login`
|
|
1135
|
-
* // - Install the npm module by running:
|
|
1136
|
-
* // `$ npm install googleapis`
|
|
1137
|
-
*
|
|
1138
|
-
* const {google} = require('googleapis');
|
|
1139
|
-
* const tpu = google.tpu('v1alpha1');
|
|
1140
|
-
*
|
|
1141
|
-
* async function main() {
|
|
1142
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1143
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1144
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1145
|
-
* });
|
|
1146
|
-
*
|
|
1147
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1148
|
-
* const authClient = await auth.getClient();
|
|
1149
|
-
* google.options({auth: authClient});
|
|
1150
|
-
*
|
|
1151
|
-
* // Do the magic
|
|
1152
|
-
* const res = await tpu.projects.locations.nodes.create({
|
|
1153
|
-
* // The unqualified resource name.
|
|
1154
|
-
* nodeId: 'placeholder-value',
|
|
1155
|
-
* // Required. The parent resource name.
|
|
1156
|
-
* parent: 'projects/my-project/locations/my-location',
|
|
1157
|
-
* // Idempotent request UUID.
|
|
1158
|
-
* requestId: 'placeholder-value',
|
|
1159
|
-
*
|
|
1160
|
-
* // Request body metadata
|
|
1161
|
-
* requestBody: {
|
|
1162
|
-
* // request body parameters
|
|
1163
|
-
* // {
|
|
1164
|
-
* // "acceleratorType": "my_acceleratorType",
|
|
1165
|
-
* // "apiVersion": "my_apiVersion",
|
|
1166
|
-
* // "cidrBlock": "my_cidrBlock",
|
|
1167
|
-
* // "createTime": "my_createTime",
|
|
1168
|
-
* // "description": "my_description",
|
|
1169
|
-
* // "health": "my_health",
|
|
1170
|
-
* // "healthDescription": "my_healthDescription",
|
|
1171
|
-
* // "ipAddress": "my_ipAddress",
|
|
1172
|
-
* // "labels": {},
|
|
1173
|
-
* // "name": "my_name",
|
|
1174
|
-
* // "network": "my_network",
|
|
1175
|
-
* // "networkEndpoints": [],
|
|
1176
|
-
* // "port": "my_port",
|
|
1177
|
-
* // "schedulingConfig": {},
|
|
1178
|
-
* // "serviceAccount": "my_serviceAccount",
|
|
1179
|
-
* // "state": "my_state",
|
|
1180
|
-
* // "symptoms": [],
|
|
1181
|
-
* // "tensorflowVersion": "my_tensorflowVersion",
|
|
1182
|
-
* // "useServiceNetworking": false
|
|
1183
|
-
* // }
|
|
1184
|
-
* },
|
|
1185
|
-
* });
|
|
1186
|
-
* console.log(res.data);
|
|
1187
|
-
*
|
|
1188
|
-
* // Example response
|
|
1189
|
-
* // {
|
|
1190
|
-
* // "done": false,
|
|
1191
|
-
* // "error": {},
|
|
1192
|
-
* // "metadata": {},
|
|
1193
|
-
* // "name": "my_name",
|
|
1194
|
-
* // "response": {}
|
|
1195
|
-
* // }
|
|
1196
|
-
* }
|
|
1197
|
-
*
|
|
1198
|
-
* main().catch(e => {
|
|
1199
|
-
* console.error(e);
|
|
1200
|
-
* throw e;
|
|
1201
|
-
* });
|
|
1202
|
-
*
|
|
1203
|
-
* ```
|
|
1204
938
|
*
|
|
1205
939
|
* @param params - Parameters for request
|
|
1206
940
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1288,54 +1022,6 @@ export namespace tpu_v1alpha1 {
|
|
|
1288
1022
|
|
|
1289
1023
|
/**
|
|
1290
1024
|
* Deletes a node.
|
|
1291
|
-
* @example
|
|
1292
|
-
* ```js
|
|
1293
|
-
* // Before running the sample:
|
|
1294
|
-
* // - Enable the API at:
|
|
1295
|
-
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1296
|
-
* // - Login into gcloud by running:
|
|
1297
|
-
* // `$ gcloud auth application-default login`
|
|
1298
|
-
* // - Install the npm module by running:
|
|
1299
|
-
* // `$ npm install googleapis`
|
|
1300
|
-
*
|
|
1301
|
-
* const {google} = require('googleapis');
|
|
1302
|
-
* const tpu = google.tpu('v1alpha1');
|
|
1303
|
-
*
|
|
1304
|
-
* async function main() {
|
|
1305
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1306
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1307
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1308
|
-
* });
|
|
1309
|
-
*
|
|
1310
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1311
|
-
* const authClient = await auth.getClient();
|
|
1312
|
-
* google.options({auth: authClient});
|
|
1313
|
-
*
|
|
1314
|
-
* // Do the magic
|
|
1315
|
-
* const res = await tpu.projects.locations.nodes.delete({
|
|
1316
|
-
* // Required. The resource name.
|
|
1317
|
-
* name: 'projects/my-project/locations/my-location/nodes/my-node',
|
|
1318
|
-
* // Idempotent request UUID.
|
|
1319
|
-
* requestId: 'placeholder-value',
|
|
1320
|
-
* });
|
|
1321
|
-
* console.log(res.data);
|
|
1322
|
-
*
|
|
1323
|
-
* // Example response
|
|
1324
|
-
* // {
|
|
1325
|
-
* // "done": false,
|
|
1326
|
-
* // "error": {},
|
|
1327
|
-
* // "metadata": {},
|
|
1328
|
-
* // "name": "my_name",
|
|
1329
|
-
* // "response": {}
|
|
1330
|
-
* // }
|
|
1331
|
-
* }
|
|
1332
|
-
*
|
|
1333
|
-
* main().catch(e => {
|
|
1334
|
-
* console.error(e);
|
|
1335
|
-
* throw e;
|
|
1336
|
-
* });
|
|
1337
|
-
*
|
|
1338
|
-
* ```
|
|
1339
1025
|
*
|
|
1340
1026
|
* @param params - Parameters for request
|
|
1341
1027
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1420,66 +1106,6 @@ export namespace tpu_v1alpha1 {
|
|
|
1420
1106
|
|
|
1421
1107
|
/**
|
|
1422
1108
|
* Gets the details of a node.
|
|
1423
|
-
* @example
|
|
1424
|
-
* ```js
|
|
1425
|
-
* // Before running the sample:
|
|
1426
|
-
* // - Enable the API at:
|
|
1427
|
-
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1428
|
-
* // - Login into gcloud by running:
|
|
1429
|
-
* // `$ gcloud auth application-default login`
|
|
1430
|
-
* // - Install the npm module by running:
|
|
1431
|
-
* // `$ npm install googleapis`
|
|
1432
|
-
*
|
|
1433
|
-
* const {google} = require('googleapis');
|
|
1434
|
-
* const tpu = google.tpu('v1alpha1');
|
|
1435
|
-
*
|
|
1436
|
-
* async function main() {
|
|
1437
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1438
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1439
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1440
|
-
* });
|
|
1441
|
-
*
|
|
1442
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1443
|
-
* const authClient = await auth.getClient();
|
|
1444
|
-
* google.options({auth: authClient});
|
|
1445
|
-
*
|
|
1446
|
-
* // Do the magic
|
|
1447
|
-
* const res = await tpu.projects.locations.nodes.get({
|
|
1448
|
-
* // Required. The resource name.
|
|
1449
|
-
* name: 'projects/my-project/locations/my-location/nodes/my-node',
|
|
1450
|
-
* });
|
|
1451
|
-
* console.log(res.data);
|
|
1452
|
-
*
|
|
1453
|
-
* // Example response
|
|
1454
|
-
* // {
|
|
1455
|
-
* // "acceleratorType": "my_acceleratorType",
|
|
1456
|
-
* // "apiVersion": "my_apiVersion",
|
|
1457
|
-
* // "cidrBlock": "my_cidrBlock",
|
|
1458
|
-
* // "createTime": "my_createTime",
|
|
1459
|
-
* // "description": "my_description",
|
|
1460
|
-
* // "health": "my_health",
|
|
1461
|
-
* // "healthDescription": "my_healthDescription",
|
|
1462
|
-
* // "ipAddress": "my_ipAddress",
|
|
1463
|
-
* // "labels": {},
|
|
1464
|
-
* // "name": "my_name",
|
|
1465
|
-
* // "network": "my_network",
|
|
1466
|
-
* // "networkEndpoints": [],
|
|
1467
|
-
* // "port": "my_port",
|
|
1468
|
-
* // "schedulingConfig": {},
|
|
1469
|
-
* // "serviceAccount": "my_serviceAccount",
|
|
1470
|
-
* // "state": "my_state",
|
|
1471
|
-
* // "symptoms": [],
|
|
1472
|
-
* // "tensorflowVersion": "my_tensorflowVersion",
|
|
1473
|
-
* // "useServiceNetworking": false
|
|
1474
|
-
* // }
|
|
1475
|
-
* }
|
|
1476
|
-
*
|
|
1477
|
-
* main().catch(e => {
|
|
1478
|
-
* console.error(e);
|
|
1479
|
-
* throw e;
|
|
1480
|
-
* });
|
|
1481
|
-
*
|
|
1482
|
-
* ```
|
|
1483
1109
|
*
|
|
1484
1110
|
* @param params - Parameters for request
|
|
1485
1111
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1564,54 +1190,6 @@ export namespace tpu_v1alpha1 {
|
|
|
1564
1190
|
|
|
1565
1191
|
/**
|
|
1566
1192
|
* Lists nodes.
|
|
1567
|
-
* @example
|
|
1568
|
-
* ```js
|
|
1569
|
-
* // Before running the sample:
|
|
1570
|
-
* // - Enable the API at:
|
|
1571
|
-
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1572
|
-
* // - Login into gcloud by running:
|
|
1573
|
-
* // `$ gcloud auth application-default login`
|
|
1574
|
-
* // - Install the npm module by running:
|
|
1575
|
-
* // `$ npm install googleapis`
|
|
1576
|
-
*
|
|
1577
|
-
* const {google} = require('googleapis');
|
|
1578
|
-
* const tpu = google.tpu('v1alpha1');
|
|
1579
|
-
*
|
|
1580
|
-
* async function main() {
|
|
1581
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1582
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1583
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1584
|
-
* });
|
|
1585
|
-
*
|
|
1586
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1587
|
-
* const authClient = await auth.getClient();
|
|
1588
|
-
* google.options({auth: authClient});
|
|
1589
|
-
*
|
|
1590
|
-
* // Do the magic
|
|
1591
|
-
* const res = await tpu.projects.locations.nodes.list({
|
|
1592
|
-
* // The maximum number of items to return.
|
|
1593
|
-
* pageSize: 'placeholder-value',
|
|
1594
|
-
* // The next_page_token value returned from a previous List request, if any.
|
|
1595
|
-
* pageToken: 'placeholder-value',
|
|
1596
|
-
* // Required. The parent resource name.
|
|
1597
|
-
* parent: 'projects/my-project/locations/my-location',
|
|
1598
|
-
* });
|
|
1599
|
-
* console.log(res.data);
|
|
1600
|
-
*
|
|
1601
|
-
* // Example response
|
|
1602
|
-
* // {
|
|
1603
|
-
* // "nextPageToken": "my_nextPageToken",
|
|
1604
|
-
* // "nodes": [],
|
|
1605
|
-
* // "unreachable": []
|
|
1606
|
-
* // }
|
|
1607
|
-
* }
|
|
1608
|
-
*
|
|
1609
|
-
* main().catch(e => {
|
|
1610
|
-
* console.error(e);
|
|
1611
|
-
* throw e;
|
|
1612
|
-
* });
|
|
1613
|
-
*
|
|
1614
|
-
* ```
|
|
1615
1193
|
*
|
|
1616
1194
|
* @param params - Parameters for request
|
|
1617
1195
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1702,60 +1280,6 @@ export namespace tpu_v1alpha1 {
|
|
|
1702
1280
|
|
|
1703
1281
|
/**
|
|
1704
1282
|
* Reimages a node's OS.
|
|
1705
|
-
* @example
|
|
1706
|
-
* ```js
|
|
1707
|
-
* // Before running the sample:
|
|
1708
|
-
* // - Enable the API at:
|
|
1709
|
-
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1710
|
-
* // - Login into gcloud by running:
|
|
1711
|
-
* // `$ gcloud auth application-default login`
|
|
1712
|
-
* // - Install the npm module by running:
|
|
1713
|
-
* // `$ npm install googleapis`
|
|
1714
|
-
*
|
|
1715
|
-
* const {google} = require('googleapis');
|
|
1716
|
-
* const tpu = google.tpu('v1alpha1');
|
|
1717
|
-
*
|
|
1718
|
-
* async function main() {
|
|
1719
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1720
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1721
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1722
|
-
* });
|
|
1723
|
-
*
|
|
1724
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1725
|
-
* const authClient = await auth.getClient();
|
|
1726
|
-
* google.options({auth: authClient});
|
|
1727
|
-
*
|
|
1728
|
-
* // Do the magic
|
|
1729
|
-
* const res = await tpu.projects.locations.nodes.reimage({
|
|
1730
|
-
* // The resource name.
|
|
1731
|
-
* name: 'projects/my-project/locations/my-location/nodes/my-node',
|
|
1732
|
-
*
|
|
1733
|
-
* // Request body metadata
|
|
1734
|
-
* requestBody: {
|
|
1735
|
-
* // request body parameters
|
|
1736
|
-
* // {
|
|
1737
|
-
* // "tensorflowVersion": "my_tensorflowVersion"
|
|
1738
|
-
* // }
|
|
1739
|
-
* },
|
|
1740
|
-
* });
|
|
1741
|
-
* console.log(res.data);
|
|
1742
|
-
*
|
|
1743
|
-
* // Example response
|
|
1744
|
-
* // {
|
|
1745
|
-
* // "done": false,
|
|
1746
|
-
* // "error": {},
|
|
1747
|
-
* // "metadata": {},
|
|
1748
|
-
* // "name": "my_name",
|
|
1749
|
-
* // "response": {}
|
|
1750
|
-
* // }
|
|
1751
|
-
* }
|
|
1752
|
-
*
|
|
1753
|
-
* main().catch(e => {
|
|
1754
|
-
* console.error(e);
|
|
1755
|
-
* throw e;
|
|
1756
|
-
* });
|
|
1757
|
-
*
|
|
1758
|
-
* ```
|
|
1759
1283
|
*
|
|
1760
1284
|
* @param params - Parameters for request
|
|
1761
1285
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1843,58 +1367,6 @@ export namespace tpu_v1alpha1 {
|
|
|
1843
1367
|
|
|
1844
1368
|
/**
|
|
1845
1369
|
* Starts a node.
|
|
1846
|
-
* @example
|
|
1847
|
-
* ```js
|
|
1848
|
-
* // Before running the sample:
|
|
1849
|
-
* // - Enable the API at:
|
|
1850
|
-
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1851
|
-
* // - Login into gcloud by running:
|
|
1852
|
-
* // `$ gcloud auth application-default login`
|
|
1853
|
-
* // - Install the npm module by running:
|
|
1854
|
-
* // `$ npm install googleapis`
|
|
1855
|
-
*
|
|
1856
|
-
* const {google} = require('googleapis');
|
|
1857
|
-
* const tpu = google.tpu('v1alpha1');
|
|
1858
|
-
*
|
|
1859
|
-
* async function main() {
|
|
1860
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1861
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1862
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1863
|
-
* });
|
|
1864
|
-
*
|
|
1865
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1866
|
-
* const authClient = await auth.getClient();
|
|
1867
|
-
* google.options({auth: authClient});
|
|
1868
|
-
*
|
|
1869
|
-
* // Do the magic
|
|
1870
|
-
* const res = await tpu.projects.locations.nodes.start({
|
|
1871
|
-
* // The resource name.
|
|
1872
|
-
* name: 'projects/my-project/locations/my-location/nodes/my-node',
|
|
1873
|
-
*
|
|
1874
|
-
* // Request body metadata
|
|
1875
|
-
* requestBody: {
|
|
1876
|
-
* // request body parameters
|
|
1877
|
-
* // {}
|
|
1878
|
-
* },
|
|
1879
|
-
* });
|
|
1880
|
-
* console.log(res.data);
|
|
1881
|
-
*
|
|
1882
|
-
* // Example response
|
|
1883
|
-
* // {
|
|
1884
|
-
* // "done": false,
|
|
1885
|
-
* // "error": {},
|
|
1886
|
-
* // "metadata": {},
|
|
1887
|
-
* // "name": "my_name",
|
|
1888
|
-
* // "response": {}
|
|
1889
|
-
* // }
|
|
1890
|
-
* }
|
|
1891
|
-
*
|
|
1892
|
-
* main().catch(e => {
|
|
1893
|
-
* console.error(e);
|
|
1894
|
-
* throw e;
|
|
1895
|
-
* });
|
|
1896
|
-
*
|
|
1897
|
-
* ```
|
|
1898
1370
|
*
|
|
1899
1371
|
* @param params - Parameters for request
|
|
1900
1372
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1982,58 +1454,6 @@ export namespace tpu_v1alpha1 {
|
|
|
1982
1454
|
|
|
1983
1455
|
/**
|
|
1984
1456
|
* Stops a node. This operation is only available with single TPU nodes.
|
|
1985
|
-
* @example
|
|
1986
|
-
* ```js
|
|
1987
|
-
* // Before running the sample:
|
|
1988
|
-
* // - Enable the API at:
|
|
1989
|
-
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1990
|
-
* // - Login into gcloud by running:
|
|
1991
|
-
* // `$ gcloud auth application-default login`
|
|
1992
|
-
* // - Install the npm module by running:
|
|
1993
|
-
* // `$ npm install googleapis`
|
|
1994
|
-
*
|
|
1995
|
-
* const {google} = require('googleapis');
|
|
1996
|
-
* const tpu = google.tpu('v1alpha1');
|
|
1997
|
-
*
|
|
1998
|
-
* async function main() {
|
|
1999
|
-
* const auth = new google.auth.GoogleAuth({
|
|
2000
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2001
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2002
|
-
* });
|
|
2003
|
-
*
|
|
2004
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
2005
|
-
* const authClient = await auth.getClient();
|
|
2006
|
-
* google.options({auth: authClient});
|
|
2007
|
-
*
|
|
2008
|
-
* // Do the magic
|
|
2009
|
-
* const res = await tpu.projects.locations.nodes.stop({
|
|
2010
|
-
* // The resource name.
|
|
2011
|
-
* name: 'projects/my-project/locations/my-location/nodes/my-node',
|
|
2012
|
-
*
|
|
2013
|
-
* // Request body metadata
|
|
2014
|
-
* requestBody: {
|
|
2015
|
-
* // request body parameters
|
|
2016
|
-
* // {}
|
|
2017
|
-
* },
|
|
2018
|
-
* });
|
|
2019
|
-
* console.log(res.data);
|
|
2020
|
-
*
|
|
2021
|
-
* // Example response
|
|
2022
|
-
* // {
|
|
2023
|
-
* // "done": false,
|
|
2024
|
-
* // "error": {},
|
|
2025
|
-
* // "metadata": {},
|
|
2026
|
-
* // "name": "my_name",
|
|
2027
|
-
* // "response": {}
|
|
2028
|
-
* // }
|
|
2029
|
-
* }
|
|
2030
|
-
*
|
|
2031
|
-
* main().catch(e => {
|
|
2032
|
-
* console.error(e);
|
|
2033
|
-
* throw e;
|
|
2034
|
-
* });
|
|
2035
|
-
*
|
|
2036
|
-
* ```
|
|
2037
1457
|
*
|
|
2038
1458
|
* @param params - Parameters for request
|
|
2039
1459
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2218,46 +1638,6 @@ export namespace tpu_v1alpha1 {
|
|
|
2218
1638
|
|
|
2219
1639
|
/**
|
|
2220
1640
|
* 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`.
|
|
2221
|
-
* @example
|
|
2222
|
-
* ```js
|
|
2223
|
-
* // Before running the sample:
|
|
2224
|
-
* // - Enable the API at:
|
|
2225
|
-
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
2226
|
-
* // - Login into gcloud by running:
|
|
2227
|
-
* // `$ gcloud auth application-default login`
|
|
2228
|
-
* // - Install the npm module by running:
|
|
2229
|
-
* // `$ npm install googleapis`
|
|
2230
|
-
*
|
|
2231
|
-
* const {google} = require('googleapis');
|
|
2232
|
-
* const tpu = google.tpu('v1alpha1');
|
|
2233
|
-
*
|
|
2234
|
-
* async function main() {
|
|
2235
|
-
* const auth = new google.auth.GoogleAuth({
|
|
2236
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2237
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2238
|
-
* });
|
|
2239
|
-
*
|
|
2240
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
2241
|
-
* const authClient = await auth.getClient();
|
|
2242
|
-
* google.options({auth: authClient});
|
|
2243
|
-
*
|
|
2244
|
-
* // Do the magic
|
|
2245
|
-
* const res = await tpu.projects.locations.operations.cancel({
|
|
2246
|
-
* // The name of the operation resource to be cancelled.
|
|
2247
|
-
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
2248
|
-
* });
|
|
2249
|
-
* console.log(res.data);
|
|
2250
|
-
*
|
|
2251
|
-
* // Example response
|
|
2252
|
-
* // {}
|
|
2253
|
-
* }
|
|
2254
|
-
*
|
|
2255
|
-
* main().catch(e => {
|
|
2256
|
-
* console.error(e);
|
|
2257
|
-
* throw e;
|
|
2258
|
-
* });
|
|
2259
|
-
*
|
|
2260
|
-
* ```
|
|
2261
1641
|
*
|
|
2262
1642
|
* @param params - Parameters for request
|
|
2263
1643
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2345,46 +1725,6 @@ export namespace tpu_v1alpha1 {
|
|
|
2345
1725
|
|
|
2346
1726
|
/**
|
|
2347
1727
|
* 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`.
|
|
2348
|
-
* @example
|
|
2349
|
-
* ```js
|
|
2350
|
-
* // Before running the sample:
|
|
2351
|
-
* // - Enable the API at:
|
|
2352
|
-
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
2353
|
-
* // - Login into gcloud by running:
|
|
2354
|
-
* // `$ gcloud auth application-default login`
|
|
2355
|
-
* // - Install the npm module by running:
|
|
2356
|
-
* // `$ npm install googleapis`
|
|
2357
|
-
*
|
|
2358
|
-
* const {google} = require('googleapis');
|
|
2359
|
-
* const tpu = google.tpu('v1alpha1');
|
|
2360
|
-
*
|
|
2361
|
-
* async function main() {
|
|
2362
|
-
* const auth = new google.auth.GoogleAuth({
|
|
2363
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2364
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2365
|
-
* });
|
|
2366
|
-
*
|
|
2367
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
2368
|
-
* const authClient = await auth.getClient();
|
|
2369
|
-
* google.options({auth: authClient});
|
|
2370
|
-
*
|
|
2371
|
-
* // Do the magic
|
|
2372
|
-
* const res = await tpu.projects.locations.operations.delete({
|
|
2373
|
-
* // The name of the operation resource to be deleted.
|
|
2374
|
-
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
2375
|
-
* });
|
|
2376
|
-
* console.log(res.data);
|
|
2377
|
-
*
|
|
2378
|
-
* // Example response
|
|
2379
|
-
* // {}
|
|
2380
|
-
* }
|
|
2381
|
-
*
|
|
2382
|
-
* main().catch(e => {
|
|
2383
|
-
* console.error(e);
|
|
2384
|
-
* throw e;
|
|
2385
|
-
* });
|
|
2386
|
-
*
|
|
2387
|
-
* ```
|
|
2388
1728
|
*
|
|
2389
1729
|
* @param params - Parameters for request
|
|
2390
1730
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2469,52 +1809,6 @@ export namespace tpu_v1alpha1 {
|
|
|
2469
1809
|
|
|
2470
1810
|
/**
|
|
2471
1811
|
* 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.
|
|
2472
|
-
* @example
|
|
2473
|
-
* ```js
|
|
2474
|
-
* // Before running the sample:
|
|
2475
|
-
* // - Enable the API at:
|
|
2476
|
-
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
2477
|
-
* // - Login into gcloud by running:
|
|
2478
|
-
* // `$ gcloud auth application-default login`
|
|
2479
|
-
* // - Install the npm module by running:
|
|
2480
|
-
* // `$ npm install googleapis`
|
|
2481
|
-
*
|
|
2482
|
-
* const {google} = require('googleapis');
|
|
2483
|
-
* const tpu = google.tpu('v1alpha1');
|
|
2484
|
-
*
|
|
2485
|
-
* async function main() {
|
|
2486
|
-
* const auth = new google.auth.GoogleAuth({
|
|
2487
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2488
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2489
|
-
* });
|
|
2490
|
-
*
|
|
2491
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
2492
|
-
* const authClient = await auth.getClient();
|
|
2493
|
-
* google.options({auth: authClient});
|
|
2494
|
-
*
|
|
2495
|
-
* // Do the magic
|
|
2496
|
-
* const res = await tpu.projects.locations.operations.get({
|
|
2497
|
-
* // The name of the operation resource.
|
|
2498
|
-
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
2499
|
-
* });
|
|
2500
|
-
* console.log(res.data);
|
|
2501
|
-
*
|
|
2502
|
-
* // Example response
|
|
2503
|
-
* // {
|
|
2504
|
-
* // "done": false,
|
|
2505
|
-
* // "error": {},
|
|
2506
|
-
* // "metadata": {},
|
|
2507
|
-
* // "name": "my_name",
|
|
2508
|
-
* // "response": {}
|
|
2509
|
-
* // }
|
|
2510
|
-
* }
|
|
2511
|
-
*
|
|
2512
|
-
* main().catch(e => {
|
|
2513
|
-
* console.error(e);
|
|
2514
|
-
* throw e;
|
|
2515
|
-
* });
|
|
2516
|
-
*
|
|
2517
|
-
* ```
|
|
2518
1812
|
*
|
|
2519
1813
|
* @param params - Parameters for request
|
|
2520
1814
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2598,56 +1892,7 @@ export namespace tpu_v1alpha1 {
|
|
|
2598
1892
|
}
|
|
2599
1893
|
|
|
2600
1894
|
/**
|
|
2601
|
-
* Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
|
|
2602
|
-
* @example
|
|
2603
|
-
* ```js
|
|
2604
|
-
* // Before running the sample:
|
|
2605
|
-
* // - Enable the API at:
|
|
2606
|
-
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
2607
|
-
* // - Login into gcloud by running:
|
|
2608
|
-
* // `$ gcloud auth application-default login`
|
|
2609
|
-
* // - Install the npm module by running:
|
|
2610
|
-
* // `$ npm install googleapis`
|
|
2611
|
-
*
|
|
2612
|
-
* const {google} = require('googleapis');
|
|
2613
|
-
* const tpu = google.tpu('v1alpha1');
|
|
2614
|
-
*
|
|
2615
|
-
* async function main() {
|
|
2616
|
-
* const auth = new google.auth.GoogleAuth({
|
|
2617
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2618
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2619
|
-
* });
|
|
2620
|
-
*
|
|
2621
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
2622
|
-
* const authClient = await auth.getClient();
|
|
2623
|
-
* google.options({auth: authClient});
|
|
2624
|
-
*
|
|
2625
|
-
* // Do the magic
|
|
2626
|
-
* const res = await tpu.projects.locations.operations.list({
|
|
2627
|
-
* // The standard list filter.
|
|
2628
|
-
* filter: 'placeholder-value',
|
|
2629
|
-
* // The name of the operation's parent resource.
|
|
2630
|
-
* name: 'projects/my-project/locations/my-location',
|
|
2631
|
-
* // The standard list page size.
|
|
2632
|
-
* pageSize: 'placeholder-value',
|
|
2633
|
-
* // The standard list page token.
|
|
2634
|
-
* pageToken: 'placeholder-value',
|
|
2635
|
-
* });
|
|
2636
|
-
* console.log(res.data);
|
|
2637
|
-
*
|
|
2638
|
-
* // Example response
|
|
2639
|
-
* // {
|
|
2640
|
-
* // "nextPageToken": "my_nextPageToken",
|
|
2641
|
-
* // "operations": []
|
|
2642
|
-
* // }
|
|
2643
|
-
* }
|
|
2644
|
-
*
|
|
2645
|
-
* main().catch(e => {
|
|
2646
|
-
* console.error(e);
|
|
2647
|
-
* throw e;
|
|
2648
|
-
* });
|
|
2649
|
-
*
|
|
2650
|
-
* ```
|
|
1895
|
+
* Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
|
|
2651
1896
|
*
|
|
2652
1897
|
* @param params - Parameters for request
|
|
2653
1898
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2788,49 +2033,6 @@ export namespace tpu_v1alpha1 {
|
|
|
2788
2033
|
|
|
2789
2034
|
/**
|
|
2790
2035
|
* Gets TensorFlow Version.
|
|
2791
|
-
* @example
|
|
2792
|
-
* ```js
|
|
2793
|
-
* // Before running the sample:
|
|
2794
|
-
* // - Enable the API at:
|
|
2795
|
-
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
2796
|
-
* // - Login into gcloud by running:
|
|
2797
|
-
* // `$ gcloud auth application-default login`
|
|
2798
|
-
* // - Install the npm module by running:
|
|
2799
|
-
* // `$ npm install googleapis`
|
|
2800
|
-
*
|
|
2801
|
-
* const {google} = require('googleapis');
|
|
2802
|
-
* const tpu = google.tpu('v1alpha1');
|
|
2803
|
-
*
|
|
2804
|
-
* async function main() {
|
|
2805
|
-
* const auth = new google.auth.GoogleAuth({
|
|
2806
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2807
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2808
|
-
* });
|
|
2809
|
-
*
|
|
2810
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
2811
|
-
* const authClient = await auth.getClient();
|
|
2812
|
-
* google.options({auth: authClient});
|
|
2813
|
-
*
|
|
2814
|
-
* // Do the magic
|
|
2815
|
-
* const res = await tpu.projects.locations.tensorflowVersions.get({
|
|
2816
|
-
* // Required. The resource name.
|
|
2817
|
-
* name: 'projects/my-project/locations/my-location/tensorflowVersions/my-tensorflowVersion',
|
|
2818
|
-
* });
|
|
2819
|
-
* console.log(res.data);
|
|
2820
|
-
*
|
|
2821
|
-
* // Example response
|
|
2822
|
-
* // {
|
|
2823
|
-
* // "name": "my_name",
|
|
2824
|
-
* // "version": "my_version"
|
|
2825
|
-
* // }
|
|
2826
|
-
* }
|
|
2827
|
-
*
|
|
2828
|
-
* main().catch(e => {
|
|
2829
|
-
* console.error(e);
|
|
2830
|
-
* throw e;
|
|
2831
|
-
* });
|
|
2832
|
-
*
|
|
2833
|
-
* ```
|
|
2834
2036
|
*
|
|
2835
2037
|
* @param params - Parameters for request
|
|
2836
2038
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2919,58 +2121,6 @@ export namespace tpu_v1alpha1 {
|
|
|
2919
2121
|
|
|
2920
2122
|
/**
|
|
2921
2123
|
* Lists TensorFlow versions supported by this API.
|
|
2922
|
-
* @example
|
|
2923
|
-
* ```js
|
|
2924
|
-
* // Before running the sample:
|
|
2925
|
-
* // - Enable the API at:
|
|
2926
|
-
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
2927
|
-
* // - Login into gcloud by running:
|
|
2928
|
-
* // `$ gcloud auth application-default login`
|
|
2929
|
-
* // - Install the npm module by running:
|
|
2930
|
-
* // `$ npm install googleapis`
|
|
2931
|
-
*
|
|
2932
|
-
* const {google} = require('googleapis');
|
|
2933
|
-
* const tpu = google.tpu('v1alpha1');
|
|
2934
|
-
*
|
|
2935
|
-
* async function main() {
|
|
2936
|
-
* const auth = new google.auth.GoogleAuth({
|
|
2937
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2938
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2939
|
-
* });
|
|
2940
|
-
*
|
|
2941
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
2942
|
-
* const authClient = await auth.getClient();
|
|
2943
|
-
* google.options({auth: authClient});
|
|
2944
|
-
*
|
|
2945
|
-
* // Do the magic
|
|
2946
|
-
* const res = await tpu.projects.locations.tensorflowVersions.list({
|
|
2947
|
-
* // List filter.
|
|
2948
|
-
* filter: 'placeholder-value',
|
|
2949
|
-
* // Sort results.
|
|
2950
|
-
* orderBy: 'placeholder-value',
|
|
2951
|
-
* // The maximum number of items to return.
|
|
2952
|
-
* pageSize: 'placeholder-value',
|
|
2953
|
-
* // The next_page_token value returned from a previous List request, if any.
|
|
2954
|
-
* pageToken: 'placeholder-value',
|
|
2955
|
-
* // Required. The parent resource name.
|
|
2956
|
-
* parent: 'projects/my-project/locations/my-location',
|
|
2957
|
-
* });
|
|
2958
|
-
* console.log(res.data);
|
|
2959
|
-
*
|
|
2960
|
-
* // Example response
|
|
2961
|
-
* // {
|
|
2962
|
-
* // "nextPageToken": "my_nextPageToken",
|
|
2963
|
-
* // "tensorflowVersions": [],
|
|
2964
|
-
* // "unreachable": []
|
|
2965
|
-
* // }
|
|
2966
|
-
* }
|
|
2967
|
-
*
|
|
2968
|
-
* main().catch(e => {
|
|
2969
|
-
* console.error(e);
|
|
2970
|
-
* throw e;
|
|
2971
|
-
* });
|
|
2972
|
-
*
|
|
2973
|
-
* ```
|
|
2974
2124
|
*
|
|
2975
2125
|
* @param params - Parameters for request
|
|
2976
2126
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|