/** * 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 SecurityHub { namespace Model { /** *

The container health check command and associated configuration parameters * for the container.

See Also:

AWS * API Reference

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

The command that the container runs to determine whether it is healthy.

*/ inline const Aws::Vector& GetCommand() const{ return m_command; } /** *

The command that the container runs to determine whether it is healthy.

*/ inline bool CommandHasBeenSet() const { return m_commandHasBeenSet; } /** *

The command that the container runs to determine whether it is healthy.

*/ inline void SetCommand(const Aws::Vector& value) { m_commandHasBeenSet = true; m_command = value; } /** *

The command that the container runs to determine whether it is healthy.

*/ inline void SetCommand(Aws::Vector&& value) { m_commandHasBeenSet = true; m_command = std::move(value); } /** *

The command that the container runs to determine whether it is healthy.

*/ inline AwsEcsTaskDefinitionContainerDefinitionsHealthCheckDetails& WithCommand(const Aws::Vector& value) { SetCommand(value); return *this;} /** *

The command that the container runs to determine whether it is healthy.

*/ inline AwsEcsTaskDefinitionContainerDefinitionsHealthCheckDetails& WithCommand(Aws::Vector&& value) { SetCommand(std::move(value)); return *this;} /** *

The command that the container runs to determine whether it is healthy.

*/ inline AwsEcsTaskDefinitionContainerDefinitionsHealthCheckDetails& AddCommand(const Aws::String& value) { m_commandHasBeenSet = true; m_command.push_back(value); return *this; } /** *

The command that the container runs to determine whether it is healthy.

*/ inline AwsEcsTaskDefinitionContainerDefinitionsHealthCheckDetails& AddCommand(Aws::String&& value) { m_commandHasBeenSet = true; m_command.push_back(std::move(value)); return *this; } /** *

The command that the container runs to determine whether it is healthy.

*/ inline AwsEcsTaskDefinitionContainerDefinitionsHealthCheckDetails& AddCommand(const char* value) { m_commandHasBeenSet = true; m_command.push_back(value); return *this; } /** *

The time period in seconds between each health check execution. The default * value is 30 seconds.

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

The time period in seconds between each health check execution. The default * value is 30 seconds.

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

The time period in seconds between each health check execution. The default * value is 30 seconds.

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

The time period in seconds between each health check execution. The default * value is 30 seconds.

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

The number of times to retry a failed health check before the container is * considered unhealthy. The default value is 3.

*/ inline int GetRetries() const{ return m_retries; } /** *

The number of times to retry a failed health check before the container is * considered unhealthy. The default value is 3.

*/ inline bool RetriesHasBeenSet() const { return m_retriesHasBeenSet; } /** *

The number of times to retry a failed health check before the container is * considered unhealthy. The default value is 3.

*/ inline void SetRetries(int value) { m_retriesHasBeenSet = true; m_retries = value; } /** *

The number of times to retry a failed health check before the container is * considered unhealthy. The default value is 3.

*/ inline AwsEcsTaskDefinitionContainerDefinitionsHealthCheckDetails& WithRetries(int value) { SetRetries(value); return *this;} /** *

The optional grace period in seconds that allows containers time to bootstrap * before failed health checks count towards the maximum number of retries.

*/ inline int GetStartPeriod() const{ return m_startPeriod; } /** *

The optional grace period in seconds that allows containers time to bootstrap * before failed health checks count towards the maximum number of retries.

*/ inline bool StartPeriodHasBeenSet() const { return m_startPeriodHasBeenSet; } /** *

The optional grace period in seconds that allows containers time to bootstrap * before failed health checks count towards the maximum number of retries.

*/ inline void SetStartPeriod(int value) { m_startPeriodHasBeenSet = true; m_startPeriod = value; } /** *

The optional grace period in seconds that allows containers time to bootstrap * before failed health checks count towards the maximum number of retries.

*/ inline AwsEcsTaskDefinitionContainerDefinitionsHealthCheckDetails& WithStartPeriod(int value) { SetStartPeriod(value); return *this;} /** *

The time period in seconds to wait for a health check to succeed before it is * considered a failure. The default value is 5.

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

The time period in seconds to wait for a health check to succeed before it is * considered a failure. The default value is 5.

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

The time period in seconds to wait for a health check to succeed before it is * considered a failure. The default value is 5.

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

The time period in seconds to wait for a health check to succeed before it is * considered a failure. The default value is 5.

*/ inline AwsEcsTaskDefinitionContainerDefinitionsHealthCheckDetails& WithTimeout(int value) { SetTimeout(value); return *this;} private: Aws::Vector m_command; bool m_commandHasBeenSet = false; int m_interval; bool m_intervalHasBeenSet = false; int m_retries; bool m_retriesHasBeenSet = false; int m_startPeriod; bool m_startPeriodHasBeenSet = false; int m_timeout; bool m_timeoutHasBeenSet = false; }; } // namespace Model } // namespace SecurityHub } // namespace Aws