【问题标题】:Update-AzureRmEventGridSubscription setup subject prefix/postfix to string emptyUpdate-AzureRmEventGridSubscription 将主题前缀/后缀设置为字符串空
【发布时间】:2018-11-07 22:54:42
【问题描述】:

我有 PowerShell 脚本来更新 EventGrid 订阅。一种可能的情况是设置订阅主题前缀/后缀来定义值。

Update-AzureRmEventGridSubscription -ResourceGroup $ResourceGroupName -TopicName $EventGridTopicName -EventSubscriptionName $Subscription.name -SubjectEndsWith $Subscription.subjectEndsWith

当 value 不为 null 或为空时,它可以正常工作。但是当它需要设置为 '' 时它会抛出

 Cannot validate argument on parameter 'SubjectBeginsWith'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again

我应该重新创建订阅吗?

【问题讨论】:

  • 我怀疑你想删除“powerpoint”标签并添加一个“powershell”标签。

标签: powershell azure-eventgrid


【解决方案1】:

这看起来是 Update-AzureRmEventGridSubscription 实现中的一个错误,感谢您报告此问题!我已经在https://github.com/Azure/azure-powershell/issues/6331 提交了一个问题来跟踪这个问题。

在 EventGrid PowerShell 模块中解决此问题之前,解决方法是:

1) 删除并重新创建事件订阅,或者

2) 在 Azure CLI 中使用等效命令 (az eventgrid event-subscription update --resource-group your-rg-name --topic-name your-topic-name --name your-event-subscription-name --subject-ends-with "").

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-06-25
    • 1970-01-01
    • 2021-10-30
    • 2018-08-24
    • 2011-10-05
    • 2018-12-02
    • 1970-01-01
    相关资源
    最近更新 更多