use of com.microsoft.azure.management.eventhub.EventHubNamespaceAuthorizationRule in project azure-tools-for-java by Microsoft.
the class CreateFunctionAction method getEventHubNamespaceConnectionString.
private String getEventHubNamespaceConnectionString(EventHubNamespace eventHubNamespace) {
Azure azure = AuthMethodManager.getInstance().getAzureClient(eventHubNamespace.id().split("/")[2]);
EventHubNamespaceAuthorizationRule eventHubNamespaceAuthorizationRule = azure.eventHubNamespaces().authorizationRules().getByName(eventHubNamespace.resourceGroupName(), eventHubNamespace.name(), "RootManageSharedAccessKey");
return eventHubNamespaceAuthorizationRule.getKeys().primaryConnectionString();
}
Aggregations