Sdílet prostřednictvím


EventHubClient.CreateWithAzureActiveDirectory Method

Definition

Creates a new instance of the EventHubClient by using Azure Active Directory authentication.

public static Microsoft.Azure.EventHubs.EventHubClient CreateWithAzureActiveDirectory (Uri endpointAddress, string path, Microsoft.Azure.EventHubs.AzureActiveDirectoryTokenProvider.AuthenticationCallback authCallback, string authority, TimeSpan? operationTimeout = default, Microsoft.Azure.EventHubs.TransportType transportType = Microsoft.Azure.EventHubs.TransportType.Amqp);
static member CreateWithAzureActiveDirectory : Uri * string * Microsoft.Azure.EventHubs.AzureActiveDirectoryTokenProvider.AuthenticationCallback * string * Nullable<TimeSpan> * Microsoft.Azure.EventHubs.TransportType -> Microsoft.Azure.EventHubs.EventHubClient
Public Shared Function CreateWithAzureActiveDirectory (endpointAddress As Uri, path As String, authCallback As AzureActiveDirectoryTokenProvider.AuthenticationCallback, authority As String, Optional operationTimeout As Nullable(Of TimeSpan) = Nothing, Optional transportType As TransportType = Microsoft.Azure.EventHubs.TransportType.Amqp) As EventHubClient

Parameters

endpointAddress
Uri

Fully qualified domain name for Event Hubs. Most likely, {yournamespace}.servicebus.windows.net

path
String

The path to the Event Hub.

authCallback
AzureActiveDirectoryTokenProvider.AuthenticationCallback

The authentication callback.

authority
String

Address of the authority to issue token.

operationTimeout
Nullable<TimeSpan>

Operation timeout for Event Hubs operations.

transportType
TransportType

Transport type on connection.

Returns

The newly created Event Hub client object.

Applies to