@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/build/v2.d.ts
CHANGED
|
@@ -924,6 +924,58 @@ export declare namespace tpu_v2 {
|
|
|
924
924
|
constructor(context: APIRequestContext);
|
|
925
925
|
/**
|
|
926
926
|
* Generates the Cloud TPU service identity for the project.
|
|
927
|
+
* @example
|
|
928
|
+
* ```js
|
|
929
|
+
* // Before running the sample:
|
|
930
|
+
* // - Enable the API at:
|
|
931
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
932
|
+
* // - Login into gcloud by running:
|
|
933
|
+
* // ```sh
|
|
934
|
+
* // $ gcloud auth application-default login
|
|
935
|
+
* // ```
|
|
936
|
+
* // - Install the npm module by running:
|
|
937
|
+
* // ```sh
|
|
938
|
+
* // $ npm install googleapis
|
|
939
|
+
* // ```
|
|
940
|
+
*
|
|
941
|
+
* const {google} = require('googleapis');
|
|
942
|
+
* const tpu = google.tpu('v2');
|
|
943
|
+
*
|
|
944
|
+
* async function main() {
|
|
945
|
+
* const auth = new google.auth.GoogleAuth({
|
|
946
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
947
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
948
|
+
* });
|
|
949
|
+
*
|
|
950
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
951
|
+
* const authClient = await auth.getClient();
|
|
952
|
+
* google.options({auth: authClient});
|
|
953
|
+
*
|
|
954
|
+
* // Do the magic
|
|
955
|
+
* const res = await tpu.projects.locations.generateServiceIdentity({
|
|
956
|
+
* // Required. The parent resource name.
|
|
957
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
958
|
+
*
|
|
959
|
+
* // Request body metadata
|
|
960
|
+
* requestBody: {
|
|
961
|
+
* // request body parameters
|
|
962
|
+
* // {}
|
|
963
|
+
* },
|
|
964
|
+
* });
|
|
965
|
+
* console.log(res.data);
|
|
966
|
+
*
|
|
967
|
+
* // Example response
|
|
968
|
+
* // {
|
|
969
|
+
* // "identity": {}
|
|
970
|
+
* // }
|
|
971
|
+
* }
|
|
972
|
+
*
|
|
973
|
+
* main().catch(e => {
|
|
974
|
+
* console.error(e);
|
|
975
|
+
* throw e;
|
|
976
|
+
* });
|
|
977
|
+
*
|
|
978
|
+
* ```
|
|
927
979
|
*
|
|
928
980
|
* @param params - Parameters for request
|
|
929
981
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -938,6 +990,56 @@ export declare namespace tpu_v2 {
|
|
|
938
990
|
generateServiceIdentity(callback: BodyResponseCallback<Schema$GenerateServiceIdentityResponse>): void;
|
|
939
991
|
/**
|
|
940
992
|
* Gets information about a location.
|
|
993
|
+
* @example
|
|
994
|
+
* ```js
|
|
995
|
+
* // Before running the sample:
|
|
996
|
+
* // - Enable the API at:
|
|
997
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
998
|
+
* // - Login into gcloud by running:
|
|
999
|
+
* // ```sh
|
|
1000
|
+
* // $ gcloud auth application-default login
|
|
1001
|
+
* // ```
|
|
1002
|
+
* // - Install the npm module by running:
|
|
1003
|
+
* // ```sh
|
|
1004
|
+
* // $ npm install googleapis
|
|
1005
|
+
* // ```
|
|
1006
|
+
*
|
|
1007
|
+
* const {google} = require('googleapis');
|
|
1008
|
+
* const tpu = google.tpu('v2');
|
|
1009
|
+
*
|
|
1010
|
+
* async function main() {
|
|
1011
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1012
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1013
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1014
|
+
* });
|
|
1015
|
+
*
|
|
1016
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1017
|
+
* const authClient = await auth.getClient();
|
|
1018
|
+
* google.options({auth: authClient});
|
|
1019
|
+
*
|
|
1020
|
+
* // Do the magic
|
|
1021
|
+
* const res = await tpu.projects.locations.get({
|
|
1022
|
+
* // Resource name for the location.
|
|
1023
|
+
* name: 'projects/my-project/locations/my-location',
|
|
1024
|
+
* });
|
|
1025
|
+
* console.log(res.data);
|
|
1026
|
+
*
|
|
1027
|
+
* // Example response
|
|
1028
|
+
* // {
|
|
1029
|
+
* // "displayName": "my_displayName",
|
|
1030
|
+
* // "labels": {},
|
|
1031
|
+
* // "locationId": "my_locationId",
|
|
1032
|
+
* // "metadata": {},
|
|
1033
|
+
* // "name": "my_name"
|
|
1034
|
+
* // }
|
|
1035
|
+
* }
|
|
1036
|
+
*
|
|
1037
|
+
* main().catch(e => {
|
|
1038
|
+
* console.error(e);
|
|
1039
|
+
* throw e;
|
|
1040
|
+
* });
|
|
1041
|
+
*
|
|
1042
|
+
* ```
|
|
941
1043
|
*
|
|
942
1044
|
* @param params - Parameters for request
|
|
943
1045
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -952,6 +1054,61 @@ export declare namespace tpu_v2 {
|
|
|
952
1054
|
get(callback: BodyResponseCallback<Schema$Location>): void;
|
|
953
1055
|
/**
|
|
954
1056
|
* Lists information about the supported locations for this service.
|
|
1057
|
+
* @example
|
|
1058
|
+
* ```js
|
|
1059
|
+
* // Before running the sample:
|
|
1060
|
+
* // - Enable the API at:
|
|
1061
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1062
|
+
* // - Login into gcloud by running:
|
|
1063
|
+
* // ```sh
|
|
1064
|
+
* // $ gcloud auth application-default login
|
|
1065
|
+
* // ```
|
|
1066
|
+
* // - Install the npm module by running:
|
|
1067
|
+
* // ```sh
|
|
1068
|
+
* // $ npm install googleapis
|
|
1069
|
+
* // ```
|
|
1070
|
+
*
|
|
1071
|
+
* const {google} = require('googleapis');
|
|
1072
|
+
* const tpu = google.tpu('v2');
|
|
1073
|
+
*
|
|
1074
|
+
* async function main() {
|
|
1075
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1076
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1077
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1078
|
+
* });
|
|
1079
|
+
*
|
|
1080
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1081
|
+
* const authClient = await auth.getClient();
|
|
1082
|
+
* google.options({auth: authClient});
|
|
1083
|
+
*
|
|
1084
|
+
* // Do the magic
|
|
1085
|
+
* const res = await tpu.projects.locations.list({
|
|
1086
|
+
* // Optional. A list of extra location types that should be used as conditions for controlling the visibility of the locations.
|
|
1087
|
+
* extraLocationTypes: 'placeholder-value',
|
|
1088
|
+
* // 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).
|
|
1089
|
+
* filter: 'placeholder-value',
|
|
1090
|
+
* // The resource that owns the locations collection, if applicable.
|
|
1091
|
+
* name: 'projects/my-project',
|
|
1092
|
+
* // The maximum number of results to return. If not set, the service selects a default.
|
|
1093
|
+
* pageSize: 'placeholder-value',
|
|
1094
|
+
* // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.
|
|
1095
|
+
* pageToken: 'placeholder-value',
|
|
1096
|
+
* });
|
|
1097
|
+
* console.log(res.data);
|
|
1098
|
+
*
|
|
1099
|
+
* // Example response
|
|
1100
|
+
* // {
|
|
1101
|
+
* // "locations": [],
|
|
1102
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
1103
|
+
* // }
|
|
1104
|
+
* }
|
|
1105
|
+
*
|
|
1106
|
+
* main().catch(e => {
|
|
1107
|
+
* console.error(e);
|
|
1108
|
+
* throw e;
|
|
1109
|
+
* });
|
|
1110
|
+
*
|
|
1111
|
+
* ```
|
|
955
1112
|
*
|
|
956
1113
|
* @param params - Parameters for request
|
|
957
1114
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1008,6 +1165,54 @@ export declare namespace tpu_v2 {
|
|
|
1008
1165
|
constructor(context: APIRequestContext);
|
|
1009
1166
|
/**
|
|
1010
1167
|
* Gets AcceleratorType.
|
|
1168
|
+
* @example
|
|
1169
|
+
* ```js
|
|
1170
|
+
* // Before running the sample:
|
|
1171
|
+
* // - Enable the API at:
|
|
1172
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1173
|
+
* // - Login into gcloud by running:
|
|
1174
|
+
* // ```sh
|
|
1175
|
+
* // $ gcloud auth application-default login
|
|
1176
|
+
* // ```
|
|
1177
|
+
* // - Install the npm module by running:
|
|
1178
|
+
* // ```sh
|
|
1179
|
+
* // $ npm install googleapis
|
|
1180
|
+
* // ```
|
|
1181
|
+
*
|
|
1182
|
+
* const {google} = require('googleapis');
|
|
1183
|
+
* const tpu = google.tpu('v2');
|
|
1184
|
+
*
|
|
1185
|
+
* async function main() {
|
|
1186
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1187
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1188
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1189
|
+
* });
|
|
1190
|
+
*
|
|
1191
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1192
|
+
* const authClient = await auth.getClient();
|
|
1193
|
+
* google.options({auth: authClient});
|
|
1194
|
+
*
|
|
1195
|
+
* // Do the magic
|
|
1196
|
+
* const res = await tpu.projects.locations.acceleratorTypes.get({
|
|
1197
|
+
* // Required. The resource name.
|
|
1198
|
+
* name: 'projects/my-project/locations/my-location/acceleratorTypes/my-acceleratorType',
|
|
1199
|
+
* });
|
|
1200
|
+
* console.log(res.data);
|
|
1201
|
+
*
|
|
1202
|
+
* // Example response
|
|
1203
|
+
* // {
|
|
1204
|
+
* // "acceleratorConfigs": [],
|
|
1205
|
+
* // "name": "my_name",
|
|
1206
|
+
* // "type": "my_type"
|
|
1207
|
+
* // }
|
|
1208
|
+
* }
|
|
1209
|
+
*
|
|
1210
|
+
* main().catch(e => {
|
|
1211
|
+
* console.error(e);
|
|
1212
|
+
* throw e;
|
|
1213
|
+
* });
|
|
1214
|
+
*
|
|
1215
|
+
* ```
|
|
1011
1216
|
*
|
|
1012
1217
|
* @param params - Parameters for request
|
|
1013
1218
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1022,6 +1227,62 @@ export declare namespace tpu_v2 {
|
|
|
1022
1227
|
get(callback: BodyResponseCallback<Schema$AcceleratorType>): void;
|
|
1023
1228
|
/**
|
|
1024
1229
|
* Lists accelerator types supported by this API.
|
|
1230
|
+
* @example
|
|
1231
|
+
* ```js
|
|
1232
|
+
* // Before running the sample:
|
|
1233
|
+
* // - Enable the API at:
|
|
1234
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1235
|
+
* // - Login into gcloud by running:
|
|
1236
|
+
* // ```sh
|
|
1237
|
+
* // $ gcloud auth application-default login
|
|
1238
|
+
* // ```
|
|
1239
|
+
* // - Install the npm module by running:
|
|
1240
|
+
* // ```sh
|
|
1241
|
+
* // $ npm install googleapis
|
|
1242
|
+
* // ```
|
|
1243
|
+
*
|
|
1244
|
+
* const {google} = require('googleapis');
|
|
1245
|
+
* const tpu = google.tpu('v2');
|
|
1246
|
+
*
|
|
1247
|
+
* async function main() {
|
|
1248
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1249
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1250
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1251
|
+
* });
|
|
1252
|
+
*
|
|
1253
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1254
|
+
* const authClient = await auth.getClient();
|
|
1255
|
+
* google.options({auth: authClient});
|
|
1256
|
+
*
|
|
1257
|
+
* // Do the magic
|
|
1258
|
+
* const res = await tpu.projects.locations.acceleratorTypes.list({
|
|
1259
|
+
* // List filter.
|
|
1260
|
+
* filter: 'placeholder-value',
|
|
1261
|
+
* // Sort results.
|
|
1262
|
+
* orderBy: 'placeholder-value',
|
|
1263
|
+
* // The maximum number of items to return.
|
|
1264
|
+
* pageSize: 'placeholder-value',
|
|
1265
|
+
* // The next_page_token value returned from a previous List request, if any.
|
|
1266
|
+
* pageToken: 'placeholder-value',
|
|
1267
|
+
* // Required. The parent resource name.
|
|
1268
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
1269
|
+
* });
|
|
1270
|
+
* console.log(res.data);
|
|
1271
|
+
*
|
|
1272
|
+
* // Example response
|
|
1273
|
+
* // {
|
|
1274
|
+
* // "acceleratorTypes": [],
|
|
1275
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
1276
|
+
* // "unreachable": []
|
|
1277
|
+
* // }
|
|
1278
|
+
* }
|
|
1279
|
+
*
|
|
1280
|
+
* main().catch(e => {
|
|
1281
|
+
* console.error(e);
|
|
1282
|
+
* throw e;
|
|
1283
|
+
* });
|
|
1284
|
+
*
|
|
1285
|
+
* ```
|
|
1025
1286
|
*
|
|
1026
1287
|
* @param params - Parameters for request
|
|
1027
1288
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1068,6 +1329,91 @@ export declare namespace tpu_v2 {
|
|
|
1068
1329
|
constructor(context: APIRequestContext);
|
|
1069
1330
|
/**
|
|
1070
1331
|
* Creates a node.
|
|
1332
|
+
* @example
|
|
1333
|
+
* ```js
|
|
1334
|
+
* // Before running the sample:
|
|
1335
|
+
* // - Enable the API at:
|
|
1336
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1337
|
+
* // - Login into gcloud by running:
|
|
1338
|
+
* // ```sh
|
|
1339
|
+
* // $ gcloud auth application-default login
|
|
1340
|
+
* // ```
|
|
1341
|
+
* // - Install the npm module by running:
|
|
1342
|
+
* // ```sh
|
|
1343
|
+
* // $ npm install googleapis
|
|
1344
|
+
* // ```
|
|
1345
|
+
*
|
|
1346
|
+
* const {google} = require('googleapis');
|
|
1347
|
+
* const tpu = google.tpu('v2');
|
|
1348
|
+
*
|
|
1349
|
+
* async function main() {
|
|
1350
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1351
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1352
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1353
|
+
* });
|
|
1354
|
+
*
|
|
1355
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1356
|
+
* const authClient = await auth.getClient();
|
|
1357
|
+
* google.options({auth: authClient});
|
|
1358
|
+
*
|
|
1359
|
+
* // Do the magic
|
|
1360
|
+
* const res = await tpu.projects.locations.nodes.create({
|
|
1361
|
+
* // The unqualified resource name.
|
|
1362
|
+
* nodeId: 'placeholder-value',
|
|
1363
|
+
* // Required. The parent resource name.
|
|
1364
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
1365
|
+
*
|
|
1366
|
+
* // Request body metadata
|
|
1367
|
+
* requestBody: {
|
|
1368
|
+
* // request body parameters
|
|
1369
|
+
* // {
|
|
1370
|
+
* // "acceleratorConfig": {},
|
|
1371
|
+
* // "acceleratorType": "my_acceleratorType",
|
|
1372
|
+
* // "apiVersion": "my_apiVersion",
|
|
1373
|
+
* // "cidrBlock": "my_cidrBlock",
|
|
1374
|
+
* // "createTime": "my_createTime",
|
|
1375
|
+
* // "dataDisks": [],
|
|
1376
|
+
* // "description": "my_description",
|
|
1377
|
+
* // "health": "my_health",
|
|
1378
|
+
* // "healthDescription": "my_healthDescription",
|
|
1379
|
+
* // "id": "my_id",
|
|
1380
|
+
* // "labels": {},
|
|
1381
|
+
* // "metadata": {},
|
|
1382
|
+
* // "multisliceNode": false,
|
|
1383
|
+
* // "name": "my_name",
|
|
1384
|
+
* // "networkConfig": {},
|
|
1385
|
+
* // "networkConfigs": [],
|
|
1386
|
+
* // "networkEndpoints": [],
|
|
1387
|
+
* // "queuedResource": "my_queuedResource",
|
|
1388
|
+
* // "runtimeVersion": "my_runtimeVersion",
|
|
1389
|
+
* // "schedulingConfig": {},
|
|
1390
|
+
* // "serviceAccount": {},
|
|
1391
|
+
* // "shieldedInstanceConfig": {},
|
|
1392
|
+
* // "state": "my_state",
|
|
1393
|
+
* // "symptoms": [],
|
|
1394
|
+
* // "tags": [],
|
|
1395
|
+
* // "upcomingMaintenance": {}
|
|
1396
|
+
* // }
|
|
1397
|
+
* },
|
|
1398
|
+
* });
|
|
1399
|
+
* console.log(res.data);
|
|
1400
|
+
*
|
|
1401
|
+
* // Example response
|
|
1402
|
+
* // {
|
|
1403
|
+
* // "done": false,
|
|
1404
|
+
* // "error": {},
|
|
1405
|
+
* // "metadata": {},
|
|
1406
|
+
* // "name": "my_name",
|
|
1407
|
+
* // "response": {}
|
|
1408
|
+
* // }
|
|
1409
|
+
* }
|
|
1410
|
+
*
|
|
1411
|
+
* main().catch(e => {
|
|
1412
|
+
* console.error(e);
|
|
1413
|
+
* throw e;
|
|
1414
|
+
* });
|
|
1415
|
+
*
|
|
1416
|
+
* ```
|
|
1071
1417
|
*
|
|
1072
1418
|
* @param params - Parameters for request
|
|
1073
1419
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1082,6 +1428,56 @@ export declare namespace tpu_v2 {
|
|
|
1082
1428
|
create(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
1083
1429
|
/**
|
|
1084
1430
|
* Deletes a node.
|
|
1431
|
+
* @example
|
|
1432
|
+
* ```js
|
|
1433
|
+
* // Before running the sample:
|
|
1434
|
+
* // - Enable the API at:
|
|
1435
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1436
|
+
* // - Login into gcloud by running:
|
|
1437
|
+
* // ```sh
|
|
1438
|
+
* // $ gcloud auth application-default login
|
|
1439
|
+
* // ```
|
|
1440
|
+
* // - Install the npm module by running:
|
|
1441
|
+
* // ```sh
|
|
1442
|
+
* // $ npm install googleapis
|
|
1443
|
+
* // ```
|
|
1444
|
+
*
|
|
1445
|
+
* const {google} = require('googleapis');
|
|
1446
|
+
* const tpu = google.tpu('v2');
|
|
1447
|
+
*
|
|
1448
|
+
* async function main() {
|
|
1449
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1450
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1451
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1452
|
+
* });
|
|
1453
|
+
*
|
|
1454
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1455
|
+
* const authClient = await auth.getClient();
|
|
1456
|
+
* google.options({auth: authClient});
|
|
1457
|
+
*
|
|
1458
|
+
* // Do the magic
|
|
1459
|
+
* const res = await tpu.projects.locations.nodes.delete({
|
|
1460
|
+
* // Required. The resource name.
|
|
1461
|
+
* name: 'projects/my-project/locations/my-location/nodes/my-node',
|
|
1462
|
+
* });
|
|
1463
|
+
* console.log(res.data);
|
|
1464
|
+
*
|
|
1465
|
+
* // Example response
|
|
1466
|
+
* // {
|
|
1467
|
+
* // "done": false,
|
|
1468
|
+
* // "error": {},
|
|
1469
|
+
* // "metadata": {},
|
|
1470
|
+
* // "name": "my_name",
|
|
1471
|
+
* // "response": {}
|
|
1472
|
+
* // }
|
|
1473
|
+
* }
|
|
1474
|
+
*
|
|
1475
|
+
* main().catch(e => {
|
|
1476
|
+
* console.error(e);
|
|
1477
|
+
* throw e;
|
|
1478
|
+
* });
|
|
1479
|
+
*
|
|
1480
|
+
* ```
|
|
1085
1481
|
*
|
|
1086
1482
|
* @param params - Parameters for request
|
|
1087
1483
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1096,6 +1492,77 @@ export declare namespace tpu_v2 {
|
|
|
1096
1492
|
delete(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
1097
1493
|
/**
|
|
1098
1494
|
* Gets the details of a node.
|
|
1495
|
+
* @example
|
|
1496
|
+
* ```js
|
|
1497
|
+
* // Before running the sample:
|
|
1498
|
+
* // - Enable the API at:
|
|
1499
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1500
|
+
* // - Login into gcloud by running:
|
|
1501
|
+
* // ```sh
|
|
1502
|
+
* // $ gcloud auth application-default login
|
|
1503
|
+
* // ```
|
|
1504
|
+
* // - Install the npm module by running:
|
|
1505
|
+
* // ```sh
|
|
1506
|
+
* // $ npm install googleapis
|
|
1507
|
+
* // ```
|
|
1508
|
+
*
|
|
1509
|
+
* const {google} = require('googleapis');
|
|
1510
|
+
* const tpu = google.tpu('v2');
|
|
1511
|
+
*
|
|
1512
|
+
* async function main() {
|
|
1513
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1514
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1515
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1516
|
+
* });
|
|
1517
|
+
*
|
|
1518
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1519
|
+
* const authClient = await auth.getClient();
|
|
1520
|
+
* google.options({auth: authClient});
|
|
1521
|
+
*
|
|
1522
|
+
* // Do the magic
|
|
1523
|
+
* const res = await tpu.projects.locations.nodes.get({
|
|
1524
|
+
* // Required. The resource name.
|
|
1525
|
+
* name: 'projects/my-project/locations/my-location/nodes/my-node',
|
|
1526
|
+
* });
|
|
1527
|
+
* console.log(res.data);
|
|
1528
|
+
*
|
|
1529
|
+
* // Example response
|
|
1530
|
+
* // {
|
|
1531
|
+
* // "acceleratorConfig": {},
|
|
1532
|
+
* // "acceleratorType": "my_acceleratorType",
|
|
1533
|
+
* // "apiVersion": "my_apiVersion",
|
|
1534
|
+
* // "cidrBlock": "my_cidrBlock",
|
|
1535
|
+
* // "createTime": "my_createTime",
|
|
1536
|
+
* // "dataDisks": [],
|
|
1537
|
+
* // "description": "my_description",
|
|
1538
|
+
* // "health": "my_health",
|
|
1539
|
+
* // "healthDescription": "my_healthDescription",
|
|
1540
|
+
* // "id": "my_id",
|
|
1541
|
+
* // "labels": {},
|
|
1542
|
+
* // "metadata": {},
|
|
1543
|
+
* // "multisliceNode": false,
|
|
1544
|
+
* // "name": "my_name",
|
|
1545
|
+
* // "networkConfig": {},
|
|
1546
|
+
* // "networkConfigs": [],
|
|
1547
|
+
* // "networkEndpoints": [],
|
|
1548
|
+
* // "queuedResource": "my_queuedResource",
|
|
1549
|
+
* // "runtimeVersion": "my_runtimeVersion",
|
|
1550
|
+
* // "schedulingConfig": {},
|
|
1551
|
+
* // "serviceAccount": {},
|
|
1552
|
+
* // "shieldedInstanceConfig": {},
|
|
1553
|
+
* // "state": "my_state",
|
|
1554
|
+
* // "symptoms": [],
|
|
1555
|
+
* // "tags": [],
|
|
1556
|
+
* // "upcomingMaintenance": {}
|
|
1557
|
+
* // }
|
|
1558
|
+
* }
|
|
1559
|
+
*
|
|
1560
|
+
* main().catch(e => {
|
|
1561
|
+
* console.error(e);
|
|
1562
|
+
* throw e;
|
|
1563
|
+
* });
|
|
1564
|
+
*
|
|
1565
|
+
* ```
|
|
1099
1566
|
*
|
|
1100
1567
|
* @param params - Parameters for request
|
|
1101
1568
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1110,6 +1577,61 @@ export declare namespace tpu_v2 {
|
|
|
1110
1577
|
get(callback: BodyResponseCallback<Schema$Node>): void;
|
|
1111
1578
|
/**
|
|
1112
1579
|
* Retrieves the guest attributes for the node.
|
|
1580
|
+
* @example
|
|
1581
|
+
* ```js
|
|
1582
|
+
* // Before running the sample:
|
|
1583
|
+
* // - Enable the API at:
|
|
1584
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1585
|
+
* // - Login into gcloud by running:
|
|
1586
|
+
* // ```sh
|
|
1587
|
+
* // $ gcloud auth application-default login
|
|
1588
|
+
* // ```
|
|
1589
|
+
* // - Install the npm module by running:
|
|
1590
|
+
* // ```sh
|
|
1591
|
+
* // $ npm install googleapis
|
|
1592
|
+
* // ```
|
|
1593
|
+
*
|
|
1594
|
+
* const {google} = require('googleapis');
|
|
1595
|
+
* const tpu = google.tpu('v2');
|
|
1596
|
+
*
|
|
1597
|
+
* async function main() {
|
|
1598
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1599
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1600
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1601
|
+
* });
|
|
1602
|
+
*
|
|
1603
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1604
|
+
* const authClient = await auth.getClient();
|
|
1605
|
+
* google.options({auth: authClient});
|
|
1606
|
+
*
|
|
1607
|
+
* // Do the magic
|
|
1608
|
+
* const res = await tpu.projects.locations.nodes.getGuestAttributes({
|
|
1609
|
+
* // Required. The resource name.
|
|
1610
|
+
* name: 'projects/my-project/locations/my-location/nodes/my-node',
|
|
1611
|
+
*
|
|
1612
|
+
* // Request body metadata
|
|
1613
|
+
* requestBody: {
|
|
1614
|
+
* // request body parameters
|
|
1615
|
+
* // {
|
|
1616
|
+
* // "queryPath": "my_queryPath",
|
|
1617
|
+
* // "workerIds": []
|
|
1618
|
+
* // }
|
|
1619
|
+
* },
|
|
1620
|
+
* });
|
|
1621
|
+
* console.log(res.data);
|
|
1622
|
+
*
|
|
1623
|
+
* // Example response
|
|
1624
|
+
* // {
|
|
1625
|
+
* // "guestAttributes": []
|
|
1626
|
+
* // }
|
|
1627
|
+
* }
|
|
1628
|
+
*
|
|
1629
|
+
* main().catch(e => {
|
|
1630
|
+
* console.error(e);
|
|
1631
|
+
* throw e;
|
|
1632
|
+
* });
|
|
1633
|
+
*
|
|
1634
|
+
* ```
|
|
1113
1635
|
*
|
|
1114
1636
|
* @param params - Parameters for request
|
|
1115
1637
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1124,6 +1646,58 @@ export declare namespace tpu_v2 {
|
|
|
1124
1646
|
getGuestAttributes(callback: BodyResponseCallback<Schema$GetGuestAttributesResponse>): void;
|
|
1125
1647
|
/**
|
|
1126
1648
|
* Lists nodes.
|
|
1649
|
+
* @example
|
|
1650
|
+
* ```js
|
|
1651
|
+
* // Before running the sample:
|
|
1652
|
+
* // - Enable the API at:
|
|
1653
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1654
|
+
* // - Login into gcloud by running:
|
|
1655
|
+
* // ```sh
|
|
1656
|
+
* // $ gcloud auth application-default login
|
|
1657
|
+
* // ```
|
|
1658
|
+
* // - Install the npm module by running:
|
|
1659
|
+
* // ```sh
|
|
1660
|
+
* // $ npm install googleapis
|
|
1661
|
+
* // ```
|
|
1662
|
+
*
|
|
1663
|
+
* const {google} = require('googleapis');
|
|
1664
|
+
* const tpu = google.tpu('v2');
|
|
1665
|
+
*
|
|
1666
|
+
* async function main() {
|
|
1667
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1668
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1669
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1670
|
+
* });
|
|
1671
|
+
*
|
|
1672
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1673
|
+
* const authClient = await auth.getClient();
|
|
1674
|
+
* google.options({auth: authClient});
|
|
1675
|
+
*
|
|
1676
|
+
* // Do the magic
|
|
1677
|
+
* const res = await tpu.projects.locations.nodes.list({
|
|
1678
|
+
* // The maximum number of items to return.
|
|
1679
|
+
* pageSize: 'placeholder-value',
|
|
1680
|
+
* // The next_page_token value returned from a previous List request, if any.
|
|
1681
|
+
* pageToken: 'placeholder-value',
|
|
1682
|
+
* // Required. The parent resource name.
|
|
1683
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
1684
|
+
* });
|
|
1685
|
+
* console.log(res.data);
|
|
1686
|
+
*
|
|
1687
|
+
* // Example response
|
|
1688
|
+
* // {
|
|
1689
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
1690
|
+
* // "nodes": [],
|
|
1691
|
+
* // "unreachable": []
|
|
1692
|
+
* // }
|
|
1693
|
+
* }
|
|
1694
|
+
*
|
|
1695
|
+
* main().catch(e => {
|
|
1696
|
+
* console.error(e);
|
|
1697
|
+
* throw e;
|
|
1698
|
+
* });
|
|
1699
|
+
*
|
|
1700
|
+
* ```
|
|
1127
1701
|
*
|
|
1128
1702
|
* @param params - Parameters for request
|
|
1129
1703
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1138,6 +1712,91 @@ export declare namespace tpu_v2 {
|
|
|
1138
1712
|
list(callback: BodyResponseCallback<Schema$ListNodesResponse>): void;
|
|
1139
1713
|
/**
|
|
1140
1714
|
* Updates the configurations of a node.
|
|
1715
|
+
* @example
|
|
1716
|
+
* ```js
|
|
1717
|
+
* // Before running the sample:
|
|
1718
|
+
* // - Enable the API at:
|
|
1719
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1720
|
+
* // - Login into gcloud by running:
|
|
1721
|
+
* // ```sh
|
|
1722
|
+
* // $ gcloud auth application-default login
|
|
1723
|
+
* // ```
|
|
1724
|
+
* // - Install the npm module by running:
|
|
1725
|
+
* // ```sh
|
|
1726
|
+
* // $ npm install googleapis
|
|
1727
|
+
* // ```
|
|
1728
|
+
*
|
|
1729
|
+
* const {google} = require('googleapis');
|
|
1730
|
+
* const tpu = google.tpu('v2');
|
|
1731
|
+
*
|
|
1732
|
+
* async function main() {
|
|
1733
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1734
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1735
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1736
|
+
* });
|
|
1737
|
+
*
|
|
1738
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1739
|
+
* const authClient = await auth.getClient();
|
|
1740
|
+
* google.options({auth: authClient});
|
|
1741
|
+
*
|
|
1742
|
+
* // Do the magic
|
|
1743
|
+
* const res = await tpu.projects.locations.nodes.patch({
|
|
1744
|
+
* // Output only. Immutable. The name of the TPU.
|
|
1745
|
+
* name: 'projects/my-project/locations/my-location/nodes/my-node',
|
|
1746
|
+
* // Required. Mask of fields from Node to update. Supported fields: [description, tags, labels, metadata, network_config.enable_external_ips].
|
|
1747
|
+
* updateMask: 'placeholder-value',
|
|
1748
|
+
*
|
|
1749
|
+
* // Request body metadata
|
|
1750
|
+
* requestBody: {
|
|
1751
|
+
* // request body parameters
|
|
1752
|
+
* // {
|
|
1753
|
+
* // "acceleratorConfig": {},
|
|
1754
|
+
* // "acceleratorType": "my_acceleratorType",
|
|
1755
|
+
* // "apiVersion": "my_apiVersion",
|
|
1756
|
+
* // "cidrBlock": "my_cidrBlock",
|
|
1757
|
+
* // "createTime": "my_createTime",
|
|
1758
|
+
* // "dataDisks": [],
|
|
1759
|
+
* // "description": "my_description",
|
|
1760
|
+
* // "health": "my_health",
|
|
1761
|
+
* // "healthDescription": "my_healthDescription",
|
|
1762
|
+
* // "id": "my_id",
|
|
1763
|
+
* // "labels": {},
|
|
1764
|
+
* // "metadata": {},
|
|
1765
|
+
* // "multisliceNode": false,
|
|
1766
|
+
* // "name": "my_name",
|
|
1767
|
+
* // "networkConfig": {},
|
|
1768
|
+
* // "networkConfigs": [],
|
|
1769
|
+
* // "networkEndpoints": [],
|
|
1770
|
+
* // "queuedResource": "my_queuedResource",
|
|
1771
|
+
* // "runtimeVersion": "my_runtimeVersion",
|
|
1772
|
+
* // "schedulingConfig": {},
|
|
1773
|
+
* // "serviceAccount": {},
|
|
1774
|
+
* // "shieldedInstanceConfig": {},
|
|
1775
|
+
* // "state": "my_state",
|
|
1776
|
+
* // "symptoms": [],
|
|
1777
|
+
* // "tags": [],
|
|
1778
|
+
* // "upcomingMaintenance": {}
|
|
1779
|
+
* // }
|
|
1780
|
+
* },
|
|
1781
|
+
* });
|
|
1782
|
+
* console.log(res.data);
|
|
1783
|
+
*
|
|
1784
|
+
* // Example response
|
|
1785
|
+
* // {
|
|
1786
|
+
* // "done": false,
|
|
1787
|
+
* // "error": {},
|
|
1788
|
+
* // "metadata": {},
|
|
1789
|
+
* // "name": "my_name",
|
|
1790
|
+
* // "response": {}
|
|
1791
|
+
* // }
|
|
1792
|
+
* }
|
|
1793
|
+
*
|
|
1794
|
+
* main().catch(e => {
|
|
1795
|
+
* console.error(e);
|
|
1796
|
+
* throw e;
|
|
1797
|
+
* });
|
|
1798
|
+
*
|
|
1799
|
+
* ```
|
|
1141
1800
|
*
|
|
1142
1801
|
* @param params - Parameters for request
|
|
1143
1802
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1152,6 +1811,62 @@ export declare namespace tpu_v2 {
|
|
|
1152
1811
|
patch(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
1153
1812
|
/**
|
|
1154
1813
|
* Starts a node.
|
|
1814
|
+
* @example
|
|
1815
|
+
* ```js
|
|
1816
|
+
* // Before running the sample:
|
|
1817
|
+
* // - Enable the API at:
|
|
1818
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1819
|
+
* // - Login into gcloud by running:
|
|
1820
|
+
* // ```sh
|
|
1821
|
+
* // $ gcloud auth application-default login
|
|
1822
|
+
* // ```
|
|
1823
|
+
* // - Install the npm module by running:
|
|
1824
|
+
* // ```sh
|
|
1825
|
+
* // $ npm install googleapis
|
|
1826
|
+
* // ```
|
|
1827
|
+
*
|
|
1828
|
+
* const {google} = require('googleapis');
|
|
1829
|
+
* const tpu = google.tpu('v2');
|
|
1830
|
+
*
|
|
1831
|
+
* async function main() {
|
|
1832
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1833
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1834
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1835
|
+
* });
|
|
1836
|
+
*
|
|
1837
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1838
|
+
* const authClient = await auth.getClient();
|
|
1839
|
+
* google.options({auth: authClient});
|
|
1840
|
+
*
|
|
1841
|
+
* // Do the magic
|
|
1842
|
+
* const res = await tpu.projects.locations.nodes.start({
|
|
1843
|
+
* // Required. The resource name.
|
|
1844
|
+
* name: 'projects/my-project/locations/my-location/nodes/my-node',
|
|
1845
|
+
*
|
|
1846
|
+
* // Request body metadata
|
|
1847
|
+
* requestBody: {
|
|
1848
|
+
* // request body parameters
|
|
1849
|
+
* // {}
|
|
1850
|
+
* },
|
|
1851
|
+
* });
|
|
1852
|
+
* console.log(res.data);
|
|
1853
|
+
*
|
|
1854
|
+
* // Example response
|
|
1855
|
+
* // {
|
|
1856
|
+
* // "done": false,
|
|
1857
|
+
* // "error": {},
|
|
1858
|
+
* // "metadata": {},
|
|
1859
|
+
* // "name": "my_name",
|
|
1860
|
+
* // "response": {}
|
|
1861
|
+
* // }
|
|
1862
|
+
* }
|
|
1863
|
+
*
|
|
1864
|
+
* main().catch(e => {
|
|
1865
|
+
* console.error(e);
|
|
1866
|
+
* throw e;
|
|
1867
|
+
* });
|
|
1868
|
+
*
|
|
1869
|
+
* ```
|
|
1155
1870
|
*
|
|
1156
1871
|
* @param params - Parameters for request
|
|
1157
1872
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1166,6 +1881,62 @@ export declare namespace tpu_v2 {
|
|
|
1166
1881
|
start(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
1167
1882
|
/**
|
|
1168
1883
|
* Stops a node. This operation is only available with single TPU nodes.
|
|
1884
|
+
* @example
|
|
1885
|
+
* ```js
|
|
1886
|
+
* // Before running the sample:
|
|
1887
|
+
* // - Enable the API at:
|
|
1888
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1889
|
+
* // - Login into gcloud by running:
|
|
1890
|
+
* // ```sh
|
|
1891
|
+
* // $ gcloud auth application-default login
|
|
1892
|
+
* // ```
|
|
1893
|
+
* // - Install the npm module by running:
|
|
1894
|
+
* // ```sh
|
|
1895
|
+
* // $ npm install googleapis
|
|
1896
|
+
* // ```
|
|
1897
|
+
*
|
|
1898
|
+
* const {google} = require('googleapis');
|
|
1899
|
+
* const tpu = google.tpu('v2');
|
|
1900
|
+
*
|
|
1901
|
+
* async function main() {
|
|
1902
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1903
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1904
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1905
|
+
* });
|
|
1906
|
+
*
|
|
1907
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1908
|
+
* const authClient = await auth.getClient();
|
|
1909
|
+
* google.options({auth: authClient});
|
|
1910
|
+
*
|
|
1911
|
+
* // Do the magic
|
|
1912
|
+
* const res = await tpu.projects.locations.nodes.stop({
|
|
1913
|
+
* // Required. The resource name.
|
|
1914
|
+
* name: 'projects/my-project/locations/my-location/nodes/my-node',
|
|
1915
|
+
*
|
|
1916
|
+
* // Request body metadata
|
|
1917
|
+
* requestBody: {
|
|
1918
|
+
* // request body parameters
|
|
1919
|
+
* // {}
|
|
1920
|
+
* },
|
|
1921
|
+
* });
|
|
1922
|
+
* console.log(res.data);
|
|
1923
|
+
*
|
|
1924
|
+
* // Example response
|
|
1925
|
+
* // {
|
|
1926
|
+
* // "done": false,
|
|
1927
|
+
* // "error": {},
|
|
1928
|
+
* // "metadata": {},
|
|
1929
|
+
* // "name": "my_name",
|
|
1930
|
+
* // "response": {}
|
|
1931
|
+
* // }
|
|
1932
|
+
* }
|
|
1933
|
+
*
|
|
1934
|
+
* main().catch(e => {
|
|
1935
|
+
* console.error(e);
|
|
1936
|
+
* throw e;
|
|
1937
|
+
* });
|
|
1938
|
+
*
|
|
1939
|
+
* ```
|
|
1169
1940
|
*
|
|
1170
1941
|
* @param params - Parameters for request
|
|
1171
1942
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1268,6 +2039,50 @@ export declare namespace tpu_v2 {
|
|
|
1268
2039
|
constructor(context: APIRequestContext);
|
|
1269
2040
|
/**
|
|
1270
2041
|
* 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`.
|
|
2042
|
+
* @example
|
|
2043
|
+
* ```js
|
|
2044
|
+
* // Before running the sample:
|
|
2045
|
+
* // - Enable the API at:
|
|
2046
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
2047
|
+
* // - Login into gcloud by running:
|
|
2048
|
+
* // ```sh
|
|
2049
|
+
* // $ gcloud auth application-default login
|
|
2050
|
+
* // ```
|
|
2051
|
+
* // - Install the npm module by running:
|
|
2052
|
+
* // ```sh
|
|
2053
|
+
* // $ npm install googleapis
|
|
2054
|
+
* // ```
|
|
2055
|
+
*
|
|
2056
|
+
* const {google} = require('googleapis');
|
|
2057
|
+
* const tpu = google.tpu('v2');
|
|
2058
|
+
*
|
|
2059
|
+
* async function main() {
|
|
2060
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2061
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2062
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2063
|
+
* });
|
|
2064
|
+
*
|
|
2065
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2066
|
+
* const authClient = await auth.getClient();
|
|
2067
|
+
* google.options({auth: authClient});
|
|
2068
|
+
*
|
|
2069
|
+
* // Do the magic
|
|
2070
|
+
* const res = await tpu.projects.locations.operations.cancel({
|
|
2071
|
+
* // The name of the operation resource to be cancelled.
|
|
2072
|
+
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
2073
|
+
* });
|
|
2074
|
+
* console.log(res.data);
|
|
2075
|
+
*
|
|
2076
|
+
* // Example response
|
|
2077
|
+
* // {}
|
|
2078
|
+
* }
|
|
2079
|
+
*
|
|
2080
|
+
* main().catch(e => {
|
|
2081
|
+
* console.error(e);
|
|
2082
|
+
* throw e;
|
|
2083
|
+
* });
|
|
2084
|
+
*
|
|
2085
|
+
* ```
|
|
1271
2086
|
*
|
|
1272
2087
|
* @param params - Parameters for request
|
|
1273
2088
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1282,6 +2097,50 @@ export declare namespace tpu_v2 {
|
|
|
1282
2097
|
cancel(callback: BodyResponseCallback<Schema$Empty>): void;
|
|
1283
2098
|
/**
|
|
1284
2099
|
* 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`.
|
|
2100
|
+
* @example
|
|
2101
|
+
* ```js
|
|
2102
|
+
* // Before running the sample:
|
|
2103
|
+
* // - Enable the API at:
|
|
2104
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
2105
|
+
* // - Login into gcloud by running:
|
|
2106
|
+
* // ```sh
|
|
2107
|
+
* // $ gcloud auth application-default login
|
|
2108
|
+
* // ```
|
|
2109
|
+
* // - Install the npm module by running:
|
|
2110
|
+
* // ```sh
|
|
2111
|
+
* // $ npm install googleapis
|
|
2112
|
+
* // ```
|
|
2113
|
+
*
|
|
2114
|
+
* const {google} = require('googleapis');
|
|
2115
|
+
* const tpu = google.tpu('v2');
|
|
2116
|
+
*
|
|
2117
|
+
* async function main() {
|
|
2118
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2119
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2120
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2121
|
+
* });
|
|
2122
|
+
*
|
|
2123
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2124
|
+
* const authClient = await auth.getClient();
|
|
2125
|
+
* google.options({auth: authClient});
|
|
2126
|
+
*
|
|
2127
|
+
* // Do the magic
|
|
2128
|
+
* const res = await tpu.projects.locations.operations.delete({
|
|
2129
|
+
* // The name of the operation resource to be deleted.
|
|
2130
|
+
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
2131
|
+
* });
|
|
2132
|
+
* console.log(res.data);
|
|
2133
|
+
*
|
|
2134
|
+
* // Example response
|
|
2135
|
+
* // {}
|
|
2136
|
+
* }
|
|
2137
|
+
*
|
|
2138
|
+
* main().catch(e => {
|
|
2139
|
+
* console.error(e);
|
|
2140
|
+
* throw e;
|
|
2141
|
+
* });
|
|
2142
|
+
*
|
|
2143
|
+
* ```
|
|
1285
2144
|
*
|
|
1286
2145
|
* @param params - Parameters for request
|
|
1287
2146
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1296,6 +2155,56 @@ export declare namespace tpu_v2 {
|
|
|
1296
2155
|
delete(callback: BodyResponseCallback<Schema$Empty>): void;
|
|
1297
2156
|
/**
|
|
1298
2157
|
* 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.
|
|
2158
|
+
* @example
|
|
2159
|
+
* ```js
|
|
2160
|
+
* // Before running the sample:
|
|
2161
|
+
* // - Enable the API at:
|
|
2162
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
2163
|
+
* // - Login into gcloud by running:
|
|
2164
|
+
* // ```sh
|
|
2165
|
+
* // $ gcloud auth application-default login
|
|
2166
|
+
* // ```
|
|
2167
|
+
* // - Install the npm module by running:
|
|
2168
|
+
* // ```sh
|
|
2169
|
+
* // $ npm install googleapis
|
|
2170
|
+
* // ```
|
|
2171
|
+
*
|
|
2172
|
+
* const {google} = require('googleapis');
|
|
2173
|
+
* const tpu = google.tpu('v2');
|
|
2174
|
+
*
|
|
2175
|
+
* async function main() {
|
|
2176
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2177
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2178
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2179
|
+
* });
|
|
2180
|
+
*
|
|
2181
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2182
|
+
* const authClient = await auth.getClient();
|
|
2183
|
+
* google.options({auth: authClient});
|
|
2184
|
+
*
|
|
2185
|
+
* // Do the magic
|
|
2186
|
+
* const res = await tpu.projects.locations.operations.get({
|
|
2187
|
+
* // The name of the operation resource.
|
|
2188
|
+
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
2189
|
+
* });
|
|
2190
|
+
* console.log(res.data);
|
|
2191
|
+
*
|
|
2192
|
+
* // Example response
|
|
2193
|
+
* // {
|
|
2194
|
+
* // "done": false,
|
|
2195
|
+
* // "error": {},
|
|
2196
|
+
* // "metadata": {},
|
|
2197
|
+
* // "name": "my_name",
|
|
2198
|
+
* // "response": {}
|
|
2199
|
+
* // }
|
|
2200
|
+
* }
|
|
2201
|
+
*
|
|
2202
|
+
* main().catch(e => {
|
|
2203
|
+
* console.error(e);
|
|
2204
|
+
* throw e;
|
|
2205
|
+
* });
|
|
2206
|
+
*
|
|
2207
|
+
* ```
|
|
1299
2208
|
*
|
|
1300
2209
|
* @param params - Parameters for request
|
|
1301
2210
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1310,6 +2219,59 @@ export declare namespace tpu_v2 {
|
|
|
1310
2219
|
get(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
1311
2220
|
/**
|
|
1312
2221
|
* Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
|
|
2222
|
+
* @example
|
|
2223
|
+
* ```js
|
|
2224
|
+
* // Before running the sample:
|
|
2225
|
+
* // - Enable the API at:
|
|
2226
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
2227
|
+
* // - Login into gcloud by running:
|
|
2228
|
+
* // ```sh
|
|
2229
|
+
* // $ gcloud auth application-default login
|
|
2230
|
+
* // ```
|
|
2231
|
+
* // - Install the npm module by running:
|
|
2232
|
+
* // ```sh
|
|
2233
|
+
* // $ npm install googleapis
|
|
2234
|
+
* // ```
|
|
2235
|
+
*
|
|
2236
|
+
* const {google} = require('googleapis');
|
|
2237
|
+
* const tpu = google.tpu('v2');
|
|
2238
|
+
*
|
|
2239
|
+
* async function main() {
|
|
2240
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2241
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2242
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2243
|
+
* });
|
|
2244
|
+
*
|
|
2245
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2246
|
+
* const authClient = await auth.getClient();
|
|
2247
|
+
* google.options({auth: authClient});
|
|
2248
|
+
*
|
|
2249
|
+
* // Do the magic
|
|
2250
|
+
* const res = await tpu.projects.locations.operations.list({
|
|
2251
|
+
* // The standard list filter.
|
|
2252
|
+
* filter: 'placeholder-value',
|
|
2253
|
+
* // The name of the operation's parent resource.
|
|
2254
|
+
* name: 'projects/my-project/locations/my-location',
|
|
2255
|
+
* // The standard list page size.
|
|
2256
|
+
* pageSize: 'placeholder-value',
|
|
2257
|
+
* // The standard list page token.
|
|
2258
|
+
* pageToken: 'placeholder-value',
|
|
2259
|
+
* });
|
|
2260
|
+
* console.log(res.data);
|
|
2261
|
+
*
|
|
2262
|
+
* // Example response
|
|
2263
|
+
* // {
|
|
2264
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
2265
|
+
* // "operations": []
|
|
2266
|
+
* // }
|
|
2267
|
+
* }
|
|
2268
|
+
*
|
|
2269
|
+
* main().catch(e => {
|
|
2270
|
+
* console.error(e);
|
|
2271
|
+
* throw e;
|
|
2272
|
+
* });
|
|
2273
|
+
*
|
|
2274
|
+
* ```
|
|
1313
2275
|
*
|
|
1314
2276
|
* @param params - Parameters for request
|
|
1315
2277
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1364,6 +2326,75 @@ export declare namespace tpu_v2 {
|
|
|
1364
2326
|
constructor(context: APIRequestContext);
|
|
1365
2327
|
/**
|
|
1366
2328
|
* Creates a QueuedResource TPU instance.
|
|
2329
|
+
* @example
|
|
2330
|
+
* ```js
|
|
2331
|
+
* // Before running the sample:
|
|
2332
|
+
* // - Enable the API at:
|
|
2333
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
2334
|
+
* // - Login into gcloud by running:
|
|
2335
|
+
* // ```sh
|
|
2336
|
+
* // $ gcloud auth application-default login
|
|
2337
|
+
* // ```
|
|
2338
|
+
* // - Install the npm module by running:
|
|
2339
|
+
* // ```sh
|
|
2340
|
+
* // $ npm install googleapis
|
|
2341
|
+
* // ```
|
|
2342
|
+
*
|
|
2343
|
+
* const {google} = require('googleapis');
|
|
2344
|
+
* const tpu = google.tpu('v2');
|
|
2345
|
+
*
|
|
2346
|
+
* async function main() {
|
|
2347
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2348
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2349
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2350
|
+
* });
|
|
2351
|
+
*
|
|
2352
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2353
|
+
* const authClient = await auth.getClient();
|
|
2354
|
+
* google.options({auth: authClient});
|
|
2355
|
+
*
|
|
2356
|
+
* // Do the magic
|
|
2357
|
+
* const res = await tpu.projects.locations.queuedResources.create({
|
|
2358
|
+
* // Required. The parent resource name.
|
|
2359
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
2360
|
+
* // Optional. The unqualified resource name. Should follow the `^[A-Za-z0-9_.~+%-]+$` regex format.
|
|
2361
|
+
* queuedResourceId: 'placeholder-value',
|
|
2362
|
+
* // Optional. Idempotent request UUID.
|
|
2363
|
+
* requestId: 'placeholder-value',
|
|
2364
|
+
*
|
|
2365
|
+
* // Request body metadata
|
|
2366
|
+
* requestBody: {
|
|
2367
|
+
* // request body parameters
|
|
2368
|
+
* // {
|
|
2369
|
+
* // "createTime": "my_createTime",
|
|
2370
|
+
* // "guaranteed": {},
|
|
2371
|
+
* // "name": "my_name",
|
|
2372
|
+
* // "queueingPolicy": {},
|
|
2373
|
+
* // "reservationName": "my_reservationName",
|
|
2374
|
+
* // "spot": {},
|
|
2375
|
+
* // "state": {},
|
|
2376
|
+
* // "tpu": {}
|
|
2377
|
+
* // }
|
|
2378
|
+
* },
|
|
2379
|
+
* });
|
|
2380
|
+
* console.log(res.data);
|
|
2381
|
+
*
|
|
2382
|
+
* // Example response
|
|
2383
|
+
* // {
|
|
2384
|
+
* // "done": false,
|
|
2385
|
+
* // "error": {},
|
|
2386
|
+
* // "metadata": {},
|
|
2387
|
+
* // "name": "my_name",
|
|
2388
|
+
* // "response": {}
|
|
2389
|
+
* // }
|
|
2390
|
+
* }
|
|
2391
|
+
*
|
|
2392
|
+
* main().catch(e => {
|
|
2393
|
+
* console.error(e);
|
|
2394
|
+
* throw e;
|
|
2395
|
+
* });
|
|
2396
|
+
*
|
|
2397
|
+
* ```
|
|
1367
2398
|
*
|
|
1368
2399
|
* @param params - Parameters for request
|
|
1369
2400
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1378,6 +2409,60 @@ export declare namespace tpu_v2 {
|
|
|
1378
2409
|
create(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
1379
2410
|
/**
|
|
1380
2411
|
* Deletes a QueuedResource TPU instance.
|
|
2412
|
+
* @example
|
|
2413
|
+
* ```js
|
|
2414
|
+
* // Before running the sample:
|
|
2415
|
+
* // - Enable the API at:
|
|
2416
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
2417
|
+
* // - Login into gcloud by running:
|
|
2418
|
+
* // ```sh
|
|
2419
|
+
* // $ gcloud auth application-default login
|
|
2420
|
+
* // ```
|
|
2421
|
+
* // - Install the npm module by running:
|
|
2422
|
+
* // ```sh
|
|
2423
|
+
* // $ npm install googleapis
|
|
2424
|
+
* // ```
|
|
2425
|
+
*
|
|
2426
|
+
* const {google} = require('googleapis');
|
|
2427
|
+
* const tpu = google.tpu('v2');
|
|
2428
|
+
*
|
|
2429
|
+
* async function main() {
|
|
2430
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2431
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2432
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2433
|
+
* });
|
|
2434
|
+
*
|
|
2435
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2436
|
+
* const authClient = await auth.getClient();
|
|
2437
|
+
* google.options({auth: authClient});
|
|
2438
|
+
*
|
|
2439
|
+
* // Do the magic
|
|
2440
|
+
* const res = await tpu.projects.locations.queuedResources.delete({
|
|
2441
|
+
* // Optional. 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.
|
|
2442
|
+
* force: 'placeholder-value',
|
|
2443
|
+
* // Required. The resource name.
|
|
2444
|
+
* name: 'projects/my-project/locations/my-location/queuedResources/my-queuedResource',
|
|
2445
|
+
* // Optional. Idempotent request UUID.
|
|
2446
|
+
* requestId: 'placeholder-value',
|
|
2447
|
+
* });
|
|
2448
|
+
* console.log(res.data);
|
|
2449
|
+
*
|
|
2450
|
+
* // Example response
|
|
2451
|
+
* // {
|
|
2452
|
+
* // "done": false,
|
|
2453
|
+
* // "error": {},
|
|
2454
|
+
* // "metadata": {},
|
|
2455
|
+
* // "name": "my_name",
|
|
2456
|
+
* // "response": {}
|
|
2457
|
+
* // }
|
|
2458
|
+
* }
|
|
2459
|
+
*
|
|
2460
|
+
* main().catch(e => {
|
|
2461
|
+
* console.error(e);
|
|
2462
|
+
* throw e;
|
|
2463
|
+
* });
|
|
2464
|
+
*
|
|
2465
|
+
* ```
|
|
1381
2466
|
*
|
|
1382
2467
|
* @param params - Parameters for request
|
|
1383
2468
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1392,6 +2477,59 @@ export declare namespace tpu_v2 {
|
|
|
1392
2477
|
delete(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
1393
2478
|
/**
|
|
1394
2479
|
* Gets details of a queued resource.
|
|
2480
|
+
* @example
|
|
2481
|
+
* ```js
|
|
2482
|
+
* // Before running the sample:
|
|
2483
|
+
* // - Enable the API at:
|
|
2484
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
2485
|
+
* // - Login into gcloud by running:
|
|
2486
|
+
* // ```sh
|
|
2487
|
+
* // $ gcloud auth application-default login
|
|
2488
|
+
* // ```
|
|
2489
|
+
* // - Install the npm module by running:
|
|
2490
|
+
* // ```sh
|
|
2491
|
+
* // $ npm install googleapis
|
|
2492
|
+
* // ```
|
|
2493
|
+
*
|
|
2494
|
+
* const {google} = require('googleapis');
|
|
2495
|
+
* const tpu = google.tpu('v2');
|
|
2496
|
+
*
|
|
2497
|
+
* async function main() {
|
|
2498
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2499
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2500
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2501
|
+
* });
|
|
2502
|
+
*
|
|
2503
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2504
|
+
* const authClient = await auth.getClient();
|
|
2505
|
+
* google.options({auth: authClient});
|
|
2506
|
+
*
|
|
2507
|
+
* // Do the magic
|
|
2508
|
+
* const res = await tpu.projects.locations.queuedResources.get({
|
|
2509
|
+
* // Required. The resource name.
|
|
2510
|
+
* name: 'projects/my-project/locations/my-location/queuedResources/my-queuedResource',
|
|
2511
|
+
* });
|
|
2512
|
+
* console.log(res.data);
|
|
2513
|
+
*
|
|
2514
|
+
* // Example response
|
|
2515
|
+
* // {
|
|
2516
|
+
* // "createTime": "my_createTime",
|
|
2517
|
+
* // "guaranteed": {},
|
|
2518
|
+
* // "name": "my_name",
|
|
2519
|
+
* // "queueingPolicy": {},
|
|
2520
|
+
* // "reservationName": "my_reservationName",
|
|
2521
|
+
* // "spot": {},
|
|
2522
|
+
* // "state": {},
|
|
2523
|
+
* // "tpu": {}
|
|
2524
|
+
* // }
|
|
2525
|
+
* }
|
|
2526
|
+
*
|
|
2527
|
+
* main().catch(e => {
|
|
2528
|
+
* console.error(e);
|
|
2529
|
+
* throw e;
|
|
2530
|
+
* });
|
|
2531
|
+
*
|
|
2532
|
+
* ```
|
|
1395
2533
|
*
|
|
1396
2534
|
* @param params - Parameters for request
|
|
1397
2535
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1406,6 +2544,58 @@ export declare namespace tpu_v2 {
|
|
|
1406
2544
|
get(callback: BodyResponseCallback<Schema$QueuedResource>): void;
|
|
1407
2545
|
/**
|
|
1408
2546
|
* Lists queued resources.
|
|
2547
|
+
* @example
|
|
2548
|
+
* ```js
|
|
2549
|
+
* // Before running the sample:
|
|
2550
|
+
* // - Enable the API at:
|
|
2551
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
2552
|
+
* // - Login into gcloud by running:
|
|
2553
|
+
* // ```sh
|
|
2554
|
+
* // $ gcloud auth application-default login
|
|
2555
|
+
* // ```
|
|
2556
|
+
* // - Install the npm module by running:
|
|
2557
|
+
* // ```sh
|
|
2558
|
+
* // $ npm install googleapis
|
|
2559
|
+
* // ```
|
|
2560
|
+
*
|
|
2561
|
+
* const {google} = require('googleapis');
|
|
2562
|
+
* const tpu = google.tpu('v2');
|
|
2563
|
+
*
|
|
2564
|
+
* async function main() {
|
|
2565
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2566
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2567
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2568
|
+
* });
|
|
2569
|
+
*
|
|
2570
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2571
|
+
* const authClient = await auth.getClient();
|
|
2572
|
+
* google.options({auth: authClient});
|
|
2573
|
+
*
|
|
2574
|
+
* // Do the magic
|
|
2575
|
+
* const res = await tpu.projects.locations.queuedResources.list({
|
|
2576
|
+
* // Optional. The maximum number of items to return.
|
|
2577
|
+
* pageSize: 'placeholder-value',
|
|
2578
|
+
* // Optional. The next_page_token value returned from a previous List request, if any.
|
|
2579
|
+
* pageToken: 'placeholder-value',
|
|
2580
|
+
* // Required. The parent resource name.
|
|
2581
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
2582
|
+
* });
|
|
2583
|
+
* console.log(res.data);
|
|
2584
|
+
*
|
|
2585
|
+
* // Example response
|
|
2586
|
+
* // {
|
|
2587
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
2588
|
+
* // "queuedResources": [],
|
|
2589
|
+
* // "unreachable": []
|
|
2590
|
+
* // }
|
|
2591
|
+
* }
|
|
2592
|
+
*
|
|
2593
|
+
* main().catch(e => {
|
|
2594
|
+
* console.error(e);
|
|
2595
|
+
* throw e;
|
|
2596
|
+
* });
|
|
2597
|
+
*
|
|
2598
|
+
* ```
|
|
1409
2599
|
*
|
|
1410
2600
|
* @param params - Parameters for request
|
|
1411
2601
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1420,6 +2610,62 @@ export declare namespace tpu_v2 {
|
|
|
1420
2610
|
list(callback: BodyResponseCallback<Schema$ListQueuedResourcesResponse>): void;
|
|
1421
2611
|
/**
|
|
1422
2612
|
* Resets a QueuedResource TPU instance
|
|
2613
|
+
* @example
|
|
2614
|
+
* ```js
|
|
2615
|
+
* // Before running the sample:
|
|
2616
|
+
* // - Enable the API at:
|
|
2617
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
2618
|
+
* // - Login into gcloud by running:
|
|
2619
|
+
* // ```sh
|
|
2620
|
+
* // $ gcloud auth application-default login
|
|
2621
|
+
* // ```
|
|
2622
|
+
* // - Install the npm module by running:
|
|
2623
|
+
* // ```sh
|
|
2624
|
+
* // $ npm install googleapis
|
|
2625
|
+
* // ```
|
|
2626
|
+
*
|
|
2627
|
+
* const {google} = require('googleapis');
|
|
2628
|
+
* const tpu = google.tpu('v2');
|
|
2629
|
+
*
|
|
2630
|
+
* async function main() {
|
|
2631
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2632
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2633
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2634
|
+
* });
|
|
2635
|
+
*
|
|
2636
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2637
|
+
* const authClient = await auth.getClient();
|
|
2638
|
+
* google.options({auth: authClient});
|
|
2639
|
+
*
|
|
2640
|
+
* // Do the magic
|
|
2641
|
+
* const res = await tpu.projects.locations.queuedResources.reset({
|
|
2642
|
+
* // Required. The name of the queued resource.
|
|
2643
|
+
* name: 'projects/my-project/locations/my-location/queuedResources/my-queuedResource',
|
|
2644
|
+
*
|
|
2645
|
+
* // Request body metadata
|
|
2646
|
+
* requestBody: {
|
|
2647
|
+
* // request body parameters
|
|
2648
|
+
* // {}
|
|
2649
|
+
* },
|
|
2650
|
+
* });
|
|
2651
|
+
* console.log(res.data);
|
|
2652
|
+
*
|
|
2653
|
+
* // Example response
|
|
2654
|
+
* // {
|
|
2655
|
+
* // "done": false,
|
|
2656
|
+
* // "error": {},
|
|
2657
|
+
* // "metadata": {},
|
|
2658
|
+
* // "name": "my_name",
|
|
2659
|
+
* // "response": {}
|
|
2660
|
+
* // }
|
|
2661
|
+
* }
|
|
2662
|
+
*
|
|
2663
|
+
* main().catch(e => {
|
|
2664
|
+
* console.error(e);
|
|
2665
|
+
* throw e;
|
|
2666
|
+
* });
|
|
2667
|
+
*
|
|
2668
|
+
* ```
|
|
1423
2669
|
*
|
|
1424
2670
|
* @param params - Parameters for request
|
|
1425
2671
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1500,6 +2746,53 @@ export declare namespace tpu_v2 {
|
|
|
1500
2746
|
constructor(context: APIRequestContext);
|
|
1501
2747
|
/**
|
|
1502
2748
|
* Gets a runtime version.
|
|
2749
|
+
* @example
|
|
2750
|
+
* ```js
|
|
2751
|
+
* // Before running the sample:
|
|
2752
|
+
* // - Enable the API at:
|
|
2753
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
2754
|
+
* // - Login into gcloud by running:
|
|
2755
|
+
* // ```sh
|
|
2756
|
+
* // $ gcloud auth application-default login
|
|
2757
|
+
* // ```
|
|
2758
|
+
* // - Install the npm module by running:
|
|
2759
|
+
* // ```sh
|
|
2760
|
+
* // $ npm install googleapis
|
|
2761
|
+
* // ```
|
|
2762
|
+
*
|
|
2763
|
+
* const {google} = require('googleapis');
|
|
2764
|
+
* const tpu = google.tpu('v2');
|
|
2765
|
+
*
|
|
2766
|
+
* async function main() {
|
|
2767
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2768
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2769
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2770
|
+
* });
|
|
2771
|
+
*
|
|
2772
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2773
|
+
* const authClient = await auth.getClient();
|
|
2774
|
+
* google.options({auth: authClient});
|
|
2775
|
+
*
|
|
2776
|
+
* // Do the magic
|
|
2777
|
+
* const res = await tpu.projects.locations.runtimeVersions.get({
|
|
2778
|
+
* // Required. The resource name.
|
|
2779
|
+
* name: 'projects/my-project/locations/my-location/runtimeVersions/my-runtimeVersion',
|
|
2780
|
+
* });
|
|
2781
|
+
* console.log(res.data);
|
|
2782
|
+
*
|
|
2783
|
+
* // Example response
|
|
2784
|
+
* // {
|
|
2785
|
+
* // "name": "my_name",
|
|
2786
|
+
* // "version": "my_version"
|
|
2787
|
+
* // }
|
|
2788
|
+
* }
|
|
2789
|
+
*
|
|
2790
|
+
* main().catch(e => {
|
|
2791
|
+
* console.error(e);
|
|
2792
|
+
* throw e;
|
|
2793
|
+
* });
|
|
2794
|
+
*
|
|
2795
|
+
* ```
|
|
1503
2796
|
*
|
|
1504
2797
|
* @param params - Parameters for request
|
|
1505
2798
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1514,6 +2807,62 @@ export declare namespace tpu_v2 {
|
|
|
1514
2807
|
get(callback: BodyResponseCallback<Schema$RuntimeVersion>): void;
|
|
1515
2808
|
/**
|
|
1516
2809
|
* Lists runtime versions supported by this API.
|
|
2810
|
+
* @example
|
|
2811
|
+
* ```js
|
|
2812
|
+
* // Before running the sample:
|
|
2813
|
+
* // - Enable the API at:
|
|
2814
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
2815
|
+
* // - Login into gcloud by running:
|
|
2816
|
+
* // ```sh
|
|
2817
|
+
* // $ gcloud auth application-default login
|
|
2818
|
+
* // ```
|
|
2819
|
+
* // - Install the npm module by running:
|
|
2820
|
+
* // ```sh
|
|
2821
|
+
* // $ npm install googleapis
|
|
2822
|
+
* // ```
|
|
2823
|
+
*
|
|
2824
|
+
* const {google} = require('googleapis');
|
|
2825
|
+
* const tpu = google.tpu('v2');
|
|
2826
|
+
*
|
|
2827
|
+
* async function main() {
|
|
2828
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2829
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2830
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2831
|
+
* });
|
|
2832
|
+
*
|
|
2833
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2834
|
+
* const authClient = await auth.getClient();
|
|
2835
|
+
* google.options({auth: authClient});
|
|
2836
|
+
*
|
|
2837
|
+
* // Do the magic
|
|
2838
|
+
* const res = await tpu.projects.locations.runtimeVersions.list({
|
|
2839
|
+
* // List filter.
|
|
2840
|
+
* filter: 'placeholder-value',
|
|
2841
|
+
* // Sort results.
|
|
2842
|
+
* orderBy: 'placeholder-value',
|
|
2843
|
+
* // The maximum number of items to return.
|
|
2844
|
+
* pageSize: 'placeholder-value',
|
|
2845
|
+
* // The next_page_token value returned from a previous List request, if any.
|
|
2846
|
+
* pageToken: 'placeholder-value',
|
|
2847
|
+
* // Required. The parent resource name.
|
|
2848
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
2849
|
+
* });
|
|
2850
|
+
* console.log(res.data);
|
|
2851
|
+
*
|
|
2852
|
+
* // Example response
|
|
2853
|
+
* // {
|
|
2854
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
2855
|
+
* // "runtimeVersions": [],
|
|
2856
|
+
* // "unreachable": []
|
|
2857
|
+
* // }
|
|
2858
|
+
* }
|
|
2859
|
+
*
|
|
2860
|
+
* main().catch(e => {
|
|
2861
|
+
* console.error(e);
|
|
2862
|
+
* throw e;
|
|
2863
|
+
* });
|
|
2864
|
+
*
|
|
2865
|
+
* ```
|
|
1517
2866
|
*
|
|
1518
2867
|
* @param params - Parameters for request
|
|
1519
2868
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|