@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/CHANGELOG.md +30 -0
- package/build/v1.d.ts +916 -0
- package/build/v1.js.map +1 -1
- package/build/v1alpha1.d.ts +920 -0
- package/build/v1alpha1.js.map +1 -1
- package/build/v2.d.ts +1349 -0
- package/build/v2.js.map +1 -1
- package/build/v2alpha1.d.ts +1595 -0
- package/build/v2alpha1.js.map +1 -1
- package/package.json +1 -1
- package/v1.ts +916 -0
- package/v1alpha1.ts +920 -0
- package/v2.ts +1349 -0
- package/v2alpha1.ts +1595 -0
package/v2alpha1.ts
CHANGED
|
@@ -933,6 +933,10 @@ export namespace tpu_v2alpha1 {
|
|
|
933
933
|
* Optional. Defines the provisioning model for the node.
|
|
934
934
|
*/
|
|
935
935
|
provisioningModel?: string | null;
|
|
936
|
+
/**
|
|
937
|
+
* Optional. Name of the reservation in which the node should be provisioned.
|
|
938
|
+
*/
|
|
939
|
+
reservationName?: string | null;
|
|
936
940
|
/**
|
|
937
941
|
* Whether the node is created under a reservation.
|
|
938
942
|
*/
|
|
@@ -1156,6 +1160,58 @@ export namespace tpu_v2alpha1 {
|
|
|
1156
1160
|
|
|
1157
1161
|
/**
|
|
1158
1162
|
* Generates the Cloud TPU service identity for the project.
|
|
1163
|
+
* @example
|
|
1164
|
+
* ```js
|
|
1165
|
+
* // Before running the sample:
|
|
1166
|
+
* // - Enable the API at:
|
|
1167
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1168
|
+
* // - Login into gcloud by running:
|
|
1169
|
+
* // ```sh
|
|
1170
|
+
* // $ gcloud auth application-default login
|
|
1171
|
+
* // ```
|
|
1172
|
+
* // - Install the npm module by running:
|
|
1173
|
+
* // ```sh
|
|
1174
|
+
* // $ npm install googleapis
|
|
1175
|
+
* // ```
|
|
1176
|
+
*
|
|
1177
|
+
* const {google} = require('googleapis');
|
|
1178
|
+
* const tpu = google.tpu('v2alpha1');
|
|
1179
|
+
*
|
|
1180
|
+
* async function main() {
|
|
1181
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1182
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1183
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1184
|
+
* });
|
|
1185
|
+
*
|
|
1186
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1187
|
+
* const authClient = await auth.getClient();
|
|
1188
|
+
* google.options({auth: authClient});
|
|
1189
|
+
*
|
|
1190
|
+
* // Do the magic
|
|
1191
|
+
* const res = await tpu.projects.locations.generateServiceIdentity({
|
|
1192
|
+
* // Required. The parent resource name.
|
|
1193
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
1194
|
+
*
|
|
1195
|
+
* // Request body metadata
|
|
1196
|
+
* requestBody: {
|
|
1197
|
+
* // request body parameters
|
|
1198
|
+
* // {}
|
|
1199
|
+
* },
|
|
1200
|
+
* });
|
|
1201
|
+
* console.log(res.data);
|
|
1202
|
+
*
|
|
1203
|
+
* // Example response
|
|
1204
|
+
* // {
|
|
1205
|
+
* // "identity": {}
|
|
1206
|
+
* // }
|
|
1207
|
+
* }
|
|
1208
|
+
*
|
|
1209
|
+
* main().catch(e => {
|
|
1210
|
+
* console.error(e);
|
|
1211
|
+
* throw e;
|
|
1212
|
+
* });
|
|
1213
|
+
*
|
|
1214
|
+
* ```
|
|
1159
1215
|
*
|
|
1160
1216
|
* @param params - Parameters for request
|
|
1161
1217
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1253,6 +1309,56 @@ export namespace tpu_v2alpha1 {
|
|
|
1253
1309
|
|
|
1254
1310
|
/**
|
|
1255
1311
|
* Gets information about a location.
|
|
1312
|
+
* @example
|
|
1313
|
+
* ```js
|
|
1314
|
+
* // Before running the sample:
|
|
1315
|
+
* // - Enable the API at:
|
|
1316
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1317
|
+
* // - Login into gcloud by running:
|
|
1318
|
+
* // ```sh
|
|
1319
|
+
* // $ gcloud auth application-default login
|
|
1320
|
+
* // ```
|
|
1321
|
+
* // - Install the npm module by running:
|
|
1322
|
+
* // ```sh
|
|
1323
|
+
* // $ npm install googleapis
|
|
1324
|
+
* // ```
|
|
1325
|
+
*
|
|
1326
|
+
* const {google} = require('googleapis');
|
|
1327
|
+
* const tpu = google.tpu('v2alpha1');
|
|
1328
|
+
*
|
|
1329
|
+
* async function main() {
|
|
1330
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1331
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1332
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1333
|
+
* });
|
|
1334
|
+
*
|
|
1335
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1336
|
+
* const authClient = await auth.getClient();
|
|
1337
|
+
* google.options({auth: authClient});
|
|
1338
|
+
*
|
|
1339
|
+
* // Do the magic
|
|
1340
|
+
* const res = await tpu.projects.locations.get({
|
|
1341
|
+
* // Resource name for the location.
|
|
1342
|
+
* name: 'projects/my-project/locations/my-location',
|
|
1343
|
+
* });
|
|
1344
|
+
* console.log(res.data);
|
|
1345
|
+
*
|
|
1346
|
+
* // Example response
|
|
1347
|
+
* // {
|
|
1348
|
+
* // "displayName": "my_displayName",
|
|
1349
|
+
* // "labels": {},
|
|
1350
|
+
* // "locationId": "my_locationId",
|
|
1351
|
+
* // "metadata": {},
|
|
1352
|
+
* // "name": "my_name"
|
|
1353
|
+
* // }
|
|
1354
|
+
* }
|
|
1355
|
+
*
|
|
1356
|
+
* main().catch(e => {
|
|
1357
|
+
* console.error(e);
|
|
1358
|
+
* throw e;
|
|
1359
|
+
* });
|
|
1360
|
+
*
|
|
1361
|
+
* ```
|
|
1256
1362
|
*
|
|
1257
1363
|
* @param params - Parameters for request
|
|
1258
1364
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1341,6 +1447,61 @@ export namespace tpu_v2alpha1 {
|
|
|
1341
1447
|
|
|
1342
1448
|
/**
|
|
1343
1449
|
* Lists information about the supported locations for this service.
|
|
1450
|
+
* @example
|
|
1451
|
+
* ```js
|
|
1452
|
+
* // Before running the sample:
|
|
1453
|
+
* // - Enable the API at:
|
|
1454
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1455
|
+
* // - Login into gcloud by running:
|
|
1456
|
+
* // ```sh
|
|
1457
|
+
* // $ gcloud auth application-default login
|
|
1458
|
+
* // ```
|
|
1459
|
+
* // - Install the npm module by running:
|
|
1460
|
+
* // ```sh
|
|
1461
|
+
* // $ npm install googleapis
|
|
1462
|
+
* // ```
|
|
1463
|
+
*
|
|
1464
|
+
* const {google} = require('googleapis');
|
|
1465
|
+
* const tpu = google.tpu('v2alpha1');
|
|
1466
|
+
*
|
|
1467
|
+
* async function main() {
|
|
1468
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1469
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1470
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1471
|
+
* });
|
|
1472
|
+
*
|
|
1473
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1474
|
+
* const authClient = await auth.getClient();
|
|
1475
|
+
* google.options({auth: authClient});
|
|
1476
|
+
*
|
|
1477
|
+
* // Do the magic
|
|
1478
|
+
* const res = await tpu.projects.locations.list({
|
|
1479
|
+
* // Optional. A list of extra location types that should be used as conditions for controlling the visibility of the locations.
|
|
1480
|
+
* extraLocationTypes: 'placeholder-value',
|
|
1481
|
+
* // 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).
|
|
1482
|
+
* filter: 'placeholder-value',
|
|
1483
|
+
* // The resource that owns the locations collection, if applicable.
|
|
1484
|
+
* name: 'projects/my-project',
|
|
1485
|
+
* // The maximum number of results to return. If not set, the service selects a default.
|
|
1486
|
+
* pageSize: 'placeholder-value',
|
|
1487
|
+
* // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.
|
|
1488
|
+
* pageToken: 'placeholder-value',
|
|
1489
|
+
* });
|
|
1490
|
+
* console.log(res.data);
|
|
1491
|
+
*
|
|
1492
|
+
* // Example response
|
|
1493
|
+
* // {
|
|
1494
|
+
* // "locations": [],
|
|
1495
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
1496
|
+
* // }
|
|
1497
|
+
* }
|
|
1498
|
+
*
|
|
1499
|
+
* main().catch(e => {
|
|
1500
|
+
* console.error(e);
|
|
1501
|
+
* throw e;
|
|
1502
|
+
* });
|
|
1503
|
+
*
|
|
1504
|
+
* ```
|
|
1344
1505
|
*
|
|
1345
1506
|
* @param params - Parameters for request
|
|
1346
1507
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1484,6 +1645,54 @@ export namespace tpu_v2alpha1 {
|
|
|
1484
1645
|
|
|
1485
1646
|
/**
|
|
1486
1647
|
* Gets AcceleratorType.
|
|
1648
|
+
* @example
|
|
1649
|
+
* ```js
|
|
1650
|
+
* // Before running the sample:
|
|
1651
|
+
* // - Enable the API at:
|
|
1652
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1653
|
+
* // - Login into gcloud by running:
|
|
1654
|
+
* // ```sh
|
|
1655
|
+
* // $ gcloud auth application-default login
|
|
1656
|
+
* // ```
|
|
1657
|
+
* // - Install the npm module by running:
|
|
1658
|
+
* // ```sh
|
|
1659
|
+
* // $ npm install googleapis
|
|
1660
|
+
* // ```
|
|
1661
|
+
*
|
|
1662
|
+
* const {google} = require('googleapis');
|
|
1663
|
+
* const tpu = google.tpu('v2alpha1');
|
|
1664
|
+
*
|
|
1665
|
+
* async function main() {
|
|
1666
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1667
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1668
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1669
|
+
* });
|
|
1670
|
+
*
|
|
1671
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1672
|
+
* const authClient = await auth.getClient();
|
|
1673
|
+
* google.options({auth: authClient});
|
|
1674
|
+
*
|
|
1675
|
+
* // Do the magic
|
|
1676
|
+
* const res = await tpu.projects.locations.acceleratorTypes.get({
|
|
1677
|
+
* // Required. The resource name.
|
|
1678
|
+
* name: 'projects/my-project/locations/my-location/acceleratorTypes/my-acceleratorType',
|
|
1679
|
+
* });
|
|
1680
|
+
* console.log(res.data);
|
|
1681
|
+
*
|
|
1682
|
+
* // Example response
|
|
1683
|
+
* // {
|
|
1684
|
+
* // "acceleratorConfigs": [],
|
|
1685
|
+
* // "name": "my_name",
|
|
1686
|
+
* // "type": "my_type"
|
|
1687
|
+
* // }
|
|
1688
|
+
* }
|
|
1689
|
+
*
|
|
1690
|
+
* main().catch(e => {
|
|
1691
|
+
* console.error(e);
|
|
1692
|
+
* throw e;
|
|
1693
|
+
* });
|
|
1694
|
+
*
|
|
1695
|
+
* ```
|
|
1487
1696
|
*
|
|
1488
1697
|
* @param params - Parameters for request
|
|
1489
1698
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1572,6 +1781,62 @@ export namespace tpu_v2alpha1 {
|
|
|
1572
1781
|
|
|
1573
1782
|
/**
|
|
1574
1783
|
* Lists accelerator types supported by this API.
|
|
1784
|
+
* @example
|
|
1785
|
+
* ```js
|
|
1786
|
+
* // Before running the sample:
|
|
1787
|
+
* // - Enable the API at:
|
|
1788
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1789
|
+
* // - Login into gcloud by running:
|
|
1790
|
+
* // ```sh
|
|
1791
|
+
* // $ gcloud auth application-default login
|
|
1792
|
+
* // ```
|
|
1793
|
+
* // - Install the npm module by running:
|
|
1794
|
+
* // ```sh
|
|
1795
|
+
* // $ npm install googleapis
|
|
1796
|
+
* // ```
|
|
1797
|
+
*
|
|
1798
|
+
* const {google} = require('googleapis');
|
|
1799
|
+
* const tpu = google.tpu('v2alpha1');
|
|
1800
|
+
*
|
|
1801
|
+
* async function main() {
|
|
1802
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1803
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1804
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1805
|
+
* });
|
|
1806
|
+
*
|
|
1807
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1808
|
+
* const authClient = await auth.getClient();
|
|
1809
|
+
* google.options({auth: authClient});
|
|
1810
|
+
*
|
|
1811
|
+
* // Do the magic
|
|
1812
|
+
* const res = await tpu.projects.locations.acceleratorTypes.list({
|
|
1813
|
+
* // List filter.
|
|
1814
|
+
* filter: 'placeholder-value',
|
|
1815
|
+
* // Sort results.
|
|
1816
|
+
* orderBy: 'placeholder-value',
|
|
1817
|
+
* // The maximum number of items to return.
|
|
1818
|
+
* pageSize: 'placeholder-value',
|
|
1819
|
+
* // The next_page_token value returned from a previous List request, if any.
|
|
1820
|
+
* pageToken: 'placeholder-value',
|
|
1821
|
+
* // Required. The parent resource name.
|
|
1822
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
1823
|
+
* });
|
|
1824
|
+
* console.log(res.data);
|
|
1825
|
+
*
|
|
1826
|
+
* // Example response
|
|
1827
|
+
* // {
|
|
1828
|
+
* // "acceleratorTypes": [],
|
|
1829
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
1830
|
+
* // "unreachable": []
|
|
1831
|
+
* // }
|
|
1832
|
+
* }
|
|
1833
|
+
*
|
|
1834
|
+
* main().catch(e => {
|
|
1835
|
+
* console.error(e);
|
|
1836
|
+
* throw e;
|
|
1837
|
+
* });
|
|
1838
|
+
*
|
|
1839
|
+
* ```
|
|
1575
1840
|
*
|
|
1576
1841
|
* @param params - Parameters for request
|
|
1577
1842
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1707,6 +1972,95 @@ export namespace tpu_v2alpha1 {
|
|
|
1707
1972
|
|
|
1708
1973
|
/**
|
|
1709
1974
|
* Creates a node.
|
|
1975
|
+
* @example
|
|
1976
|
+
* ```js
|
|
1977
|
+
* // Before running the sample:
|
|
1978
|
+
* // - Enable the API at:
|
|
1979
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1980
|
+
* // - Login into gcloud by running:
|
|
1981
|
+
* // ```sh
|
|
1982
|
+
* // $ gcloud auth application-default login
|
|
1983
|
+
* // ```
|
|
1984
|
+
* // - Install the npm module by running:
|
|
1985
|
+
* // ```sh
|
|
1986
|
+
* // $ npm install googleapis
|
|
1987
|
+
* // ```
|
|
1988
|
+
*
|
|
1989
|
+
* const {google} = require('googleapis');
|
|
1990
|
+
* const tpu = google.tpu('v2alpha1');
|
|
1991
|
+
*
|
|
1992
|
+
* async function main() {
|
|
1993
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1994
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1995
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1996
|
+
* });
|
|
1997
|
+
*
|
|
1998
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1999
|
+
* const authClient = await auth.getClient();
|
|
2000
|
+
* google.options({auth: authClient});
|
|
2001
|
+
*
|
|
2002
|
+
* // Do the magic
|
|
2003
|
+
* const res = await tpu.projects.locations.nodes.create({
|
|
2004
|
+
* // The unqualified resource name.
|
|
2005
|
+
* nodeId: 'placeholder-value',
|
|
2006
|
+
* // Required. The parent resource name.
|
|
2007
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
2008
|
+
* // Idempotent request UUID.
|
|
2009
|
+
* requestId: 'placeholder-value',
|
|
2010
|
+
*
|
|
2011
|
+
* // Request body metadata
|
|
2012
|
+
* requestBody: {
|
|
2013
|
+
* // request body parameters
|
|
2014
|
+
* // {
|
|
2015
|
+
* // "acceleratorConfig": {},
|
|
2016
|
+
* // "acceleratorType": "my_acceleratorType",
|
|
2017
|
+
* // "apiVersion": "my_apiVersion",
|
|
2018
|
+
* // "autocheckpointEnabled": false,
|
|
2019
|
+
* // "bootDiskConfig": {},
|
|
2020
|
+
* // "cidrBlock": "my_cidrBlock",
|
|
2021
|
+
* // "createTime": "my_createTime",
|
|
2022
|
+
* // "dataDisks": [],
|
|
2023
|
+
* // "description": "my_description",
|
|
2024
|
+
* // "health": "my_health",
|
|
2025
|
+
* // "healthDescription": "my_healthDescription",
|
|
2026
|
+
* // "id": "my_id",
|
|
2027
|
+
* // "labels": {},
|
|
2028
|
+
* // "metadata": {},
|
|
2029
|
+
* // "multisliceNode": false,
|
|
2030
|
+
* // "name": "my_name",
|
|
2031
|
+
* // "networkConfig": {},
|
|
2032
|
+
* // "networkConfigs": [],
|
|
2033
|
+
* // "networkEndpoints": [],
|
|
2034
|
+
* // "queuedResource": "my_queuedResource",
|
|
2035
|
+
* // "runtimeVersion": "my_runtimeVersion",
|
|
2036
|
+
* // "schedulingConfig": {},
|
|
2037
|
+
* // "serviceAccount": {},
|
|
2038
|
+
* // "shieldedInstanceConfig": {},
|
|
2039
|
+
* // "state": "my_state",
|
|
2040
|
+
* // "symptoms": [],
|
|
2041
|
+
* // "tags": [],
|
|
2042
|
+
* // "upcomingMaintenance": {}
|
|
2043
|
+
* // }
|
|
2044
|
+
* },
|
|
2045
|
+
* });
|
|
2046
|
+
* console.log(res.data);
|
|
2047
|
+
*
|
|
2048
|
+
* // Example response
|
|
2049
|
+
* // {
|
|
2050
|
+
* // "done": false,
|
|
2051
|
+
* // "error": {},
|
|
2052
|
+
* // "metadata": {},
|
|
2053
|
+
* // "name": "my_name",
|
|
2054
|
+
* // "response": {}
|
|
2055
|
+
* // }
|
|
2056
|
+
* }
|
|
2057
|
+
*
|
|
2058
|
+
* main().catch(e => {
|
|
2059
|
+
* console.error(e);
|
|
2060
|
+
* throw e;
|
|
2061
|
+
* });
|
|
2062
|
+
*
|
|
2063
|
+
* ```
|
|
1710
2064
|
*
|
|
1711
2065
|
* @param params - Parameters for request
|
|
1712
2066
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1798,6 +2152,58 @@ export namespace tpu_v2alpha1 {
|
|
|
1798
2152
|
|
|
1799
2153
|
/**
|
|
1800
2154
|
* Deletes a node.
|
|
2155
|
+
* @example
|
|
2156
|
+
* ```js
|
|
2157
|
+
* // Before running the sample:
|
|
2158
|
+
* // - Enable the API at:
|
|
2159
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
2160
|
+
* // - Login into gcloud by running:
|
|
2161
|
+
* // ```sh
|
|
2162
|
+
* // $ gcloud auth application-default login
|
|
2163
|
+
* // ```
|
|
2164
|
+
* // - Install the npm module by running:
|
|
2165
|
+
* // ```sh
|
|
2166
|
+
* // $ npm install googleapis
|
|
2167
|
+
* // ```
|
|
2168
|
+
*
|
|
2169
|
+
* const {google} = require('googleapis');
|
|
2170
|
+
* const tpu = google.tpu('v2alpha1');
|
|
2171
|
+
*
|
|
2172
|
+
* async function main() {
|
|
2173
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2174
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2175
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2176
|
+
* });
|
|
2177
|
+
*
|
|
2178
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2179
|
+
* const authClient = await auth.getClient();
|
|
2180
|
+
* google.options({auth: authClient});
|
|
2181
|
+
*
|
|
2182
|
+
* // Do the magic
|
|
2183
|
+
* const res = await tpu.projects.locations.nodes.delete({
|
|
2184
|
+
* // Required. The resource name.
|
|
2185
|
+
* name: 'projects/my-project/locations/my-location/nodes/my-node',
|
|
2186
|
+
* // Idempotent request UUID.
|
|
2187
|
+
* requestId: 'placeholder-value',
|
|
2188
|
+
* });
|
|
2189
|
+
* console.log(res.data);
|
|
2190
|
+
*
|
|
2191
|
+
* // Example response
|
|
2192
|
+
* // {
|
|
2193
|
+
* // "done": false,
|
|
2194
|
+
* // "error": {},
|
|
2195
|
+
* // "metadata": {},
|
|
2196
|
+
* // "name": "my_name",
|
|
2197
|
+
* // "response": {}
|
|
2198
|
+
* // }
|
|
2199
|
+
* }
|
|
2200
|
+
*
|
|
2201
|
+
* main().catch(e => {
|
|
2202
|
+
* console.error(e);
|
|
2203
|
+
* throw e;
|
|
2204
|
+
* });
|
|
2205
|
+
*
|
|
2206
|
+
* ```
|
|
1801
2207
|
*
|
|
1802
2208
|
* @param params - Parameters for request
|
|
1803
2209
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1886,6 +2292,79 @@ export namespace tpu_v2alpha1 {
|
|
|
1886
2292
|
|
|
1887
2293
|
/**
|
|
1888
2294
|
* Gets the details of a node.
|
|
2295
|
+
* @example
|
|
2296
|
+
* ```js
|
|
2297
|
+
* // Before running the sample:
|
|
2298
|
+
* // - Enable the API at:
|
|
2299
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
2300
|
+
* // - Login into gcloud by running:
|
|
2301
|
+
* // ```sh
|
|
2302
|
+
* // $ gcloud auth application-default login
|
|
2303
|
+
* // ```
|
|
2304
|
+
* // - Install the npm module by running:
|
|
2305
|
+
* // ```sh
|
|
2306
|
+
* // $ npm install googleapis
|
|
2307
|
+
* // ```
|
|
2308
|
+
*
|
|
2309
|
+
* const {google} = require('googleapis');
|
|
2310
|
+
* const tpu = google.tpu('v2alpha1');
|
|
2311
|
+
*
|
|
2312
|
+
* async function main() {
|
|
2313
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2314
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2315
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2316
|
+
* });
|
|
2317
|
+
*
|
|
2318
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2319
|
+
* const authClient = await auth.getClient();
|
|
2320
|
+
* google.options({auth: authClient});
|
|
2321
|
+
*
|
|
2322
|
+
* // Do the magic
|
|
2323
|
+
* const res = await tpu.projects.locations.nodes.get({
|
|
2324
|
+
* // Required. The resource name.
|
|
2325
|
+
* name: 'projects/my-project/locations/my-location/nodes/my-node',
|
|
2326
|
+
* });
|
|
2327
|
+
* console.log(res.data);
|
|
2328
|
+
*
|
|
2329
|
+
* // Example response
|
|
2330
|
+
* // {
|
|
2331
|
+
* // "acceleratorConfig": {},
|
|
2332
|
+
* // "acceleratorType": "my_acceleratorType",
|
|
2333
|
+
* // "apiVersion": "my_apiVersion",
|
|
2334
|
+
* // "autocheckpointEnabled": false,
|
|
2335
|
+
* // "bootDiskConfig": {},
|
|
2336
|
+
* // "cidrBlock": "my_cidrBlock",
|
|
2337
|
+
* // "createTime": "my_createTime",
|
|
2338
|
+
* // "dataDisks": [],
|
|
2339
|
+
* // "description": "my_description",
|
|
2340
|
+
* // "health": "my_health",
|
|
2341
|
+
* // "healthDescription": "my_healthDescription",
|
|
2342
|
+
* // "id": "my_id",
|
|
2343
|
+
* // "labels": {},
|
|
2344
|
+
* // "metadata": {},
|
|
2345
|
+
* // "multisliceNode": false,
|
|
2346
|
+
* // "name": "my_name",
|
|
2347
|
+
* // "networkConfig": {},
|
|
2348
|
+
* // "networkConfigs": [],
|
|
2349
|
+
* // "networkEndpoints": [],
|
|
2350
|
+
* // "queuedResource": "my_queuedResource",
|
|
2351
|
+
* // "runtimeVersion": "my_runtimeVersion",
|
|
2352
|
+
* // "schedulingConfig": {},
|
|
2353
|
+
* // "serviceAccount": {},
|
|
2354
|
+
* // "shieldedInstanceConfig": {},
|
|
2355
|
+
* // "state": "my_state",
|
|
2356
|
+
* // "symptoms": [],
|
|
2357
|
+
* // "tags": [],
|
|
2358
|
+
* // "upcomingMaintenance": {}
|
|
2359
|
+
* // }
|
|
2360
|
+
* }
|
|
2361
|
+
*
|
|
2362
|
+
* main().catch(e => {
|
|
2363
|
+
* console.error(e);
|
|
2364
|
+
* throw e;
|
|
2365
|
+
* });
|
|
2366
|
+
*
|
|
2367
|
+
* ```
|
|
1889
2368
|
*
|
|
1890
2369
|
* @param params - Parameters for request
|
|
1891
2370
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1974,6 +2453,61 @@ export namespace tpu_v2alpha1 {
|
|
|
1974
2453
|
|
|
1975
2454
|
/**
|
|
1976
2455
|
* Retrieves the guest attributes for the node.
|
|
2456
|
+
* @example
|
|
2457
|
+
* ```js
|
|
2458
|
+
* // Before running the sample:
|
|
2459
|
+
* // - Enable the API at:
|
|
2460
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
2461
|
+
* // - Login into gcloud by running:
|
|
2462
|
+
* // ```sh
|
|
2463
|
+
* // $ gcloud auth application-default login
|
|
2464
|
+
* // ```
|
|
2465
|
+
* // - Install the npm module by running:
|
|
2466
|
+
* // ```sh
|
|
2467
|
+
* // $ npm install googleapis
|
|
2468
|
+
* // ```
|
|
2469
|
+
*
|
|
2470
|
+
* const {google} = require('googleapis');
|
|
2471
|
+
* const tpu = google.tpu('v2alpha1');
|
|
2472
|
+
*
|
|
2473
|
+
* async function main() {
|
|
2474
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2475
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2476
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2477
|
+
* });
|
|
2478
|
+
*
|
|
2479
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2480
|
+
* const authClient = await auth.getClient();
|
|
2481
|
+
* google.options({auth: authClient});
|
|
2482
|
+
*
|
|
2483
|
+
* // Do the magic
|
|
2484
|
+
* const res = await tpu.projects.locations.nodes.getGuestAttributes({
|
|
2485
|
+
* // Required. The resource name.
|
|
2486
|
+
* name: 'projects/my-project/locations/my-location/nodes/my-node',
|
|
2487
|
+
*
|
|
2488
|
+
* // Request body metadata
|
|
2489
|
+
* requestBody: {
|
|
2490
|
+
* // request body parameters
|
|
2491
|
+
* // {
|
|
2492
|
+
* // "queryPath": "my_queryPath",
|
|
2493
|
+
* // "workerIds": []
|
|
2494
|
+
* // }
|
|
2495
|
+
* },
|
|
2496
|
+
* });
|
|
2497
|
+
* console.log(res.data);
|
|
2498
|
+
*
|
|
2499
|
+
* // Example response
|
|
2500
|
+
* // {
|
|
2501
|
+
* // "guestAttributes": []
|
|
2502
|
+
* // }
|
|
2503
|
+
* }
|
|
2504
|
+
*
|
|
2505
|
+
* main().catch(e => {
|
|
2506
|
+
* console.error(e);
|
|
2507
|
+
* throw e;
|
|
2508
|
+
* });
|
|
2509
|
+
*
|
|
2510
|
+
* ```
|
|
1977
2511
|
*
|
|
1978
2512
|
* @param params - Parameters for request
|
|
1979
2513
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2070,6 +2604,58 @@ export namespace tpu_v2alpha1 {
|
|
|
2070
2604
|
|
|
2071
2605
|
/**
|
|
2072
2606
|
* Lists nodes.
|
|
2607
|
+
* @example
|
|
2608
|
+
* ```js
|
|
2609
|
+
* // Before running the sample:
|
|
2610
|
+
* // - Enable the API at:
|
|
2611
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
2612
|
+
* // - Login into gcloud by running:
|
|
2613
|
+
* // ```sh
|
|
2614
|
+
* // $ gcloud auth application-default login
|
|
2615
|
+
* // ```
|
|
2616
|
+
* // - Install the npm module by running:
|
|
2617
|
+
* // ```sh
|
|
2618
|
+
* // $ npm install googleapis
|
|
2619
|
+
* // ```
|
|
2620
|
+
*
|
|
2621
|
+
* const {google} = require('googleapis');
|
|
2622
|
+
* const tpu = google.tpu('v2alpha1');
|
|
2623
|
+
*
|
|
2624
|
+
* async function main() {
|
|
2625
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2626
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2627
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2628
|
+
* });
|
|
2629
|
+
*
|
|
2630
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2631
|
+
* const authClient = await auth.getClient();
|
|
2632
|
+
* google.options({auth: authClient});
|
|
2633
|
+
*
|
|
2634
|
+
* // Do the magic
|
|
2635
|
+
* const res = await tpu.projects.locations.nodes.list({
|
|
2636
|
+
* // The maximum number of items to return.
|
|
2637
|
+
* pageSize: 'placeholder-value',
|
|
2638
|
+
* // The next_page_token value returned from a previous List request, if any.
|
|
2639
|
+
* pageToken: 'placeholder-value',
|
|
2640
|
+
* // Required. The parent resource name.
|
|
2641
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
2642
|
+
* });
|
|
2643
|
+
* console.log(res.data);
|
|
2644
|
+
*
|
|
2645
|
+
* // Example response
|
|
2646
|
+
* // {
|
|
2647
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
2648
|
+
* // "nodes": [],
|
|
2649
|
+
* // "unreachable": []
|
|
2650
|
+
* // }
|
|
2651
|
+
* }
|
|
2652
|
+
*
|
|
2653
|
+
* main().catch(e => {
|
|
2654
|
+
* console.error(e);
|
|
2655
|
+
* throw e;
|
|
2656
|
+
* });
|
|
2657
|
+
*
|
|
2658
|
+
* ```
|
|
2073
2659
|
*
|
|
2074
2660
|
* @param params - Parameters for request
|
|
2075
2661
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2161,6 +2747,93 @@ export namespace tpu_v2alpha1 {
|
|
|
2161
2747
|
|
|
2162
2748
|
/**
|
|
2163
2749
|
* Updates the configurations of a node.
|
|
2750
|
+
* @example
|
|
2751
|
+
* ```js
|
|
2752
|
+
* // Before running the sample:
|
|
2753
|
+
* // - Enable the API at:
|
|
2754
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
2755
|
+
* // - Login into gcloud by running:
|
|
2756
|
+
* // ```sh
|
|
2757
|
+
* // $ gcloud auth application-default login
|
|
2758
|
+
* // ```
|
|
2759
|
+
* // - Install the npm module by running:
|
|
2760
|
+
* // ```sh
|
|
2761
|
+
* // $ npm install googleapis
|
|
2762
|
+
* // ```
|
|
2763
|
+
*
|
|
2764
|
+
* const {google} = require('googleapis');
|
|
2765
|
+
* const tpu = google.tpu('v2alpha1');
|
|
2766
|
+
*
|
|
2767
|
+
* async function main() {
|
|
2768
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2769
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2770
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2771
|
+
* });
|
|
2772
|
+
*
|
|
2773
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2774
|
+
* const authClient = await auth.getClient();
|
|
2775
|
+
* google.options({auth: authClient});
|
|
2776
|
+
*
|
|
2777
|
+
* // Do the magic
|
|
2778
|
+
* const res = await tpu.projects.locations.nodes.patch({
|
|
2779
|
+
* // Output only. Immutable. The name of the TPU.
|
|
2780
|
+
* name: 'projects/my-project/locations/my-location/nodes/my-node',
|
|
2781
|
+
* // Required. Mask of fields from Node to update. Supported fields: [description, tags, labels, metadata, network_config.enable_external_ips].
|
|
2782
|
+
* updateMask: 'placeholder-value',
|
|
2783
|
+
*
|
|
2784
|
+
* // Request body metadata
|
|
2785
|
+
* requestBody: {
|
|
2786
|
+
* // request body parameters
|
|
2787
|
+
* // {
|
|
2788
|
+
* // "acceleratorConfig": {},
|
|
2789
|
+
* // "acceleratorType": "my_acceleratorType",
|
|
2790
|
+
* // "apiVersion": "my_apiVersion",
|
|
2791
|
+
* // "autocheckpointEnabled": false,
|
|
2792
|
+
* // "bootDiskConfig": {},
|
|
2793
|
+
* // "cidrBlock": "my_cidrBlock",
|
|
2794
|
+
* // "createTime": "my_createTime",
|
|
2795
|
+
* // "dataDisks": [],
|
|
2796
|
+
* // "description": "my_description",
|
|
2797
|
+
* // "health": "my_health",
|
|
2798
|
+
* // "healthDescription": "my_healthDescription",
|
|
2799
|
+
* // "id": "my_id",
|
|
2800
|
+
* // "labels": {},
|
|
2801
|
+
* // "metadata": {},
|
|
2802
|
+
* // "multisliceNode": false,
|
|
2803
|
+
* // "name": "my_name",
|
|
2804
|
+
* // "networkConfig": {},
|
|
2805
|
+
* // "networkConfigs": [],
|
|
2806
|
+
* // "networkEndpoints": [],
|
|
2807
|
+
* // "queuedResource": "my_queuedResource",
|
|
2808
|
+
* // "runtimeVersion": "my_runtimeVersion",
|
|
2809
|
+
* // "schedulingConfig": {},
|
|
2810
|
+
* // "serviceAccount": {},
|
|
2811
|
+
* // "shieldedInstanceConfig": {},
|
|
2812
|
+
* // "state": "my_state",
|
|
2813
|
+
* // "symptoms": [],
|
|
2814
|
+
* // "tags": [],
|
|
2815
|
+
* // "upcomingMaintenance": {}
|
|
2816
|
+
* // }
|
|
2817
|
+
* },
|
|
2818
|
+
* });
|
|
2819
|
+
* console.log(res.data);
|
|
2820
|
+
*
|
|
2821
|
+
* // Example response
|
|
2822
|
+
* // {
|
|
2823
|
+
* // "done": false,
|
|
2824
|
+
* // "error": {},
|
|
2825
|
+
* // "metadata": {},
|
|
2826
|
+
* // "name": "my_name",
|
|
2827
|
+
* // "response": {}
|
|
2828
|
+
* // }
|
|
2829
|
+
* }
|
|
2830
|
+
*
|
|
2831
|
+
* main().catch(e => {
|
|
2832
|
+
* console.error(e);
|
|
2833
|
+
* throw e;
|
|
2834
|
+
* });
|
|
2835
|
+
*
|
|
2836
|
+
* ```
|
|
2164
2837
|
*
|
|
2165
2838
|
* @param params - Parameters for request
|
|
2166
2839
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2249,6 +2922,62 @@ export namespace tpu_v2alpha1 {
|
|
|
2249
2922
|
|
|
2250
2923
|
/**
|
|
2251
2924
|
* Perform manual maintenance on a node.
|
|
2925
|
+
* @example
|
|
2926
|
+
* ```js
|
|
2927
|
+
* // Before running the sample:
|
|
2928
|
+
* // - Enable the API at:
|
|
2929
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
2930
|
+
* // - Login into gcloud by running:
|
|
2931
|
+
* // ```sh
|
|
2932
|
+
* // $ gcloud auth application-default login
|
|
2933
|
+
* // ```
|
|
2934
|
+
* // - Install the npm module by running:
|
|
2935
|
+
* // ```sh
|
|
2936
|
+
* // $ npm install googleapis
|
|
2937
|
+
* // ```
|
|
2938
|
+
*
|
|
2939
|
+
* const {google} = require('googleapis');
|
|
2940
|
+
* const tpu = google.tpu('v2alpha1');
|
|
2941
|
+
*
|
|
2942
|
+
* async function main() {
|
|
2943
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2944
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2945
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2946
|
+
* });
|
|
2947
|
+
*
|
|
2948
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2949
|
+
* const authClient = await auth.getClient();
|
|
2950
|
+
* google.options({auth: authClient});
|
|
2951
|
+
*
|
|
2952
|
+
* // Do the magic
|
|
2953
|
+
* const res = await tpu.projects.locations.nodes.performMaintenance({
|
|
2954
|
+
* // Required. The resource name.
|
|
2955
|
+
* name: 'projects/my-project/locations/my-location/nodes/my-node',
|
|
2956
|
+
*
|
|
2957
|
+
* // Request body metadata
|
|
2958
|
+
* requestBody: {
|
|
2959
|
+
* // request body parameters
|
|
2960
|
+
* // {}
|
|
2961
|
+
* },
|
|
2962
|
+
* });
|
|
2963
|
+
* console.log(res.data);
|
|
2964
|
+
*
|
|
2965
|
+
* // Example response
|
|
2966
|
+
* // {
|
|
2967
|
+
* // "done": false,
|
|
2968
|
+
* // "error": {},
|
|
2969
|
+
* // "metadata": {},
|
|
2970
|
+
* // "name": "my_name",
|
|
2971
|
+
* // "response": {}
|
|
2972
|
+
* // }
|
|
2973
|
+
* }
|
|
2974
|
+
*
|
|
2975
|
+
* main().catch(e => {
|
|
2976
|
+
* console.error(e);
|
|
2977
|
+
* throw e;
|
|
2978
|
+
* });
|
|
2979
|
+
*
|
|
2980
|
+
* ```
|
|
2252
2981
|
*
|
|
2253
2982
|
* @param params - Parameters for request
|
|
2254
2983
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2341,6 +3070,64 @@ export namespace tpu_v2alpha1 {
|
|
|
2341
3070
|
|
|
2342
3071
|
/**
|
|
2343
3072
|
* Simulates a maintenance event.
|
|
3073
|
+
* @example
|
|
3074
|
+
* ```js
|
|
3075
|
+
* // Before running the sample:
|
|
3076
|
+
* // - Enable the API at:
|
|
3077
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
3078
|
+
* // - Login into gcloud by running:
|
|
3079
|
+
* // ```sh
|
|
3080
|
+
* // $ gcloud auth application-default login
|
|
3081
|
+
* // ```
|
|
3082
|
+
* // - Install the npm module by running:
|
|
3083
|
+
* // ```sh
|
|
3084
|
+
* // $ npm install googleapis
|
|
3085
|
+
* // ```
|
|
3086
|
+
*
|
|
3087
|
+
* const {google} = require('googleapis');
|
|
3088
|
+
* const tpu = google.tpu('v2alpha1');
|
|
3089
|
+
*
|
|
3090
|
+
* async function main() {
|
|
3091
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3092
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3093
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3094
|
+
* });
|
|
3095
|
+
*
|
|
3096
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3097
|
+
* const authClient = await auth.getClient();
|
|
3098
|
+
* google.options({auth: authClient});
|
|
3099
|
+
*
|
|
3100
|
+
* // Do the magic
|
|
3101
|
+
* const res = await tpu.projects.locations.nodes.simulateMaintenanceEvent({
|
|
3102
|
+
* // Required. The resource name.
|
|
3103
|
+
* name: 'projects/my-project/locations/my-location/nodes/my-node',
|
|
3104
|
+
*
|
|
3105
|
+
* // Request body metadata
|
|
3106
|
+
* requestBody: {
|
|
3107
|
+
* // request body parameters
|
|
3108
|
+
* // {
|
|
3109
|
+
* // "workerIds": []
|
|
3110
|
+
* // }
|
|
3111
|
+
* },
|
|
3112
|
+
* });
|
|
3113
|
+
* console.log(res.data);
|
|
3114
|
+
*
|
|
3115
|
+
* // Example response
|
|
3116
|
+
* // {
|
|
3117
|
+
* // "done": false,
|
|
3118
|
+
* // "error": {},
|
|
3119
|
+
* // "metadata": {},
|
|
3120
|
+
* // "name": "my_name",
|
|
3121
|
+
* // "response": {}
|
|
3122
|
+
* // }
|
|
3123
|
+
* }
|
|
3124
|
+
*
|
|
3125
|
+
* main().catch(e => {
|
|
3126
|
+
* console.error(e);
|
|
3127
|
+
* throw e;
|
|
3128
|
+
* });
|
|
3129
|
+
*
|
|
3130
|
+
* ```
|
|
2344
3131
|
*
|
|
2345
3132
|
* @param params - Parameters for request
|
|
2346
3133
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2434,6 +3221,62 @@ export namespace tpu_v2alpha1 {
|
|
|
2434
3221
|
|
|
2435
3222
|
/**
|
|
2436
3223
|
* Starts a node.
|
|
3224
|
+
* @example
|
|
3225
|
+
* ```js
|
|
3226
|
+
* // Before running the sample:
|
|
3227
|
+
* // - Enable the API at:
|
|
3228
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
3229
|
+
* // - Login into gcloud by running:
|
|
3230
|
+
* // ```sh
|
|
3231
|
+
* // $ gcloud auth application-default login
|
|
3232
|
+
* // ```
|
|
3233
|
+
* // - Install the npm module by running:
|
|
3234
|
+
* // ```sh
|
|
3235
|
+
* // $ npm install googleapis
|
|
3236
|
+
* // ```
|
|
3237
|
+
*
|
|
3238
|
+
* const {google} = require('googleapis');
|
|
3239
|
+
* const tpu = google.tpu('v2alpha1');
|
|
3240
|
+
*
|
|
3241
|
+
* async function main() {
|
|
3242
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3243
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3244
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3245
|
+
* });
|
|
3246
|
+
*
|
|
3247
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3248
|
+
* const authClient = await auth.getClient();
|
|
3249
|
+
* google.options({auth: authClient});
|
|
3250
|
+
*
|
|
3251
|
+
* // Do the magic
|
|
3252
|
+
* const res = await tpu.projects.locations.nodes.start({
|
|
3253
|
+
* // Required. The resource name.
|
|
3254
|
+
* name: 'projects/my-project/locations/my-location/nodes/my-node',
|
|
3255
|
+
*
|
|
3256
|
+
* // Request body metadata
|
|
3257
|
+
* requestBody: {
|
|
3258
|
+
* // request body parameters
|
|
3259
|
+
* // {}
|
|
3260
|
+
* },
|
|
3261
|
+
* });
|
|
3262
|
+
* console.log(res.data);
|
|
3263
|
+
*
|
|
3264
|
+
* // Example response
|
|
3265
|
+
* // {
|
|
3266
|
+
* // "done": false,
|
|
3267
|
+
* // "error": {},
|
|
3268
|
+
* // "metadata": {},
|
|
3269
|
+
* // "name": "my_name",
|
|
3270
|
+
* // "response": {}
|
|
3271
|
+
* // }
|
|
3272
|
+
* }
|
|
3273
|
+
*
|
|
3274
|
+
* main().catch(e => {
|
|
3275
|
+
* console.error(e);
|
|
3276
|
+
* throw e;
|
|
3277
|
+
* });
|
|
3278
|
+
*
|
|
3279
|
+
* ```
|
|
2437
3280
|
*
|
|
2438
3281
|
* @param params - Parameters for request
|
|
2439
3282
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2525,6 +3368,62 @@ export namespace tpu_v2alpha1 {
|
|
|
2525
3368
|
|
|
2526
3369
|
/**
|
|
2527
3370
|
* Stops a node. This operation is only available with single TPU nodes.
|
|
3371
|
+
* @example
|
|
3372
|
+
* ```js
|
|
3373
|
+
* // Before running the sample:
|
|
3374
|
+
* // - Enable the API at:
|
|
3375
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
3376
|
+
* // - Login into gcloud by running:
|
|
3377
|
+
* // ```sh
|
|
3378
|
+
* // $ gcloud auth application-default login
|
|
3379
|
+
* // ```
|
|
3380
|
+
* // - Install the npm module by running:
|
|
3381
|
+
* // ```sh
|
|
3382
|
+
* // $ npm install googleapis
|
|
3383
|
+
* // ```
|
|
3384
|
+
*
|
|
3385
|
+
* const {google} = require('googleapis');
|
|
3386
|
+
* const tpu = google.tpu('v2alpha1');
|
|
3387
|
+
*
|
|
3388
|
+
* async function main() {
|
|
3389
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3390
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3391
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3392
|
+
* });
|
|
3393
|
+
*
|
|
3394
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3395
|
+
* const authClient = await auth.getClient();
|
|
3396
|
+
* google.options({auth: authClient});
|
|
3397
|
+
*
|
|
3398
|
+
* // Do the magic
|
|
3399
|
+
* const res = await tpu.projects.locations.nodes.stop({
|
|
3400
|
+
* // Required. The resource name.
|
|
3401
|
+
* name: 'projects/my-project/locations/my-location/nodes/my-node',
|
|
3402
|
+
*
|
|
3403
|
+
* // Request body metadata
|
|
3404
|
+
* requestBody: {
|
|
3405
|
+
* // request body parameters
|
|
3406
|
+
* // {}
|
|
3407
|
+
* },
|
|
3408
|
+
* });
|
|
3409
|
+
* console.log(res.data);
|
|
3410
|
+
*
|
|
3411
|
+
* // Example response
|
|
3412
|
+
* // {
|
|
3413
|
+
* // "done": false,
|
|
3414
|
+
* // "error": {},
|
|
3415
|
+
* // "metadata": {},
|
|
3416
|
+
* // "name": "my_name",
|
|
3417
|
+
* // "response": {}
|
|
3418
|
+
* // }
|
|
3419
|
+
* }
|
|
3420
|
+
*
|
|
3421
|
+
* main().catch(e => {
|
|
3422
|
+
* console.error(e);
|
|
3423
|
+
* throw e;
|
|
3424
|
+
* });
|
|
3425
|
+
*
|
|
3426
|
+
* ```
|
|
2528
3427
|
*
|
|
2529
3428
|
* @param params - Parameters for request
|
|
2530
3429
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2753,6 +3652,50 @@ export namespace tpu_v2alpha1 {
|
|
|
2753
3652
|
|
|
2754
3653
|
/**
|
|
2755
3654
|
* 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`.
|
|
3655
|
+
* @example
|
|
3656
|
+
* ```js
|
|
3657
|
+
* // Before running the sample:
|
|
3658
|
+
* // - Enable the API at:
|
|
3659
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
3660
|
+
* // - Login into gcloud by running:
|
|
3661
|
+
* // ```sh
|
|
3662
|
+
* // $ gcloud auth application-default login
|
|
3663
|
+
* // ```
|
|
3664
|
+
* // - Install the npm module by running:
|
|
3665
|
+
* // ```sh
|
|
3666
|
+
* // $ npm install googleapis
|
|
3667
|
+
* // ```
|
|
3668
|
+
*
|
|
3669
|
+
* const {google} = require('googleapis');
|
|
3670
|
+
* const tpu = google.tpu('v2alpha1');
|
|
3671
|
+
*
|
|
3672
|
+
* async function main() {
|
|
3673
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3674
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3675
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3676
|
+
* });
|
|
3677
|
+
*
|
|
3678
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3679
|
+
* const authClient = await auth.getClient();
|
|
3680
|
+
* google.options({auth: authClient});
|
|
3681
|
+
*
|
|
3682
|
+
* // Do the magic
|
|
3683
|
+
* const res = await tpu.projects.locations.operations.cancel({
|
|
3684
|
+
* // The name of the operation resource to be cancelled.
|
|
3685
|
+
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
3686
|
+
* });
|
|
3687
|
+
* console.log(res.data);
|
|
3688
|
+
*
|
|
3689
|
+
* // Example response
|
|
3690
|
+
* // {}
|
|
3691
|
+
* }
|
|
3692
|
+
*
|
|
3693
|
+
* main().catch(e => {
|
|
3694
|
+
* console.error(e);
|
|
3695
|
+
* throw e;
|
|
3696
|
+
* });
|
|
3697
|
+
*
|
|
3698
|
+
* ```
|
|
2756
3699
|
*
|
|
2757
3700
|
* @param params - Parameters for request
|
|
2758
3701
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2844,6 +3787,50 @@ export namespace tpu_v2alpha1 {
|
|
|
2844
3787
|
|
|
2845
3788
|
/**
|
|
2846
3789
|
* 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`.
|
|
3790
|
+
* @example
|
|
3791
|
+
* ```js
|
|
3792
|
+
* // Before running the sample:
|
|
3793
|
+
* // - Enable the API at:
|
|
3794
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
3795
|
+
* // - Login into gcloud by running:
|
|
3796
|
+
* // ```sh
|
|
3797
|
+
* // $ gcloud auth application-default login
|
|
3798
|
+
* // ```
|
|
3799
|
+
* // - Install the npm module by running:
|
|
3800
|
+
* // ```sh
|
|
3801
|
+
* // $ npm install googleapis
|
|
3802
|
+
* // ```
|
|
3803
|
+
*
|
|
3804
|
+
* const {google} = require('googleapis');
|
|
3805
|
+
* const tpu = google.tpu('v2alpha1');
|
|
3806
|
+
*
|
|
3807
|
+
* async function main() {
|
|
3808
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3809
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3810
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3811
|
+
* });
|
|
3812
|
+
*
|
|
3813
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3814
|
+
* const authClient = await auth.getClient();
|
|
3815
|
+
* google.options({auth: authClient});
|
|
3816
|
+
*
|
|
3817
|
+
* // Do the magic
|
|
3818
|
+
* const res = await tpu.projects.locations.operations.delete({
|
|
3819
|
+
* // The name of the operation resource to be deleted.
|
|
3820
|
+
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
3821
|
+
* });
|
|
3822
|
+
* console.log(res.data);
|
|
3823
|
+
*
|
|
3824
|
+
* // Example response
|
|
3825
|
+
* // {}
|
|
3826
|
+
* }
|
|
3827
|
+
*
|
|
3828
|
+
* main().catch(e => {
|
|
3829
|
+
* console.error(e);
|
|
3830
|
+
* throw e;
|
|
3831
|
+
* });
|
|
3832
|
+
*
|
|
3833
|
+
* ```
|
|
2847
3834
|
*
|
|
2848
3835
|
* @param params - Parameters for request
|
|
2849
3836
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2932,6 +3919,56 @@ export namespace tpu_v2alpha1 {
|
|
|
2932
3919
|
|
|
2933
3920
|
/**
|
|
2934
3921
|
* 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.
|
|
3922
|
+
* @example
|
|
3923
|
+
* ```js
|
|
3924
|
+
* // Before running the sample:
|
|
3925
|
+
* // - Enable the API at:
|
|
3926
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
3927
|
+
* // - Login into gcloud by running:
|
|
3928
|
+
* // ```sh
|
|
3929
|
+
* // $ gcloud auth application-default login
|
|
3930
|
+
* // ```
|
|
3931
|
+
* // - Install the npm module by running:
|
|
3932
|
+
* // ```sh
|
|
3933
|
+
* // $ npm install googleapis
|
|
3934
|
+
* // ```
|
|
3935
|
+
*
|
|
3936
|
+
* const {google} = require('googleapis');
|
|
3937
|
+
* const tpu = google.tpu('v2alpha1');
|
|
3938
|
+
*
|
|
3939
|
+
* async function main() {
|
|
3940
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3941
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3942
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3943
|
+
* });
|
|
3944
|
+
*
|
|
3945
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3946
|
+
* const authClient = await auth.getClient();
|
|
3947
|
+
* google.options({auth: authClient});
|
|
3948
|
+
*
|
|
3949
|
+
* // Do the magic
|
|
3950
|
+
* const res = await tpu.projects.locations.operations.get({
|
|
3951
|
+
* // The name of the operation resource.
|
|
3952
|
+
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
3953
|
+
* });
|
|
3954
|
+
* console.log(res.data);
|
|
3955
|
+
*
|
|
3956
|
+
* // Example response
|
|
3957
|
+
* // {
|
|
3958
|
+
* // "done": false,
|
|
3959
|
+
* // "error": {},
|
|
3960
|
+
* // "metadata": {},
|
|
3961
|
+
* // "name": "my_name",
|
|
3962
|
+
* // "response": {}
|
|
3963
|
+
* // }
|
|
3964
|
+
* }
|
|
3965
|
+
*
|
|
3966
|
+
* main().catch(e => {
|
|
3967
|
+
* console.error(e);
|
|
3968
|
+
* throw e;
|
|
3969
|
+
* });
|
|
3970
|
+
*
|
|
3971
|
+
* ```
|
|
2935
3972
|
*
|
|
2936
3973
|
* @param params - Parameters for request
|
|
2937
3974
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3020,6 +4057,59 @@ export namespace tpu_v2alpha1 {
|
|
|
3020
4057
|
|
|
3021
4058
|
/**
|
|
3022
4059
|
* Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
|
|
4060
|
+
* @example
|
|
4061
|
+
* ```js
|
|
4062
|
+
* // Before running the sample:
|
|
4063
|
+
* // - Enable the API at:
|
|
4064
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
4065
|
+
* // - Login into gcloud by running:
|
|
4066
|
+
* // ```sh
|
|
4067
|
+
* // $ gcloud auth application-default login
|
|
4068
|
+
* // ```
|
|
4069
|
+
* // - Install the npm module by running:
|
|
4070
|
+
* // ```sh
|
|
4071
|
+
* // $ npm install googleapis
|
|
4072
|
+
* // ```
|
|
4073
|
+
*
|
|
4074
|
+
* const {google} = require('googleapis');
|
|
4075
|
+
* const tpu = google.tpu('v2alpha1');
|
|
4076
|
+
*
|
|
4077
|
+
* async function main() {
|
|
4078
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4079
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4080
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4081
|
+
* });
|
|
4082
|
+
*
|
|
4083
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4084
|
+
* const authClient = await auth.getClient();
|
|
4085
|
+
* google.options({auth: authClient});
|
|
4086
|
+
*
|
|
4087
|
+
* // Do the magic
|
|
4088
|
+
* const res = await tpu.projects.locations.operations.list({
|
|
4089
|
+
* // The standard list filter.
|
|
4090
|
+
* filter: 'placeholder-value',
|
|
4091
|
+
* // The name of the operation's parent resource.
|
|
4092
|
+
* name: 'projects/my-project/locations/my-location',
|
|
4093
|
+
* // The standard list page size.
|
|
4094
|
+
* pageSize: 'placeholder-value',
|
|
4095
|
+
* // The standard list page token.
|
|
4096
|
+
* pageToken: 'placeholder-value',
|
|
4097
|
+
* });
|
|
4098
|
+
* console.log(res.data);
|
|
4099
|
+
*
|
|
4100
|
+
* // Example response
|
|
4101
|
+
* // {
|
|
4102
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
4103
|
+
* // "operations": []
|
|
4104
|
+
* // }
|
|
4105
|
+
* }
|
|
4106
|
+
*
|
|
4107
|
+
* main().catch(e => {
|
|
4108
|
+
* console.error(e);
|
|
4109
|
+
* throw e;
|
|
4110
|
+
* });
|
|
4111
|
+
*
|
|
4112
|
+
* ```
|
|
3023
4113
|
*
|
|
3024
4114
|
* @param params - Parameters for request
|
|
3025
4115
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3161,6 +4251,78 @@ export namespace tpu_v2alpha1 {
|
|
|
3161
4251
|
|
|
3162
4252
|
/**
|
|
3163
4253
|
* Creates a QueuedResource TPU instance.
|
|
4254
|
+
* @example
|
|
4255
|
+
* ```js
|
|
4256
|
+
* // Before running the sample:
|
|
4257
|
+
* // - Enable the API at:
|
|
4258
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
4259
|
+
* // - Login into gcloud by running:
|
|
4260
|
+
* // ```sh
|
|
4261
|
+
* // $ gcloud auth application-default login
|
|
4262
|
+
* // ```
|
|
4263
|
+
* // - Install the npm module by running:
|
|
4264
|
+
* // ```sh
|
|
4265
|
+
* // $ npm install googleapis
|
|
4266
|
+
* // ```
|
|
4267
|
+
*
|
|
4268
|
+
* const {google} = require('googleapis');
|
|
4269
|
+
* const tpu = google.tpu('v2alpha1');
|
|
4270
|
+
*
|
|
4271
|
+
* async function main() {
|
|
4272
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4273
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4274
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4275
|
+
* });
|
|
4276
|
+
*
|
|
4277
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4278
|
+
* const authClient = await auth.getClient();
|
|
4279
|
+
* google.options({auth: authClient});
|
|
4280
|
+
*
|
|
4281
|
+
* // Do the magic
|
|
4282
|
+
* const res = await tpu.projects.locations.queuedResources.create({
|
|
4283
|
+
* // Required. The parent resource name.
|
|
4284
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
4285
|
+
* // The unqualified resource name. Should follow the `^[A-Za-z0-9_.~+%-]+$` regex format.
|
|
4286
|
+
* queuedResourceId: 'placeholder-value',
|
|
4287
|
+
* // Idempotent request UUID.
|
|
4288
|
+
* requestId: 'placeholder-value',
|
|
4289
|
+
*
|
|
4290
|
+
* // Request body metadata
|
|
4291
|
+
* requestBody: {
|
|
4292
|
+
* // request body parameters
|
|
4293
|
+
* // {
|
|
4294
|
+
* // "bestEffort": {},
|
|
4295
|
+
* // "createTime": "my_createTime",
|
|
4296
|
+
* // "guaranteed": {},
|
|
4297
|
+
* // "name": "my_name",
|
|
4298
|
+
* // "provisioningModel": "my_provisioningModel",
|
|
4299
|
+
* // "queueingPolicy": {},
|
|
4300
|
+
* // "reservationName": "my_reservationName",
|
|
4301
|
+
* // "runDuration": {},
|
|
4302
|
+
* // "spot": {},
|
|
4303
|
+
* // "state": {},
|
|
4304
|
+
* // "tpu": {}
|
|
4305
|
+
* // }
|
|
4306
|
+
* },
|
|
4307
|
+
* });
|
|
4308
|
+
* console.log(res.data);
|
|
4309
|
+
*
|
|
4310
|
+
* // Example response
|
|
4311
|
+
* // {
|
|
4312
|
+
* // "done": false,
|
|
4313
|
+
* // "error": {},
|
|
4314
|
+
* // "metadata": {},
|
|
4315
|
+
* // "name": "my_name",
|
|
4316
|
+
* // "response": {}
|
|
4317
|
+
* // }
|
|
4318
|
+
* }
|
|
4319
|
+
*
|
|
4320
|
+
* main().catch(e => {
|
|
4321
|
+
* console.error(e);
|
|
4322
|
+
* throw e;
|
|
4323
|
+
* });
|
|
4324
|
+
*
|
|
4325
|
+
* ```
|
|
3164
4326
|
*
|
|
3165
4327
|
* @param params - Parameters for request
|
|
3166
4328
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3253,6 +4415,60 @@ export namespace tpu_v2alpha1 {
|
|
|
3253
4415
|
|
|
3254
4416
|
/**
|
|
3255
4417
|
* Deletes a QueuedResource TPU instance.
|
|
4418
|
+
* @example
|
|
4419
|
+
* ```js
|
|
4420
|
+
* // Before running the sample:
|
|
4421
|
+
* // - Enable the API at:
|
|
4422
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
4423
|
+
* // - Login into gcloud by running:
|
|
4424
|
+
* // ```sh
|
|
4425
|
+
* // $ gcloud auth application-default login
|
|
4426
|
+
* // ```
|
|
4427
|
+
* // - Install the npm module by running:
|
|
4428
|
+
* // ```sh
|
|
4429
|
+
* // $ npm install googleapis
|
|
4430
|
+
* // ```
|
|
4431
|
+
*
|
|
4432
|
+
* const {google} = require('googleapis');
|
|
4433
|
+
* const tpu = google.tpu('v2alpha1');
|
|
4434
|
+
*
|
|
4435
|
+
* async function main() {
|
|
4436
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4437
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4438
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4439
|
+
* });
|
|
4440
|
+
*
|
|
4441
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4442
|
+
* const authClient = await auth.getClient();
|
|
4443
|
+
* google.options({auth: authClient});
|
|
4444
|
+
*
|
|
4445
|
+
* // Do the magic
|
|
4446
|
+
* const res = await tpu.projects.locations.queuedResources.delete({
|
|
4447
|
+
* // If set to true, all running nodes belonging to this queued resource will be deleted first and then the queued resource will be deleted. Otherwise (i.e. force=false), the queued resource will only be deleted if its nodes have already been deleted or the queued resource is in the ACCEPTED, FAILED, or SUSPENDED state.
|
|
4448
|
+
* force: 'placeholder-value',
|
|
4449
|
+
* // Required. The resource name.
|
|
4450
|
+
* name: 'projects/my-project/locations/my-location/queuedResources/my-queuedResource',
|
|
4451
|
+
* // Idempotent request UUID.
|
|
4452
|
+
* requestId: 'placeholder-value',
|
|
4453
|
+
* });
|
|
4454
|
+
* console.log(res.data);
|
|
4455
|
+
*
|
|
4456
|
+
* // Example response
|
|
4457
|
+
* // {
|
|
4458
|
+
* // "done": false,
|
|
4459
|
+
* // "error": {},
|
|
4460
|
+
* // "metadata": {},
|
|
4461
|
+
* // "name": "my_name",
|
|
4462
|
+
* // "response": {}
|
|
4463
|
+
* // }
|
|
4464
|
+
* }
|
|
4465
|
+
*
|
|
4466
|
+
* main().catch(e => {
|
|
4467
|
+
* console.error(e);
|
|
4468
|
+
* throw e;
|
|
4469
|
+
* });
|
|
4470
|
+
*
|
|
4471
|
+
* ```
|
|
3256
4472
|
*
|
|
3257
4473
|
* @param params - Parameters for request
|
|
3258
4474
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3342,6 +4558,62 @@ export namespace tpu_v2alpha1 {
|
|
|
3342
4558
|
|
|
3343
4559
|
/**
|
|
3344
4560
|
* Gets details of a queued resource.
|
|
4561
|
+
* @example
|
|
4562
|
+
* ```js
|
|
4563
|
+
* // Before running the sample:
|
|
4564
|
+
* // - Enable the API at:
|
|
4565
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
4566
|
+
* // - Login into gcloud by running:
|
|
4567
|
+
* // ```sh
|
|
4568
|
+
* // $ gcloud auth application-default login
|
|
4569
|
+
* // ```
|
|
4570
|
+
* // - Install the npm module by running:
|
|
4571
|
+
* // ```sh
|
|
4572
|
+
* // $ npm install googleapis
|
|
4573
|
+
* // ```
|
|
4574
|
+
*
|
|
4575
|
+
* const {google} = require('googleapis');
|
|
4576
|
+
* const tpu = google.tpu('v2alpha1');
|
|
4577
|
+
*
|
|
4578
|
+
* async function main() {
|
|
4579
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4580
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4581
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4582
|
+
* });
|
|
4583
|
+
*
|
|
4584
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4585
|
+
* const authClient = await auth.getClient();
|
|
4586
|
+
* google.options({auth: authClient});
|
|
4587
|
+
*
|
|
4588
|
+
* // Do the magic
|
|
4589
|
+
* const res = await tpu.projects.locations.queuedResources.get({
|
|
4590
|
+
* // Required. The resource name.
|
|
4591
|
+
* name: 'projects/my-project/locations/my-location/queuedResources/my-queuedResource',
|
|
4592
|
+
* });
|
|
4593
|
+
* console.log(res.data);
|
|
4594
|
+
*
|
|
4595
|
+
* // Example response
|
|
4596
|
+
* // {
|
|
4597
|
+
* // "bestEffort": {},
|
|
4598
|
+
* // "createTime": "my_createTime",
|
|
4599
|
+
* // "guaranteed": {},
|
|
4600
|
+
* // "name": "my_name",
|
|
4601
|
+
* // "provisioningModel": "my_provisioningModel",
|
|
4602
|
+
* // "queueingPolicy": {},
|
|
4603
|
+
* // "reservationName": "my_reservationName",
|
|
4604
|
+
* // "runDuration": {},
|
|
4605
|
+
* // "spot": {},
|
|
4606
|
+
* // "state": {},
|
|
4607
|
+
* // "tpu": {}
|
|
4608
|
+
* // }
|
|
4609
|
+
* }
|
|
4610
|
+
*
|
|
4611
|
+
* main().catch(e => {
|
|
4612
|
+
* console.error(e);
|
|
4613
|
+
* throw e;
|
|
4614
|
+
* });
|
|
4615
|
+
*
|
|
4616
|
+
* ```
|
|
3345
4617
|
*
|
|
3346
4618
|
* @param params - Parameters for request
|
|
3347
4619
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3430,6 +4702,58 @@ export namespace tpu_v2alpha1 {
|
|
|
3430
4702
|
|
|
3431
4703
|
/**
|
|
3432
4704
|
* Lists queued resources.
|
|
4705
|
+
* @example
|
|
4706
|
+
* ```js
|
|
4707
|
+
* // Before running the sample:
|
|
4708
|
+
* // - Enable the API at:
|
|
4709
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
4710
|
+
* // - Login into gcloud by running:
|
|
4711
|
+
* // ```sh
|
|
4712
|
+
* // $ gcloud auth application-default login
|
|
4713
|
+
* // ```
|
|
4714
|
+
* // - Install the npm module by running:
|
|
4715
|
+
* // ```sh
|
|
4716
|
+
* // $ npm install googleapis
|
|
4717
|
+
* // ```
|
|
4718
|
+
*
|
|
4719
|
+
* const {google} = require('googleapis');
|
|
4720
|
+
* const tpu = google.tpu('v2alpha1');
|
|
4721
|
+
*
|
|
4722
|
+
* async function main() {
|
|
4723
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4724
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4725
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4726
|
+
* });
|
|
4727
|
+
*
|
|
4728
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4729
|
+
* const authClient = await auth.getClient();
|
|
4730
|
+
* google.options({auth: authClient});
|
|
4731
|
+
*
|
|
4732
|
+
* // Do the magic
|
|
4733
|
+
* const res = await tpu.projects.locations.queuedResources.list({
|
|
4734
|
+
* // The maximum number of items to return.
|
|
4735
|
+
* pageSize: 'placeholder-value',
|
|
4736
|
+
* // The next_page_token value returned from a previous List request, if any.
|
|
4737
|
+
* pageToken: 'placeholder-value',
|
|
4738
|
+
* // Required. The parent resource name.
|
|
4739
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
4740
|
+
* });
|
|
4741
|
+
* console.log(res.data);
|
|
4742
|
+
*
|
|
4743
|
+
* // Example response
|
|
4744
|
+
* // {
|
|
4745
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
4746
|
+
* // "queuedResources": [],
|
|
4747
|
+
* // "unreachable": []
|
|
4748
|
+
* // }
|
|
4749
|
+
* }
|
|
4750
|
+
*
|
|
4751
|
+
* main().catch(e => {
|
|
4752
|
+
* console.error(e);
|
|
4753
|
+
* throw e;
|
|
4754
|
+
* });
|
|
4755
|
+
*
|
|
4756
|
+
* ```
|
|
3433
4757
|
*
|
|
3434
4758
|
* @param params - Parameters for request
|
|
3435
4759
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3525,6 +4849,67 @@ export namespace tpu_v2alpha1 {
|
|
|
3525
4849
|
|
|
3526
4850
|
/**
|
|
3527
4851
|
* Perform manual maintenance on specific nodes of a QueuedResource.
|
|
4852
|
+
* @example
|
|
4853
|
+
* ```js
|
|
4854
|
+
* // Before running the sample:
|
|
4855
|
+
* // - Enable the API at:
|
|
4856
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
4857
|
+
* // - Login into gcloud by running:
|
|
4858
|
+
* // ```sh
|
|
4859
|
+
* // $ gcloud auth application-default login
|
|
4860
|
+
* // ```
|
|
4861
|
+
* // - Install the npm module by running:
|
|
4862
|
+
* // ```sh
|
|
4863
|
+
* // $ npm install googleapis
|
|
4864
|
+
* // ```
|
|
4865
|
+
*
|
|
4866
|
+
* const {google} = require('googleapis');
|
|
4867
|
+
* const tpu = google.tpu('v2alpha1');
|
|
4868
|
+
*
|
|
4869
|
+
* async function main() {
|
|
4870
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4871
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4872
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4873
|
+
* });
|
|
4874
|
+
*
|
|
4875
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4876
|
+
* const authClient = await auth.getClient();
|
|
4877
|
+
* google.options({auth: authClient});
|
|
4878
|
+
*
|
|
4879
|
+
* // Do the magic
|
|
4880
|
+
* const res =
|
|
4881
|
+
* await tpu.projects.locations.queuedResources.performMaintenanceQueuedResource(
|
|
4882
|
+
* {
|
|
4883
|
+
* // Required. The name of the QueuedResource which holds the nodes to perform maintenance on.
|
|
4884
|
+
* name: 'projects/my-project/locations/my-location/queuedResources/my-queuedResource',
|
|
4885
|
+
*
|
|
4886
|
+
* // Request body metadata
|
|
4887
|
+
* requestBody: {
|
|
4888
|
+
* // request body parameters
|
|
4889
|
+
* // {
|
|
4890
|
+
* // "nodeNames": []
|
|
4891
|
+
* // }
|
|
4892
|
+
* },
|
|
4893
|
+
* },
|
|
4894
|
+
* );
|
|
4895
|
+
* console.log(res.data);
|
|
4896
|
+
*
|
|
4897
|
+
* // Example response
|
|
4898
|
+
* // {
|
|
4899
|
+
* // "done": false,
|
|
4900
|
+
* // "error": {},
|
|
4901
|
+
* // "metadata": {},
|
|
4902
|
+
* // "name": "my_name",
|
|
4903
|
+
* // "response": {}
|
|
4904
|
+
* // }
|
|
4905
|
+
* }
|
|
4906
|
+
*
|
|
4907
|
+
* main().catch(e => {
|
|
4908
|
+
* console.error(e);
|
|
4909
|
+
* throw e;
|
|
4910
|
+
* });
|
|
4911
|
+
*
|
|
4912
|
+
* ```
|
|
3528
4913
|
*
|
|
3529
4914
|
* @param params - Parameters for request
|
|
3530
4915
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3618,6 +5003,62 @@ export namespace tpu_v2alpha1 {
|
|
|
3618
5003
|
|
|
3619
5004
|
/**
|
|
3620
5005
|
* Resets a QueuedResource TPU instance
|
|
5006
|
+
* @example
|
|
5007
|
+
* ```js
|
|
5008
|
+
* // Before running the sample:
|
|
5009
|
+
* // - Enable the API at:
|
|
5010
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
5011
|
+
* // - Login into gcloud by running:
|
|
5012
|
+
* // ```sh
|
|
5013
|
+
* // $ gcloud auth application-default login
|
|
5014
|
+
* // ```
|
|
5015
|
+
* // - Install the npm module by running:
|
|
5016
|
+
* // ```sh
|
|
5017
|
+
* // $ npm install googleapis
|
|
5018
|
+
* // ```
|
|
5019
|
+
*
|
|
5020
|
+
* const {google} = require('googleapis');
|
|
5021
|
+
* const tpu = google.tpu('v2alpha1');
|
|
5022
|
+
*
|
|
5023
|
+
* async function main() {
|
|
5024
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5025
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5026
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5027
|
+
* });
|
|
5028
|
+
*
|
|
5029
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5030
|
+
* const authClient = await auth.getClient();
|
|
5031
|
+
* google.options({auth: authClient});
|
|
5032
|
+
*
|
|
5033
|
+
* // Do the magic
|
|
5034
|
+
* const res = await tpu.projects.locations.queuedResources.reset({
|
|
5035
|
+
* // Required. The name of the queued resource.
|
|
5036
|
+
* name: 'projects/my-project/locations/my-location/queuedResources/my-queuedResource',
|
|
5037
|
+
*
|
|
5038
|
+
* // Request body metadata
|
|
5039
|
+
* requestBody: {
|
|
5040
|
+
* // request body parameters
|
|
5041
|
+
* // {}
|
|
5042
|
+
* },
|
|
5043
|
+
* });
|
|
5044
|
+
* console.log(res.data);
|
|
5045
|
+
*
|
|
5046
|
+
* // Example response
|
|
5047
|
+
* // {
|
|
5048
|
+
* // "done": false,
|
|
5049
|
+
* // "error": {},
|
|
5050
|
+
* // "metadata": {},
|
|
5051
|
+
* // "name": "my_name",
|
|
5052
|
+
* // "response": {}
|
|
5053
|
+
* // }
|
|
5054
|
+
* }
|
|
5055
|
+
*
|
|
5056
|
+
* main().catch(e => {
|
|
5057
|
+
* console.error(e);
|
|
5058
|
+
* throw e;
|
|
5059
|
+
* });
|
|
5060
|
+
*
|
|
5061
|
+
* ```
|
|
3621
5062
|
*
|
|
3622
5063
|
* @param params - Parameters for request
|
|
3623
5064
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3798,6 +5239,57 @@ export namespace tpu_v2alpha1 {
|
|
|
3798
5239
|
|
|
3799
5240
|
/**
|
|
3800
5241
|
* Retrieves the reservations for the given project in the given location.
|
|
5242
|
+
* @example
|
|
5243
|
+
* ```js
|
|
5244
|
+
* // Before running the sample:
|
|
5245
|
+
* // - Enable the API at:
|
|
5246
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
5247
|
+
* // - Login into gcloud by running:
|
|
5248
|
+
* // ```sh
|
|
5249
|
+
* // $ gcloud auth application-default login
|
|
5250
|
+
* // ```
|
|
5251
|
+
* // - Install the npm module by running:
|
|
5252
|
+
* // ```sh
|
|
5253
|
+
* // $ npm install googleapis
|
|
5254
|
+
* // ```
|
|
5255
|
+
*
|
|
5256
|
+
* const {google} = require('googleapis');
|
|
5257
|
+
* const tpu = google.tpu('v2alpha1');
|
|
5258
|
+
*
|
|
5259
|
+
* async function main() {
|
|
5260
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5261
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5262
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5263
|
+
* });
|
|
5264
|
+
*
|
|
5265
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5266
|
+
* const authClient = await auth.getClient();
|
|
5267
|
+
* google.options({auth: authClient});
|
|
5268
|
+
*
|
|
5269
|
+
* // Do the magic
|
|
5270
|
+
* const res = await tpu.projects.locations.reservations.list({
|
|
5271
|
+
* // The maximum number of items to return. Defaults to 0 if not specified, which means no limit.
|
|
5272
|
+
* pageSize: 'placeholder-value',
|
|
5273
|
+
* // The next_page_token value returned from a previous List request, if any.
|
|
5274
|
+
* pageToken: 'placeholder-value',
|
|
5275
|
+
* // Required. The parent for reservations.
|
|
5276
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
5277
|
+
* });
|
|
5278
|
+
* console.log(res.data);
|
|
5279
|
+
*
|
|
5280
|
+
* // Example response
|
|
5281
|
+
* // {
|
|
5282
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
5283
|
+
* // "reservations": []
|
|
5284
|
+
* // }
|
|
5285
|
+
* }
|
|
5286
|
+
*
|
|
5287
|
+
* main().catch(e => {
|
|
5288
|
+
* console.error(e);
|
|
5289
|
+
* throw e;
|
|
5290
|
+
* });
|
|
5291
|
+
*
|
|
5292
|
+
* ```
|
|
3801
5293
|
*
|
|
3802
5294
|
* @param params - Parameters for request
|
|
3803
5295
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3914,6 +5406,53 @@ export namespace tpu_v2alpha1 {
|
|
|
3914
5406
|
|
|
3915
5407
|
/**
|
|
3916
5408
|
* Gets a runtime version.
|
|
5409
|
+
* @example
|
|
5410
|
+
* ```js
|
|
5411
|
+
* // Before running the sample:
|
|
5412
|
+
* // - Enable the API at:
|
|
5413
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
5414
|
+
* // - Login into gcloud by running:
|
|
5415
|
+
* // ```sh
|
|
5416
|
+
* // $ gcloud auth application-default login
|
|
5417
|
+
* // ```
|
|
5418
|
+
* // - Install the npm module by running:
|
|
5419
|
+
* // ```sh
|
|
5420
|
+
* // $ npm install googleapis
|
|
5421
|
+
* // ```
|
|
5422
|
+
*
|
|
5423
|
+
* const {google} = require('googleapis');
|
|
5424
|
+
* const tpu = google.tpu('v2alpha1');
|
|
5425
|
+
*
|
|
5426
|
+
* async function main() {
|
|
5427
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5428
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5429
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5430
|
+
* });
|
|
5431
|
+
*
|
|
5432
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5433
|
+
* const authClient = await auth.getClient();
|
|
5434
|
+
* google.options({auth: authClient});
|
|
5435
|
+
*
|
|
5436
|
+
* // Do the magic
|
|
5437
|
+
* const res = await tpu.projects.locations.runtimeVersions.get({
|
|
5438
|
+
* // Required. The resource name.
|
|
5439
|
+
* name: 'projects/my-project/locations/my-location/runtimeVersions/my-runtimeVersion',
|
|
5440
|
+
* });
|
|
5441
|
+
* console.log(res.data);
|
|
5442
|
+
*
|
|
5443
|
+
* // Example response
|
|
5444
|
+
* // {
|
|
5445
|
+
* // "name": "my_name",
|
|
5446
|
+
* // "version": "my_version"
|
|
5447
|
+
* // }
|
|
5448
|
+
* }
|
|
5449
|
+
*
|
|
5450
|
+
* main().catch(e => {
|
|
5451
|
+
* console.error(e);
|
|
5452
|
+
* throw e;
|
|
5453
|
+
* });
|
|
5454
|
+
*
|
|
5455
|
+
* ```
|
|
3917
5456
|
*
|
|
3918
5457
|
* @param params - Parameters for request
|
|
3919
5458
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4002,6 +5541,62 @@ export namespace tpu_v2alpha1 {
|
|
|
4002
5541
|
|
|
4003
5542
|
/**
|
|
4004
5543
|
* Lists runtime versions supported by this API.
|
|
5544
|
+
* @example
|
|
5545
|
+
* ```js
|
|
5546
|
+
* // Before running the sample:
|
|
5547
|
+
* // - Enable the API at:
|
|
5548
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
5549
|
+
* // - Login into gcloud by running:
|
|
5550
|
+
* // ```sh
|
|
5551
|
+
* // $ gcloud auth application-default login
|
|
5552
|
+
* // ```
|
|
5553
|
+
* // - Install the npm module by running:
|
|
5554
|
+
* // ```sh
|
|
5555
|
+
* // $ npm install googleapis
|
|
5556
|
+
* // ```
|
|
5557
|
+
*
|
|
5558
|
+
* const {google} = require('googleapis');
|
|
5559
|
+
* const tpu = google.tpu('v2alpha1');
|
|
5560
|
+
*
|
|
5561
|
+
* async function main() {
|
|
5562
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5563
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5564
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5565
|
+
* });
|
|
5566
|
+
*
|
|
5567
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5568
|
+
* const authClient = await auth.getClient();
|
|
5569
|
+
* google.options({auth: authClient});
|
|
5570
|
+
*
|
|
5571
|
+
* // Do the magic
|
|
5572
|
+
* const res = await tpu.projects.locations.runtimeVersions.list({
|
|
5573
|
+
* // List filter.
|
|
5574
|
+
* filter: 'placeholder-value',
|
|
5575
|
+
* // Sort results.
|
|
5576
|
+
* orderBy: 'placeholder-value',
|
|
5577
|
+
* // The maximum number of items to return.
|
|
5578
|
+
* pageSize: 'placeholder-value',
|
|
5579
|
+
* // The next_page_token value returned from a previous List request, if any.
|
|
5580
|
+
* pageToken: 'placeholder-value',
|
|
5581
|
+
* // Required. The parent resource name.
|
|
5582
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
5583
|
+
* });
|
|
5584
|
+
* console.log(res.data);
|
|
5585
|
+
*
|
|
5586
|
+
* // Example response
|
|
5587
|
+
* // {
|
|
5588
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
5589
|
+
* // "runtimeVersions": [],
|
|
5590
|
+
* // "unreachable": []
|
|
5591
|
+
* // }
|
|
5592
|
+
* }
|
|
5593
|
+
*
|
|
5594
|
+
* main().catch(e => {
|
|
5595
|
+
* console.error(e);
|
|
5596
|
+
* throw e;
|
|
5597
|
+
* });
|
|
5598
|
+
*
|
|
5599
|
+
* ```
|
|
4005
5600
|
*
|
|
4006
5601
|
* @param params - Parameters for request
|
|
4007
5602
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|