# DurableTaskHubResource

- Kind: `class`
- Package: [Aspire.Hosting.Azure.Functions](/reference/api/csharp/aspire.hosting.azure.functions.md)
- Version: `13.4.0`
- Namespace: `Aspire.Hosting.Azure.DurableTask`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.Functions/DurableTask/DurableTaskHubResource.cs)
- Inherits: `Resource`
- Implements: `IExpressionValue`, `IManifestExpressionProvider`, `IResource`, `IResourceWithConnectionString`, `IResourceWithParent`, `IResourceWithParent<DurableTaskSchedulerResource>`, `IValueProvider`, `IValueWithReferences`, `IResourceWithAzureFunctionsConfig`

Represents a Durable Task hub resource. A Task Hub groups durable orchestrations and activities. This resource extends the scheduler connection string with the TaskHub name so that clients can connect to the correct hub.

## Definition

```csharp
namespace Aspire.Hosting.Azure.DurableTask;

public sealed class DurableTaskHubResource
    : Aspire.Hosting.ApplicationModel.Resource,
      Aspire.Hosting.ApplicationModel.IExpressionValue,
      Aspire.Hosting.ApplicationModel.IManifestExpressionProvider,
      Aspire.Hosting.ApplicationModel.IResource,
      Aspire.Hosting.ApplicationModel.IResourceWithConnectionString,
      Aspire.Hosting.ApplicationModel.IResourceWithParent,
      Aspire.Hosting.ApplicationModel.IResourceWithParent<Aspire.Hosting.Azure.DurableTask.DurableTaskSchedulerResource>,
      Aspire.Hosting.ApplicationModel.IValueProvider,
      Aspire.Hosting.ApplicationModel.IValueWithReferences,
      Aspire.Hosting.Azure.IResourceWithAzureFunctionsConfig
{
    // ...
}
```

## ATS metadata

### ATS export

- Type ID: `Aspire.Hosting.Azure.Functions/DurableTaskHubResource`

## Constructors

- [DurableTaskHubResource(string, DurableTaskSchedulerResource)](/reference/api/csharp/aspire.hosting.azure.functions/durabletaskhubresource/constructors.md#constructor-string-durabletaskschedulerresource) -- Represents a Durable Task hub resource. A Task Hub groups durable orchestrations and activities. This resource extends the scheduler connection string with the TaskHub name so that clients can connect to the correct hub.

## Properties

- [ConnectionStringExpression](/reference/api/csharp/aspire.hosting.azure.functions/durabletaskhubresource/properties.md#connectionstringexpression) : `ReferenceExpression` `get` -- Gets the connection string expression composed of the scheduler connection string and the TaskHub name.
- [Parent](/reference/api/csharp/aspire.hosting.azure.functions/durabletaskhubresource/properties.md#parent) : [DurableTaskSchedulerResource](/reference/api/csharp/aspire.hosting.azure.functions/durabletaskschedulerresource.md) `get` -- Gets the parent durable task scheduler resource that provides the base connection string.
- [TaskHubName](/reference/api/csharp/aspire.hosting.azure.functions/durabletaskhubresource/properties.md#taskhubname) : `ReferenceExpression` `get` -- Gets the name of the Task Hub. If not provided, the logical name of this resource is returned.
