Class NetworkInterfaceDnsSettings

java.lang.Object
com.azure.resourcemanager.network.models.NetworkInterfaceDnsSettings
All Implemented Interfaces:
com.azure.json.JsonSerializable<NetworkInterfaceDnsSettings>

public final class NetworkInterfaceDnsSettings extends Object implements com.azure.json.JsonSerializable<NetworkInterfaceDnsSettings>
DNS settings of a network interface.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of NetworkInterfaceDnsSettings class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the appliedDnsServers property: If the VM that uses this NIC is part of an Availability Set, then this list will have the union of all DNS servers from all NICs that are part of the Availability Set.
    Get the dnsServers property: List of DNS servers IP addresses.
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of NetworkInterfaceDnsSettings from the JsonReader.
    Get the internalDnsNameLabel property: Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.
    Get the internalDomainNameSuffix property: Even if internalDnsNameLabel is not specified, a DNS entry is created for the primary NIC of the VM.
    Get the internalFqdn property: Fully qualified DNS name supporting internal communications between VMs in the same virtual network.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    withDnsServers(List<String> dnsServers)
    Set the dnsServers property: List of DNS servers IP addresses.
    withInternalDnsNameLabel(String internalDnsNameLabel)
    Set the internalDnsNameLabel property: Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Constructor Details

    • NetworkInterfaceDnsSettings

      public NetworkInterfaceDnsSettings()
      Creates an instance of NetworkInterfaceDnsSettings class.
  • Method Details

    • dnsServers

      public List<String> dnsServers()
      Get the dnsServers property: List of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to azure provided DNS resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it must be the only value in dnsServers collection.
      Returns:
      the dnsServers value.
    • withDnsServers

      public NetworkInterfaceDnsSettings withDnsServers(List<String> dnsServers)
      Set the dnsServers property: List of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to azure provided DNS resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it must be the only value in dnsServers collection.
      Parameters:
      dnsServers - the dnsServers value to set.
      Returns:
      the NetworkInterfaceDnsSettings object itself.
    • appliedDnsServers

      public List<String> appliedDnsServers()
      Get the appliedDnsServers property: If the VM that uses this NIC is part of an Availability Set, then this list will have the union of all DNS servers from all NICs that are part of the Availability Set. This property is what is configured on each of those VMs.
      Returns:
      the appliedDnsServers value.
    • internalDnsNameLabel

      public String internalDnsNameLabel()
      Get the internalDnsNameLabel property: Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.
      Returns:
      the internalDnsNameLabel value.
    • withInternalDnsNameLabel

      public NetworkInterfaceDnsSettings withInternalDnsNameLabel(String internalDnsNameLabel)
      Set the internalDnsNameLabel property: Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.
      Parameters:
      internalDnsNameLabel - the internalDnsNameLabel value to set.
      Returns:
      the NetworkInterfaceDnsSettings object itself.
    • internalFqdn

      public String internalFqdn()
      Get the internalFqdn property: Fully qualified DNS name supporting internal communications between VMs in the same virtual network.
      Returns:
      the internalFqdn value.
    • internalDomainNameSuffix

      public String internalDomainNameSuffix()
      Get the internalDomainNameSuffix property: Even if internalDnsNameLabel is not specified, a DNS entry is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the VM name with the value of internalDomainNameSuffix.
      Returns:
      the internalDomainNameSuffix value.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<NetworkInterfaceDnsSettings>
      Throws:
      IOException
    • fromJson

      public static NetworkInterfaceDnsSettings fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of NetworkInterfaceDnsSettings from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of NetworkInterfaceDnsSettings if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the NetworkInterfaceDnsSettings.