# DurableTaskHubResource

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

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

```go
type DurableTaskHubResource interface {
    ExpressionValue
    Resource
    ResourceWithConnectionString
    ResourceWithParent
}
```

## Embeds

- `ExpressionValue`
- `Resource`
- `ResourceWithConnectionString`
- `ResourceWithParent`

## 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/go/aspire.hosting.azure.functions/durabletaskhubresource/withtaskhubname.md) -- `method` -- Sets the Durable Task hub name from a string or parameter resource.
  ```go
  WithTaskHubName(taskHubName any) DurableTaskHubResource
  ```
