AzureEventHubsExtensions.AddHub Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds an Azure Event Hubs hub resource to the application model.
public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureEventHubResource> AddHub(this Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureEventHubsResource> builder, string name, string? hubName = default);
static member AddHub : Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureEventHubsResource> * string * string -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureEventHubResource>
<Extension()>
Public Function AddHub (builder As IResourceBuilder(Of AzureEventHubsResource), name As String, Optional hubName As String = Nothing) As IResourceBuilder(Of AzureEventHubResource)
Parameters
- builder
- IResourceBuilder<AzureEventHubsResource>
The Azure Event Hubs resource builder.
- name
- String
The name of the Event Hub resource.
- hubName
- String
The name of the Event Hub. If not provided, this defaults to the same value as name
.
Returns
A reference to the IResourceBuilder<T>.