我目前正在尝试在 azure 上为我的无服务器应用程序设置自动部署。对我来说最后一个缺失的部分是自动在新创建的 EventHub 和 Azure Function 之间建立连接。
对于自动部署,我使用 Azure CLI 2.0 的资源模板,但我不知道如何获取事件中心的连接字符串,在门户中,我可以在事件中心的命名空间 -> 设置 -> 共享访问中找到此连接字符串政策->政策。
但我想使用命令行获取它,但 Azure CLI 2.0 似乎仍然不支持事件中心?
https://learn.microsoft.com/en-us/cli/azure/?view=azure-cli-latest
有谁知道我如何获得此连接,以便我可以自动化整个部署?
最佳答案
Has anybody idea how could I get this connection, so I would have the whole deployment automated?
目前,Azure CLI 2.0 不支持事件中心。
您可以使用 Azure PowerShell 命令 Get-AzureRmEventHubAuthorizationRule
来执行此操作。
更多关于Event hub的PowerShell的信息,请引用这个link .
关于powershell - 带有事件中心的 Azure CLI,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48450551/