liara_delete_dns_record
Remove a DNS record from the Liara cloud platform by specifying the zone and record IDs to manage your domain configurations.
Instructions
Delete a DNS record
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| zoneId | Yes | The zone ID | |
| recordId | Yes | The record ID to delete |
Implementation Reference
- src/services/dns.ts:135-143 (handler)The handler function that executes the deletion of a specific DNS record from a Liara DNS zone using the Liara API.export async function deleteRecord( client: LiaraClient, zoneId: string, recordId: string ): Promise<void> { validateRequired(zoneId, 'Zone ID'); validateRequired(recordId, 'Record ID'); await client.delete(`/v1/zones/${zoneId}/records/${recordId}`); }
- src/api/types.ts:231-239 (schema)Type definitions for DNS records and create requests, relevant for delete operations as they define the structure of records.export type DnsRecordType = 'A' | 'AAAA' | 'CNAME' | 'MX' | 'TXT' | 'NS' | 'SRV'; export interface CreateDnsRecordRequest { type: DnsRecordType; name: string; value: string; ttl?: number; priority?: number; }
- src/services/dns.ts:10-10 (helper)Imports validation helpers used in the deleteRecord function.import { validateRequired, unwrapApiResponse } from '../utils/errors.js';
- src/api/types.ts:221-229 (schema)Interface defining the structure of a DNS record.export interface DnsRecord { _id: string; zoneID: string; type: DnsRecordType; name: string; value: string; ttl: number; priority?: number; }