createApplicationStatusCheck

Creates an application status check for monitoring the health of applications running on your instances. You can configure the protocol, port, path, and thresholds for the health check. The following rules apply:

  • You can create a maximum of 50 application status checks per account.

  • Health checks do not start until you associate the check with instances or tags using AssociateApplicationStatusCheck.

  • The Timeout value must be less than the Interval value.

  • The Path must start with a forward slash (/). Default: /.

  • If you do not specify Aggregation, it defaults to included, which means the check contributes to the instance-level application status.

  • Default values: Interval is 60 seconds, Timeout is 6 seconds, FailureThreshold is 2, SuccessThreshold is 2, StatusCodeMatcher is 200, InitializationGracePeriodSeconds is 300 seconds.

  • You can tag the application status check during creation. For more information, see Tag your Amazon EC2 resources.

Samples

// This example creates an application status check that monitors HTTP health on port 80.
val resp = ec2Client.createApplicationStatusCheck {
    protocol = NetworkProtocolEnum.fromValue("http")
    port = 80
    path = "/health"
    aggregation = AggregationStatusEnum.fromValue("included")
}