MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/nodejs-docs-samples / callStartTpuVM

Function callStartTpuVM

tpu/startVM.js:39–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37 const zone = 'europe-west4-a';
38
39 async function callStartTpuVM() {
40 const request = {
41 name: `projects/${projectId}/locations/${zone}/nodes/${nodeName}`,
42 };
43
44 const [operation] = await tpuClient.startNode(request);
45
46 // Wait for the operation to complete.
47 const [response] = await operation.promise();
48
49 console.log(`Node: ${nodeName} started.`);
50 return response;
51 }
52
53 return await callStartTpuVM();
54 // [END tpu_vm_start]

Callers 1

mainFunction · 0.85

Calls 1

startNodeMethod · 0.80

Tested by

no test coverage detected