# ResourceUrlsCallbackContext.GetEndpoint

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

Gets an endpoint reference from the associated resource

## Definition

```go
type ResourceUrlsCallbackContext interface {
    // ... omitted for brevity
    GetEndpoint(name string) EndpointReference
}
```

## Signature

```go
GetEndpoint(name string) EndpointReference
```

## Parameters

- `name` (`string`) -- The name of the endpoint.

## Returns

[`EndpointReference`](/reference/api/go/aspire.hosting/endpointreference.md)

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

## Defined on

- [ResourceUrlsCallbackContext](/reference/api/go/aspire.hosting/resourceurlscallbackcontext.md) -- `handle`
