HealthCheck

class oci.waas.models.HealthCheck(**kwargs)

Bases: object

Health checks monitor the status of your origin servers and only route traffic to the origins that pass the health check. If the health check fails, origin is automatically removed from the load balancing. There is roughly one health check per EDGE POP per period. Any checks that pass will be reported as “healthy”.

Attributes

EXPECTED_RESPONSE_CODE_GROUP_2_XX A constant which can be used with the expected_response_code_group property of a HealthCheck.
EXPECTED_RESPONSE_CODE_GROUP_3_XX A constant which can be used with the expected_response_code_group property of a HealthCheck.
EXPECTED_RESPONSE_CODE_GROUP_4_XX A constant which can be used with the expected_response_code_group property of a HealthCheck.
EXPECTED_RESPONSE_CODE_GROUP_5_XX A constant which can be used with the expected_response_code_group property of a HealthCheck.
METHOD_GET A constant which can be used with the method property of a HealthCheck.
METHOD_HEAD A constant which can be used with the method property of a HealthCheck.
METHOD_POST A constant which can be used with the method property of a HealthCheck.
expected_response_code_group Gets the expected_response_code_group of this HealthCheck.
expected_response_text Gets the expected_response_text of this HealthCheck.
headers Gets the headers of this HealthCheck.
healthy_threshold Gets the healthy_threshold of this HealthCheck.
interval_in_seconds Gets the interval_in_seconds of this HealthCheck.
is_enabled Gets the is_enabled of this HealthCheck.
is_response_text_check_enabled Gets the is_response_text_check_enabled of this HealthCheck.
method Gets the method of this HealthCheck.
path Gets the path of this HealthCheck.
timeout_in_seconds Gets the timeout_in_seconds of this HealthCheck.
unhealthy_threshold Gets the unhealthy_threshold of this HealthCheck.

Methods

__init__(**kwargs) Initializes a new HealthCheck object with values from keyword arguments.
EXPECTED_RESPONSE_CODE_GROUP_2_XX = '2XX'

A constant which can be used with the expected_response_code_group property of a HealthCheck. This constant has a value of “2XX”

EXPECTED_RESPONSE_CODE_GROUP_3_XX = '3XX'

A constant which can be used with the expected_response_code_group property of a HealthCheck. This constant has a value of “3XX”

EXPECTED_RESPONSE_CODE_GROUP_4_XX = '4XX'

A constant which can be used with the expected_response_code_group property of a HealthCheck. This constant has a value of “4XX”

EXPECTED_RESPONSE_CODE_GROUP_5_XX = '5XX'

A constant which can be used with the expected_response_code_group property of a HealthCheck. This constant has a value of “5XX”

METHOD_GET = 'GET'

A constant which can be used with the method property of a HealthCheck. This constant has a value of “GET”

METHOD_HEAD = 'HEAD'

A constant which can be used with the method property of a HealthCheck. This constant has a value of “HEAD”

METHOD_POST = 'POST'

A constant which can be used with the method property of a HealthCheck. This constant has a value of “POST”

__init__(**kwargs)

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

Parameters:
  • is_enabled (bool) – The value to assign to the is_enabled property of this HealthCheck.
  • method (str) – The value to assign to the method property of this HealthCheck. Allowed values for this property are: “GET”, “HEAD”, “POST”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • path (str) – The value to assign to the path property of this HealthCheck.
  • headers (dict(str, str)) – The value to assign to the headers property of this HealthCheck.
  • expected_response_code_group (list[str]) – The value to assign to the expected_response_code_group property of this HealthCheck. Allowed values for items in this list are: “2XX”, “3XX”, “4XX”, “5XX”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • is_response_text_check_enabled (bool) – The value to assign to the is_response_text_check_enabled property of this HealthCheck.
  • expected_response_text (str) – The value to assign to the expected_response_text property of this HealthCheck.
  • interval_in_seconds (int) – The value to assign to the interval_in_seconds property of this HealthCheck.
  • timeout_in_seconds (int) – The value to assign to the timeout_in_seconds property of this HealthCheck.
  • healthy_threshold (int) – The value to assign to the healthy_threshold property of this HealthCheck.
  • unhealthy_threshold (int) – The value to assign to the unhealthy_threshold property of this HealthCheck.
expected_response_code_group

Gets the expected_response_code_group of this HealthCheck. The HTTP response codes that signify a healthy state. - 2XX: Success response code group. - 3XX: Redirection response code group. - 4XX: Client errors response code group. - 5XX: Server errors response code group.

Allowed values for items in this list are: “2XX”, “3XX”, “4XX”, “5XX”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The expected_response_code_group of this HealthCheck.
Return type:list[str]
expected_response_text

Gets the expected_response_text of this HealthCheck. Health check will search for the given text in a case-sensitive manner within the response body and will fail if the text is not found.

Returns:The expected_response_text of this HealthCheck.
Return type:str
headers

Gets the headers of this HealthCheck. HTTP header fields to include in health check requests, expressed as “name”: “value” properties. Because HTTP header field names are case-insensitive, any use of names that are case-insensitive equal to other names will be rejected. If Host is not specified, requests will include a Host header field with value matching the policy’s protected domain. If User-Agent is not specified, requests will include a User-Agent header field with value “waf health checks”.

Note: The only currently-supported header fields are Host and User-Agent.

Returns:The headers of this HealthCheck.
Return type:dict(str, str)
healthy_threshold

Gets the healthy_threshold of this HealthCheck. Number of successful health checks after which the server is marked up.

Returns:The healthy_threshold of this HealthCheck.
Return type:int
interval_in_seconds

Gets the interval_in_seconds of this HealthCheck. Time between health checks of an individual origin server, in seconds.

Returns:The interval_in_seconds of this HealthCheck.
Return type:int
is_enabled

Gets the is_enabled of this HealthCheck. Enables or disables the health checks.

Returns:The is_enabled of this HealthCheck.
Return type:bool
is_response_text_check_enabled

Gets the is_response_text_check_enabled of this HealthCheck. Enables or disables additional check for predefined text in addition to response code.

Returns:The is_response_text_check_enabled of this HealthCheck.
Return type:bool
method

Gets the method of this HealthCheck. An HTTP verb (i.e. HEAD, GET, or POST) to use when performing the health check.

Allowed values for this property are: “GET”, “HEAD”, “POST”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The method of this HealthCheck.
Return type:str
path

Gets the path of this HealthCheck. Path to visit on your origins when performing the health check.

Returns:The path of this HealthCheck.
Return type:str
timeout_in_seconds

Gets the timeout_in_seconds of this HealthCheck. Response timeout represents wait time until request is considered failed, in seconds.

Returns:The timeout_in_seconds of this HealthCheck.
Return type:int
unhealthy_threshold

Gets the unhealthy_threshold of this HealthCheck. Number of failed health checks after which the server is marked down.

Returns:The unhealthy_threshold of this HealthCheck.
Return type:int