@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
).
Modifier and Type | Class and Description |
---|---|
static class |
HealthCheck.Builder |
static class |
HealthCheck.ExpectedResponseCodeGroup |
static class |
HealthCheck.Method
An HTTP verb (i.e.
|
EXPLICITLY_SET_FILTER_NAME, EXPLICITLY_SET_PROPERTY_NAME
Constructor and Description |
---|
HealthCheck(Boolean isEnabled,
HealthCheck.Method method,
String path,
Map<String,String> headers,
List<HealthCheck.ExpectedResponseCodeGroup> expectedResponseCodeGroup,
Boolean isResponseTextCheckEnabled,
String expectedResponseText,
Integer intervalInSeconds,
Integer timeoutInSeconds,
Integer healthyThreshold,
Integer unhealthyThreshold)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static HealthCheck.Builder |
builder()
Create a new builder.
|
boolean |
equals(Object o) |
List<HealthCheck.ExpectedResponseCodeGroup> |
getExpectedResponseCodeGroup()
The HTTP response codes that signify a healthy state.
|
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.
|
Map<String,String> |
getHeaders()
HTTP header fields to include in health check requests, expressed as
"name": "value"
properties. |
Integer |
getHealthyThreshold()
Number of successful health checks after which the server is marked up.
|
Integer |
getIntervalInSeconds()
Time between health checks of an individual origin server, in seconds.
|
Boolean |
getIsEnabled()
Enables or disables the health checks.
|
Boolean |
getIsResponseTextCheckEnabled()
Enables or disables additional check for predefined text in addition to response code.
|
HealthCheck.Method |
getMethod()
An HTTP verb (i.e.
|
String |
getPath()
Path to visit on your origins when performing the health check.
|
Integer |
getTimeoutInSeconds()
Response timeout represents wait time until request is considered failed, in seconds.
|
Integer |
getUnhealthyThreshold()
Number of failed health checks after which the server is marked down.
|
int |
hashCode() |
HealthCheck.Builder |
toBuilder() |
String |
toString() |
String |
toString(boolean includeByteArrayContents)
Return a string representation of the object.
|
markPropertyAsExplicitlySet, wasPropertyExplicitlySet
@Deprecated @ConstructorProperties(value={"isEnabled","method","path","headers","expectedResponseCodeGroup","isResponseTextCheckEnabled","expectedResponseText","intervalInSeconds","timeoutInSeconds","healthyThreshold","unhealthyThreshold"}) public HealthCheck(Boolean isEnabled, HealthCheck.Method method, String path, Map<String,String> headers, List<HealthCheck.ExpectedResponseCodeGroup> expectedResponseCodeGroup, Boolean isResponseTextCheckEnabled, String expectedResponseText, Integer intervalInSeconds, Integer timeoutInSeconds, Integer healthyThreshold, Integer unhealthyThreshold)
public static HealthCheck.Builder builder()
Create a new builder.
public HealthCheck.Builder toBuilder()
public Boolean getIsEnabled()
Enables or disables the health checks.
public HealthCheck.Method getMethod()
An HTTP verb (i.e. HEAD, GET, or POST) to use when performing the health check.
public String getPath()
Path to visit on your origins when performing the health check.
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.
public List<HealthCheck.ExpectedResponseCodeGroup> getExpectedResponseCodeGroup()
The HTTP response codes that signify a healthy state. - 2XX: Success response code group.
public Boolean getIsResponseTextCheckEnabled()
Enables or disables additional check for predefined text in addition to response code.
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.
public Integer getIntervalInSeconds()
Time between health checks of an individual origin server, in seconds.
public Integer getTimeoutInSeconds()
Response timeout represents wait time until request is considered failed, in seconds.
public Integer getHealthyThreshold()
Number of successful health checks after which the server is marked up.
public Integer getUnhealthyThreshold()
Number of failed health checks after which the server is marked down.
public String toString()
toString
in class com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
public String toString(boolean includeByteArrayContents)
Return a string representation of the object.
includeByteArrayContents
- true to include the full contents of byte arrayspublic boolean equals(Object o)
equals
in class com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
public int hashCode()
hashCode
in class com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
Copyright © 2016–2024. All rights reserved.