# YarpResource

- Kind: `class`
- Package: [Aspire.Hosting.Yarp](/reference/api/csharp/aspire.hosting.yarp.md)
- Version: `13.4.0`
- Namespace: `Aspire.Hosting.Yarp`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Yarp/YarpResource.cs)
- Inherits: `ContainerResource`
- Implements: `IContainerFilesDestinationResource`, `IResource`, `IResourceWithEndpoints`, `IResourceWithServiceDiscovery`

A resource that represents a YARP resource independent of the hosting model.

## Definition

```csharp
namespace Aspire.Hosting.Yarp;

public class YarpResource
    : Aspire.Hosting.ApplicationModel.ContainerResource,
      Aspire.Hosting.ApplicationModel.IContainerFilesDestinationResource,
      Aspire.Hosting.ApplicationModel.IResource,
      Aspire.Hosting.ApplicationModel.IResourceWithEndpoints,
      Aspire.Hosting.IResourceWithServiceDiscovery
{
    // ...
}
```

## Constructors

- [YarpResource(string)](/reference/api/csharp/aspire.hosting.yarp/yarpresource/constructors.md#constructor-string)
