Skip to content
DocsTry Aspire
DocsTry

withHttpHealthCheck

Method
📦 Aspire.Hosting v13.4.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
pathstringoptional
statusCodenumberoptional
endpointNamestringoptional
IResourceWithEndpoints

Applies to

This method applies to the following types: