Share via


EndpointAnnotation Class

Definition

Represents an endpoint annotation that describes how a service should be bound to a network.

public sealed class EndpointAnnotation : Aspire.Hosting.ApplicationModel.IResourceAnnotation
type EndpointAnnotation = class
    interface IResourceAnnotation
Public NotInheritable Class EndpointAnnotation
Implements IResourceAnnotation
Inheritance
EndpointAnnotation
Implements

Remarks

This class is used to specify the network protocol, port, URI scheme, transport, and other details for a service.

Constructors

EndpointAnnotation(ProtocolType, String, String, String, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, Boolean)

Initializes a new instance of EndpointAnnotation.

Properties

AllocatedEndpoint

Gets or sets the allocated endpoint.

IsExternal

Indicates that this endpoint should be exposed externally at publish time.

IsProxied

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.

Name

Name of the service

Port

Desired port for the service

Protocol

Network protocol: TCP or UDP are supported today, others possibly in future.

TargetPort

This is the port the resource is listening on. If the endpoint is used for the container, it is the container port.

Transport

Transport that is being used (e.g. http, http2, http3 etc).

UriScheme

If a service is URI-addressable, this property will contain the URI scheme to use for constructing service URI.

Applies to