EndpointAnnotation
Classsealednet10.0
Represents an endpoint annotation that describes how a service should be bound to a network.
namespace Aspire.Hosting.ApplicationModel;
public sealed class EndpointAnnotation : Aspire.Hosting.ApplicationModel.IResourceAnnotation{ // ...}20 members
Remarks
Section titled Remarks This class is used to specify the network protocol, port, URI scheme, transport, and other details for a service.
Constructors4
Section titled Constructors Initializes a new instance of
EndpointAnnotation. Initializes a new instance of
EndpointAnnotation. Initializes a new instance of
EndpointAnnotation. Initializes a new instance of
EndpointAnnotation. Properties16
Section titled Properties Gets the list of all AllocatedEndpoints associated with this Endpoint.
AllocatedEndpointget; set Gets or sets the default
EndpointAnnotation.AllocatedEndpoint for this Endpoint. ValueSnapshot<AllocatedEndpoint> Gets the
EndpointAnnotation.AllocatedEndpointSnapshot for the default EndpointAnnotation.AllocatedEndpoint. Gets the ID of the network that is the "default" network for the Endpoint (the one the Endpoint is associated with and can be reached without routing or network address translation).
ExcludeReferenceEndpointget; setbool Gets or sets a value indicating whether this endpoint is excluded from the default set when referencing the resource's endpoints via
WithReference(resource). When true, the endpoint is excluded from the default set and must be referenced explicitly using WithReference(resource.GetEndpoint("name")). IsExplicitlyProxiedget; setbool? Gets or sets a value indicating whether this endpoint was explicitly configured to be proxied.
IsProxiedget; setbool Indicates that this endpoint should be managed by DCP. This means it can be replicated and use a different port internally than the one publicly exposed. Setting to
false means the endpoint will be handled and exposed by the resource. Protocolget; setProtocolType Network protocol: TCP or UDP are supported today, others possibly in future.
TargetHostget; setstring This is the address the resource is listening on. By default it is localhost.
TargetPortget; setint? This is the port the resource is listening on. If the endpoint is used for the container, it is the container port.
UriSchemeget; setstring If a service is URI-addressable, this property will contain the URI scheme to use for constructing service URI.