| 77 | }; |
| 78 | |
| 79 | const deleteDisk = async (projectId, zone, diskName) => { |
| 80 | const [response] = await disksClient.delete({ |
| 81 | project: projectId, |
| 82 | zone, |
| 83 | disk: diskName, |
| 84 | }); |
| 85 | let operation = response.latestResponse; |
| 86 | const operationsClient = new compute.ZoneOperationsClient(); |
| 87 | |
| 88 | while (operation.status !== 'DONE') { |
| 89 | [operation] = await operationsClient.wait({ |
| 90 | operation: operation.name, |
| 91 | project: projectId, |
| 92 | zone: operation.zone.split('/').pop(), |
| 93 | }); |
| 94 | } |
| 95 | }; |
| 96 | |
| 97 | const deleteRegionDisk = async (projectId, region, diskName) => { |
| 98 | const [response] = await regionDisksClient.delete({ |