public static class HealthCheck.Builder extends Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
HealthCheck |
build() |
HealthCheck.Builder |
copy(HealthCheck model) |
HealthCheck.Builder |
expectedResponseCodeGroup(List<HealthCheck.ExpectedResponseCodeGroup> expectedResponseCodeGroup)
The HTTP response codes that signify a healthy state.
|
HealthCheck.Builder |
expectedResponseText(String expectedResponseText)
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.
|
HealthCheck.Builder |
headers(Map<String,String> headers)
HTTP header fields to include in health check requests, expressed as
"name":
"value" properties. |
HealthCheck.Builder |
healthyThreshold(Integer healthyThreshold)
Number of successful health checks after which the server is marked up.
|
HealthCheck.Builder |
intervalInSeconds(Integer intervalInSeconds)
Time between health checks of an individual origin server, in seconds.
|
HealthCheck.Builder |
isEnabled(Boolean isEnabled)
Enables or disables the health checks.
|
HealthCheck.Builder |
isResponseTextCheckEnabled(Boolean isResponseTextCheckEnabled)
Enables or disables additional check for predefined text in addition to response code.
|
HealthCheck.Builder |
method(HealthCheck.Method method)
An HTTP verb (i.e.
|
HealthCheck.Builder |
path(String path)
Path to visit on your origins when performing the health check.
|
HealthCheck.Builder |
timeoutInSeconds(Integer timeoutInSeconds)
Response timeout represents wait time until request is considered failed, in seconds.
|
HealthCheck.Builder |
unhealthyThreshold(Integer unhealthyThreshold)
Number of failed health checks after which the server is marked down.
|
public HealthCheck.Builder isEnabled(Boolean isEnabled)
Enables or disables the health checks.
isEnabled
- the value to setpublic HealthCheck.Builder method(HealthCheck.Method method)
An HTTP verb (i.e. HEAD, GET, or POST) to use when performing the health check.
method
- the value to setpublic HealthCheck.Builder path(String path)
Path to visit on your origins when performing the health check.
path
- the value to setpublic HealthCheck.Builder headers(Map<String,String> headers)
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.
headers
- the value to setpublic HealthCheck.Builder expectedResponseCodeGroup(List<HealthCheck.ExpectedResponseCodeGroup> expectedResponseCodeGroup)
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.
expectedResponseCodeGroup
- the value to setpublic HealthCheck.Builder isResponseTextCheckEnabled(Boolean isResponseTextCheckEnabled)
Enables or disables additional check for predefined text in addition to response code.
isResponseTextCheckEnabled
- the value to setpublic HealthCheck.Builder expectedResponseText(String expectedResponseText)
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.
expectedResponseText
- the value to setpublic HealthCheck.Builder intervalInSeconds(Integer intervalInSeconds)
Time between health checks of an individual origin server, in seconds.
intervalInSeconds
- the value to setpublic HealthCheck.Builder timeoutInSeconds(Integer timeoutInSeconds)
Response timeout represents wait time until request is considered failed, in seconds.
timeoutInSeconds
- the value to setpublic HealthCheck.Builder healthyThreshold(Integer healthyThreshold)
Number of successful health checks after which the server is marked up.
healthyThreshold
- the value to setpublic HealthCheck.Builder unhealthyThreshold(Integer unhealthyThreshold)
Number of failed health checks after which the server is marked down.
unhealthyThreshold
- the value to setpublic HealthCheck build()
public HealthCheck.Builder copy(HealthCheck model)
Copyright © 2016–2024. All rights reserved.