# ExternalServiceResource Properties

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [ExternalServiceResource](/reference/api/csharp/aspire.hosting/externalserviceresource.md)
- Kind: `Properties`
- Members: `2`

Represents an external service resource with service discovery capabilities.

## Uri

- Name: `Uri`
- Modifiers: `nullable` `get`
- Returns: `Uri?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ExternalServiceResource.cs#L52)

Gets the URI for the external service, if defined.

```csharp
public Uri? Uri { get; }
```

## Remarks

If [ExternalServiceResource.Uri](/reference/api/csharp/aspire.hosting/externalserviceresource/properties.md#uri) is `null`, the external service URL is parameterized and can be accessed via [ExternalServiceResource.UrlParameter](/reference/api/csharp/aspire.hosting/externalserviceresource/properties.md#urlparameter)."/>

## UrlParameter

- Name: `UrlParameter`
- Modifiers: `nullable` `get`
- Returns: [ParameterResource?](/reference/api/csharp/aspire.hosting/parameterresource.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ExternalServiceResource.cs#L60)

Gets the URL parameter for the external service, if defined.

```csharp
public ParameterResource? UrlParameter { get; }
```

## Remarks

If [ExternalServiceResource.UrlParameter](/reference/api/csharp/aspire.hosting/externalserviceresource/properties.md#urlparameter) is `null`, the external service URL is not parameterized and can be accessed directly via [ExternalServiceResource.Uri](/reference/api/csharp/aspire.hosting/externalserviceresource/properties.md#uri).
