# RadiusEnvironmentResource Methods

- Package: [Aspire.Hosting.Radius](/reference/api/csharp/aspire.hosting.radius.md)
- Type: [RadiusEnvironmentResource](/reference/api/csharp/aspire.hosting.radius/radiusenvironmentresource.md)
- Kind: `Methods`
- Members: `1`

Represents a Radius compute environment in the Aspire app model.

<a id="gethostaddressexpression"></a>
<a id="gethostaddressexpression-endpointreference"></a>

## GetHostAddressExpression(EndpointReference)

- Name: `GetHostAddressExpression(EndpointReference)`
- Returns: `ReferenceExpression`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/2d325b13709752ba6d9a943635c5e2940a2530c0/src/Aspire.Hosting.Radius/RadiusEnvironmentResource.cs#L128-L159)

Gets a `ApplicationModel.ReferenceExpression` representing the host address or host name for the specified `ApplicationModel.EndpointReference`.

```csharp
public sealed class RadiusEnvironmentResource
{
    public ReferenceExpression GetHostAddressExpression(
        EndpointReference endpointReference)
    {
        // ...
    }
}
```

## Parameters

- `endpointReference` (`EndpointReference`)
  The endpoint reference for which to retrieve the host address or host name.

## Returns

`ReferenceExpression` -- A `ApplicationModel.ReferenceExpression` representing the host address or host name (not a full URL).

## Exceptions

- `NotImplementedException` -- Thrown when the environment does not implement host-address resolution.

## Remarks

The returned value typically contains only the host name or address, without scheme, port, or path information. Implementations that support host-address resolution must override this method. The default implementation throws `NotImplementedException` so environments that do not support this capability can still implement `ApplicationModel.IComputeEnvironmentResource`.
