@googleapis/tpu 1.0.2 → 2.0.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 +25 -0
- package/build/index.d.ts +5 -0
- package/build/index.js +9 -5
- package/build/index.js.map +1 -1
- package/build/v1.js +35 -34
- package/build/v1.js.map +1 -1
- package/build/v1alpha1.js +35 -34
- package/build/v1alpha1.js.map +1 -1
- package/build/v2.d.ts +2072 -0
- package/build/v2.js +678 -0
- package/build/v2.js.map +1 -0
- package/build/v2alpha1.d.ts +103 -0
- package/build/v2alpha1.js +71 -38
- package/build/v2alpha1.js.map +1 -1
- package/index.ts +10 -1
- package/package.json +5 -5
- package/v2.ts +3566 -0
- package/v2alpha1.ts +180 -0
package/v2alpha1.ts
CHANGED
|
@@ -449,6 +449,10 @@ export namespace tpu_v2alpha1 {
|
|
|
449
449
|
* The Google Cloud Platform Service Account to be used by the TPU node VMs. If None is specified, the default compute service account will be used.
|
|
450
450
|
*/
|
|
451
451
|
serviceAccount?: Schema$ServiceAccount;
|
|
452
|
+
/**
|
|
453
|
+
* Shielded Instance options.
|
|
454
|
+
*/
|
|
455
|
+
shieldedInstanceConfig?: Schema$ShieldedInstanceConfig;
|
|
452
456
|
/**
|
|
453
457
|
* Output only. The current state for the TPU Node.
|
|
454
458
|
*/
|
|
@@ -568,6 +572,24 @@ export namespace tpu_v2alpha1 {
|
|
|
568
572
|
*/
|
|
569
573
|
email?: string | null;
|
|
570
574
|
}
|
|
575
|
+
/**
|
|
576
|
+
* A set of Shielded Instance options.
|
|
577
|
+
*/
|
|
578
|
+
export interface Schema$ShieldedInstanceConfig {
|
|
579
|
+
/**
|
|
580
|
+
* Defines whether the instance has Secure Boot enabled.
|
|
581
|
+
*/
|
|
582
|
+
enableSecureBoot?: boolean | null;
|
|
583
|
+
}
|
|
584
|
+
/**
|
|
585
|
+
* Request for SimulateMaintenanceEvent.
|
|
586
|
+
*/
|
|
587
|
+
export interface Schema$SimulateMaintenanceEventRequest {
|
|
588
|
+
/**
|
|
589
|
+
* The 0-based worker ID. If it is empty, worker ID 0 will be selected for maintenance event simulation. A maintenance event will only be fired on the first specified worker ID. Future implementations may support firing on multiple workers.
|
|
590
|
+
*/
|
|
591
|
+
workerIds?: string[] | null;
|
|
592
|
+
}
|
|
571
593
|
/**
|
|
572
594
|
* Request for StartNode.
|
|
573
595
|
*/
|
|
@@ -1473,6 +1495,7 @@ export namespace tpu_v2alpha1 {
|
|
|
1473
1495
|
* // "runtimeVersion": "my_runtimeVersion",
|
|
1474
1496
|
* // "schedulingConfig": {},
|
|
1475
1497
|
* // "serviceAccount": {},
|
|
1498
|
+
* // "shieldedInstanceConfig": {},
|
|
1476
1499
|
* // "state": "my_state",
|
|
1477
1500
|
* // "symptoms": [],
|
|
1478
1501
|
* // "tags": []
|
|
@@ -1765,6 +1788,7 @@ export namespace tpu_v2alpha1 {
|
|
|
1765
1788
|
* // "runtimeVersion": "my_runtimeVersion",
|
|
1766
1789
|
* // "schedulingConfig": {},
|
|
1767
1790
|
* // "serviceAccount": {},
|
|
1791
|
+
* // "shieldedInstanceConfig": {},
|
|
1768
1792
|
* // "state": "my_state",
|
|
1769
1793
|
* // "symptoms": [],
|
|
1770
1794
|
* // "tags": []
|
|
@@ -2196,6 +2220,7 @@ export namespace tpu_v2alpha1 {
|
|
|
2196
2220
|
* // "runtimeVersion": "my_runtimeVersion",
|
|
2197
2221
|
* // "schedulingConfig": {},
|
|
2198
2222
|
* // "serviceAccount": {},
|
|
2223
|
+
* // "shieldedInstanceConfig": {},
|
|
2199
2224
|
* // "state": "my_state",
|
|
2200
2225
|
* // "symptoms": [],
|
|
2201
2226
|
* // "tags": []
|
|
@@ -2302,6 +2327,149 @@ export namespace tpu_v2alpha1 {
|
|
|
2302
2327
|
}
|
|
2303
2328
|
}
|
|
2304
2329
|
|
|
2330
|
+
/**
|
|
2331
|
+
* Simulates a maintenance event.
|
|
2332
|
+
* @example
|
|
2333
|
+
* ```js
|
|
2334
|
+
* // Before running the sample:
|
|
2335
|
+
* // - Enable the API at:
|
|
2336
|
+
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
2337
|
+
* // - Login into gcloud by running:
|
|
2338
|
+
* // `$ gcloud auth application-default login`
|
|
2339
|
+
* // - Install the npm module by running:
|
|
2340
|
+
* // `$ npm install googleapis`
|
|
2341
|
+
*
|
|
2342
|
+
* const {google} = require('googleapis');
|
|
2343
|
+
* const tpu = google.tpu('v2alpha1');
|
|
2344
|
+
*
|
|
2345
|
+
* async function main() {
|
|
2346
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2347
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2348
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2349
|
+
* });
|
|
2350
|
+
*
|
|
2351
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2352
|
+
* const authClient = await auth.getClient();
|
|
2353
|
+
* google.options({auth: authClient});
|
|
2354
|
+
*
|
|
2355
|
+
* // Do the magic
|
|
2356
|
+
* const res = await tpu.projects.locations.nodes.simulateMaintenanceEvent({
|
|
2357
|
+
* // Required. The resource name.
|
|
2358
|
+
* name: 'projects/my-project/locations/my-location/nodes/my-node',
|
|
2359
|
+
*
|
|
2360
|
+
* // Request body metadata
|
|
2361
|
+
* requestBody: {
|
|
2362
|
+
* // request body parameters
|
|
2363
|
+
* // {
|
|
2364
|
+
* // "workerIds": []
|
|
2365
|
+
* // }
|
|
2366
|
+
* },
|
|
2367
|
+
* });
|
|
2368
|
+
* console.log(res.data);
|
|
2369
|
+
*
|
|
2370
|
+
* // Example response
|
|
2371
|
+
* // {
|
|
2372
|
+
* // "done": false,
|
|
2373
|
+
* // "error": {},
|
|
2374
|
+
* // "metadata": {},
|
|
2375
|
+
* // "name": "my_name",
|
|
2376
|
+
* // "response": {}
|
|
2377
|
+
* // }
|
|
2378
|
+
* }
|
|
2379
|
+
*
|
|
2380
|
+
* main().catch(e => {
|
|
2381
|
+
* console.error(e);
|
|
2382
|
+
* throw e;
|
|
2383
|
+
* });
|
|
2384
|
+
*
|
|
2385
|
+
* ```
|
|
2386
|
+
*
|
|
2387
|
+
* @param params - Parameters for request
|
|
2388
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2389
|
+
* @param callback - Optional callback that handles the response.
|
|
2390
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2391
|
+
*/
|
|
2392
|
+
simulateMaintenanceEvent(
|
|
2393
|
+
params: Params$Resource$Projects$Locations$Nodes$Simulatemaintenanceevent,
|
|
2394
|
+
options: StreamMethodOptions
|
|
2395
|
+
): GaxiosPromise<Readable>;
|
|
2396
|
+
simulateMaintenanceEvent(
|
|
2397
|
+
params?: Params$Resource$Projects$Locations$Nodes$Simulatemaintenanceevent,
|
|
2398
|
+
options?: MethodOptions
|
|
2399
|
+
): GaxiosPromise<Schema$Operation>;
|
|
2400
|
+
simulateMaintenanceEvent(
|
|
2401
|
+
params: Params$Resource$Projects$Locations$Nodes$Simulatemaintenanceevent,
|
|
2402
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
2403
|
+
callback: BodyResponseCallback<Readable>
|
|
2404
|
+
): void;
|
|
2405
|
+
simulateMaintenanceEvent(
|
|
2406
|
+
params: Params$Resource$Projects$Locations$Nodes$Simulatemaintenanceevent,
|
|
2407
|
+
options: MethodOptions | BodyResponseCallback<Schema$Operation>,
|
|
2408
|
+
callback: BodyResponseCallback<Schema$Operation>
|
|
2409
|
+
): void;
|
|
2410
|
+
simulateMaintenanceEvent(
|
|
2411
|
+
params: Params$Resource$Projects$Locations$Nodes$Simulatemaintenanceevent,
|
|
2412
|
+
callback: BodyResponseCallback<Schema$Operation>
|
|
2413
|
+
): void;
|
|
2414
|
+
simulateMaintenanceEvent(
|
|
2415
|
+
callback: BodyResponseCallback<Schema$Operation>
|
|
2416
|
+
): void;
|
|
2417
|
+
simulateMaintenanceEvent(
|
|
2418
|
+
paramsOrCallback?:
|
|
2419
|
+
| Params$Resource$Projects$Locations$Nodes$Simulatemaintenanceevent
|
|
2420
|
+
| BodyResponseCallback<Schema$Operation>
|
|
2421
|
+
| BodyResponseCallback<Readable>,
|
|
2422
|
+
optionsOrCallback?:
|
|
2423
|
+
| MethodOptions
|
|
2424
|
+
| StreamMethodOptions
|
|
2425
|
+
| BodyResponseCallback<Schema$Operation>
|
|
2426
|
+
| BodyResponseCallback<Readable>,
|
|
2427
|
+
callback?:
|
|
2428
|
+
| BodyResponseCallback<Schema$Operation>
|
|
2429
|
+
| BodyResponseCallback<Readable>
|
|
2430
|
+
): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
|
|
2431
|
+
let params = (paramsOrCallback ||
|
|
2432
|
+
{}) as Params$Resource$Projects$Locations$Nodes$Simulatemaintenanceevent;
|
|
2433
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
2434
|
+
|
|
2435
|
+
if (typeof paramsOrCallback === 'function') {
|
|
2436
|
+
callback = paramsOrCallback;
|
|
2437
|
+
params =
|
|
2438
|
+
{} as Params$Resource$Projects$Locations$Nodes$Simulatemaintenanceevent;
|
|
2439
|
+
options = {};
|
|
2440
|
+
}
|
|
2441
|
+
|
|
2442
|
+
if (typeof optionsOrCallback === 'function') {
|
|
2443
|
+
callback = optionsOrCallback;
|
|
2444
|
+
options = {};
|
|
2445
|
+
}
|
|
2446
|
+
|
|
2447
|
+
const rootUrl = options.rootUrl || 'https://tpu.googleapis.com/';
|
|
2448
|
+
const parameters = {
|
|
2449
|
+
options: Object.assign(
|
|
2450
|
+
{
|
|
2451
|
+
url: (
|
|
2452
|
+
rootUrl + '/v2alpha1/{+name}:simulateMaintenanceEvent'
|
|
2453
|
+
).replace(/([^:]\/)\/+/g, '$1'),
|
|
2454
|
+
method: 'POST',
|
|
2455
|
+
},
|
|
2456
|
+
options
|
|
2457
|
+
),
|
|
2458
|
+
params,
|
|
2459
|
+
requiredParams: ['name'],
|
|
2460
|
+
pathParams: ['name'],
|
|
2461
|
+
context: this.context,
|
|
2462
|
+
};
|
|
2463
|
+
if (callback) {
|
|
2464
|
+
createAPIRequest<Schema$Operation>(
|
|
2465
|
+
parameters,
|
|
2466
|
+
callback as BodyResponseCallback<unknown>
|
|
2467
|
+
);
|
|
2468
|
+
} else {
|
|
2469
|
+
return createAPIRequest<Schema$Operation>(parameters);
|
|
2470
|
+
}
|
|
2471
|
+
}
|
|
2472
|
+
|
|
2305
2473
|
/**
|
|
2306
2474
|
* Starts a node.
|
|
2307
2475
|
* @example
|
|
@@ -2662,6 +2830,18 @@ export namespace tpu_v2alpha1 {
|
|
|
2662
2830
|
*/
|
|
2663
2831
|
requestBody?: Schema$Node;
|
|
2664
2832
|
}
|
|
2833
|
+
export interface Params$Resource$Projects$Locations$Nodes$Simulatemaintenanceevent
|
|
2834
|
+
extends StandardParameters {
|
|
2835
|
+
/**
|
|
2836
|
+
* Required. The resource name.
|
|
2837
|
+
*/
|
|
2838
|
+
name?: string;
|
|
2839
|
+
|
|
2840
|
+
/**
|
|
2841
|
+
* Request body metadata
|
|
2842
|
+
*/
|
|
2843
|
+
requestBody?: Schema$SimulateMaintenanceEventRequest;
|
|
2844
|
+
}
|
|
2665
2845
|
export interface Params$Resource$Projects$Locations$Nodes$Start
|
|
2666
2846
|
extends StandardParameters {
|
|
2667
2847
|
/**
|