【问题标题】:"Resource should pre-exist" error when adding Advanced Filters to EventGrid Subscription将高级筛选器添加到 EventGrid 订阅时出现“资源应预先存在”错误
【发布时间】:2021-02-07 12:38:46
【问题描述】:

为什么会发生这种情况,我该如何解决?

问题:

  • 现有基础设施
  • 由 EventGrid 触发的 Python Azure 函数
  • 在 BlobUpload 到存储帐户时创建的 EventGrid 消息
  • 为 EventGrid 订阅创建高级筛选器时,我收到错误消息:
Deploying Event Subscription: my-eventgrid-sub-name
Deployment has failed with the following error: 
{
    code:"Endpoint validation",
    message:"Destination azure endpoint not found,
    Resource details: resourceId:/subscriptions/<redacted>/resourceGroups/<redacted>/providers/Microsoft.Web/sites/myFunctionAppName/functions/myFunctionName. 
    Resource should pre-exist before attempting this operation,
    Activity id:7e9c4817-5bbd-4772-a7b0-a4dbc70dbf04, 
    timestamp: 10/24/2020 7:01:39 PM (UTC)."
}

当然myFucnctionName 存在。它已经存在并运行了数周。似乎 EventGrid 无法“看到”函数。

编辑 1:

  • 更新了上面的图片。我应该看到该应用程序已停止。我猜这会影响添加 EventGrid 过滤器的能力。
  • 启动应用,现在一切正常。

【问题讨论】:

    标签: python azure-functions azure-function-app azure-eventgrid


    【解决方案1】:

    正如错误消息 - Resource should pre-exist before attempting this operation 所说,此错误有两个潜在原因:

    • 您尚未创建您在此订阅中指向的事件网格触发器函数应用程序。
    • 函数应用的工件未正确部署且函数应用不存在。

    【讨论】:

    • 其实昨天又弹出了这个,还有一个原因:local.settings.jsonAzureWebJobsStorage属性设置不正确。这不允许我编辑 EventGrid 高级过滤器。更正后,它会毫无问题地保存。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-06-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多