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

Function deleteDiskSnapshot

compute/test/disks.test.js:103–117  ·  view source on GitHub ↗
(projectId, snapshotName)

Source from the content-addressed store, hash-verified

101};
102
103const deleteDiskSnapshot = async (projectId, snapshotName) => {
104 const [response] = await snapshotsClient.delete({
105 project: projectId,
106 snapshot: snapshotName,
107 });
108 let operation = response.latestResponse;
109 const operationsClient = new compute.GlobalOperationsClient();
110
111 while (operation.status !== 'DONE') {
112 [operation] = await operationsClient.wait({
113 operation: operation.name,
114 project: projectId,
115 });
116 }
117};
118
119describe('disks tests', () => {
120 const instanceName = generateTestId();

Callers 1

disks.test.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected