Interface NetworkInterface.UpdateStages.WithDnsServer

All Known Subinterfaces:
NetworkInterface.Update
Enclosing interface:
NetworkInterface.UpdateStages

public static interface NetworkInterface.UpdateStages.WithDnsServer
The stage of the network interface update allowing to specify DNS servers.
  • Method Details

    • withDnsServer

      NetworkInterface.Update withDnsServer(String ipAddress)
      Specifies the IP address of the custom DNS server to associate with the network interface.

      Note this method's effect is additive, i.e. each time it is used, the new dns server is added to the network interface.

      Parameters:
      ipAddress - the IP address of the DNS server
      Returns:
      the next stage of the network interface update
    • withoutDnsServer

      NetworkInterface.Update withoutDnsServer(String ipAddress)
      Removes a DNS server associated with the network interface.
      Parameters:
      ipAddress - the IP address of the DNS server
      Returns:
      the next stage of the network interface update
    • withAzureDnsServer

      NetworkInterface.Update withAzureDnsServer()
      Specifies to use the default Azure DNS server for the network interface.

      Using azure DNS server will remove any custom DNS server associated with this network interface.

      Returns:
      the next stage of the network interface update