Skip to content
DocsTry Aspire
DocsTry

withEndpoint

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

Signature

methodwithEndpointbuilder
Adds a network endpoint
withEndpoint(
port?: number,
targetPort?: number,
scheme?: string,
name?: string,
env?: string,
isProxied?: boolean,
isExternal?: boolean,
protocol?: ProtocolType): IResourceWithEndpoints
portnumberoptional
targetPortnumberoptional
schemestringoptional
namestringoptional
envstringoptional
isProxiedbooleanoptional
isExternalbooleanoptional
protocolProtocolTypeoptional
IResourceWithEndpoints

Applies to

This method applies to the following types: