IKindResource.WithClusterLifetime

Method
📦 CommunityToolkit.Aspire.Hosting.Kind v13.5.1-beta.895
type IKindResource interface {
// ... 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
lifetimeClusterLifetimeThe desired cluster lifetime.
IKindResource

A reference to the IResourceBuilder.

Returns a handle; failures surface later via Err().

Defined on

This method is defined on the following type: