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

public final class Probe extends Object implements com.azure.json.JsonSerializable<Probe>
Probe describes a health check to be performed against an App Instance to determine whether it is alive or ready to receive traffic.
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    boolean
    Get the disableProbe property: Indicate whether the probe is disabled.
    Get the failureThreshold property: Minimum consecutive failures for the probe to be considered failed after having succeeded.
    static Probe
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of Probe from the JsonReader.
    Get the initialDelaySeconds property: Number of seconds after the App Instance has started before probes are initiated.
    Get the periodSeconds property: How often (in seconds) to perform the probe.
    Get the probeAction property: The action of the probe.
    Get the successThreshold property: Minimum consecutive successes for the probe to be considered successful after having failed.
    Get the timeoutSeconds property: Number of seconds after which the probe times out.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    withDisableProbe(boolean disableProbe)
    Set the disableProbe property: Indicate whether the probe is disabled.
    withFailureThreshold(Integer failureThreshold)
    Set the failureThreshold property: Minimum consecutive failures for the probe to be considered failed after having succeeded.
    withInitialDelaySeconds(Integer initialDelaySeconds)
    Set the initialDelaySeconds property: Number of seconds after the App Instance has started before probes are initiated.
    withPeriodSeconds(Integer periodSeconds)
    Set the periodSeconds property: How often (in seconds) to perform the probe.
    Set the probeAction property: The action of the probe.
    withSuccessThreshold(Integer successThreshold)
    Set the successThreshold property: Minimum consecutive successes for the probe to be considered successful after having failed.
    withTimeoutSeconds(Integer timeoutSeconds)
    Set the timeoutSeconds property: Number of seconds after which the probe times out.

    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

    • Probe

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

    • probeAction

      public ProbeAction probeAction()
      Get the probeAction property: The action of the probe.
      Returns:
      the probeAction value.
    • withProbeAction

      public Probe withProbeAction(ProbeAction probeAction)
      Set the probeAction property: The action of the probe.
      Parameters:
      probeAction - the probeAction value to set.
      Returns:
      the Probe object itself.
    • disableProbe

      public boolean disableProbe()
      Get the disableProbe property: Indicate whether the probe is disabled.
      Returns:
      the disableProbe value.
    • withDisableProbe

      public Probe withDisableProbe(boolean disableProbe)
      Set the disableProbe property: Indicate whether the probe is disabled.
      Parameters:
      disableProbe - the disableProbe value to set.
      Returns:
      the Probe object itself.
    • initialDelaySeconds

      public Integer initialDelaySeconds()
      Get the initialDelaySeconds property: Number of seconds after the App Instance has started before probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes.
      Returns:
      the initialDelaySeconds value.
    • withInitialDelaySeconds

      public Probe withInitialDelaySeconds(Integer initialDelaySeconds)
      Set the initialDelaySeconds property: Number of seconds after the App Instance has started before probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes.
      Parameters:
      initialDelaySeconds - the initialDelaySeconds value to set.
      Returns:
      the Probe object itself.
    • periodSeconds

      public Integer periodSeconds()
      Get the periodSeconds property: How often (in seconds) to perform the probe. Minimum value is 1.
      Returns:
      the periodSeconds value.
    • withPeriodSeconds

      public Probe withPeriodSeconds(Integer periodSeconds)
      Set the periodSeconds property: How often (in seconds) to perform the probe. Minimum value is 1.
      Parameters:
      periodSeconds - the periodSeconds value to set.
      Returns:
      the Probe object itself.
    • timeoutSeconds

      public Integer timeoutSeconds()
      Get the timeoutSeconds property: Number of seconds after which the probe times out. Minimum value is 1.
      Returns:
      the timeoutSeconds value.
    • withTimeoutSeconds

      public Probe withTimeoutSeconds(Integer timeoutSeconds)
      Set the timeoutSeconds property: Number of seconds after which the probe times out. Minimum value is 1.
      Parameters:
      timeoutSeconds - the timeoutSeconds value to set.
      Returns:
      the Probe object itself.
    • failureThreshold

      public Integer failureThreshold()
      Get the failureThreshold property: Minimum consecutive failures for the probe to be considered failed after having succeeded. Minimum value is 1.
      Returns:
      the failureThreshold value.
    • withFailureThreshold

      public Probe withFailureThreshold(Integer failureThreshold)
      Set the failureThreshold property: Minimum consecutive failures for the probe to be considered failed after having succeeded. Minimum value is 1.
      Parameters:
      failureThreshold - the failureThreshold value to set.
      Returns:
      the Probe object itself.
    • successThreshold

      public Integer successThreshold()
      Get the successThreshold property: Minimum consecutive successes for the probe to be considered successful after having failed. Must be 1 for liveness and startup. Minimum value is 1.
      Returns:
      the successThreshold value.
    • withSuccessThreshold

      public Probe withSuccessThreshold(Integer successThreshold)
      Set the successThreshold property: Minimum consecutive successes for the probe to be considered successful after having failed. Must be 1 for liveness and startup. Minimum value is 1.
      Parameters:
      successThreshold - the successThreshold value to set.
      Returns:
      the Probe 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<Probe>
      Throws:
      IOException
    • fromJson

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