Class SiteDnsConfig

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

public final class SiteDnsConfig extends Object implements com.azure.json.JsonSerializable<SiteDnsConfig>
The SiteDnsConfig model.
  • Constructor Details

    • SiteDnsConfig

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

    • dnsServers

      public List<String> dnsServers()
      Get the dnsServers property: List of custom DNS servers to be used by an app for lookups. Maximum 5 dns servers can be set.
      Returns:
      the dnsServers value.
    • withDnsServers

      public SiteDnsConfig withDnsServers(List<String> dnsServers)
      Set the dnsServers property: List of custom DNS servers to be used by an app for lookups. Maximum 5 dns servers can be set.
      Parameters:
      dnsServers - the dnsServers value to set.
      Returns:
      the SiteDnsConfig object itself.
    • dnsAltServer

      public String dnsAltServer()
      Get the dnsAltServer property: Alternate DNS server to be used by apps. This property replicates the WEBSITE_DNS_ALT_SERVER app setting.
      Returns:
      the dnsAltServer value.
    • withDnsAltServer

      public SiteDnsConfig withDnsAltServer(String dnsAltServer)
      Set the dnsAltServer property: Alternate DNS server to be used by apps. This property replicates the WEBSITE_DNS_ALT_SERVER app setting.
      Parameters:
      dnsAltServer - the dnsAltServer value to set.
      Returns:
      the SiteDnsConfig object itself.
    • dnsRetryAttemptTimeout

      public Integer dnsRetryAttemptTimeout()
      Get the dnsRetryAttemptTimeout property: Timeout for a single dns lookup in seconds. Allowed range: 1-30. Default is 3.
      Returns:
      the dnsRetryAttemptTimeout value.
    • withDnsRetryAttemptTimeout

      public SiteDnsConfig withDnsRetryAttemptTimeout(Integer dnsRetryAttemptTimeout)
      Set the dnsRetryAttemptTimeout property: Timeout for a single dns lookup in seconds. Allowed range: 1-30. Default is 3.
      Parameters:
      dnsRetryAttemptTimeout - the dnsRetryAttemptTimeout value to set.
      Returns:
      the SiteDnsConfig object itself.
    • dnsRetryAttemptCount

      public Integer dnsRetryAttemptCount()
      Get the dnsRetryAttemptCount property: Total number of retries for dns lookup. Allowed range: 1-5. Default is 3.
      Returns:
      the dnsRetryAttemptCount value.
    • withDnsRetryAttemptCount

      public SiteDnsConfig withDnsRetryAttemptCount(Integer dnsRetryAttemptCount)
      Set the dnsRetryAttemptCount property: Total number of retries for dns lookup. Allowed range: 1-5. Default is 3.
      Parameters:
      dnsRetryAttemptCount - the dnsRetryAttemptCount value to set.
      Returns:
      the SiteDnsConfig object itself.
    • dnsMaxCacheTimeout

      public Integer dnsMaxCacheTimeout()
      Get the dnsMaxCacheTimeout property: Custom time for DNS to be cached in seconds. Allowed range: 0-60. Default is 30 seconds. 0 means caching disabled.
      Returns:
      the dnsMaxCacheTimeout value.
    • withDnsMaxCacheTimeout

      public SiteDnsConfig withDnsMaxCacheTimeout(Integer dnsMaxCacheTimeout)
      Set the dnsMaxCacheTimeout property: Custom time for DNS to be cached in seconds. Allowed range: 0-60. Default is 30 seconds. 0 means caching disabled.
      Parameters:
      dnsMaxCacheTimeout - the dnsMaxCacheTimeout value to set.
      Returns:
      the SiteDnsConfig object itself.
    • dnsLegacySortOrder

      public Boolean dnsLegacySortOrder()
      Get the dnsLegacySortOrder property: Indicates that sites using Virtual network custom DNS servers are still sorting the list of DNS servers. Read-Only.
      Returns:
      the dnsLegacySortOrder 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<SiteDnsConfig>
      Throws:
      IOException
    • fromJson

      public static SiteDnsConfig fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of SiteDnsConfig from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of SiteDnsConfig 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 SiteDnsConfig.