# YarpConfigurationBuilderExtensions

- Kind: `class`
- Package: [Aspire.Hosting.Yarp](/reference/api/csharp/aspire.hosting.yarp.md)
- Version: `13.4.0`
- Namespace: `Aspire.Hosting`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Yarp/ConfigurationBuilder/IYarpConfigurationBuilder.cs)

Collection of extensions methods for [IYarpConfigurationBuilder](/reference/api/csharp/aspire.hosting.yarp/iyarpconfigurationbuilder.md)

## Definition

```csharp
namespace Aspire.Hosting;

public static class YarpConfigurationBuilderExtensions
{
    // ...
}
```

## Methods

- [AddRoute(IYarpConfigurationBuilder, YarpCluster)](/reference/api/csharp/aspire.hosting.yarp/yarpconfigurationbuilderextensions/methods.md#addroute-iyarpconfigurationbuilder-yarpcluster) : [YarpRoute](/reference/api/csharp/aspire.hosting.yarp/yarproute.md) `extension` `ats ignored` -- Add a new catch all route to YARP that will target the cluster in parameter.
- [AddRoute(IYarpConfigurationBuilder, EndpointReference)](/reference/api/csharp/aspire.hosting.yarp/yarpconfigurationbuilderextensions/methods.md#addroute-iyarpconfigurationbuilder-endpointreference) : [YarpRoute](/reference/api/csharp/aspire.hosting.yarp/yarproute.md) `extension` `ats ignored` -- Add a new catch all route to YARP that will target the cluster in parameter.
- [AddRoute(IYarpConfigurationBuilder, IResourceBuilder<IResourceWithServiceDiscovery>)](/reference/api/csharp/aspire.hosting.yarp/yarpconfigurationbuilderextensions/methods.md#addroute-iyarpconfigurationbuilder-iresourcebuilder-iresourcewithservicediscovery) : [YarpRoute](/reference/api/csharp/aspire.hosting.yarp/yarproute.md) `extension` `ats ignored` -- Add a new catch all route to YARP that will target the cluster in parameter.
- [AddRoute(IYarpConfigurationBuilder, string, EndpointReference)](/reference/api/csharp/aspire.hosting.yarp/yarpconfigurationbuilderextensions/methods.md#addroute-iyarpconfigurationbuilder-string-endpointreference) : [YarpRoute](/reference/api/csharp/aspire.hosting.yarp/yarproute.md) `extension` `ats ignored` -- Add a new route to YARP that will target the cluster in parameter.
- [AddRoute(IYarpConfigurationBuilder, string, IResourceBuilder<IResourceWithServiceDiscovery>)](/reference/api/csharp/aspire.hosting.yarp/yarpconfigurationbuilderextensions/methods.md#addroute-iyarpconfigurationbuilder-string-iresourcebuilder-iresourcewithservicediscovery) : [YarpRoute](/reference/api/csharp/aspire.hosting.yarp/yarproute.md) `extension` `ats ignored` -- Add a new route to YARP that will target the cluster in parameter.
- [AddRoute(IYarpConfigurationBuilder, string, IResourceBuilder<ExternalServiceResource>)](/reference/api/csharp/aspire.hosting.yarp/yarpconfigurationbuilderextensions/methods.md#addroute-iyarpconfigurationbuilder-string-iresourcebuilder-externalserviceresource) : [YarpRoute](/reference/api/csharp/aspire.hosting.yarp/yarproute.md) `extension` `ats ignored` -- Add a new route to YARP that will target the external service in parameter.
- [AddRoute(IYarpConfigurationBuilder, IResourceBuilder<ExternalServiceResource>)](/reference/api/csharp/aspire.hosting.yarp/yarpconfigurationbuilderextensions/methods.md#addroute-iyarpconfigurationbuilder-iresourcebuilder-externalserviceresource) : [YarpRoute](/reference/api/csharp/aspire.hosting.yarp/yarproute.md) `extension` `ats ignored` -- Add a new catch all route to YARP that will target the cluster in parameter.
