Skip to main content
Glama

liara_delete_zone

Remove a DNS zone from the Liara cloud platform by specifying its zone ID to manage infrastructure configurations.

Instructions

Delete a DNS zone

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
zoneIdYesThe zone ID to delete

Implementation Reference

  • The core handler function that deletes a DNS zone using the Liara API client. This implements the logic for the 'liara_delete_zone' tool.
    export async function deleteZone( client: LiaraClient, zoneId: string ): Promise<void> { validateRequired(zoneId, 'Zone ID'); await client.delete(`/v1/zones/${zoneId}`); }
  • Type definition for DNS Zone, relevant for input/output of DNS operations including deleteZone.
    export interface Zone { _id: string; name: string; status: 'ACTIVE' | 'PENDING'; createdAt: string; nameservers?: string[]; }
  • Imports LiaraClient used in deleteZone to make the API call.
    import { LiaraClient } from '../api/client.js'; import { Zone, DnsRecord, CreateDnsRecordRequest, DomainCheck, PaginationOptions, paginationToParams, } from '../api/types.js'; import { validateRequired, unwrapApiResponse } from '../utils/errors.js'; /** * List all DNS zones */ export async function listZones( client: LiaraClient, pagination?: PaginationOptions ): Promise<Zone[]> { const params = paginationToParams(pagination); const response = await client.get<any>('/v1/zones', params); return unwrapApiResponse<Zone[]>(response, ['zones', 'data', 'items']); } /** * Get details of a specific DNS zone */ export async function getZone( client: LiaraClient, zoneId: string ): Promise<Zone> { validateRequired(zoneId, 'Zone ID'); return await client.get<Zone>(`/v1/zones/${zoneId}`); } /** * Create a new DNS zone */ export async function createZone( client: LiaraClient, name: string ): Promise<Zone> { validateRequired(name, 'Zone name'); return await client.post<Zone>('/v1/zones', { name }); } /** * Delete a DNS zone */ export async function deleteZone( client: LiaraClient, zoneId: string ): Promise<void> { validateRequired(zoneId, 'Zone ID'); await client.delete(`/v1/zones/${zoneId}`); }

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/razavioo/liara-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server