# AzureEventHubsResource Properties

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

Represents an Azure Event Hubs resource.

## ConnectionStringExpression

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

Gets the connection string template for the manifest for the Azure Event Hubs endpoint.

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

## EventHubsEndpoint

- Name: `EventHubsEndpoint`
- Modifiers: `get`
- Returns: `BicepOutputReference`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.EventHubs/AzureEventHubsResource.cs#L37)

Gets the "eventHubsEndpoint" output reference from the bicep template for the Azure Event Hubs resource.

```csharp
public BicepOutputReference EventHubsEndpoint { get; }
```

## HostName

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

Gets the host name for the Event Hubs namespace.

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

## Id

- Name: `Id`
- Modifiers: `get`
- Returns: `BicepOutputReference`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.EventHubs/AzureEventHubsResource.cs#L52)

Gets the "id" output reference for the resource.

```csharp
public BicepOutputReference Id { get; }
```

## IsEmulator

- Name: `IsEmulator`
- Modifiers: `get`
- Returns: `bool`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.EventHubs/AzureEventHubsResource.cs#L59)

Gets a value indicating whether the Azure Event Hubs resource is running in the local emulator.

```csharp
public bool IsEmulator { get; }
```

## NameOutputReference

- Name: `NameOutputReference`
- Modifiers: `get`
- Returns: `BicepOutputReference`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.EventHubs/AzureEventHubsResource.cs#L47)

Gets the "name" output reference for the resource.

```csharp
public BicepOutputReference NameOutputReference { get; }
```

## Port

- Name: `Port`
- Modifiers: `nullable` `get`
- Returns: `ReferenceExpression?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.EventHubs/AzureEventHubsResource.cs#L77-L79)

Gets the port for the Event Hubs namespace.

```csharp
public ReferenceExpression? Port { get; }
```

## Remarks

In container mode, resolves to the container's primary endpoint port. In Azure mode, return null.

## UriExpression

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

Gets the connection URI expression for the Event Hubs namespace.

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

## Remarks

Format: `sb://{host}:{port}`.
