Watch Aspire live streamsDocsTry Aspire

withHttpsEndpoint

Method
📦 Aspire.Hosting v13.6.0
interface ContainerResource {
// ... omitted for brevity
withHttpsEndpoint(
port?: number,
targetPort?: number,
name?: string,
env?: string,
isProxied?: boolean): IResourceWithEndpoints;
}

Signature

methodwithHttpsEndpointbuilder
Adds an HTTPS endpoint
withHttpsEndpoint(
port?: number,
targetPort?: number,
name?: string,
env?: string,
isProxied?: boolean): IResourceWithEndpoints
portnumberoptionalAn optional host port.
targetPortnumberoptionalThis is the port the resource is listening on. If the endpoint is used for the container, it is the container port.
namestringoptionalAn optional name of the endpoint. Defaults to "https" if not specified.
envstringoptionalAn optional name of the environment variable to inject.
isProxiedbooleanoptionalSpecifies if the endpoint will be proxied by DCP. Defaults to `null`.
IResourceWithEndpoints

Applies to

This method applies to the following types: