将高级筛选器添加到EventGrid订阅时出现“资源应预先存在”错误

问题描述

为什么会这样?我该如何解决?

问题:

  • 现有基础设施
  • 由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)."
}

enter image description here

当然myFucnctionName存在。它已经存在并已经运行了数周。看来EventGrid无法“看到”该功能。

编辑1:

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

解决方法

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

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

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...