AWS SDK for C++  1.8.95
AWS SDK for C++
Public Member Functions | List of all members
Aws::ECS::Model::HealthCheck Class Reference

#include <HealthCheck.h>

Public Member Functions

 HealthCheck ()
 
 HealthCheck (Aws::Utils::Json::JsonView jsonValue)
 
HealthCheckoperator= (Aws::Utils::Json::JsonView jsonValue)
 
Aws::Utils::Json::JsonValue Jsonize () const
 
const Aws::Vector< Aws::String > & GetCommand () const
 
bool CommandHasBeenSet () const
 
void SetCommand (const Aws::Vector< Aws::String > &value)
 
void SetCommand (Aws::Vector< Aws::String > &&value)
 
HealthCheckWithCommand (const Aws::Vector< Aws::String > &value)
 
HealthCheckWithCommand (Aws::Vector< Aws::String > &&value)
 
HealthCheckAddCommand (const Aws::String &value)
 
HealthCheckAddCommand (Aws::String &&value)
 
HealthCheckAddCommand (const char *value)
 
int GetInterval () const
 
bool IntervalHasBeenSet () const
 
void SetInterval (int value)
 
HealthCheckWithInterval (int value)
 
int GetTimeout () const
 
bool TimeoutHasBeenSet () const
 
void SetTimeout (int value)
 
HealthCheckWithTimeout (int value)
 
int GetRetries () const
 
bool RetriesHasBeenSet () const
 
void SetRetries (int value)
 
HealthCheckWithRetries (int value)
 
int GetStartPeriod () const
 
bool StartPeriodHasBeenSet () const
 
void SetStartPeriod (int value)
 
HealthCheckWithStartPeriod (int value)
 

Detailed Description

