Watch Aspire live streamsDocsTry Aspire

VolumeMountBindingAnnotation

Classsealednet10.0
📦 Aspire.Hosting v13.6.0
Describes how a named volume binds to a resource across the inner and outer loop.
namespace Aspire.Hosting.ApplicationModel;
public sealed class VolumeMountBindingAnnotation
: Aspire.Hosting.ApplicationModel.IResourceAnnotation
{
// ...
}

This annotation is the extensibility point compute environments use to participate in the portable volume path convention. It carries two independent facets, either of which may be absent:

The two facets are produced by different parties at different times — the AppHost author opts into the environment variable, while the compute environment supplies the local path — so a resource can carry several of these annotations for the same VolumeMountBindingAnnotation.VolumeName. A binding resolves through its own VolumeMountBindingAnnotation.RunModeHostPathResolver when it has one, and otherwise takes the last sibling that does. VolumeMountBindingAnnotation.VolumeName alone is not a unique key, because separate compute environments can each declare a volume under the same name.

View all constructors
View all properties
View all methods