# AddAzureEventHubs

- Module: [Aspire.Hosting.Azure.EventHubs](/reference/api/go/aspire.hosting.azure.eventhubs.md)
- Version: `17.0.0`
- Kind: `method`
- Defined on: `DistributedApplicationBuilder`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/2d325b13709752ba6d9a943635c5e2940a2530c0)

Adds an Azure Event Hubs Namespace resource to the application model. This resource can be used to create Event Hub resources.

## Definition

```go
func (DistributedApplicationBuilder) AddAzureEventHubs(name string) AzureEventHubsResource
```

## Parameters

- `name` (`string`) -- The name of the resource.

## Returns

[`AzureEventHubsResource`](/reference/api/go/aspire.hosting.azure.eventhubs/azureeventhubsresource.md) -- The resource builder.

Returns a handle; failures surface later via `Err()`.

## Applies to

- `DistributedApplicationBuilder`
