# GetTunnelEndpoint

- Module: [Aspire.Hosting.DevTunnels](/reference/api/go/aspire.hosting.devtunnels.md)
- Version: `17.0.0`
- Kind: `method`
- Defined on: [`DevTunnelResource`](/reference/api/go/aspire.hosting.devtunnels/devtunnelresource.md)
- Source: [GitHub](https://github.com/microsoft/aspire/tree/2d325b13709752ba6d9a943635c5e2940a2530c0)

Gets the tunnel endpoint reference for the specified target endpoint.

## Definition

```go
func (DevTunnelResource) GetTunnelEndpoint(targetEndpointReference EndpointReference) EndpointReference
```

## Parameters

- `targetEndpointReference` (`EndpointReference`) -- The target endpoint reference.

## Returns

`EndpointReference` -- An `EndpointReference` representing the public tunnel endpoint.

Returns a handle; failures surface later via `Err()`.

## Applies to

- [`DevTunnelResource`](/reference/api/go/aspire.hosting.devtunnels/devtunnelresource.md)
