ContainerCommandHealthCheck

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

Bases: oci.container_instances.models.container_health_check.ContainerHealthCheck

Container Health Check with command type.

Attributes

FAILURE_ACTION_KILL str(object=’’) -> str
FAILURE_ACTION_NONE str(object=’’) -> str
HEALTH_CHECK_TYPE_COMMAND str(object=’’) -> str
HEALTH_CHECK_TYPE_HTTP str(object=’’) -> str
HEALTH_CHECK_TYPE_TCP str(object=’’) -> str
STATUS_HEALTHY str(object=’’) -> str
STATUS_UNHEALTHY str(object=’’) -> str
STATUS_UNKNOWN str(object=’’) -> str
command [Required] Gets the command of this ContainerCommandHealthCheck.
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 ContainerCommandHealthCheck 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'
FAILURE_ACTION_NONE = 'NONE'
HEALTH_CHECK_TYPE_COMMAND = 'COMMAND'
HEALTH_CHECK_TYPE_HTTP = 'HTTP'
HEALTH_CHECK_TYPE_TCP = 'TCP'
STATUS_HEALTHY = 'HEALTHY'
STATUS_UNHEALTHY = 'UNHEALTHY'
STATUS_UNKNOWN = 'UNKNOWN'
__init__(**kwargs)

Initializes a new ContainerCommandHealthCheck object with values from keyword arguments. The default value of the health_check_type attribute of this class is COMMAND and it should not be changed. 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 ContainerCommandHealthCheck.
  • health_check_type (str) – The value to assign to the health_check_type property of this ContainerCommandHealthCheck. Allowed values for this property are: “HTTP”, “TCP”, “COMMAND”
  • initial_delay_in_seconds (int) – The value to assign to the initial_delay_in_seconds property of this ContainerCommandHealthCheck.
  • interval_in_seconds (int) – The value to assign to the interval_in_seconds property of this ContainerCommandHealthCheck.
  • failure_threshold (int) – The value to assign to the failure_threshold property of this ContainerCommandHealthCheck.
  • success_threshold (int) – The value to assign to the success_threshold property of this ContainerCommandHealthCheck.
  • timeout_in_seconds (int) – The value to assign to the timeout_in_seconds property of this ContainerCommandHealthCheck.
  • status (str) – The value to assign to the status property of this ContainerCommandHealthCheck. Allowed values for this property are: “HEALTHY”, “UNHEALTHY”, “UNKNOWN”
  • status_details (str) – The value to assign to the status_details property of this ContainerCommandHealthCheck.
  • failure_action (str) – The value to assign to the failure_action property of this ContainerCommandHealthCheck. Allowed values for this property are: “KILL”, “NONE”
  • command (list[str]) – The value to assign to the command property of this ContainerCommandHealthCheck.
command

[Required] Gets the command of this ContainerCommandHealthCheck. The list of strings that will be simplified to a single command for checking the status of the container.

Returns:The command of this ContainerCommandHealthCheck.
Return type:list[str]
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