Skip to content
DocsTry Aspire
DocsTry

DevTunnelPortResource Constructors

ClassConstructors1 member
A resource representing a single forwarded endpoint/port on a dev tunnel. Contains an endpoint that resolves to the public tunnel URL of this port.
Constructor(string, DevTunnelResource, EndpointReference, DevTunnelPortOptions?)Section titled Constructor(string, DevTunnelResource, EndpointReference, DevTunnelPortOptions?)
Initializes a new instance of the DevTunnelPortResource class, representing a single forwarded endpoint/port on a dev tunnel.
public sealed class DevTunnelPortResource
{
public DevTunnelPortResource(
string name,
DevTunnelResource tunnel,
EndpointReference targetEndpoint,
DevTunnelPortOptions? options = null)
{
// ...
}
}
namestringThe name of the port resource.
tunnelDevTunnelResourceThe parent DevTunnelResource this port belongs to.
targetEndpointEndpointReferenceThe endpoint to be forwarded through the tunnel.
optionsDevTunnelPortOptions?optionalOptions controlling how this port is exposed.