Upsert DNS record
upsert_dns_recordCreate or update a forward DNS record in a VPSnet zone by name, type, and content, preserving existing values or updating TTL and comment when identical.
Instructions
Add a forward DNS desired-state record to a native zone, identified by name, type and content together. Different content adds another record and keeps existing values; it does not replace them. An identical tuple updates its TTL/comment and re-enables it if disabled. To replace an existing record's content, read get_dns_zone and pass its exact record_id to update_dns_record. Changes affect public answers after publication. PTR and *.arpa are rejected; use change_rdns for reverse DNS. Requires dns:write when using an API key.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ttl | No | TTL in seconds, allowed range 60-604800. Defaults to 120. | |
| name | Yes | Record name. Use @ for apex, or a relative name inside the zone. | |
| type | Yes | DNS record type. PTR is intentionally not supported here. | |
| comment | No | Optional note about this record, max 255 chars. | |
| content | Yes | DNS record value for the selected type | |
| zone_id | Yes | DNS zone ID |