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

Describes the settings for the health check that App Runner performs to * monitor the health of a service.

See Also:

AWS * API Reference

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

The IP protocol that App Runner uses to perform health checks for your * service.

If you set Protocol to HTTP, App * Runner sends health check requests to the HTTP path specified by * Path.

Default: TCP

*/ inline const HealthCheckProtocol& GetProtocol() const{ return m_protocol; } /** *

The IP protocol that App Runner uses to perform health checks for your * service.

If you set Protocol to HTTP, App * Runner sends health check requests to the HTTP path specified by * Path.

Default: TCP

*/ inline bool ProtocolHasBeenSet() const { return m_protocolHasBeenSet; } /** *

The IP protocol that App Runner uses to perform health checks for your * service.

If you set Protocol to HTTP, App * Runner sends health check requests to the HTTP path specified by * Path.

Default: TCP

*/ inline void SetProtocol(const HealthCheckProtocol& value) { m_protocolHasBeenSet = true; m_protocol = value; } /** *

The IP protocol that App Runner uses to perform health checks for your * service.

If you set Protocol to HTTP, App * Runner sends health check requests to the HTTP path specified by * Path.

Default: TCP

*/ inline void SetProtocol(HealthCheckProtocol&& value) { m_protocolHasBeenSet = true; m_protocol = std::move(value); } /** *

The IP protocol that App Runner uses to perform health checks for your * service.

If you set Protocol to HTTP, App * Runner sends health check requests to the HTTP path specified by * Path.

Default: TCP

*/ inline HealthCheckConfiguration& WithProtocol(const HealthCheckProtocol& value) { SetProtocol(value); return *this;} /** *

The IP protocol that App Runner uses to perform health checks for your * service.

If you set Protocol to HTTP, App * Runner sends health check requests to the HTTP path specified by * Path.

Default: TCP

*/ inline HealthCheckConfiguration& WithProtocol(HealthCheckProtocol&& value) { SetProtocol(std::move(value)); return *this;} /** *

The URL that health check requests are sent to.

Path is * only applicable when you set Protocol to HTTP.

*

Default: "/"

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

The URL that health check requests are sent to.

Path is * only applicable when you set Protocol to HTTP.

*

Default: "/"

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

The URL that health check requests are sent to.

Path is * only applicable when you set Protocol to HTTP.

*

Default: "/"

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

The URL that health check requests are sent to.

Path is * only applicable when you set Protocol to HTTP.

*

Default: "/"

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

The URL that health check requests are sent to.

Path is * only applicable when you set Protocol to HTTP.

*

Default: "/"

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

The URL that health check requests are sent to.

Path is * only applicable when you set Protocol to HTTP.

*

Default: "/"

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

The URL that health check requests are sent to.

Path is * only applicable when you set Protocol to HTTP.

*

Default: "/"

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

The URL that health check requests are sent to.

Path is * only applicable when you set Protocol to HTTP.

*

Default: "/"

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

The time interval, in seconds, between health checks.

Default: * 5

*/ inline int GetInterval() const{ return m_interval; } /** *

The time interval, in seconds, between health checks.

Default: * 5

*/ inline bool IntervalHasBeenSet() const { return m_intervalHasBeenSet; } /** *

The time interval, in seconds, between health checks.

Default: * 5

*/ inline void SetInterval(int value) { m_intervalHasBeenSet = true; m_interval = value; } /** *

The time interval, in seconds, between health checks.

Default: * 5

*/ inline HealthCheckConfiguration& WithInterval(int value) { SetInterval(value); return *this;} /** *

The time, in seconds, to wait for a health check response before deciding it * failed.

Default: 2

*/ inline int GetTimeout() const{ return m_timeout; } /** *

The time, in seconds, to wait for a health check response before deciding it * failed.

Default: 2

*/ inline bool TimeoutHasBeenSet() const { return m_timeoutHasBeenSet; } /** *

The time, in seconds, to wait for a health check response before deciding it * failed.

Default: 2

*/ inline void SetTimeout(int value) { m_timeoutHasBeenSet = true; m_timeout = value; } /** *

The time, in seconds, to wait for a health check response before deciding it * failed.

Default: 2

*/ inline HealthCheckConfiguration& WithTimeout(int value) { SetTimeout(value); return *this;} /** *

The number of consecutive checks that must succeed before App Runner decides * that the service is healthy.

Default: 1

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

The number of consecutive checks that must succeed before App Runner decides * that the service is healthy.

Default: 1

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

The number of consecutive checks that must succeed before App Runner decides * that the service is healthy.

Default: 1

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

The number of consecutive checks that must succeed before App Runner decides * that the service is healthy.

Default: 1

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

The number of consecutive checks that must fail before App Runner decides * that the service is unhealthy.

Default: 5

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

The number of consecutive checks that must fail before App Runner decides * that the service is unhealthy.

Default: 5

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

The number of consecutive checks that must fail before App Runner decides * that the service is unhealthy.

Default: 5

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

The number of consecutive checks that must fail before App Runner decides * that the service is unhealthy.

Default: 5

*/ inline HealthCheckConfiguration& WithUnhealthyThreshold(int value) { SetUnhealthyThreshold(value); return *this;} private: HealthCheckProtocol m_protocol; bool m_protocolHasBeenSet = false; Aws::String m_path; bool m_pathHasBeenSet = false; int m_interval; bool m_intervalHasBeenSet = false; int m_timeout; bool m_timeoutHasBeenSet = false; int m_healthyThreshold; bool m_healthyThresholdHasBeenSet = false; int m_unhealthyThreshold; bool m_unhealthyThresholdHasBeenSet = false; }; } // namespace Model } // namespace AppRunner } // namespace Aws