# DevTunnelPortResource

- Kind: `class`
- Package: [Aspire.Hosting.DevTunnels](/reference/api/csharp/aspire.hosting.devtunnels.md)
- Version: `13.4.0`
- Namespace: `Aspire.Hosting.DevTunnels`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.DevTunnels/DevTunnelResource.cs)
- Inherits: `Resource`
- Implements: `IResource`, `IResourceWithEndpoints`, `IResourceWithWaitSupport`, `IResourceWithServiceDiscovery`

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.

## Definition

```csharp
namespace Aspire.Hosting.DevTunnels;

public sealed class DevTunnelPortResource
    : Aspire.Hosting.ApplicationModel.Resource,
      Aspire.Hosting.ApplicationModel.IResource,
      Aspire.Hosting.ApplicationModel.IResourceWithEndpoints,
      Aspire.Hosting.ApplicationModel.IResourceWithWaitSupport,
      Aspire.Hosting.IResourceWithServiceDiscovery
{
    // ...
}
```

## Constructors

- [DevTunnelPortResource(string, DevTunnelResource, EndpointReference, DevTunnelPortOptions?)](/reference/api/csharp/aspire.hosting.devtunnels/devtunnelportresource/constructors.md#constructor-string-devtunnelresource-endpointreference-devtunnelportoptions) -- Initializes a new instance of the [DevTunnelPortResource](/reference/api/csharp/aspire.hosting.devtunnels/devtunnelportresource.md) class, representing a single forwarded endpoint/port on a dev tunnel.

## Properties

- [DevTunnel](/reference/api/csharp/aspire.hosting.devtunnels/devtunnelportresource/properties.md#devtunnel) : [DevTunnelResource](/reference/api/csharp/aspire.hosting.devtunnels/devtunnelresource.md) `get` -- The dev tunnel this port belongs to.
- [Options](/reference/api/csharp/aspire.hosting.devtunnels/devtunnelportresource/properties.md#options) : [DevTunnelPortOptions](/reference/api/csharp/aspire.hosting.devtunnels/devtunnelportoptions.md) `get` -- Options controlling how this port is exposed.
