Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

AzureEventHubResource

Handle
📦 Aspire.Hosting.Azure.EventHubs v17.0.0

Represents an Azure Event Hub. Initializes a new instance of the AzureEventHubResource class.

type AzureEventHubResource interface {
ExpressionValue
Resource
ResourceWithConnectionString
ResourceWithParent
}

Properties

propertyConnectionStringExpression*ReferenceExpressionget
Gets the connection string expression for the Azure Event Hub.
ConnectionStringExpression() *ReferenceExpression
propertyHubNamestringget · set
The event hub name.
HubName() (string, error)
SetHubName(value string) AzureEventHubResource
propertyParentAzureEventHubsResourceget
Gets the parent Azure Event Hubs resource.
Parent() AzureEventHubsResource
propertyPartitionCount*float64get · set
Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions.
PartitionCount() (*float64, error)
SetPartitionCount(value *float64) AzureEventHubResource
propertyResourceTypeDisplayNamestringget
Gets the ResourceTypeDisplayName property
ResourceTypeDisplayName() (string, error)

Methods

methodAddConsumerGroupbuilder
Adds an Azure Event Hub Consumer Group resource to the application model.
AddConsumerGroup(
name string,
options ...*AddConsumerGroupOptions,
) AzureEventHubConsumerGroupResource
namestringThe name of the Event Hub Consumer Group resource.
options...*AddConsumerGroupOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*AddConsumerGroupOptions argument.

GroupName*stringThe name of the Consumer Group. If not provided, this defaults to the same value as name.
AzureEventHubConsumerGroupResource

The resource builder.

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

methodWithPropertiesbuilder
Allows setting the properties of an Azure Event Hub resource.
WithProperties(configure func(obj AzureEventHubResource)) AzureEventHubResource
configurefunc(obj AzureEventHubResource)callbackA method that can be used for customizing the AzureEventHubResource.
AzureEventHubResource

The resource builder.

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