AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

HealthCheck

import "github.com/aws/aws-sdk-go/service/elb"

type HealthCheck struct { HealthyThreshold *int64 `min:"2" type:"integer" required:"true"` Interval *int64 `min:"5" type:"integer" required:"true"` Target *string `type:"string" required:"true"` Timeout *int64 `min:"2" type:"integer" required:"true"` UnhealthyThreshold *int64 `min:"2" type:"integer" required:"true"` }

Information about a health check.

HealthyThreshold

Type: *int64

The number of consecutive health checks successes required before moving the instance to the Healthy state.

HealthyThreshold is a required field

Interval

Type: *int64

The approximate interval, in seconds, between health checks of an individual instance.

Interval is a required field

Target

Type: *string

The instance being checked. The protocol is either TCP, HTTP, HTTPS, or SSL. The range of valid ports is one (1) through 65535.

TCP is the default, specified as a TCP: port pair, for example "TCP:5000". In this case, a health check simply attempts to open a TCP connection to the instance on the specified port. Failure to connect within the configured timeout is considered unhealthy.

SSL is also specified as SSL: port pair, for example, SSL:5000.

For HTTP/HTTPS, you must include a ping path in the string. HTTP is specified as a HTTP:port;/;PathToPing; grouping, for example "HTTP:80/weather/us/wa/seattle". In this case, a HTTP GET request is issued to the instance on the given port and path. Any answer other than "200 OK" within the timeout period is considered unhealthy.

The total length of the HTTP ping target must be 1024 16-bit Unicode characters or less.

Target is a required field

Timeout

Type: *int64

The amount of time, in seconds, during which no response means a failed health check.

This value must be less than the Interval value.

Timeout is a required field

UnhealthyThreshold

Type: *int64

The number of consecutive health check failures required before moving the instance to the Unhealthy state.

UnhealthyThreshold is a required field

Method

GoString

func (s HealthCheck) GoString() string

GoString returns the string representation

SetHealthyThreshold

func (s *HealthCheck) SetHealthyThreshold(v int64) *HealthCheck

SetHealthyThreshold sets the HealthyThreshold field's value.

SetInterval

func (s *HealthCheck) SetInterval(v int64) *HealthCheck

SetInterval sets the Interval field's value.

SetTarget

func (s *HealthCheck) SetTarget(v string) *HealthCheck

SetTarget sets the Target field's value.

SetTimeout

func (s *HealthCheck) SetTimeout(v int64) *HealthCheck

SetTimeout sets the Timeout field's value.

SetUnhealthyThreshold

func (s *HealthCheck) SetUnhealthyThreshold(v int64) *HealthCheck

SetUnhealthyThreshold sets the UnhealthyThreshold field's value.

String

func (s HealthCheck) String() string

String returns the string representation

Validate

func (s *HealthCheck) Validate() error

Validate inspects the fields of the type to determine if they are valid.

On this page: