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 for each account.
You must associate the check with instances or tags using
AssociateApplicationStatusCheckbefore health checks start.You must set the
Timeoutvalue to less than theIntervalvalue.You must start the
Pathwith a forward slash (/). Default:/.You can specify
Aggregationasincludedorexcluded. If you do not specify a value, it defaults toincluded, which means the check contributes to the instance-level application status.You can use the following default values:
Intervalis 60 seconds,Timeoutis 6 seconds,FailureThresholdis 2,SuccessThresholdis 2,StatusCodeMatcheris200,InitializationGracePeriodSecondsis 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")
}