/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Lightsail { namespace Model { /** *

Describes the health check configuration of an Amazon Lightsail container * service.

See Also:

AWS * API Reference

*/ class ContainerServiceHealthCheckConfig { public: AWS_LIGHTSAIL_API ContainerServiceHealthCheckConfig(); AWS_LIGHTSAIL_API ContainerServiceHealthCheckConfig(Aws::Utils::Json::JsonView jsonValue); AWS_LIGHTSAIL_API ContainerServiceHealthCheckConfig& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The number of consecutive health checks successes required before moving the * container to the Healthy state. The default value is * 2.

*/ inline int GetHealthyThreshold() const{ return m_healthyThreshold; } /** *

The number of consecutive health checks successes required before moving the * container to the Healthy state. The default value is * 2.

*/ inline bool HealthyThresholdHasBeenSet() const { return m_healthyThresholdHasBeenSet; } /** *

The number of consecutive health checks successes required before moving the * container to the Healthy state. The default value is * 2.

*/ inline void SetHealthyThreshold(int value) { m_healthyThresholdHasBeenSet = true; m_healthyThreshold = value; } /** *

The number of consecutive health checks successes required before moving the * container to the Healthy state. The default value is * 2.

*/ inline ContainerServiceHealthCheckConfig& WithHealthyThreshold(int value) { SetHealthyThreshold(value); return *this;} /** *

The number of consecutive health check failures required before moving the * container to the Unhealthy state. The default value is * 2.

*/ inline int GetUnhealthyThreshold() const{ return m_unhealthyThreshold; } /** *

The number of consecutive health check failures required before moving the * container to the Unhealthy state. The default value is * 2.

*/ inline bool UnhealthyThresholdHasBeenSet() const { return m_unhealthyThresholdHasBeenSet; } /** *

The number of consecutive health check failures required before moving the * container to the Unhealthy state. The default value is * 2.

*/ inline void SetUnhealthyThreshold(int value) { m_unhealthyThresholdHasBeenSet = true; m_unhealthyThreshold = value; } /** *

The number of consecutive health check failures required before moving the * container to the Unhealthy state. The default value is * 2.

*/ inline ContainerServiceHealthCheckConfig& WithUnhealthyThreshold(int value) { SetUnhealthyThreshold(value); return *this;} /** *

The amount of time, in seconds, during which no response means a failed * health check. You can specify between 2 and 60 seconds. The default value is * 2.

*/ inline int GetTimeoutSeconds() const{ return m_timeoutSeconds; } /** *

The amount of time, in seconds, during which no response means a failed * health check. You can specify between 2 and 60 seconds. The default value is * 2.

*/ inline bool TimeoutSecondsHasBeenSet() const { return m_timeoutSecondsHasBeenSet; } /** *

The amount of time, in seconds, during which no response means a failed * health check. You can specify between 2 and 60 seconds. The default value is * 2.

*/ inline void SetTimeoutSeconds(int value) { m_timeoutSecondsHasBeenSet = true; m_timeoutSeconds = value; } /** *

The amount of time, in seconds, during which no response means a failed * health check. You can specify between 2 and 60 seconds. The default value is * 2.

*/ inline ContainerServiceHealthCheckConfig& WithTimeoutSeconds(int value) { SetTimeoutSeconds(value); return *this;} /** *

The approximate interval, in seconds, between health checks of an individual * container. You can specify between 5 and 300 seconds. The default value is * 5.

*/ inline int GetIntervalSeconds() const{ return m_intervalSeconds; } /** *

The approximate interval, in seconds, between health checks of an individual * container. You can specify between 5 and 300 seconds. The default value is * 5.

*/ inline bool IntervalSecondsHasBeenSet() const { return m_intervalSecondsHasBeenSet; } /** *

The approximate interval, in seconds, between health checks of an individual * container. You can specify between 5 and 300 seconds. The default value is * 5.

*/ inline void SetIntervalSeconds(int value) { m_intervalSecondsHasBeenSet = true; m_intervalSeconds = value; } /** *

The approximate interval, in seconds, between health checks of an individual * container. You can specify between 5 and 300 seconds. The default value is * 5.

*/ inline ContainerServiceHealthCheckConfig& WithIntervalSeconds(int value) { SetIntervalSeconds(value); return *this;} /** *

The path on the container on which to perform the health check. The default * value is /.

*/ inline const Aws::String& GetPath() const{ return m_path; } /** *

The path on the container on which to perform the health check. The default * value is /.

*/ inline bool PathHasBeenSet() const { return m_pathHasBeenSet; } /** *

The path on the container on which to perform the health check. The default * value is /.

*/ inline void SetPath(const Aws::String& value) { m_pathHasBeenSet = true; m_path = value; } /** *

The path on the container on which to perform the health check. The default * value is /.

*/ inline void SetPath(Aws::String&& value) { m_pathHasBeenSet = true; m_path = std::move(value); } /** *

The path on the container on which to perform the health check. The default * value is /.

*/ inline void SetPath(const char* value) { m_pathHasBeenSet = true; m_path.assign(value); } /** *

The path on the container on which to perform the health check. The default * value is /.

*/ inline ContainerServiceHealthCheckConfig& WithPath(const Aws::String& value) { SetPath(value); return *this;} /** *

The path on the container on which to perform the health check. The default * value is /.

*/ inline ContainerServiceHealthCheckConfig& WithPath(Aws::String&& value) { SetPath(std::move(value)); return *this;} /** *

The path on the container on which to perform the health check. The default * value is /.

*/ inline ContainerServiceHealthCheckConfig& WithPath(const char* value) { SetPath(value); return *this;} /** *

The HTTP codes to use when checking for a successful response from a * container. You can specify values between 200 and 499. * You can specify multiple values (for example, 200,202) or a range * of values (for example, 200-299).

*/ inline const Aws::String& GetSuccessCodes() const{ return m_successCodes; } /** *

The HTTP codes to use when checking for a successful response from a * container. You can specify values between 200 and 499. * You can specify multiple values (for example, 200,202) or a range * of values (for example, 200-299).

*/ inline bool SuccessCodesHasBeenSet() const { return m_successCodesHasBeenSet; } /** *

The HTTP codes to use when checking for a successful response from a * container. You can specify values between 200 and 499. * You can specify multiple values (for example, 200,202) or a range * of values (for example, 200-299).

*/ inline void SetSuccessCodes(const Aws::String& value) { m_successCodesHasBeenSet = true; m_successCodes = value; } /** *

The HTTP codes to use when checking for a successful response from a * container. You can specify values between 200 and 499. * You can specify multiple values (for example, 200,202) or a range * of values (for example, 200-299).

*/ inline void SetSuccessCodes(Aws::String&& value) { m_successCodesHasBeenSet = true; m_successCodes = std::move(value); } /** *

The HTTP codes to use when checking for a successful response from a * container. You can specify values between 200 and 499. * You can specify multiple values (for example, 200,202) or a range * of values (for example, 200-299).

*/ inline void SetSuccessCodes(const char* value) { m_successCodesHasBeenSet = true; m_successCodes.assign(value); } /** *

The HTTP codes to use when checking for a successful response from a * container. You can specify values between 200 and 499. * You can specify multiple values (for example, 200,202) or a range * of values (for example, 200-299).

*/ inline ContainerServiceHealthCheckConfig& WithSuccessCodes(const Aws::String& value) { SetSuccessCodes(value); return *this;} /** *

The HTTP codes to use when checking for a successful response from a * container. You can specify values between 200 and 499. * You can specify multiple values (for example, 200,202) or a range * of values (for example, 200-299).

*/ inline ContainerServiceHealthCheckConfig& WithSuccessCodes(Aws::String&& value) { SetSuccessCodes(std::move(value)); return *this;} /** *

The HTTP codes to use when checking for a successful response from a * container. You can specify values between 200 and 499. * You can specify multiple values (for example, 200,202) or a range * of values (for example, 200-299).

*/ inline ContainerServiceHealthCheckConfig& WithSuccessCodes(const char* value) { SetSuccessCodes(value); return *this;} private: int m_healthyThreshold; bool m_healthyThresholdHasBeenSet = false; int m_unhealthyThreshold; bool m_unhealthyThresholdHasBeenSet = false; int m_timeoutSeconds; bool m_timeoutSecondsHasBeenSet = false; int m_intervalSeconds; bool m_intervalSecondsHasBeenSet = false; Aws::String m_path; bool m_pathHasBeenSet = false; Aws::String m_successCodes; bool m_successCodesHasBeenSet = false; }; } // namespace Model } // namespace Lightsail } // namespace Aws