liara_delete_disk
Remove a disk from an application on the Liara cloud platform by specifying the app and disk names to manage storage resources.
Instructions
Delete a disk
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| appName | Yes | The name of the app | |
| diskName | Yes | The name of the disk to delete |
Implementation Reference
- src/services/disks.ts:76-84 (handler)The main handler function for deleting a disk in a Liara project. This implements the core logic of the 'liara_delete_disk' tool by calling the Liara API to delete the specified disk.export async function deleteDisk( client: LiaraClient, appName: string, diskName: string ): Promise<void> { validateAppName(appName); validateRequired(diskName, 'Disk name'); await client.delete(`/v1/projects/${appName}/disks/${diskName}`); }
- src/api/types.ts:242-242 (schema)Type definitions related to disks, including Disk interface used in API responses.export interface Disk {
- src/utils/errors.ts:5-9 (helper)Validation helpers used in deleteDisk, like validateAppName and validateRequired. (Assuming content based on usage; exact lines approximate.)constructor( message: string, public code?: string, public details?: any, public suggestions?: string[]
- src/services/disks.ts:81-84 (helper)Validation calls within the handler.validateAppName(appName); validateRequired(diskName, 'Disk name'); await client.delete(`/v1/projects/${appName}/disks/${diskName}`); }