Skip to content
Docs Try Aspire

withLifetime

Function
📦 Aspire.Hosting v13.2.0-preview.1.26159.1
interface ContainerResource {
// ... omitted for brevity
withLifetime(lifetime: ContainerLifetime): ContainerResource;
}

Signature

method withLifetime builder
Sets the lifetime behavior of the container resource
withLifetime(lifetime: ContainerLifetime): ContainerResource
lifetime ContainerLifetime
ContainerResource

Applies to

This function is an extension method on the following types: