# IYarpJsonConfigGeneratorBuilder

- Kind: `interface`
- 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/ConfigurationBuilder/IYarpJsonConfigGeneratorBuilder.cs)

Interface to build a configuration file for YARP

## Definition

```csharp
namespace Aspire.Hosting.Yarp;

public interface IYarpJsonConfigGeneratorBuilder
{
    // ...
}
```

## Methods

- [AddCluster(ClusterConfig)](/reference/api/csharp/aspire.hosting.yarp/iyarpjsonconfiggeneratorbuilder/methods.md#addcluster-clusterconfig) : [IYarpJsonConfigGeneratorBuilder](/reference/api/csharp/aspire.hosting.yarp/iyarpjsonconfiggeneratorbuilder.md) `abstract` -- Add a ClusterConfig to the YARP resource
- [AddRoute(RouteConfig)](/reference/api/csharp/aspire.hosting.yarp/iyarpjsonconfiggeneratorbuilder/methods.md#addroute-routeconfig) : [IYarpJsonConfigGeneratorBuilder](/reference/api/csharp/aspire.hosting.yarp/iyarpjsonconfiggeneratorbuilder.md) `abstract` -- Add a RouteConfig to the YARP resource
- [WithConfigFile(string)](/reference/api/csharp/aspire.hosting.yarp/iyarpjsonconfiggeneratorbuilder/methods.md#withconfigfile-string) : [IYarpJsonConfigGeneratorBuilder](/reference/api/csharp/aspire.hosting.yarp/iyarpjsonconfiggeneratorbuilder.md) `abstract` -- Add a YARP config to the YARP resource
