Synchronyzing DNS Zones with Template
Plesk for Linux gives you the ability to synchronize all the DNS records containing a predefined IP address with the server-wide DNS template. The synchronization is performed according to the following rules:
- User-modified records always remain intact (are not modified or removed under any circumstances).
- Records added to the template are added to the zone.
- Records removed from the template are removed from the zone (if they were not changed by users before that).
- Records modified in the template are modified in the zone (if they were not changed by users before that).
Note: Once DNS template changes are applied to a DNS zone, Plesk starts treating it as unaltered, that is, not modified by the user. Unaltered zones keep this status until somebody modifies them. After restoration, migration, or upgrade, all zones are treated as user-modified.
To retrieve the ACL of your name server, use the get_acl operation. This operation is available on Linux only.
Request Packet Structure
A request XML packet synchronizing DNS zones with the template includes the sync-with-template operation node.
The graphical representation of the sync-with-template node is as follows:
Note: The interactive schema navigator for all request packets is available here: http://plesk.github.io/api-schemas/184.108.40.206/agent_input.svg.
- The filter node is required. It specifies the filtering rule:
the used IP address, according to the dnsIpSelectionFilter filter.
For more information, refer to the Available Filters
section. Data type: dnsIpSelectionFilterType
Response Packet Structure
The sync-with-template node of the output XML packet is structured as follows:
Note: The interactive schema navigator for all response packets is available here: http://plesk.github.io/api-schemas/220.127.116.11/agent_output.svg.
- The result node is required. It wraps the response retrieved
from the server. Data type: resultType (
- The status node is required. It specifies the execution status of the add_rec operation. Data type: string. Allowed values: ok | error.
- The errcode node is optional. It is used to return the error code when the add_rec operation fails. Data type: unsignedInt.
- The errtext node is optional. It is used to return the error message if the add_rec operation fails. Data type: string.
This request packet synchronizes DNS records with the IP address 18.104.22.168 with the server-wide template.
<packet> <dns> <sync-with-template> <filter> <used-ip>22.214.171.124</used-ip> </filter> </sync-with-template> </dns> </packet>
<packet version="126.96.36.199"> <dns> <sync-with-template> <result> <status>ok</status> </result> </sync-with-template> </dns> </packet>