Class: Aws::GameLift::Types::ContainerHealthCheck

Inherits:
Struct
  • Object
show all
Includes:
Structure
Defined in:
lib/aws-sdk-gamelift/types.rb

Overview

Instructions on when and how to check the health of a container in a container fleet. When health check properties are set in a container definition, they override any Docker health checks in the container image. For more information on container health checks, see

HealthCheck command][1

in the *Amazon Elastic Container Service

API*.

The following example instructions tell the container to wait 100 seconds after launch before counting failed health checks, then initiate the health check command every 60 seconds. After issuing the health check command, wait 10 seconds for it to succeed. If it fails, retry the command 3 times before considering the container to be unhealthy.

‘{“Command”: [ “CMD-SHELL”, “ps cax | grep ”processmanager“ || exit 1” ], “Interval”: 300, “Timeout”: 30, “Retries”: 5, “StartPeriod”: 100 }`

**Part of:** ContainerDefinition$HealthCheck

[1]: docs.aws.amazon.com/AmazonECS/latest/APIReference/API_HealthCheck.html#ECS-Type-HealthCheck-command

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#commandArray<String>

A string array that specifies the command that the container runs to determine if it’s healthy.

Returns:

  • (Array<String>)


1413
1414
1415
1416
1417
1418
1419
1420
1421
# File 'lib/aws-sdk-gamelift/types.rb', line 1413

class ContainerHealthCheck < Struct.new(
  :command,
  :interval,
  :timeout,
  :retries,
  :start_period)
  SENSITIVE = []
  include Aws::Structure
end

#intervalInteger

The time period (in seconds) between each health check.

Returns:

  • (Integer)


1413
1414
1415
1416
1417
1418
1419
1420
1421
# File 'lib/aws-sdk-gamelift/types.rb', line 1413

class ContainerHealthCheck < Struct.new(
  :command,
  :interval,
  :timeout,
  :retries,
  :start_period)
  SENSITIVE = []
  include Aws::Structure
end

#retriesInteger

The number of times to retry a failed health check before the container is considered unhealthy. The first run of the command does not count as a retry.

Returns:

  • (Integer)


1413
1414
1415
1416
1417
1418
1419
1420
1421
# File 'lib/aws-sdk-gamelift/types.rb', line 1413

class ContainerHealthCheck < Struct.new(
  :command,
  :interval,
  :timeout,
  :retries,
  :start_period)
  SENSITIVE = []
  include Aws::Structure
end

#start_periodInteger

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.

Returns:

  • (Integer)


1413
1414
1415
1416
1417
1418
1419
1420
1421
# File 'lib/aws-sdk-gamelift/types.rb', line 1413

class ContainerHealthCheck < Struct.new(
  :command,
  :interval,
  :timeout,
  :retries,
  :start_period)
  SENSITIVE = []
  include Aws::Structure
end

#timeoutInteger

The time period (in seconds) to wait for a health check to succeed before a failed health check is counted.

Returns:

  • (Integer)


1413
1414
1415
1416
1417
1418
1419
1420
1421
# File 'lib/aws-sdk-gamelift/types.rb', line 1413

class ContainerHealthCheck < Struct.new(
  :command,
  :interval,
  :timeout,
  :retries,
  :start_period)
  SENSITIVE = []
  include Aws::Structure
end