# DevTunnelResource.GetTunnelEndpoint

- Module: [Aspire.Hosting.DevTunnels](/reference/api/go/aspire.hosting.devtunnels.md)
- Defined on: [DevTunnelResource](/reference/api/go/aspire.hosting.devtunnels/devtunnelresource.md)
- Version: `17.0.0`
- Kind: `method`

Gets the tunnel endpoint reference for the specified target endpoint.

## Definition

```go
type DevTunnelResource interface {
    // ... omitted for brevity
    GetTunnelEndpoint(targetEndpointReference EndpointReference) EndpointReference
}
```

## Signature

```go
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()`.

## Defined on

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