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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the dnsAltServer property: Alternate DNS server to be used by apps.Get the dnsLegacySortOrder property: Indicates that sites using Virtual network custom DNS servers are still sorting the list of DNS servers.Get the dnsMaxCacheTimeout property: Custom time for DNS to be cached in seconds.Get the dnsRetryAttemptCount property: Total number of retries for dns lookup.Get the dnsRetryAttemptTimeout property: Timeout for a single dns lookup in seconds.Get the dnsServers property: List of custom DNS servers to be used by an app for lookups.static SiteDnsConfig
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of SiteDnsConfig from the JsonReader.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withDnsAltServer
(String dnsAltServer) Set the dnsAltServer property: Alternate DNS server to be used by apps.withDnsMaxCacheTimeout
(Integer dnsMaxCacheTimeout) Set the dnsMaxCacheTimeout property: Custom time for DNS to be cached in seconds.withDnsRetryAttemptCount
(Integer dnsRetryAttemptCount) Set the dnsRetryAttemptCount property: Total number of retries for dns lookup.withDnsRetryAttemptTimeout
(Integer dnsRetryAttemptTimeout) Set the dnsRetryAttemptTimeout property: Timeout for a single dns lookup in seconds.withDnsServers
(List<String> dnsServers) Set the dnsServers property: List of custom DNS servers to be used by an app for lookups.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
-
SiteDnsConfig
public SiteDnsConfig()Creates an instance of SiteDnsConfig class.
-
-
Method Details
-
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
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
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
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
Get the dnsRetryAttemptTimeout property: Timeout for a single dns lookup in seconds. Allowed range: 1-30. Default is 3.- Returns:
- the dnsRetryAttemptTimeout value.
-
withDnsRetryAttemptTimeout
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
Get the dnsRetryAttemptCount property: Total number of retries for dns lookup. Allowed range: 1-5. Default is 3.- Returns:
- the dnsRetryAttemptCount value.
-
withDnsRetryAttemptCount
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
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
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
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
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<SiteDnsConfig>
- Throws:
IOException
-
fromJson
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.
-