ContainerHealthCheck

class oci.container_instances.models.ContainerHealthCheck(**kwargs)

Bases: object

Type of container health check which could be either HTTP, TCP, or Command.

Attributes

FAILURE_ACTION_KILL A constant which can be used with the failure_action property of a ContainerHealthCheck.
FAILURE_ACTION_NONE A constant which can be used with the failure_action property of a ContainerHealthCheck.
HEALTH_CHECK_TYPE_COMMAND A constant which can be used with the health_check_type property of a ContainerHealthCheck.
HEALTH_CHECK_TYPE_HTTP A constant which can be used with the health_check_type property of a ContainerHealthCheck.
HEALTH_CHECK_TYPE_TCP A constant which can be used with the health_check_type property of a ContainerHealthCheck.
STATUS_HEALTHY A constant which can be used with the status property of a ContainerHealthCheck.
STATUS_UNHEALTHY A constant which can be used with the status property of a ContainerHealthCheck.
STATUS_UNKNOWN A constant which can be used with the status property of a ContainerHealthCheck.
failure_action Gets the failure_action of this ContainerHealthCheck.
failure_threshold Gets the failure_threshold of this ContainerHealthCheck.
health_check_type [Required] Gets the health_check_type of this ContainerHealthCheck.
initial_delay_in_seconds Gets the initial_delay_in_seconds of this ContainerHealthCheck.
interval_in_seconds Gets the interval_in_seconds of this ContainerHealthCheck.
name Gets the name of this ContainerHealthCheck.
status Gets the status of this ContainerHealthCheck.
status_details Gets the status_details of this ContainerHealthCheck.
success_threshold Gets the success_threshold of this ContainerHealthCheck.
timeout_in_seconds Gets the timeout_in_seconds of this ContainerHealthCheck.

Methods

__init__(**kwargs) Initializes a new ContainerHealthCheck object with values from keyword arguments.
get_subtype(object_dictionary) Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
FAILURE_ACTION_KILL = 'KILL'

A constant which can be used with the failure_action property of a ContainerHealthCheck. This constant has a value of “KILL”

FAILURE_ACTION_NONE = 'NONE'

A constant which can be used with the failure_action property of a ContainerHealthCheck. This constant has a value of “NONE”

HEALTH_CHECK_TYPE_COMMAND = 'COMMAND'

A constant which can be used with the health_check_type property of a ContainerHealthCheck. This constant has a value of “COMMAND”

HEALTH_CHECK_TYPE_HTTP = 'HTTP'

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

HEALTH_CHECK_TYPE_TCP = 'TCP'

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

STATUS_HEALTHY = 'HEALTHY'

A constant which can be used with the status property of a ContainerHealthCheck. This constant has a value of “HEALTHY”

STATUS_UNHEALTHY = 'UNHEALTHY'

A constant which can be used with the status property of a ContainerHealthCheck. This constant has a value of “UNHEALTHY”

STATUS_UNKNOWN = 'UNKNOWN'

A constant which can be used with the status property of a ContainerHealthCheck. This constant has a value of “UNKNOWN”

__init__(**kwargs)

Initializes a new ContainerHealthCheck object with values from keyword arguments. This class has the following subclasses and if you are using this class as input to a service operations then you should favor using a subclass over the base class:

The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • name (str) – The value to assign to the name property of this ContainerHealthCheck.
  • health_check_type (str) – The value to assign to the health_check_type property of this ContainerHealthCheck. Allowed values for this property are: “HTTP”, “TCP”, “COMMAND”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • initial_delay_in_seconds (int) – The value to assign to the initial_delay_in_seconds property of this ContainerHealthCheck.
  • interval_in_seconds (int) – The value to assign to the interval_in_seconds property of this ContainerHealthCheck.
  • failure_threshold (int) – The value to assign to the failure_threshold property of this ContainerHealthCheck.
  • success_threshold (int) – The value to assign to the success_threshold property of this ContainerHealthCheck.
  • timeout_in_seconds (int) – The value to assign to the timeout_in_seconds property of this ContainerHealthCheck.
  • status (str) – The value to assign to the status property of this ContainerHealthCheck. Allowed values for this property are: “HEALTHY”, “UNHEALTHY”, “UNKNOWN”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • status_details (str) – The value to assign to the status_details property of this ContainerHealthCheck.
  • failure_action (str) – The value to assign to the failure_action property of this ContainerHealthCheck. Allowed values for this property are: “KILL”, “NONE”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
failure_action

Gets the failure_action of this ContainerHealthCheck. The action will be triggered when the container health check fails. There are two types of action: KILL or NONE. The default action is KILL. If failure action is KILL, the container will be subject to the container restart policy.

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

Returns:The failure_action of this ContainerHealthCheck.
Return type:str
failure_threshold

Gets the failure_threshold of this ContainerHealthCheck. Number of consecutive failures at which we consider the check failed.

Returns:The failure_threshold of this ContainerHealthCheck.
Return type:int
static get_subtype(object_dictionary)

Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.

health_check_type

[Required] Gets the health_check_type of this ContainerHealthCheck. Container health check type.

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

Returns:The health_check_type of this ContainerHealthCheck.
Return type:str
initial_delay_in_seconds

Gets the initial_delay_in_seconds of this ContainerHealthCheck. The initial delay in seconds before start checking container health status.

Returns:The initial_delay_in_seconds of this ContainerHealthCheck.
Return type:int
interval_in_seconds

Gets the interval_in_seconds of this ContainerHealthCheck. Number of seconds between two consecutive runs for checking container health.

Returns:The interval_in_seconds of this ContainerHealthCheck.
Return type:int
name

Gets the name of this ContainerHealthCheck. Health check name.

Returns:The name of this ContainerHealthCheck.
Return type:str
status

Gets the status of this ContainerHealthCheck. Status of container

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

Returns:The status of this ContainerHealthCheck.
Return type:str
status_details

Gets the status_details of this ContainerHealthCheck. A message describing the current status in more details.

Returns:The status_details of this ContainerHealthCheck.
Return type:str
success_threshold

Gets the success_threshold of this ContainerHealthCheck. Number of consecutive successes at which we consider the check succeeded again after it was in failure state.

Returns:The success_threshold of this ContainerHealthCheck.
Return type:int
timeout_in_seconds

Gets the timeout_in_seconds of this ContainerHealthCheck. Length of waiting time in seconds before marking health check failed.

Returns:The timeout_in_seconds of this ContainerHealthCheck.
Return type:int