以前的 Powershell 模块 AzureRm.EventHub
具有 Get-AzureRmEventHubNamespaceKey
并且很容易获取 key 。现在自 powershell v5 以来它已被删除。现在我如何获取 EventHubNameSpace SAS key 。这是我在计算机中找到的 powershell Get cmdlet 的列表。
Get-AzureRmEventHub
Get-AzureRmEventHubAuthorizationRule
Get-AzureRmEventHubConsumerGroup
Get-AzureRmEventHubGeoDRConfiguration
Get-AzureRmEventHubKey
Get-AzureRmEventHubNamespace
Get-AzureRmIotHubEventHubConsumerGroup
谢谢
最佳答案
您可以使用Invoke-AzureRmResourceAction
来执行此操作:
Invoke-AzureRmResourceAction -ResourceGroupName rgName -ResourceType Microsoft.EventHub/namespaces/AuthorizationRules -ResourceName eventhubName/RootManageSharedAccessKey -Action listKeys -ApiVersion 2015-08-01 -Force
关于azure - 如何从 powershell 获取 EventHub 命名空间 SAS key ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48761146/