IResourceWithEndpoints.withHttpHealthCheck

Method
📦 Aspire.Hosting v17.0.0
interface IResourceWithEndpoints {
// ... 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

Defined on

This method is defined on the following type: