Class LocalDnsOverride

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

public final class LocalDnsOverride extends Object implements com.azure.json.JsonSerializable<LocalDnsOverride>
Overrides for localDNS profile.
  • Constructor Details

    • LocalDnsOverride

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

    • queryLogging

      public LocalDnsQueryLogging queryLogging()
      Get the queryLogging property: Log level for DNS queries in localDNS.
      Returns:
      the queryLogging value.
    • withQueryLogging

      public LocalDnsOverride withQueryLogging(LocalDnsQueryLogging queryLogging)
      Set the queryLogging property: Log level for DNS queries in localDNS.
      Parameters:
      queryLogging - the queryLogging value to set.
      Returns:
      the LocalDnsOverride object itself.
    • protocol

      public LocalDnsProtocol protocol()
      Get the protocol property: Enforce TCP or prefer UDP protocol for connections from localDNS to upstream DNS server.
      Returns:
      the protocol value.
    • withProtocol

      public LocalDnsOverride withProtocol(LocalDnsProtocol protocol)
      Set the protocol property: Enforce TCP or prefer UDP protocol for connections from localDNS to upstream DNS server.
      Parameters:
      protocol - the protocol value to set.
      Returns:
      the LocalDnsOverride object itself.
    • forwardDestination

      public LocalDnsForwardDestination forwardDestination()
      Get the forwardDestination property: Destination server for DNS queries to be forwarded from localDNS.
      Returns:
      the forwardDestination value.
    • withForwardDestination

      public LocalDnsOverride withForwardDestination(LocalDnsForwardDestination forwardDestination)
      Set the forwardDestination property: Destination server for DNS queries to be forwarded from localDNS.
      Parameters:
      forwardDestination - the forwardDestination value to set.
      Returns:
      the LocalDnsOverride object itself.
    • forwardPolicy

      public LocalDnsForwardPolicy forwardPolicy()
      Get the forwardPolicy property: Forward policy for selecting upstream DNS server. See [forward plugin](https://coredns.io/plugins/forward) for more information.
      Returns:
      the forwardPolicy value.
    • withForwardPolicy

      public LocalDnsOverride withForwardPolicy(LocalDnsForwardPolicy forwardPolicy)
      Set the forwardPolicy property: Forward policy for selecting upstream DNS server. See [forward plugin](https://coredns.io/plugins/forward) for more information.
      Parameters:
      forwardPolicy - the forwardPolicy value to set.
      Returns:
      the LocalDnsOverride object itself.
    • maxConcurrent

      public Integer maxConcurrent()
      Get the maxConcurrent property: Maximum number of concurrent queries. See [forward plugin](https://coredns.io/plugins/forward) for more information.
      Returns:
      the maxConcurrent value.
    • withMaxConcurrent

      public LocalDnsOverride withMaxConcurrent(Integer maxConcurrent)
      Set the maxConcurrent property: Maximum number of concurrent queries. See [forward plugin](https://coredns.io/plugins/forward) for more information.
      Parameters:
      maxConcurrent - the maxConcurrent value to set.
      Returns:
      the LocalDnsOverride object itself.
    • cacheDurationInSeconds

      public Integer cacheDurationInSeconds()
      Get the cacheDurationInSeconds property: Cache max TTL in seconds. See [cache plugin](https://coredns.io/plugins/cache) for more information.
      Returns:
      the cacheDurationInSeconds value.
    • withCacheDurationInSeconds

      public LocalDnsOverride withCacheDurationInSeconds(Integer cacheDurationInSeconds)
      Set the cacheDurationInSeconds property: Cache max TTL in seconds. See [cache plugin](https://coredns.io/plugins/cache) for more information.
      Parameters:
      cacheDurationInSeconds - the cacheDurationInSeconds value to set.
      Returns:
      the LocalDnsOverride object itself.
    • serveStaleDurationInSeconds

      public Integer serveStaleDurationInSeconds()
      Get the serveStaleDurationInSeconds property: Serve stale duration in seconds. See [cache plugin](https://coredns.io/plugins/cache) for more information.
      Returns:
      the serveStaleDurationInSeconds value.
    • withServeStaleDurationInSeconds

      public LocalDnsOverride withServeStaleDurationInSeconds(Integer serveStaleDurationInSeconds)
      Set the serveStaleDurationInSeconds property: Serve stale duration in seconds. See [cache plugin](https://coredns.io/plugins/cache) for more information.
      Parameters:
      serveStaleDurationInSeconds - the serveStaleDurationInSeconds value to set.
      Returns:
      the LocalDnsOverride object itself.
    • serveStale

      public LocalDnsServeStale serveStale()
      Get the serveStale property: Policy for serving stale data. See [cache plugin](https://coredns.io/plugins/cache) for more information.
      Returns:
      the serveStale value.
    • withServeStale

      public LocalDnsOverride withServeStale(LocalDnsServeStale serveStale)
      Set the serveStale property: Policy for serving stale data. See [cache plugin](https://coredns.io/plugins/cache) for more information.
      Parameters:
      serveStale - the serveStale value to set.
      Returns:
      the LocalDnsOverride object itself.
    • 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<LocalDnsOverride>
      Throws:
      IOException
    • fromJson

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