/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include Instructions on when and how to check the health of a support container in a
* container fleet. These properties override any Docker health checks that are set
* in the container image. For more information on container health checks, see HealthCheck
* command in the Amazon Elastic Container Service API. Game server
* containers don't have a health check parameter; Amazon GameLift automatically
* handles health checks for these containers. The following example
* instructs the container to initiate a health check command every 60 seconds and
* wait 10 seconds for it to succeed. If it fails, retry the command 3 times before
* flagging the container as unhealthy. It also tells the container to wait 100
* seconds after launch before counting failed health checks.
* Part of: SupportContainerDefinition,
* SupportContainerDefinitionInput {"Command": [ "CMD-SHELL", "ps cax | grep "processmanager" || exit 1" ],
* "Interval": 60, "Timeout": 10, "Retries": 3, "StartPeriod": 100 } See Also:
AWS
* API Reference
A string array that specifies the command that the container runs to * determine if it's healthy.
*/ inline const Aws::VectorThe time period (in seconds) between each health check.
*/ inline int GetInterval() const{ return m_interval; } inline bool IntervalHasBeenSet() const { return m_intervalHasBeenSet; } inline void SetInterval(int value) { m_intervalHasBeenSet = true; m_interval = value; } inline ContainerHealthCheck& WithInterval(int value) { SetInterval(value); return *this;} ///@} ///@{ /** *The number of times to retry a failed health check before flagging the * container unhealthy. The first run of the command does not count as a retry.
*/ inline int GetRetries() const{ return m_retries; } inline bool RetriesHasBeenSet() const { return m_retriesHasBeenSet; } inline void SetRetries(int value) { m_retriesHasBeenSet = true; m_retries = value; } inline ContainerHealthCheck& WithRetries(int value) { SetRetries(value); return *this;} ///@} ///@{ /** *The optional grace period (in seconds) to give a container time to bootstrap * before the first failed health check counts toward the number of retries.
*/ inline int GetStartPeriod() const{ return m_startPeriod; } inline bool StartPeriodHasBeenSet() const { return m_startPeriodHasBeenSet; } inline void SetStartPeriod(int value) { m_startPeriodHasBeenSet = true; m_startPeriod = value; } inline ContainerHealthCheck& WithStartPeriod(int value) { SetStartPeriod(value); return *this;} ///@} ///@{ /** *The time period (in seconds) to wait for a health check to succeed before * counting a failed health check.
*/ inline int GetTimeout() const{ return m_timeout; } inline bool TimeoutHasBeenSet() const { return m_timeoutHasBeenSet; } inline void SetTimeout(int value) { m_timeoutHasBeenSet = true; m_timeout = value; } inline ContainerHealthCheck& WithTimeout(int value) { SetTimeout(value); return *this;} ///@} private: Aws::Vector