Class DnsConfiguration
java.lang.Object
com.azure.resourcemanager.containerinstance.models.DnsConfiguration
- All Implemented Interfaces:
com.azure.json.JsonSerializable<DnsConfiguration>
public final class DnsConfiguration
extends Object
implements com.azure.json.JsonSerializable<DnsConfiguration>
DNS configuration for the container group.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DnsConfigurationfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of DnsConfiguration from the JsonReader.Get the nameServers property: The DNS servers for the container group.options()Get the options property: The DNS options for the container group.Get the searchDomains property: The DNS search domains for hostname lookup in the container group.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withNameServers(List<String> nameServers) Set the nameServers property: The DNS servers for the container group.withOptions(String options) Set the options property: The DNS options for the container group.withSearchDomains(String searchDomains) Set the searchDomains property: The DNS search domains for hostname lookup in the container group.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
DnsConfiguration
public DnsConfiguration()Creates an instance of DnsConfiguration class.
-
-
Method Details
-
nameServers
Get the nameServers property: The DNS servers for the container group.- Returns:
- the nameServers value.
-
withNameServers
Set the nameServers property: The DNS servers for the container group.- Parameters:
nameServers- the nameServers value to set.- Returns:
- the DnsConfiguration object itself.
-
searchDomains
Get the searchDomains property: The DNS search domains for hostname lookup in the container group.- Returns:
- the searchDomains value.
-
withSearchDomains
Set the searchDomains property: The DNS search domains for hostname lookup in the container group.- Parameters:
searchDomains- the searchDomains value to set.- Returns:
- the DnsConfiguration object itself.
-
options
Get the options property: The DNS options for the container group.- Returns:
- the options value.
-
withOptions
Set the options property: The DNS options for the container group.- Parameters:
options- the options value to set.- Returns:
- the DnsConfiguration object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<DnsConfiguration>- Throws:
IOException
-
fromJson
Reads an instance of DnsConfiguration from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of DnsConfiguration if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the DnsConfiguration.
-