EndpointReference Properties

ClassProperties19 members
Represents an endpoint reference for a resource with endpoints.
Gets a deferred comma-separated list of browser-facing origins associated with this endpoint.
public EndpointReferenceExpression BrowserOrigins { get; }
Origins use finalized URL customization and are independent of this reference's service-discovery network context. Origins are distinct and ordered by display preference. The allocated HTTP(S) endpoint origin is included after display origins, even if its display links are removed. An endpoint without HTTP(S) origins resolves to an empty string.
backend.WithEnvironment("ALLOWED_ORIGINS", frontend.GetEndpoint("https").BrowserOrigins);
The ID of the network that serves as the context for the EndpointReference. The reference will be resolved in the context of this network, which may be different from the network associated with the default network of the referenced Endpoint.
public NetworkIdentifier? ContextNetworkID { get; }
Gets the endpoint annotation associated with the endpoint reference.
public EndpointAnnotation EndpointAnnotation { get; }
EndpointNameSection titled EndpointNamestring
Gets the name of the endpoint associated with the endpoint reference.
public string EndpointName { get; }
ErrorMessageSection titled ErrorMessagenullablestring?
Gets or sets a custom error message to be thrown when the endpoint annotation is not found.
public string? ErrorMessage { get; init; }
ExcludeReferenceEndpointSection titled ExcludeReferenceEndpointbool
Gets a value indicating whether this endpoint is excluded from the default set when referencing the resource's endpoints.
public bool ExcludeReferenceEndpoint { get; }
Returns false if the endpoint annotation has not been added to the resource yet. Once the annotation exists, this property delegates to EndpointAnnotation.ExcludeReferenceEndpoint.
Gets a value indicating whether the endpoint exists.
public bool Exists { get; }
Gets the host for this endpoint.
public string Host { get; }
Gets a value indicating whether the endpoint is allocated.
public bool IsAllocated { get; }
Gets a value indicating whether the endpoint uses HTTP scheme.
public bool IsHttp { get; }
Gets a value indicating whether the endpoint uses HTTPS scheme.
public bool IsHttps { get; }
IsHttpSchemeNamedEndpointSection titled IsHttpSchemeNamedEndpointbool
Gets a value indicating whether the endpoint name is "http" or "https", ignoring case. This is a convention used to identify endpoints that will be resolved based on the scheme of the endpoint in service discovery rather than by the specific endpoint name. This is done to allow http endpoints that are dynamically updated to https to be mapped correctly despite the endpoint name no longer matching the scheme.
public bool IsHttpSchemeNamedEndpoint { get; }
Gets the port for this endpoint.
public int Port { get; }
Gets the deferred primary browser-facing origin associated with this endpoint.
public EndpointReferenceExpression PrimaryBrowserOrigin { get; }
Returns the first origin in EndpointReference.BrowserOrigins, following finalized URL display ordering. The allocated HTTP(S) endpoint origin is used when no display origins remain. An endpoint without HTTP(S) origins resolves to an empty string. This value is independent of this reference's service-discovery network context.
frontend.WithEnvironment("PUBLIC_ORIGIN", frontend.GetEndpoint("https").PrimaryBrowserOrigin);
Gets the resource owner of the endpoint reference.
public IResourceWithEndpoints Resource { get; }
Gets the scheme for this endpoint.
public string Scheme { get; }
TargetPortSection titled TargetPortnullableint?
Gets the target port for this endpoint. If the port is dynamically allocated, this will return null.
public int? TargetPort { get; }
Gets a value indicating whether TLS is enabled for this endpoint.
public bool TlsEnabled { get; }
Returns false if the endpoint annotation has not been added to the resource yet. Once the annotation exists, this property delegates to EndpointAnnotation.TlsEnabled.
Gets the URL for this endpoint.
public string Url { get; }