Skip to content
v2.273.0

Experimental

@aws-cdk/aws-apprunner-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

HealthCheck Class ​

Contains static factory methods for creating health checks for different protocols.

Example ​

ts
new apprunner.Service(this, 'Service', {
  source: apprunner.Source.fromEcrPublic({
    imageConfiguration: { port: 8000 },
    imageIdentifier: 'public.ecr.aws/aws-containers/hello-app-runner:latest',
  }),
  healthCheck: apprunner.HealthCheck.http({
    healthyThreshold: 5,
    interval: Duration.seconds(10),
    path: '/',
    timeout: Duration.seconds(10),
    unhealthyThreshold: 10,
  }),
});

Properties ​

healthCheckProtocolTypeHealthCheckProtocolTypehealth_check_protocol_typeHealthCheckProtocolTypehealthCheckProtocolTypeHealthCheckProtocolTypeHealthCheckProtocolTypeHealthCheckProtocolTypeHealthCheckProtocolTypeHealthCheckProtocolTyperequired#
healthyThresholdnumberhealthy_thresholdint | floathealthyThresholdNumberHealthyThresholddoubleHealthyThreshold*float64required#
intervalDurationintervalDurationintervalDurationIntervalDurationIntervalDurationrequired#
pathstringpathstrpathStringPathstringPath*string#
timeoutDurationtimeoutDurationtimeoutDurationTimeoutDurationTimeoutDurationrequired#
unhealthyThresholdnumberunhealthy_thresholdint | floatunhealthyThresholdNumberUnhealthyThresholddoubleUnhealthyThreshold*float64required#

Methods ​

bind(): CfnService.HealthCheckConfigurationPropertydef bind(self, ) -> HealthCheckConfigurationPropertypublic HealthCheckConfigurationProperty bind()public HealthCheckConfigurationProperty Bind()func Bind() HealthCheckConfigurationProperty#
http(options?: HttpHealthCheckOptions): HealthCheck // chainable@staticmethod def http(options: typing.Optional[HttpHealthCheckOptions] = None) -> HealthCheckpublic static HealthCheck http(HttpHealthCheckOptions options)public static HealthCheck Http(HttpHealthCheckOptions? options = null)func Http(Options HttpHealthCheckOptions) HealthCheckstatic#
Construct a HTTP health check.
tcp(options?: TcpHealthCheckOptions): HealthCheck // chainable@staticmethod def tcp(options: typing.Optional[TcpHealthCheckOptions] = None) -> HealthCheckpublic static HealthCheck tcp(TcpHealthCheckOptions options)public static HealthCheck Tcp(TcpHealthCheckOptions? options = null)func Tcp(Options TcpHealthCheckOptions) HealthCheckstatic#
Construct a TCP health check.