Skip to content
DocsTry Aspire
DocsTry

withClusterLifetime

Method
📦 CommunityToolkit.Aspire.Hosting.Kind v13.5.1-beta.736
interface KindClusterResource {
// ... omitted for brevity
withClusterLifetime(lifetime: ClusterLifetime): IKindResource;
}

Signature

methodwithClusterLifetimebuilder
Sets the cluster lifetime. When `Session` (the default), the cluster is deleted on graceful shutdown or other process-exit signals on a best-effort basis. When `Persistent`, the cluster survives AppHost restarts and is reused on next startup.
withClusterLifetime(lifetime: ClusterLifetime): IKindResource
lifetimeClusterLifetime
IKindResource

Applies to

This method applies to the following types: