# DevTunnelResource Constructors

- Package: [Aspire.Hosting.DevTunnels](/reference/api/csharp/aspire.hosting.devtunnels.md)
- Type: [DevTunnelResource](/reference/api/csharp/aspire.hosting.devtunnels/devtunnelresource.md)
- Kind: `Constructors`
- Members: `1`

A resource representing a persistent dev tunnel that runs for the life of the AppHost.

## DevTunnelResource(string, string, string, string, DevTunnelOptions?)

- Name: `Constructor(string, string, string, string, DevTunnelOptions?)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.DevTunnels/DevTunnelResource.cs#L20-L32)

A resource representing a persistent dev tunnel that runs for the life of the AppHost.

```csharp
public sealed class DevTunnelResource
{
    public DevTunnelResource(
        string name,
        string tunnelId,
        string command,
        string workingDirectory,
        DevTunnelOptions? options = null)
    {
        // ...
    }
}
```

## Parameters

- `name` (`string`)
- `tunnelId` (`string`)
- `command` (`string`)
- `workingDirectory` (`string`)
- `options` ([DevTunnelOptions?](/reference/api/csharp/aspire.hosting.devtunnels/devtunneloptions.md)) `optional`
