Skip to content
DocsTry Aspire
DocsTry

EndpointAnnotation Constructors

ClassConstructors4 members
Represents an endpoint annotation that describes how a service should be bound to a network.
Constructor(ProtocolType, string?, string?, string?, int?, int?, bool?, bool?)Section titled Constructor(ProtocolType, string?, string?, string?, int?, int?, bool?, bool?)
Initializes a new instance of EndpointAnnotation.
public sealed class EndpointAnnotation
{
public EndpointAnnotation(
ProtocolType protocol,
string? uriScheme = null,
string? transport = null,
string? name = null,
int? port = null,
int? targetPort = null,
bool? isExternal = null,
bool? isProxied = null)
{
// ...
}
}
protocolProtocolTypeNetwork protocol: TCP or UDP are supported today, others possibly in future.
uriSchemestring?optionalIf a service is URI-addressable, this is the URI scheme to use for constructing service URI.
transportstring?optionalTransport that is being used (e.g. http, http2, http3 etc).
namestring?optionalName of the service.
portint?optionalDesired port for the service.
targetPortint?optionalThis is the port the resource is listening on. If the endpoint is used for the container, it is the container port.
isExternalbool?optionalIndicates that this endpoint should be exposed externally at publish time.
isProxiedbool?optionalSpecifies if the endpoint will be proxied by DCP. Defaults to null.
Constructor(ProtocolType, string?, string?, string?, int?, int?, bool?, bool)Section titled Constructor(ProtocolType, string?, string?, string?, int?, int?, bool?, bool)
Initializes a new instance of EndpointAnnotation.
public sealed class EndpointAnnotation
{
public EndpointAnnotation(
ProtocolType protocol,
string? uriScheme,
string? transport,
string? name,
int? port,
int? targetPort,
bool? isExternal,
bool isProxied)
{
// ...
}
}
protocolProtocolTypeNetwork protocol: TCP or UDP are supported today, others possibly in future.
uriSchemestring?If a service is URI-addressable, this is the URI scheme to use for constructing service URI.
transportstring?Transport that is being used (e.g. http, http2, http3 etc).
namestring?Name of the service.
portint?Desired port for the service.
targetPortint?This is the port the resource is listening on. If the endpoint is used for the container, it is the container port.
isExternalbool?Indicates that this endpoint should be exposed externally at publish time.
isProxiedboolSpecifies if the endpoint will be proxied by DCP.
Constructor(ProtocolType, NetworkIdentifier?, string?, string?, string?, int?, int?, bool?, bool?)Section titled Constructor(ProtocolType, NetworkIdentifier?, string?, string?, string?, int?, int?, bool?, bool?)
Initializes a new instance of EndpointAnnotation.
public sealed class EndpointAnnotation
{
public EndpointAnnotation(
ProtocolType protocol,
NetworkIdentifier? networkID,
string? uriScheme = null,
string? transport = null,
string? name = null,
int? port = null,
int? targetPort = null,
bool? isExternal = null,
bool? isProxied = null)
{
// ...
}
}
protocolProtocolTypeNetwork protocol: TCP or UDP are supported today, others possibly in future.
networkIDNetworkIdentifier?The ID of the network that is the "default" network for the Endpoint. Clients connected to the same network can reach the endpoint without any routing or network address translation.
uriSchemestring?optionalIf a service is URI-addressable, this is the URI scheme to use for constructing service URI.
transportstring?optionalTransport that is being used (e.g. http, http2, http3 etc).
namestring?optionalName of the service.
portint?optionalDesired port for the service.
targetPortint?optionalThis is the port the resource is listening on. If the endpoint is used for the container, it is the container port.
isExternalbool?optionalIndicates that this endpoint should be exposed externally at publish time.
isProxiedbool?optionalSpecifies if the endpoint will be proxied by DCP. Defaults to null.
Constructor(ProtocolType, NetworkIdentifier?, string?, string?, string?, int?, int?, bool?, bool)Section titled Constructor(ProtocolType, NetworkIdentifier?, string?, string?, string?, int?, int?, bool?, bool)
Initializes a new instance of EndpointAnnotation.
public sealed class EndpointAnnotation
{
public EndpointAnnotation(
ProtocolType protocol,
NetworkIdentifier? networkID,
string? uriScheme,
string? transport,
string? name,
int? port,
int? targetPort,
bool? isExternal,
bool isProxied)
{
// ...
}
}
protocolProtocolTypeNetwork protocol: TCP or UDP are supported today, others possibly in future.
networkIDNetworkIdentifier?The ID of the network that is the "default" network for the Endpoint. Clients connected to the same network can reach the endpoint without any routing or network address translation.
uriSchemestring?If a service is URI-addressable, this is the URI scheme to use for constructing service URI.
transportstring?Transport that is being used (e.g. http, http2, http3 etc).
namestring?Name of the service.
portint?Desired port for the service.
targetPortint?This is the port the resource is listening on. If the endpoint is used for the container, it is the container port.
isExternalbool?Indicates that this endpoint should be exposed externally at publish time.
isProxiedboolSpecifies if the endpoint will be proxied by DCP.