public class HealthCheck extends AbstractModel
header, skipSign
Constructor and Description |
---|
HealthCheck() |
HealthCheck(HealthCheck 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 |
getCheckPort()
Get Health check port (a custom check parameter), which is the port of the real server by default.
|
String |
getCheckType()
Get u200dHealth check protocol.
|
String |
getContextType()
Get Health check protocol (a custom check parameter), which is required if the value of CheckType is CUSTOM.
|
String |
getExtendedCode()
Get GRPC health check status code, which is only applicable to rules with GRPC as the backend forwarding protocol.
|
Long |
getHealthNum()
Get Health threshold.
|
Long |
getHealthSwitch()
Get Whether to enable health check.
|
String |
getHttpCheckDomain()
Get Health check domain name.
|
String |
getHttpCheckMethod()
Get Health check method (applicable only to HTTP/HTTPS forwarding rules and HTTP health checks of TCP listeners).
|
String |
getHttpCheckPath()
Get Health check path (applicable only to HTTP/HTTPS forwarding rules and HTTP health checks of TCP listeners).
|
Long |
getHttpCode()
Get Health check status code (applicable only to HTTP/HTTPS forwarding rules and HTTP health checks of TCP listeners).
|
String |
getHttpVersion()
Get HTTP version.
|
Long |
getIntervalTime()
Get Health check probing interval period.
|
String |
getRecvContext()
Get Health check protocol (a custom check parameter), which is required if the value of CheckType is CUSTOM.
|
String |
getSendContext()
Get Health check protocol (a custom check parameter), which is required if the value of CheckType is CUSTOM.
|
Long |
getSourceIpType()
Get Specifies the type of health check source IP.
|
Long |
getTimeOut()
Get Health check response timeout period in seconds (applicable only to layer-4 listeners).
|
Long |
getUnHealthNum()
Get Unhealthy threshold.
|
void |
setCheckPort(Long CheckPort)
Set Health check port (a custom check parameter), which is the port of the real server by default.
|
void |
setCheckType(String CheckType)
Set u200dHealth check protocol.
|
void |
setContextType(String ContextType)
Set Health check protocol (a custom check parameter), which is required if the value of CheckType is CUSTOM.
|
void |
setExtendedCode(String ExtendedCode)
Set GRPC health check status code, which is only applicable to rules with GRPC as the backend forwarding protocol.
|
void |
setHealthNum(Long HealthNum)
Set Health threshold.
|
void |
setHealthSwitch(Long HealthSwitch)
Set Whether to enable health check.
|
void |
setHttpCheckDomain(String HttpCheckDomain)
Set Health check domain name.
|
void |
setHttpCheckMethod(String HttpCheckMethod)
Set Health check method (applicable only to HTTP/HTTPS forwarding rules and HTTP health checks of TCP listeners).
|
void |
setHttpCheckPath(String HttpCheckPath)
Set Health check path (applicable only to HTTP/HTTPS forwarding rules and HTTP health checks of TCP listeners).
|
void |
setHttpCode(Long HttpCode)
Set Health check status code (applicable only to HTTP/HTTPS forwarding rules and HTTP health checks of TCP listeners).
|
void |
setHttpVersion(String HttpVersion)
Set HTTP version.
|
void |
setIntervalTime(Long IntervalTime)
Set Health check probing interval period.
|
void |
setRecvContext(String RecvContext)
Set Health check protocol (a custom check parameter), which is required if the value of CheckType is CUSTOM.
|
void |
setSendContext(String SendContext)
Set Health check protocol (a custom check parameter), which is required if the value of CheckType is CUSTOM.
|
void |
setSourceIpType(Long SourceIpType)
Set Specifies the type of health check source IP.
|
void |
setTimeOut(Long TimeOut)
Set Health check response timeout period in seconds (applicable only to layer-4 listeners).
|
void |
setUnHealthNum(Long UnHealthNum)
Set Unhealthy threshold.
|
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 HealthCheck()
public HealthCheck(HealthCheck source)
public Long getHealthSwitch()
public void setHealthSwitch(Long HealthSwitch)
HealthSwitch
- Whether to enable health check. 1: enable; 0: disable.public Long getTimeOut()
public void setTimeOut(Long TimeOut)
TimeOut
- Health check response timeout period in seconds (applicable only to layer-4 listeners). Value range: 2-60. Default value: 2. This parameter should be less than the check interval.
Note: This field may return null, indicating that no valid values can be obtained.public Long getIntervalTime()
public void setIntervalTime(Long IntervalTime)
IntervalTime
- Health check probing interval period. It defaults to `5`. For IPv4 CLB instances, the range is 2-300. For IPv6 CLB instances, the range is 5-300. Unit: second
Note: For some IPv4 CLB instances created long ago, the range is 5-300.
Note: This field may return null, indicating that no valid values can be obtained.public Long getHealthNum()
public void setHealthNum(Long HealthNum)
HealthNum
- Health threshold. Default value: 3, indicating that if a forward is found healthy three consecutive times, it is considered to be normal. Value range: 2-10
Note: This field may return null, indicating that no valid values can be obtained.public Long getUnHealthNum()
public void setUnHealthNum(Long UnHealthNum)
UnHealthNum
- Unhealthy threshold. Default value: 3, indicating that if a forward is found unhealthy three consecutive times, it is considered to be exceptional. Value range: 2-10
Note: This field may return null, indicating that no valid values can be obtained.public Long getHttpCode()
public void setHttpCode(Long HttpCode)
HttpCode
- Health check status code (applicable only to HTTP/HTTPS forwarding rules and HTTP health checks of TCP listeners). Value range: 1-31. Default value: 31.
`1`: Returns code 1xx for healthy status. `2`: Returns code 2xx for healthy status. `4`: Returns code 3xx for healthy status. `8`: Returns code 4xx for healthy status. `16`: Returns code 5xx for healthy status. If you want multiple return codes to represent healthy, sum up the corresponding values.
Note: This field may return `null`, indicating that no valid values can be obtained.public String getHttpCheckPath()
public void setHttpCheckPath(String HttpCheckPath)
HttpCheckPath
- Health check path (applicable only to HTTP/HTTPS forwarding rules and HTTP health checks of TCP listeners).
Note: This field may return null, indicating that no valid values can be obtained.public String getHttpCheckDomain()
public void setHttpCheckDomain(String HttpCheckDomain)
HttpCheckDomain
- Health check domain name. It’s applicable only to HTTP/HTTPS forwarding rules and HTTP health checks of TCP listeners. It’s required for HTTP health check of TCP listeners.
Note: This field may return·null, indicating that no valid values can be obtained.public String getHttpCheckMethod()
public void setHttpCheckMethod(String HttpCheckMethod)
HttpCheckMethod
- Health check method (applicable only to HTTP/HTTPS forwarding rules and HTTP health checks of TCP listeners). Value range: HEAD, GET. Default value: HEAD.
Note: This field may return null, indicating that no valid values can be obtained.public Long getCheckPort()
public void setCheckPort(Long CheckPort)
CheckPort
- Health check port (a custom check parameter), which is the port of the real server by default. Unless you want to specify a port, it is recommended to leave it empty. (Applicable only to TCP/UDP listeners.)
Note: This field may return null, indicating that no valid values can be obtained.public String getContextType()
public void setContextType(String ContextType)
ContextType
- Health check protocol (a custom check parameter), which is required if the value of CheckType is CUSTOM. This parameter represents the input format of the health check. Value range: HEX, TEXT. If the value is HEX, the characters of SendContext and RecvContext can only be selected from 0123456789ABCDEF and the length must be an even number. (Applicable only to TCP/UDP listeners.)
Note: This field may return null, indicating that no valid values can be obtained.public String getSendContext()
public void setSendContext(String SendContext)
SendContext
- Health check protocol (a custom check parameter), which is required if the value of CheckType is CUSTOM. This parameter represents the content of the request sent by the health check. Only ASCII visible characters are allowed, and the maximum length is 500. (Applicable only to TCP/UDP listeners.)
Note: This field may return null, indicating that no valid values can be obtained.public String getRecvContext()
public void setRecvContext(String RecvContext)
RecvContext
- Health check protocol (a custom check parameter), which is required if the value of CheckType is CUSTOM. This parameter represents the result returned by the health check. Only ASCII visible characters are allowed, and the maximum length is 500. (Applicable only to TCP/UDP listeners.)
Note: This field may return null, indicating that no valid values can be obtained.public String getCheckType()
public void setCheckType(String CheckType)
CheckType
- u200dHealth check protocol. Values: `TCP`, `HTTP`, `HTTPS`, `GRPC`, `PING`, and `CUSTOM`. UDP listeners support `PING`/`CUSTOM`. TCP listener support `TCP`/`HTTP`/`CUSTOM`. TCP_SSL and QUIC listeners support `TCP`/`HTTP`. HTTP rules support `HTTP`/`GRPC. HTTPS rules support `HTTP`/`HTTPS`/`GRPC`.
Note: u200dThis field may return null, indicating that no valid values can be obtained.public String getHttpVersion()
public void setHttpVersion(String HttpVersion)
HttpVersion
- HTTP version. HTTP version of the backend service. Values: `HTTP/1.0`, HTTP/1.1`. It is only applicable to TCP listeners, and is required when `CheckType`=`HTTP`.
Note: u200dThis field may return null, indicating that no valid values can be obtained.public Long getSourceIpType()
public void setSourceIpType(Long SourceIpType)
SourceIpType
- Specifies the type of health check source IP. `0` (default): CLB VIP. `1`: 100.64 IP range.
Note: u200dThis field may return null, indicating that no valid values can be obtained.public String getExtendedCode()
public void setExtendedCode(String ExtendedCode)
ExtendedCode
- GRPC health check status code, which is only applicable to rules with GRPC as the backend forwarding protocol. It can be a single number (such as `20`), multiple numbers (such as `20,25`) or a range (such as `0-99`). The default value is `12`.
Note: This field may return `null`, indicating that no valid values can be obtained.Copyright © 2024. All rights reserved.