ContainerNetworkAliasAnnotation
Class sealed net10.0
Represents an annotation for a custom network alias for a container resource.
namespace Aspire.Hosting.ApplicationModel;
public sealed class ContainerNetworkAliasAnnotation : Aspire.Hosting.ApplicationModel.IResourceAnnotation{ // ...}Remarks
Section titled Remarks Network aliases enable DNS resolution of the container on the network by custom names. Multiple aliases can be specified for a single container by adding multiple annotations.
Constructors1
Section titled ConstructorsContainerNetworkAliasAnnotation(string) Creates a new instance of the
ContainerNetworkAliasAnnotation class with the specified alias. Properties2
Section titled PropertiesAliasgetstring Gets the network alias for the container.
Networkget; set Gets or sets the network identifier for the network to which the alias applies.