Class HealthCheck


  • @Generated(value="OracleSDKGenerator",
               comments="API Version: 20181116")
    public final class HealthCheck
    extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
    Health checks monitor the status of your origin servers and only route traffic to the origins that pass the health check.

    If the health check fails, origin is automatically removed from the load balancing. There is roughly one health check per EDGE POP per period. Any checks that pass will be reported as “healthy”.
    Note: Objects should always be created or deserialized using the HealthCheck.Builder. This model distinguishes fields that are null because they are unset from fields that are explicitly set to null. This is done in the setter methods of the HealthCheck.Builder, which maintain a set of all explicitly set fields called HealthCheck.Builder.__explicitlySet__. The hashCode() and equals(Object) methods are implemented to take the explicitly set fields into account. The constructor, on the other hand, does not take the explicitly set fields into account (since the constructor cannot distinguish explicit null from unset null).

    • Method Detail

      • getIsEnabled

        public Boolean getIsEnabled()
        Enables or disables the health checks.
        Returns:
        the value
      • getMethod

        public HealthCheck.Method getMethod()
        An HTTP verb (i.e.

        HEAD, GET, or POST) to use when performing the health check.

        Returns:
        the value
      • getPath

        public String getPath()
        Path to visit on your origins when performing the health check.
        Returns:
        the value
      • getHeaders

        public Map<String,​String> getHeaders()
        HTTP header fields to include in health check requests, expressed as “name”: “value” properties.

        Because HTTP header field names are case-insensitive, any use of names that are case-insensitive equal to other names will be rejected. If Host is not specified, requests will include a Host header field with value matching the policy’s protected domain. If User-Agent is not specified, requests will include a User-Agent header field with value “waf health checks”.

        *Note:** The only currently-supported header fields are Host and User-Agent.

        Returns:
        the value
      • getExpectedResponseCodeGroup

        public List<HealthCheck.ExpectedResponseCodeGroup> getExpectedResponseCodeGroup()
        The HTTP response codes that signify a healthy state.
        • 2XX: Success response code group.
        • 3XX: Redirection response code group. - 4XX: Client errors response code group. - 5XX: Server errors response code group.
        Returns:
        the value
      • getIsResponseTextCheckEnabled

        public Boolean getIsResponseTextCheckEnabled()
        Enables or disables additional check for predefined text in addition to response code.
        Returns:
        the value
      • getExpectedResponseText

        public String getExpectedResponseText()
        Health check will search for the given text in a case-sensitive manner within the response body and will fail if the text is not found.
        Returns:
        the value
      • getIntervalInSeconds

        public Integer getIntervalInSeconds()
        Time between health checks of an individual origin server, in seconds.
        Returns:
        the value
      • getTimeoutInSeconds

        public Integer getTimeoutInSeconds()
        Response timeout represents wait time until request is considered failed, in seconds.
        Returns:
        the value
      • getHealthyThreshold

        public Integer getHealthyThreshold()
        Number of successful health checks after which the server is marked up.
        Returns:
        the value
      • getUnhealthyThreshold

        public Integer getUnhealthyThreshold()
        Number of failed health checks after which the server is marked down.
        Returns:
        the value
      • toString

        public String toString()
        Overrides:
        toString in class com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
      • toString

        public String toString​(boolean includeByteArrayContents)
        Return a string representation of the object.
        Parameters:
        includeByteArrayContents - true to include the full contents of byte arrays
        Returns:
        string representation
      • equals

        public boolean equals​(Object o)
        Overrides:
        equals in class com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel