pub async fn update_primary_zone(
client: &Arc<Client>,
token: Option<&str>,
zone_name: &str,
server: &str,
secondary_ips: &[String],
) -> Result<bool>Expand description
Update an existing primary zone’s configuration via HTTP API.
Updates a zone’s also-notify and allow-transfer configuration without
deleting and re-adding the zone. This is used when secondary pod IPs change
(e.g., after pod restart) to keep zone transfer ACLs up to date.
Implementation: Uses bindcar’s PATCH endpoint introduced in v0.4.0.
§Arguments
client- HTTP clienttoken- Authentication tokenzone_name- Name of the zone (e.g., “example.com”)server- API endpoint (e.g., “bind9-primary-api:8080”)secondary_ips- Updated list of secondary server IPs for also-notify and allow-transfer
§Returns
Returns Ok(true) if the zone was updated, Ok(false) if no update was needed.
§Errors
Returns an error if the HTTP request fails or the zone cannot be updated.