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

Function callStopTpuVM

tpu/stopVM.js:39–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected