# ExternalServiceResource

- Kind: `class`
- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Version: `13.3.0`
- Namespace: `Aspire.Hosting`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ExternalServiceResource.cs)
- Inherits: [Resource](/reference/api/csharp/aspire.hosting/resource.md)

Represents an external service resource with service discovery capabilities.

## Definition

```csharp
namespace Aspire.Hosting;

public sealed class ExternalServiceResource
    : Aspire.Hosting.ApplicationModel.Resource
{
    // ...
}
```

## Constructors

- [ExternalServiceResource(string, Uri)](/reference/api/csharp/aspire.hosting/externalserviceresource/constructors.md#constructor-string-uri) -- Creates a new instance of [ExternalServiceResource](/reference/api/csharp/aspire.hosting/externalserviceresource.md) with a specified name and URI.
- [ExternalServiceResource(string, ParameterResource)](/reference/api/csharp/aspire.hosting/externalserviceresource/constructors.md#constructor-string-parameterresource) -- Creates a new instance of [ExternalServiceResource](/reference/api/csharp/aspire.hosting/externalserviceresource.md) with a specified name and URL parameter.

## Properties

- [Uri](/reference/api/csharp/aspire.hosting/externalserviceresource/properties.md#uri) : `Uri?` `get` -- Gets the URI for the external service, if defined.
- [UrlParameter](/reference/api/csharp/aspire.hosting/externalserviceresource/properties.md#urlparameter) : [ParameterResource?](/reference/api/csharp/aspire.hosting/parameterresource.md) `get` -- Gets the URL parameter for the external service, if defined.
