public class HealthCheck extends AbstractModel
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 Health check protocol (a custom check parameter).
|
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 The target domain name for health check.
|
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 Health check protocol (a custom check parameter), which is required if the value of CheckType is HTTP.
|
Long |
getIntervalTime()
Get Health check interval in seconds.
|
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 IP for health check.
|
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 Health check protocol (a custom check parameter).
|
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 The target domain name for health check.
|
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 Health check protocol (a custom check parameter), which is required if the value of CheckType is HTTP.
|
void |
setIntervalTime(Long IntervalTime)
Set Health check interval in seconds.
|
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 IP for health check.
|
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, getMultipartRequestParams, set, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, 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 interval in seconds. Value range: 5-300. Default value: 5.
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
- The target domain name for health check. It’s applicable only to HTTP/HTTPS forwarding rules and HTTP health checks of TCP listeners. It’s required for 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
- Health check protocol (a custom check parameter). Value range: TCP, HTTP, CUSTOM (applicable only to TCP/UDP listeners, where UDP listeners only support CUSTOM. If custom health check is used, this parameter is required).
Note: This field may return null, indicating that no valid values can be obtained.public String getHttpVersion()
public void setHttpVersion(String HttpVersion)
HttpVersion
- Health check protocol (a custom check parameter), which is required if the value of CheckType is HTTP. This parameter represents the HTTP version of the real server. Value range: HTTP/1.0, HTTP/1.1. (Applicable only to TCP listeners.)
Note: This 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 IP for health check. `0` (default): CLB VIP. `1`: Use the IP range starting with 100.64 as the source IP.
Note: This 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 © 2023. All rights reserved.