Disabling Local DNS

The disable operation is used to disable the local DNS support for the current zone. With the operation, you can also disable the local DNS support for the DNS zone template. All the sites or site alias zones, which were added according to the template with the disabled status, will not be supported by local DNS. You can enable the local DNS support for multiple zones in a single packet.

To learn how to retrieve the status information for the local DNS server, refer to the Managing SOA Records and Zone Parameters section.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 
Request Packet Structure

A request XML packet switching off the local DNS support includes the disable operation node:

<packet version="1.6.7.0">
<dns>
   <disable>
   ...
   </disable>
</dns>
</packet>

 

The graphical representation of the disable node is as follows:

Note: The interactive schema navigator for all request packets is available here: http://plesk.github.io/api-schemas/1.6.8.0/agent_input.svg.

  • The filter node is optional. It specifies the filtering rule. If the filter node is omitted, the DNS zone template will changes status to "disable". For more information, refer to the Available Filters section. Data type: dnsSelectionFilterType (dns_input.xsd).

You can disable the local DNS support for multiple zones. Add as many disable operations as the number of different filtering rules.

<dns>
   <disable>
   ...
   </disable>
...
   <disable>
   ...
   </disable>
</dns>
 
Response Packet Structure

The disable 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/1.6.8.0/agent_output.svg.

  • The result node is required. It wraps the response from the server. Data type: resultOpType (dns_output.xsd).
  • The status node is required. It specifies the execution status of the disable operation. Data type: string. Allowed values: ok | error.
  • The errcode node is optional. It is used to return the error code when the disable operation fails. Data type: unsignedInt.
  • The errtext node is optional. It is used to return the error message if the disable operation fails. Data type: string.
  • The site-id node is optional. It is required if the site ID was set as a filtering rule in the response packet. Specifies the ID of the site, which zone will use local DNS. Data type: integer.
  • The site-alias-id node is optional. It is required if the site ID was set as a filtering rule in the response packet. Specifies the ID of the site alias, which zone will use local DNS. Data type: integer.
 
Samples
Disabling the local DNS for two zones

This packet disables the local DNS for the zones specified by site ID 8 and ID 9.

<packet version="1.6.3.0">
<dns>
 <disable>
 <filter>
   <site-id>8</site-id>
   <site-id>9</site-id>
 </filter>
 </disable>
</dns>
</packet>

Response:

<packet version="1.6.3.0">
<dns>
 <disable>
 <result>
   <status>ok</status>
   <site-id>8</site-id>
 </result>
 <result>
   <status>ok</status>
   <site-id>9</site-id>
 </result>
 </disable>
</dns>
</packet>
Disabling the local DNS for the DNS zone template

This packet disables the local DNS for the DNS zone template .

<packet version="1.6.7.0">
<dns>
 <disable/>
</dns>
</packet>

Response:

<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.7.0">
  <dns>
    <disable>
      <result>
        <status>ok</status>
      </result>
    </disable>
  </dns>
</packet>
 

Leave your feedback on this topic here

If you have questions or need support, please visit the Plesk forum or contact your hosting provider.
The comments below are for feedback on the documentation only. No timely answers or help will be provided.