共用方式為


AzureEventHubsExtensions.AddAzureEventHubs Method

Definition

Overloads

AddAzureEventHubs(IDistributedApplicationBuilder, String)

Adds an Azure Event Hubs Namespace resource to the application model. This resource can be used to create Event Hub resources.

AddAzureEventHubs(IDistributedApplicationBuilder, String, Action<IResourceBuilder<AzureEventHubsResource>, ResourceModuleConstruct,EventHubsNamespace>)

Adds an Azure Event Hubs Namespace resource to the application model. This resource can be used to create Event Hub resources.

AddAzureEventHubs(IDistributedApplicationBuilder, String)

Source:
AzureEventHubsExtensions.cs
Source:
AzureEventHubsExtensions.cs

Adds an Azure Event Hubs Namespace resource to the application model. This resource can be used to create Event Hub resources.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureEventHubsResource> AddAzureEventHubs (this Aspire.Hosting.IDistributedApplicationBuilder builder, string name);
static member AddAzureEventHubs : Aspire.Hosting.IDistributedApplicationBuilder * string -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureEventHubsResource>
<Extension()>
Public Function AddAzureEventHubs (builder As IDistributedApplicationBuilder, name As String) As IResourceBuilder(Of AzureEventHubsResource)

Parameters

builder
IDistributedApplicationBuilder

The builder for the distributed application.

name
String

The name of the resource.

Returns

Applies to

AddAzureEventHubs(IDistributedApplicationBuilder, String, Action<IResourceBuilder<AzureEventHubsResource>, ResourceModuleConstruct,EventHubsNamespace>)

Source:
AzureEventHubsExtensions.cs

Adds an Azure Event Hubs Namespace resource to the application model. This resource can be used to create Event Hub resources.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureEventHubsResource> AddAzureEventHubs (this Aspire.Hosting.IDistributedApplicationBuilder builder, string name, Action<Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureEventHubsResource>,Aspire.Hosting.ResourceModuleConstruct,Azure.Provisioning.EventHubs.EventHubsNamespace>? configureResource);
static member AddAzureEventHubs : Aspire.Hosting.IDistributedApplicationBuilder * string * Action<Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureEventHubsResource>, Aspire.Hosting.ResourceModuleConstruct, Azure.Provisioning.EventHubs.EventHubsNamespace> -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureEventHubsResource>
<Extension()>
Public Function AddAzureEventHubs (builder As IDistributedApplicationBuilder, name As String, configureResource As Action(Of IResourceBuilder(Of AzureEventHubsResource), ResourceModuleConstruct, EventHubsNamespace)) As IResourceBuilder(Of AzureEventHubsResource)

Parameters

builder
IDistributedApplicationBuilder

The builder for the distributed application.

name
String

The name of the resource.

configureResource
Action<IResourceBuilder<AzureEventHubsResource>,ResourceModuleConstruct,EventHubsNamespace>

Optional callback to configure the Event Hubs namespace.

Returns

Applies to