public static class HealthCheckerDetails.Builder extends Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
HealthCheckerDetails |
build() |
HealthCheckerDetails.Builder |
copy(HealthCheckerDetails model) |
HealthCheckerDetails.Builder |
dns(DnsHealthCheckerDetails dns) |
HealthCheckerDetails.Builder |
intervalInMillis(Integer intervalInMillis)
The interval between health checks, in milliseconds.
|
HealthCheckerDetails.Builder |
port(Integer port)
The backend server port against which to run the health check.
|
HealthCheckerDetails.Builder |
protocol(HealthCheckProtocols protocol)
The protocol the health check must use; either HTTP or HTTPS, or UDP or TCP.
|
HealthCheckerDetails.Builder |
requestData(byte[] requestData)
Base64 encoded pattern to be sent as UDP or TCP health check probe.
|
HealthCheckerDetails.Builder |
responseBodyRegex(String responseBodyRegex)
A regular expression for parsing the response body from the backend server.
|
HealthCheckerDetails.Builder |
responseData(byte[] responseData)
Base64 encoded pattern to be validated as UDP or TCP health check probe response.
|
HealthCheckerDetails.Builder |
retries(Integer retries)
The number of retries to attempt before a backend server is considered “unhealthy”.
|
HealthCheckerDetails.Builder |
returnCode(Integer returnCode)
The status code a healthy backend server should return.
|
HealthCheckerDetails.Builder |
timeoutInMillis(Integer timeoutInMillis)
The maximum time, in milliseconds, to wait for a reply to a health check.
|
HealthCheckerDetails.Builder |
urlPath(String urlPath)
The path against which to run the health check.
|
public HealthCheckerDetails.Builder protocol(HealthCheckProtocols protocol)
The protocol the health check must use; either HTTP or HTTPS, or UDP or TCP.
Example: HTTP
protocol
- the value to setpublic HealthCheckerDetails.Builder port(Integer port)
The backend server port against which to run the health check. If the port is not
specified, then the network load balancer uses the port information from the Backend
object. The port must be specified if the backend port is 0.
Example: 8080
port
- the value to setpublic HealthCheckerDetails.Builder retries(Integer retries)
The number of retries to attempt before a backend server is considered “unhealthy”. This number also applies when recovering a server to the “healthy” state. The default value is 3.
Example: 3
retries
- the value to setpublic HealthCheckerDetails.Builder timeoutInMillis(Integer timeoutInMillis)
The maximum time, in milliseconds, to wait for a reply to a health check. A health check is successful only if a reply returns within this timeout period. The default value is 3000 (3 seconds).
Example: 3000
timeoutInMillis
- the value to setpublic HealthCheckerDetails.Builder intervalInMillis(Integer intervalInMillis)
The interval between health checks, in milliseconds. The default value is 10000 (10 seconds).
Example: 10000
intervalInMillis
- the value to setpublic HealthCheckerDetails.Builder urlPath(String urlPath)
The path against which to run the health check.
Example: /healthcheck
urlPath
- the value to setpublic HealthCheckerDetails.Builder responseBodyRegex(String responseBodyRegex)
A regular expression for parsing the response body from the backend server.
Example: ^((?!false).|\\s)*$
responseBodyRegex
- the value to setpublic HealthCheckerDetails.Builder returnCode(Integer returnCode)
The status code a healthy backend server should return. If you configure the health check policy to use the HTTP protocol, then you can use common HTTP status codes such as “200”.
Example: 200
returnCode
- the value to setpublic HealthCheckerDetails.Builder requestData(byte[] requestData)
Base64 encoded pattern to be sent as UDP or TCP health check probe.
requestData
- the value to setpublic HealthCheckerDetails.Builder responseData(byte[] responseData)
Base64 encoded pattern to be validated as UDP or TCP health check probe response.
responseData
- the value to setpublic HealthCheckerDetails.Builder dns(DnsHealthCheckerDetails dns)
public HealthCheckerDetails build()
public HealthCheckerDetails.Builder copy(HealthCheckerDetails model)
Copyright © 2016–2024. All rights reserved.