HealthChecker

class oci.network_load_balancer.models.HealthChecker(**kwargs)

Bases: object

The health check policy configuration. For more information, see Editing Health Check Policies.

Attributes

PROTOCOL_DNS A constant which can be used with the protocol property of a HealthChecker.
PROTOCOL_HTTP A constant which can be used with the protocol property of a HealthChecker.
PROTOCOL_HTTPS A constant which can be used with the protocol property of a HealthChecker.
PROTOCOL_TCP A constant which can be used with the protocol property of a HealthChecker.
PROTOCOL_UDP A constant which can be used with the protocol property of a HealthChecker.
dns Gets the dns of this HealthChecker.
interval_in_millis Gets the interval_in_millis of this HealthChecker.
port Gets the port of this HealthChecker.
protocol [Required] Gets the protocol of this HealthChecker.
request_data Gets the request_data of this HealthChecker.
response_body_regex Gets the response_body_regex of this HealthChecker.
response_data Gets the response_data of this HealthChecker.
retries Gets the retries of this HealthChecker.
return_code Gets the return_code of this HealthChecker.
timeout_in_millis Gets the timeout_in_millis of this HealthChecker.
url_path Gets the url_path of this HealthChecker.

Methods

__init__(**kwargs) Initializes a new HealthChecker object with values from keyword arguments.
PROTOCOL_DNS = 'DNS'

A constant which can be used with the protocol property of a HealthChecker. This constant has a value of “DNS”

PROTOCOL_HTTP = 'HTTP'

A constant which can be used with the protocol property of a HealthChecker. This constant has a value of “HTTP”

PROTOCOL_HTTPS = 'HTTPS'

A constant which can be used with the protocol property of a HealthChecker. This constant has a value of “HTTPS”

PROTOCOL_TCP = 'TCP'

A constant which can be used with the protocol property of a HealthChecker. This constant has a value of “TCP”

PROTOCOL_UDP = 'UDP'

A constant which can be used with the protocol property of a HealthChecker. This constant has a value of “UDP”

__init__(**kwargs)

Initializes a new HealthChecker object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • protocol (str) – The value to assign to the protocol property of this HealthChecker. Allowed values for this property are: “HTTP”, “HTTPS”, “TCP”, “UDP”, “DNS”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • port (int) – The value to assign to the port property of this HealthChecker.
  • retries (int) – The value to assign to the retries property of this HealthChecker.
  • timeout_in_millis (int) – The value to assign to the timeout_in_millis property of this HealthChecker.
  • interval_in_millis (int) – The value to assign to the interval_in_millis property of this HealthChecker.
  • url_path (str) – The value to assign to the url_path property of this HealthChecker.
  • response_body_regex (str) – The value to assign to the response_body_regex property of this HealthChecker.
  • return_code (int) – The value to assign to the return_code property of this HealthChecker.
  • request_data (str) – The value to assign to the request_data property of this HealthChecker.
  • response_data (str) – The value to assign to the response_data property of this HealthChecker.
  • dns (oci.network_load_balancer.models.DnsHealthCheckerDetails) – The value to assign to the dns property of this HealthChecker.
dns

Gets the dns of this HealthChecker.

Returns:The dns of this HealthChecker.
Return type:oci.network_load_balancer.models.DnsHealthCheckerDetails
interval_in_millis

Gets the interval_in_millis of this HealthChecker. The interval between health checks, in milliseconds. The default value is 10000 (10 seconds).

Example: 10000

Returns:The interval_in_millis of this HealthChecker.
Return type:int
port

Gets the port of this HealthChecker. 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

Returns:The port of this HealthChecker.
Return type:int
protocol

[Required] Gets the protocol of this HealthChecker. The protocol the health check must use; either HTTP or HTTPS, or UDP or TCP.

Example: HTTP

Allowed values for this property are: “HTTP”, “HTTPS”, “TCP”, “UDP”, “DNS”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The protocol of this HealthChecker.
Return type:str
request_data

Gets the request_data of this HealthChecker. Base64 encoded pattern to be sent as UDP or TCP health check probe.

Returns:The request_data of this HealthChecker.
Return type:str
response_body_regex

Gets the response_body_regex of this HealthChecker. A regular expression for parsing the response body from the backend server.

Example: ^((?!false).|s)*$

Returns:The response_body_regex of this HealthChecker.
Return type:str
response_data

Gets the response_data of this HealthChecker. Base64 encoded pattern to be validated as UDP or TCP health check probe response.

Returns:The response_data of this HealthChecker.
Return type:str
retries

Gets the retries of this HealthChecker. 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

Returns:The retries of this HealthChecker.
Return type:int
return_code

Gets the return_code of this HealthChecker. 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

Returns:The return_code of this HealthChecker.
Return type:int
timeout_in_millis

Gets the timeout_in_millis of this HealthChecker. 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

Returns:The timeout_in_millis of this HealthChecker.
Return type:int
url_path

Gets the url_path of this HealthChecker. The path against which to run the health check.

Example: /healthcheck

Returns:The url_path of this HealthChecker.
Return type:str