"Resource should pre-exist" 向 EventGrid 订阅添加高级过滤器时出错
"Resource should pre-exist" error when adding Advanced Filters to EventGrid Subscription
为什么会发生这种情况,我该如何解决?
问题:
- 现有基础设施
- Python 由 EventGrid 触发的 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 过滤器的能力。
- 启动应用程序,一切正常。
如错误消息 - Resource should pre-exist before attempting this operation
所述,此错误有两个可能的原因:
- 您尚未创建您在此订阅中指向的事件网格触发器功能应用。
- 函数应用程序的工件未正确部署且函数应用程序不存在。
为什么会发生这种情况,我该如何解决?
问题:
- 现有基础设施
- Python 由 EventGrid 触发的 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 过滤器的能力。
- 启动应用程序,一切正常。
如错误消息 - Resource should pre-exist before attempting this operation
所述,此错误有两个可能的原因:
- 您尚未创建您在此订阅中指向的事件网格触发器功能应用。
- 函数应用程序的工件未正确部署且函数应用程序不存在。