Skip to content
Docs Try Aspire

withEndpoint

Function
📦 Aspire.Hosting v13.2.0-preview.1.26159.1
interface ContainerResource {
// ... omitted for brevity
withEndpoint(
port?: number,
targetPort?: number,
scheme?: string,
name?: string,
env?: string,
isProxied?: boolean,
isExternal?: boolean,
protocol?: ProtocolType): IResourceWithEndpoints;
}

Signature

method withEndpoint builder
Adds a network endpoint
withEndpoint(
port?: number,
targetPort?: number,
scheme?: string,
name?: string,
env?: string,
isProxied?: boolean,
isExternal?: boolean,
protocol?: ProtocolType): IResourceWithEndpoints
port number optional
targetPort number optional
scheme string optional
name string optional
env string optional
isProxied boolean optional = True
isExternal boolean optional
protocol ProtocolType optional
IResourceWithEndpoints

Applies to

This function is an extension method on the following types: