| 1 | # Generated by default/object.tt | ||
| 2 | package Paws::ECS::HealthCheck; | ||
| 3 | use Moose; | ||
| 4 | has Command => (is => 'ro', isa => 'ArrayRef[Str|Undef]', request_name => 'command', traits => ['NameInRequest'], required => 1); | ||
| 5 | has Interval => (is => 'ro', isa => 'Int', request_name => 'interval', traits => ['NameInRequest']); | ||
| 6 | has Retries => (is => 'ro', isa => 'Int', request_name => 'retries', traits => ['NameInRequest']); | ||
| 7 | has StartPeriod => (is => 'ro', isa => 'Int', request_name => 'startPeriod', traits => ['NameInRequest']); | ||
| 8 | has Timeout => (is => 'ro', isa => 'Int', request_name => 'timeout', traits => ['NameInRequest']); | ||
| 9 | |||
| 10 | 1; | ||
| 11 | |||
| 12 | ### main pod documentation begin ### | ||
| 13 | |||
| 14 | =head1 NAME | ||
| 15 | |||
| 16 | Paws::ECS::HealthCheck | ||
| 17 | |||
| 18 | =head1 USAGE | ||
| 19 | |||
| 20 | This class represents one of two things: | ||
| 21 | |||
| 22 | =head3 Arguments in a call to a service | ||
| 23 | |||
| 24 | Use the attributes of this class as arguments to methods. You shouldn't make instances of this class. | ||
| 25 | Each attribute should be used as a named argument in the calls that expect this type of object. | ||
| 26 | |||
| 27 | As an example, if Att1 is expected to be a Paws::ECS::HealthCheck object: | ||
| 28 | |||
| 29 | $service_obj->Method(Att1 => { Command => $value, ..., Timeout => $value }); | ||
| 30 | |||
| 31 | =head3 Results returned from an API call | ||
| 32 | |||
| 33 | Use accessors for each attribute. If Att1 is expected to be an Paws::ECS::HealthCheck object: | ||
| 34 | |||
| 35 | $result = $service_obj->Method(...); | ||
| 36 | $result->Att1->Command | ||
| 37 | |||
| 38 | =head1 DESCRIPTION | ||
| 39 | |||
| 40 | An object representing a container health check. Health check | ||
| 41 | parameters that are specified in a container definition override any | ||
| 42 | Docker health checks that exist in the container image (such as those | ||
| 43 | specified in a parent image or from the image's Dockerfile). | ||
| 44 | |||
| 45 | You can view the health status of both individual containers and a task | ||
| 46 | with the DescribeTasks API operation or when viewing the task details | ||
| 47 | in the console. | ||
| 48 | |||
| 49 | The following describes the possible C<healthStatus> values for a | ||
| 50 | container: | ||
| 51 | |||
| 52 | =over | ||
| 53 | |||
| 54 | =item * | ||
| 55 | |||
| 56 | C<HEALTHY>-The container health check has passed successfully. | ||
| 57 | |||
| 58 | =item * | ||
| 59 | |||
| 60 | C<UNHEALTHY>-The container health check has failed. | ||
| 61 | |||
| 62 | =item * | ||
| 63 | |||
| 64 | C<UNKNOWN>-The container health check is being evaluated or there is no | ||
| 65 | container health check defined. | ||
| 66 | |||
| 67 | =back | ||
| 68 | |||
| 69 | The following describes the possible C<healthStatus> values for a task. | ||
| 70 | The container health check status of nonessential containers do not | ||
| 71 | have an effect on the health status of a task. | ||
| 72 | |||
| 73 | =over | ||
| 74 | |||
| 75 | =item * | ||
| 76 | |||
| 77 | C<HEALTHY>-All essential containers within the task have passed their | ||
| 78 | health checks. | ||
| 79 | |||
| 80 | =item * | ||
| 81 | |||
| 82 | C<UNHEALTHY>-One or more essential containers have failed their health | ||
| 83 | check. | ||
| 84 | |||
| 85 | =item * | ||
| 86 | |||
| 87 | C<UNKNOWN>-The essential containers within the task are still having | ||
| 88 | their health checks evaluated or there are no container health checks | ||
| 89 | defined. | ||
| 90 | |||
| 91 | =back | ||
| 92 | |||
| 93 | If a task is run manually, and not as part of a service, the task will | ||
| 94 | continue its lifecycle regardless of its health status. For tasks that | ||
| 95 | are part of a service, if the task reports as unhealthy then the task | ||
| 96 | will be stopped and the service scheduler will replace it. | ||
| 97 | |||
| 98 | The following are notes about container health check support: | ||
| 99 | |||
| 100 | =over | ||
| 101 | |||
| 102 | =item * | ||
| 103 | |||
| 104 | Container health checks require version 1.17.0 or greater of the Amazon | ||
| 105 | ECS container agent. For more information, see Updating the Amazon ECS | ||
| 106 | Container Agent | ||
| 107 | (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html). | ||
| 108 | |||
| 109 | =item * | ||
| 110 | |||
| 111 | Container health checks are supported for Fargate tasks if you are | ||
| 112 | using platform version 1.1.0 or greater. For more information, see AWS | ||
| 113 | Fargate Platform Versions | ||
| 114 | (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html). | ||
| 115 | |||
| 116 | =item * | ||
| 117 | |||
| 118 | Container health checks are not supported for tasks that are part of a | ||
| 119 | service that is configured to use a Classic Load Balancer. | ||
| 120 | |||
| 121 | =back | ||
| 122 | |||
| 123 | |||
| 124 | =head1 ATTRIBUTES | ||
| 125 | |||
| 126 | |||
| 127 | =head2 B<REQUIRED> Command => ArrayRef[Str|Undef] | ||
| 128 | |||
| 129 | A string array representing the command that the container runs to | ||
| 130 | determine if it is healthy. The string array must start with C<CMD> to | ||
| 131 | execute the command arguments directly, or C<CMD-SHELL> to run the | ||
| 132 | command with the container's default shell. For example: | ||
| 133 | |||
| 134 | C<[ "CMD-SHELL", "curl -f http://localhost/ || exit 1" ]> | ||
| 135 | |||
| 136 | An exit code of 0 indicates success, and non-zero exit code indicates | ||
| 137 | failure. For more information, see C<HealthCheck> in the Create a | ||
| 138 | container | ||
| 139 | (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) | ||
| 140 | section of the Docker Remote API | ||
| 141 | (https://docs.docker.com/engine/api/v1.35/). | ||
| 142 | |||
| 143 | |||
| 144 | =head2 Interval => Int | ||
| 145 | |||
| 146 | The time period in seconds between each health check execution. You may | ||
| 147 | specify between 5 and 300 seconds. The default value is 30 seconds. | ||
| 148 | |||
| 149 | |||
| 150 | =head2 Retries => Int | ||
| 151 | |||
| 152 | The number of times to retry a failed health check before the container | ||
| 153 | is considered unhealthy. You may specify between 1 and 10 retries. The | ||
| 154 | default value is 3. | ||
| 155 | |||
| 156 | |||
| 157 | =head2 StartPeriod => Int | ||
| 158 | |||
| 159 | The optional grace period within which to provide containers time to | ||
| 160 | bootstrap before failed health checks count towards the maximum number | ||
| 161 | of retries. You may specify between 0 and 300 seconds. The | ||
| 162 | C<startPeriod> is disabled by default. | ||
| 163 | |||
| 164 | If a health check succeeds within the C<startPeriod>, then the | ||
| 165 | container is considered healthy and any subsequent failures count | ||
| 166 | toward the maximum number of retries. | ||
| 167 | |||
| 168 | |||
| 169 | =head2 Timeout => Int | ||
| 170 | |||
| 171 | The time period in seconds to wait for a health check to succeed before | ||
| 172 | it is considered a failure. You may specify between 2 and 60 seconds. | ||
| 173 | The default value is 5. | ||
| 174 | |||
| 175 | |||
| 176 | |||
| 177 | =head1 SEE ALSO | ||
| 178 | |||
| 179 | This class forms part of L<Paws>, describing an object used in L<Paws::ECS> | ||
| 180 | |||
| 181 | =head1 BUGS and CONTRIBUTIONS | ||
| 182 | |||
| 183 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 184 | |||
| 185 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 186 | |||
| 187 | =cut | ||
| 188 |