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

Function deleteRegionDisk

compute/test/snapshots.test.js:97–113  ·  view source on GitHub ↗
(projectId, region, diskName)

Source from the content-addressed store, hash-verified

95};
96
97const deleteRegionDisk = async (projectId, region, diskName) => {
98 const [response] = await regionDisksClient.delete({
99 project: projectId,
100 region,
101 disk: diskName,
102 });
103 let operation = response.latestResponse;
104 const operationsClient = new compute.RegionOperationsClient();
105
106 while (operation.status !== 'DONE') {
107 [operation] = await operationsClient.wait({
108 operation: operation.name,
109 project: projectId,
110 region: operation.region.split('/').pop(),
111 });
112 }
113};
114
115describe('snapshots tests', () => {
116 const diskName = `gcloud-test-disk-${uuid.v4().split('-')[0]}`;

Callers 1

snapshots.test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected