# DurableTaskHubResource

- Module: [Aspire.Hosting.Azure.Functions](/reference/api/typescript/aspire.hosting.azure.functions.md)
- Version: `13.4.0`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire)

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

```typescript
interface DurableTaskHubResource
  extends IExpressionValue,
    IManifestExpressionProvider,
    IResource,
    IResourceWithConnectionString,
    IResourceWithParent,
    DurableTaskSchedulerResource]],
    IValueProvider,
    IValueWithReferences,
    IResourceWithAzureFunctionsConfig {
  readonly connectionStringExpression: ReferenceExpression;
  readonly taskHubName: ReferenceExpression;
  withTaskHubName(taskHubName: ParameterResource): DurableTaskHubResource;
}
```

## Properties

- `connectionStringExpression`: `ReferenceExpression` `get` -- Gets the connection string expression composed of the scheduler connection string and the TaskHub name.
- `taskHubName`: `ReferenceExpression` `get` -- Gets the name of the Task Hub. If not provided, the logical name of this resource is returned.

## Methods

- [withTaskHubName](/reference/api/typescript/aspire.hosting.azure.functions/durabletaskhubresource/withtaskhubname.md) -- `method` -- Sets the Durable Task hub name from a string or parameter resource.
    ```typescript
  withTaskHubName(taskHubName: ParameterResource): DurableTaskHubResource
  ```
