add_a_record

Function add_a_record 

Source
pub async fn add_a_record(
    zone_name: &str,
    name: &str,
    ipv4: &str,
    ttl: Option<i32>,
    server: &str,
    key_data: &RndcKeyData,
) -> Result<()>
Expand description

Add an A record using dynamic DNS update (RFC 2136).

§Arguments

  • zone_name - DNS zone name (e.g., “example.com”)
  • name - Record name (e.g., “www” for www.example.com, or “@” for apex)
  • ipv4 - IPv4 address
  • ttl - Time to live in seconds (None = use zone default)
  • server - DNS server address with port (e.g., “10.0.0.1:53”)
  • key_data - TSIG key for authentication

§Errors

Returns an error if the DNS update fails or the server rejects it.