Watch Aspire live streamsDocsTry Aspire

withHealthCheck

Method
📦 Aspire.Hosting v17.0.0
interface ContainerResource {
// ... omitted for brevity
withHealthCheck(key: string): IResource;
}

Signature

methodwithHealthCheckbuilder
Adds a health check by key
withHealthCheck(key: string): IResource
keystringThe key for the health check.
IResource

Applies to

This method applies to the following types: