class HealthCheck
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.AppRunner.Alpha.HealthCheck |
Go | github.com/aws/aws-cdk-go/awscdkapprunneralpha/v2#HealthCheck |
Java | software.amazon.awscdk.services.apprunner.alpha.HealthCheck |
Python | aws_cdk.aws_apprunner_alpha.HealthCheck |
TypeScript (source) | @aws-cdk/aws-apprunner-alpha ยป HealthCheck |
Contains static factory methods for creating health checks for different protocols.
Example
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
Name | Type | Description |
---|---|---|
health | Health | |
healthy | number | |
interval | Duration | |
timeout | Duration | |
unhealthy | number | |
path? | string |
healthCheckProtocolType
Type:
Health
healthyThreshold
Type:
number
interval
Type:
Duration
timeout
Type:
Duration
unhealthyThreshold
Type:
number
path?
Type:
string
(optional)
Methods
Name | Description |
---|---|
bind() | |
static http(options?) | Construct a HTTP health check. |
static tcp(options?) | Construct a TCP health check. |
bind()
public bind(): HealthCheckConfigurationProperty
Returns
static http(options?)
public static http(options?: HttpHealthCheckOptions): HealthCheck
Parameters
- options
Http
Health Check Options
Returns
Construct a HTTP health check.
static tcp(options?)
public static tcp(options?: TcpHealthCheckOptions): HealthCheck
Parameters
- options
Tcp
Health Check Options
Returns
Construct a TCP health check.