withHttpHealthCheck

Method
📦 Aspire.Hosting v17.0.0
interface ContainerResource {
// ... omitted for brevity
withHttpHealthCheck(
path?: string,
statusCode?: number,
endpointName?: string): IResourceWithEndpoints;
}

Signature

methodwithHttpHealthCheckbuilder
Adds a health check to the resource which is mapped to a specific endpoint.
withHttpHealthCheck(
path?: string,
statusCode?: number,
endpointName?: string): IResourceWithEndpoints
pathstringoptionalThe relative path to test.
statusCodenumberoptionalThe result code to interpret as healthy.
endpointNamestringoptionalThe name of the endpoint to derive the base address from.
IResourceWithEndpoints

Applies to

This method applies to the following types: