# AzureEventHubResource Properties

- Package: [Aspire.Hosting.Azure.EventHubs](/reference/api/csharp/aspire.hosting.azure.eventhubs.md)
- Type: [AzureEventHubResource](/reference/api/csharp/aspire.hosting.azure.eventhubs/azureeventhubresource.md)
- Kind: `Properties`
- Members: `4`

Represents an Azure Event Hub. Initializes a new instance of the [AzureEventHubResource](/reference/api/csharp/aspire.hosting.azure.eventhubs/azureeventhubresource.md) class.

## ConnectionStringExpression

- Name: `ConnectionStringExpression`
- Modifiers: `get`
- Returns: `ReferenceExpression`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.EventHubs/AzureEventHubResource.cs#L46)

Gets the connection string expression for the Azure Event Hub.

```csharp
public ReferenceExpression ConnectionStringExpression { get; }
```

## HubName

- Name: `HubName`
- Modifiers: `get; set`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.EventHubs/AzureEventHubResource.cs)

The event hub name.

```csharp
public string HubName { get; set; }
```

## Parent

- Name: `Parent`
- Modifiers: `get`
- Returns: [AzureEventHubsResource](/reference/api/csharp/aspire.hosting.azure.eventhubs/azureeventhubsresource.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.EventHubs/AzureEventHubResource.cs#L41)

Gets the parent Azure Event Hubs resource.

```csharp
public AzureEventHubsResource Parent { get; }
```

## PartitionCount

- Name: `PartitionCount`
- Modifiers: `nullable` `get; set`
- Returns: `long?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.EventHubs/AzureEventHubResource.cs)

Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions.

```csharp
public long? PartitionCount { get; set; }
```