An object representing a container health check. Health check parameters that are specified in a container definition override any Docker health checks that exist in the container image (such as those specified in a parent image or from the image's Dockerfile).

You can view the health status of both individual containers and a task with the DescribeTasks API operation or when viewing the task details in the console.

The following describes the possible healthStatus values for a container:

The following describes the possible healthStatus values for a task. The container health check status of nonessential containers do not have an effect on the health status of a task.

If a task is run manually, and not as part of a service, the task will continue its lifecycle regardless of its health status. For tasks that are part of a service, if the task reports as unhealthy then the task will be stopped and the service scheduler will replace it.

The following are notes about container health check support:

See Also:

AWS API Reference

Definition at line 65 of file HealthCheck.h.

Constructor & Destructor Documentation

◆ HealthCheck() [1/2]

Aws::ECS::Model::HealthCheck::HealthCheck ( )

◆ HealthCheck() [2/2]

Aws::ECS::Model::HealthCheck::HealthCheck ( Aws::Utils::Json::JsonView  jsonValue)

Member Function Documentation

◆ AddCommand() [1/3]

HealthCheck& Aws::ECS::Model::HealthCheck::AddCommand ( const Aws::String value)
inline

A string array representing the command that the container runs to determine if it is healthy. The string array must start with CMD to execute the command arguments directly, or CMD-SHELL to run the command with the container's default shell. For example:

[ "CMD-SHELL", "curl -f http://localhost/ || exit 1" ]

An exit code of 0 indicates success, and non-zero exit code indicates failure. For more information, see HealthCheck in the Create a container section of the Docker Remote API.

Definition at line 170 of file HealthCheck.h.

◆ AddCommand() [2/3]

HealthCheck& Aws::ECS::Model::HealthCheck::AddCommand ( Aws::String &&  value)
inline

A string array representing the command that the container runs to determine if it is healthy. The string array must start with CMD to execute the command arguments directly, or CMD-SHELL to run the command with the container's default shell. For example:

[ "CMD-SHELL", "curl -f http://localhost/ || exit 1" ]

An exit code of 0 indicates success, and non-zero exit code indicates failure. For more information, see HealthCheck in the Create a container section of the Docker Remote API.

Definition at line 184 of file HealthCheck.h.

◆ AddCommand() [3/3]

HealthCheck& Aws::ECS::Model::HealthCheck::AddCommand ( const char *  value)
inline

A string array representing the command that the container runs to determine if it is healthy. The string array must start with CMD to execute the command arguments directly, or CMD-SHELL to run the command with the container's default shell. For example:

[ "CMD-SHELL", "curl -f http://localhost/ || exit 1" ]

An exit code of 0 indicates success, and non-zero exit code indicates failure. For more information, see HealthCheck in the Create a container section of the Docker Remote API.

Definition at line 198 of file HealthCheck.h.

◆ CommandHasBeenSet()

bool Aws::ECS::Model::HealthCheck::CommandHasBeenSet ( ) const
inline

A string array representing the command that the container runs to determine if it is healthy. The string array must start with CMD to execute the command arguments directly, or CMD-SHELL to run the command with the container's default shell. For example:

[ "CMD-SHELL", "curl -f http://localhost/ || exit 1" ]

An exit code of 0 indicates success, and non-zero exit code indicates failure. For more information, see HealthCheck in the Create a container section of the Docker Remote API.

Definition at line 100 of file HealthCheck.h.

◆ GetCommand()

const Aws::Vector<Aws::String>& Aws::ECS::Model::HealthCheck::GetCommand ( ) const
inline

A string array representing the command that the container runs to determine if it is healthy. The string array must start with CMD to execute the command arguments directly, or CMD-SHELL to run the command with the container's default shell. For example:

[ "CMD-SHELL", "curl -f http://localhost/ || exit 1" ]

An exit code of 0 indicates success, and non-zero exit code indicates failure. For more information, see HealthCheck in the Create a container section of the Docker Remote API.

Definition at line 86 of file HealthCheck.h.

◆ GetInterval()

int Aws::ECS::Model::HealthCheck::GetInterval ( ) const
inline

The time period in seconds between each health check execution. You may specify between 5 and 300 seconds. The default value is 30 seconds.

Definition at line 205 of file HealthCheck.h.

◆ GetRetries()

int Aws::ECS::Model::HealthCheck::GetRetries ( ) const
inline

The number of times to retry a failed health check before the container is considered unhealthy. You may specify between 1 and 10 retries. The default value is 3.

Definition at line 260 of file HealthCheck.h.

◆ GetStartPeriod()

int Aws::ECS::Model::HealthCheck::GetStartPeriod ( ) const
inline

The optional grace period within which to provide containers time to bootstrap before failed health checks count towards the maximum number of retries. You may specify between 0 and 300 seconds. The startPeriod is disabled by default.

If a health check succeeds within the startPeriod, then the container is considered healthy and any subsequent failures count toward the maximum number of retries.

Definition at line 292 of file HealthCheck.h.

◆ GetTimeout()

int Aws::ECS::Model::HealthCheck::GetTimeout ( ) const
inline

The time period in seconds to wait for a health check to succeed before it is considered a failure. You may specify between 2 and 60 seconds. The default value is 5.

Definition at line 231 of file HealthCheck.h.

◆ IntervalHasBeenSet()

bool Aws::ECS::Model::HealthCheck::IntervalHasBeenSet ( ) const
inline

The time period in seconds between each health check execution. You may specify between 5 and 300 seconds. The default value is 30 seconds.

Definition at line 211 of file HealthCheck.h.

◆ Jsonize()

Aws::Utils::Json::JsonValue Aws::ECS::Model::HealthCheck::Jsonize ( ) const

◆ operator=()

HealthCheck& Aws::ECS::Model::HealthCheck::operator= ( Aws::Utils::Json::JsonView  jsonValue)

◆ RetriesHasBeenSet()

bool Aws::ECS::Model::HealthCheck::RetriesHasBeenSet ( ) const
inline

The number of times to retry a failed health check before the container is considered unhealthy. You may specify between 1 and 10 retries. The default value is 3.

Definition at line 267 of file HealthCheck.h.

◆ SetCommand() [1/2]

void Aws::ECS::Model::HealthCheck::SetCommand ( const Aws::Vector< Aws::String > &  value)
inline

A string array representing the command that the container runs to determine if it is healthy. The string array must start with CMD to execute the command arguments directly, or CMD-SHELL to run the command with the container's default shell. For example:

[ "CMD-SHELL", "curl -f http://localhost/ || exit 1" ]

An exit code of 0 indicates success, and non-zero exit code indicates failure. For more information, see HealthCheck in the Create a container section of the Docker Remote API.

Definition at line 114 of file HealthCheck.h.

◆ SetCommand() [2/2]

void Aws::ECS::Model::HealthCheck::SetCommand ( Aws::Vector< Aws::String > &&  value)
inline

A string array representing the command that the container runs to determine if it is healthy. The string array must start with CMD to execute the command arguments directly, or CMD-SHELL to run the command with the container's default shell. For example:

[ "CMD-SHELL", "curl -f http://localhost/ || exit 1" ]

An exit code of 0 indicates success, and non-zero exit code indicates failure. For more information, see HealthCheck in the Create a container section of the Docker Remote API.

Definition at line 128 of file HealthCheck.h.

◆ SetInterval()

void Aws::ECS::Model::HealthCheck::SetInterval ( int  value)
inline

The time period in seconds between each health check execution. You may specify between 5 and 300 seconds. The default value is 30 seconds.

Definition at line 217 of file HealthCheck.h.

◆ SetRetries()

void Aws::ECS::Model::HealthCheck::SetRetries ( int  value)
inline

The number of times to retry a failed health check before the container is considered unhealthy. You may specify between 1 and 10 retries. The default value is 3.

Definition at line 274 of file HealthCheck.h.

◆ SetStartPeriod()

void Aws::ECS::Model::HealthCheck::SetStartPeriod ( int  value)
inline

The optional grace period within which to provide containers time to bootstrap before failed health checks count towards the maximum number of retries. You may specify between 0 and 300 seconds. The startPeriod is disabled by default.

If a health check succeeds within the startPeriod, then the container is considered healthy and any subsequent failures count toward the maximum number of retries.

Definition at line 312 of file HealthCheck.h.

◆ SetTimeout()

void Aws::ECS::Model::HealthCheck::SetTimeout ( int  value)
inline

The time period in seconds to wait for a health check to succeed before it is considered a failure. You may specify between 2 and 60 seconds. The default value is 5.

Definition at line 245 of file HealthCheck.h.

◆ StartPeriodHasBeenSet()

bool Aws::ECS::Model::HealthCheck::StartPeriodHasBeenSet ( ) const
inline

The optional grace period within which to provide containers time to bootstrap before failed health checks count towards the maximum number of retries. You may specify between 0 and 300 seconds. The startPeriod is disabled by default.

If a health check succeeds within the startPeriod, then the container is considered healthy and any subsequent failures count toward the maximum number of retries.

Definition at line 302 of file HealthCheck.h.

◆ TimeoutHasBeenSet()

bool Aws::ECS::Model::HealthCheck::TimeoutHasBeenSet ( ) const
inline

The time period in seconds to wait for a health check to succeed before it is considered a failure. You may specify between 2 and 60 seconds. The default value is 5.

Definition at line 238 of file HealthCheck.h.

◆ WithCommand() [1/2]

HealthCheck& Aws::ECS::Model::HealthCheck::WithCommand ( const Aws::Vector< Aws::String > &  value)
inline

A string array representing the command that the container runs to determine if it is healthy. The string array must start with CMD to execute the command arguments directly, or CMD-SHELL to run the command with the container's default shell. For example:

[ "CMD-SHELL", "curl -f http://localhost/ || exit 1" ]

An exit code of 0 indicates success, and non-zero exit code indicates failure. For more information, see HealthCheck in the Create a container section of the Docker Remote API.

Definition at line 142 of file HealthCheck.h.

◆ WithCommand() [2/2]

HealthCheck& Aws::ECS::Model::HealthCheck::WithCommand ( Aws::Vector< Aws::String > &&  value)
inline

A string array representing the command that the container runs to determine if it is healthy. The string array must start with CMD to execute the command arguments directly, or CMD-SHELL to run the command with the container's default shell. For example:

[ "CMD-SHELL", "curl -f http://localhost/ || exit 1" ]

An exit code of 0 indicates success, and non-zero exit code indicates failure. For more information, see HealthCheck in the Create a container section of the Docker Remote API.

Definition at line 156 of file HealthCheck.h.

◆ WithInterval()

HealthCheck& Aws::ECS::Model::HealthCheck::WithInterval ( int  value)
inline

The time period in seconds between each health check execution. You may specify between 5 and 300 seconds. The default value is 30 seconds.

Definition at line 223 of file HealthCheck.h.

◆ WithRetries()

HealthCheck& Aws::ECS::Model::HealthCheck::WithRetries ( int  value)
inline

The number of times to retry a failed health check before the container is considered unhealthy. You may specify between 1 and 10 retries. The default value is 3.

Definition at line 281 of file HealthCheck.h.

◆ WithStartPeriod()

HealthCheck& Aws::ECS::Model::HealthCheck::WithStartPeriod ( int  value)
inline

The optional grace period within which to provide containers time to bootstrap before failed health checks count towards the maximum number of retries. You may specify between 0 and 300 seconds. The startPeriod is disabled by default.

If a health check succeeds within the startPeriod, then the container is considered healthy and any subsequent failures count toward the maximum number of retries.

Definition at line 322 of file HealthCheck.h.

◆ WithTimeout()

HealthCheck& Aws::ECS::Model::HealthCheck::WithTimeout ( int  value)
inline

The time period in seconds to wait for a health check to succeed before it is considered a failure. You may specify between 2 and 60 seconds. The default value is 5.

Definition at line 252 of file HealthCheck.h.


The documentation for this class was generated from the following file: