c# - 如何解决此 Azure 事件网格订阅错误?

标签 c# .net azure webhooks azure-eventgrid

我正在尝试使用如下所示的 Azure CLI 命令为我的 Azure EventGrid 主题创建订阅 -

az eventgrid topic event-subscription create -g myresname --topic-name mytopicname --name mysubscriptionname --endpoint https://xyz.azurewebsites.net/api/mywebhookdetails

我在 Azure CLI 的 BASH shell 中收到此错误

az eventgrid topic: error: argument _subcommand: invalid choice: event-subscription

这是什么原因以及如何解决?

最佳答案

上个月进行了 CLI 更新,对此语法进行了一些更改。请使用以下命令(唯一的区别是您不需要在 eventgrid 之后指定“主题”):

az eventgrid 事件订阅 create -g myresname --topic-name mytopicname --name mysubscriptionname --endpoint https://xyz.azurewebsites.net/api/mywebhookdetails

关于c# - 如何解决此 Azure 事件网格订阅错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48656787/

相关文章:

c# - 一次性注册表 : good pattern?

.net - 在 .NET Core 2.2 上找不到 AddHealthChecks().AddUrlGroup()

python - 如何使用Python检查Azure容器中是否存在文件夹?

powershell - 替换用于部署的 Azure SDK Powershell commandlet

c# - 插入时插入语句出错

c# - 通过命令行仅构建 VS 安装项目

.net - 使用 LINQ 从列表创建元组列表

c# - 使用 Azure 作为 Windows Phone 7 应用程序的存储

c# - 为什么C#编译器在catch中授权 "throw ex",有没有 "throw ex"有用的情况?

.net - 通过 Converter 或 ExtensionMethod 读取属性属性