# AzureEventHubResource

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

## Definition

```typescript
interface AzureEventHubResource
  extends IManifestExpressionProvider,
    IResource,
    IResourceWithConnectionString,
    IResourceWithParent,
    AzureEventHubsResource]],
    IValueProvider,
    IValueWithReferences,
    IResourceWithAzureFunctionsConfig {
  hubName: string;
  readonly name: string;
  partitionCount: number;
  addConsumerGroup(
      name: string,
      groupName?: string): AzureEventHubConsumerGroupResource;
  withProperties(configure: (obj: AzureEventHubResource) => Promise<void>): AzureEventHubResource;
}
```

## Properties

- `hubName`: `string` `get - set` -- Gets the HubName property
- `name`: `string` `get` -- Gets the Name property
- `partitionCount`: `number` `get - set` -- Gets the PartitionCount property

## Methods

- [addConsumerGroup](/reference/api/typescript/aspire.hosting.azure.eventhubs/azureeventhubresource/addconsumergroup.md) -- `method` -- Adds an Azure Event Hub consumer group resource
    ```typescript
  addConsumerGroup(name: string, groupName?: string): AzureEventHubConsumerGroupResource
  ```
- [withProperties](/reference/api/typescript/aspire.hosting.azure.eventhubs/azureeventhubresource/withproperties.md) -- `method` -- Configures properties of an Azure Event Hub
    ```typescript
  withProperties(configure: (obj: AzureEventHubResource) => Promise<void>): AzureEventHubResource
  ```
