@googleapis/tpu 6.0.1 → 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/v1alpha1.ts CHANGED
@@ -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`.
@@ -595,6 +645,61 @@ export namespace tpu_v1alpha1 {
595
645
 
596
646
  /**
597
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
+ * ```
598
703
  *
599
704
  * @param params - Parameters for request
600
705
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -726,6 +831,53 @@ export namespace tpu_v1alpha1 {
726
831
 
727
832
  /**
728
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
+ * ```
729
881
  *
730
882
  * @param params - Parameters for request
731
883
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -814,6 +966,62 @@ export namespace tpu_v1alpha1 {
814
966
 
815
967
  /**
816
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
+ * ```
817
1025
  *
818
1026
  * @param params - Parameters for request
819
1027
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -949,6 +1157,86 @@ export namespace tpu_v1alpha1 {
949
1157
 
950
1158
  /**
951
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
+ * ```
952
1240
  *
953
1241
  * @param params - Parameters for request
954
1242
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1040,6 +1328,58 @@ export namespace tpu_v1alpha1 {
1040
1328
 
1041
1329
  /**
1042
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
+ * ```
1043
1383
  *
1044
1384
  * @param params - Parameters for request
1045
1385
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1128,6 +1468,70 @@ export namespace tpu_v1alpha1 {
1128
1468
 
1129
1469
  /**
1130
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
+ * ```
1131
1535
  *
1132
1536
  * @param params - Parameters for request
1133
1537
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1216,6 +1620,58 @@ export namespace tpu_v1alpha1 {
1216
1620
 
1217
1621
  /**
1218
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
+ * ```
1219
1675
  *
1220
1676
  * @param params - Parameters for request
1221
1677
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1307,6 +1763,64 @@ export namespace tpu_v1alpha1 {
1307
1763
 
1308
1764
  /**
1309
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
+ * ```
1310
1824
  *
1311
1825
  * @param params - Parameters for request
1312
1826
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1398,6 +1912,62 @@ export namespace tpu_v1alpha1 {
1398
1912
 
1399
1913
  /**
1400
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
+ * ```
1401
1971
  *
1402
1972
  * @param params - Parameters for request
1403
1973
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1489,6 +2059,62 @@ export namespace tpu_v1alpha1 {
1489
2059
 
1490
2060
  /**
1491
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
+ * ```
1492
2118
  *
1493
2119
  * @param params - Parameters for request
1494
2120
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1677,6 +2303,50 @@ export namespace tpu_v1alpha1 {
1677
2303
 
1678
2304
  /**
1679
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
+ * ```
1680
2350
  *
1681
2351
  * @param params - Parameters for request
1682
2352
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1768,6 +2438,50 @@ export namespace tpu_v1alpha1 {
1768
2438
 
1769
2439
  /**
1770
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
+ * ```
1771
2485
  *
1772
2486
  * @param params - Parameters for request
1773
2487
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1856,6 +2570,56 @@ export namespace tpu_v1alpha1 {
1856
2570
 
1857
2571
  /**
1858
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
+ * ```
1859
2623
  *
1860
2624
  * @param params - Parameters for request
1861
2625
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1944,6 +2708,59 @@ export namespace tpu_v1alpha1 {
1944
2708
 
1945
2709
  /**
1946
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
+ * ```
1947
2764
  *
1948
2765
  * @param params - Parameters for request
1949
2766
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2085,6 +2902,53 @@ export namespace tpu_v1alpha1 {
2085
2902
 
2086
2903
  /**
2087
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
+ * ```
2088
2952
  *
2089
2953
  * @param params - Parameters for request
2090
2954
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2174,6 +3038,62 @@ export namespace tpu_v1alpha1 {
2174
3038
 
2175
3039
  /**
2176
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
+ * ```
2177
3097
  *
2178
3098
  * @param params - Parameters for request
2179
3099
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.