public class HealthChecker extends AbstractModel
header, skipSign
Constructor and Description |
---|
HealthChecker() |
HealthChecker(HealthChecker source)
NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
|
Modifier and Type | Method and Description |
---|---|
Long |
getCriticalThreshold()
Get Unhealthy state threshold, in the number of times.
|
String[] |
getExpectedCodes()
Get The status codes used to determine that the probe result is healthy when the probe node initiates a health check to an origin server.
|
String |
getFollowRedirect()
Get Whether to follow 301/302 redirect.
|
CustomizedHeader[] |
getHeaders()
Get The custom HTTP request header carried by a probe request, with a maximum value of 10.
|
Long |
getHealthThreshold()
Get Healthy state threshold, in the number of times.
|
Long |
getInterval()
Get Check frequency, in seconds.
|
String |
getMethod()
Get Request method.
|
String |
getPath()
Get Probe path.
|
Long |
getPort()
Get Check port, which is required when Type = HTTP, Type = HTTPS, Type = TCP, or Type = UDP.
|
String |
getRecvContext()
Get The expected return result from an origin server during health check.
|
String |
getSendContext()
Get The content sent by a health check.
|
Long |
getTimeout()
Get Timeout for each health check, in seconds.
|
String |
getType()
Get Health check policy.
|
void |
setCriticalThreshold(Long CriticalThreshold)
Set Unhealthy state threshold, in the number of times.
|
void |
setExpectedCodes(String[] ExpectedCodes)
Set The status codes used to determine that the probe result is healthy when the probe node initiates a health check to an origin server.
|
void |
setFollowRedirect(String FollowRedirect)
Set Whether to follow 301/302 redirect.
|
void |
setHeaders(CustomizedHeader[] Headers)
Set The custom HTTP request header carried by a probe request, with a maximum value of 10.
|
void |
setHealthThreshold(Long HealthThreshold)
Set Healthy state threshold, in the number of times.
|
void |
setInterval(Long Interval)
Set Check frequency, in seconds.
|
void |
setMethod(String Method)
Set Request method.
|
void |
setPath(String Path)
Set Probe path.
|
void |
setPort(Long Port)
Set Check port, which is required when Type = HTTP, Type = HTTPS, Type = TCP, or Type = UDP.
|
void |
setRecvContext(String RecvContext)
Set The expected return result from an origin server during health check.
|
void |
setSendContext(String SendContext)
Set The content sent by a health check.
|
void |
setTimeout(Long Timeout)
Set Timeout for each health check, in seconds.
|
void |
setType(String Type)
Set Health check policy.
|
void |
toMap(HashMap<String,String> map,
String prefix)
Internal implementation, normal users should not use it.
|
any, fromJsonString, getBinaryParams, GetHeader, getMultipartRequestParams, getSkipSign, set, SetHeader, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, setSkipSign, toJsonString
public HealthChecker()
public HealthChecker(HealthChecker source)
public String getType()
public void setType(String Type)
Type
- Health check policy. Valid values:
public Long getPort()
public void setPort(Long Port)
Port
- Check port, which is required when Type = HTTP, Type = HTTPS, Type = TCP, or Type = UDP.public Long getInterval()
public void setInterval(Long Interval)
Interval
- Check frequency, in seconds. It indicates how often a health check task is initiated. Valid values: 30, 60, 180, 300, 600.public Long getTimeout()
public void setTimeout(Long Timeout)
Timeout
- Timeout for each health check, in seconds. If the health check time exceeds this value, the check result is determined as "unhealthy". The default value is 5s, and the value should be less than Interval.public Long getHealthThreshold()
public void setHealthThreshold(Long HealthThreshold)
HealthThreshold
- Healthy state threshold, in the number of times. It indicates that if the consecutive health check results are "healthy" for a certain number of times, an origin server is considered "healthy". The default value is 3 times, with the minimum value of 1 time.public Long getCriticalThreshold()
public void setCriticalThreshold(Long CriticalThreshold)
CriticalThreshold
- Unhealthy state threshold, in the number of times. It indicates that if the consecutive health check results are "unhealthy" for a certain number of times, an origin server is considered "unhealthy". The default value is 2 times.public String getPath()
public void setPath(String Path)
Path
- Probe path. This parameter is valid only when Type = HTTP or Type = HTTPS. It needs to include the complete host/path and should not contain a protocol, for example, www.example.com/test.public String getMethod()
public void setMethod(String Method)
Method
- Request method. This parameter is valid only when Type = HTTP or Type = HTTPS. Valid values:
public String[] getExpectedCodes()
public void setExpectedCodes(String[] ExpectedCodes)
ExpectedCodes
- The status codes used to determine that the probe result is healthy when the probe node initiates a health check to an origin server. This parameter is valid only when Type = HTTP or Type = HTTPS.public CustomizedHeader[] getHeaders()
public void setHeaders(CustomizedHeader[] Headers)
Headers
- The custom HTTP request header carried by a probe request, with a maximum value of 10. This parameter is valid only when Type = HTTP or Type = HTTPS.public String getFollowRedirect()
public void setFollowRedirect(String FollowRedirect)
FollowRedirect
- Whether to follow 301/302 redirect. When enabled, 301/302 is considered a "healthy" status code, redirecting 3 times by default. This parameter is valid only when Type = HTTP or Type = HTTPS.public String getSendContext()
public void setSendContext(String SendContext)
SendContext
- The content sent by a health check. Only ASCII visible characters are allowed, with up to 500 characters. This parameter is valid only when Type = UDP.public String getRecvContext()
public void setRecvContext(String RecvContext)
RecvContext
- The expected return result from an origin server during health check. Only ASCII visible characters are allowed, with up to 500 characters. This parameter is valid only when Type = UDP.Copyright © 2024. All rights reserved.