我可以在发布函数之前创建对 Azure 函数应用的事件网格订阅吗?
Can I create an event grid subscription to an Azure function app before the function is published?
我一直在尝试使用 ARM 模板创建对事件网格触发器函数的事件网格订阅,该函数是为捕获 Blob 存储事件而创建的。我首先成功创建了函数应用程序资源,然后尝试在创建的函数应用程序上创建事件网格订阅,但失败并出现以下错误:
"error": {
"code": "ResourceDeploymentFailure",
"message": "The resource operation completed with terminal provisioning state 'Failed'.",
"details": [
{
"code": "Url validation",
"message": "The attempt to validate the provided endpoint https://myfunction.azurewebsites.net/runtime/webhooks/eventgrid failed. For more details, visit https://aka.ms/esvalidation."
}
]
}
这里我使用了 webhook URL 作为端点。我已经知道有一个验证调用返回到函数应用程序以验证它的存在。
我的问题是,在尝试为其创建事件网格订阅之前,我们是否需要将事件网格触发器函数发布到函数应用?
P.S。我也尝试过使用 AzureFunction 作为端点类型 (2020-01-01 version) 的相同顺序,但它仍然无法创建订阅。
根据 here 描述的验证细节:
At the time of event subscription creation/update, Event Grid posts a subscription validation event to the target endpoint
作为解决方法,您可以使用虚拟(nop 操作)订阅者处理程序端点来创建订阅,然后使用真实的订阅者处理程序端点更新 webhook 端点。
我一直在尝试使用 ARM 模板创建对事件网格触发器函数的事件网格订阅,该函数是为捕获 Blob 存储事件而创建的。我首先成功创建了函数应用程序资源,然后尝试在创建的函数应用程序上创建事件网格订阅,但失败并出现以下错误:
"error": {
"code": "ResourceDeploymentFailure",
"message": "The resource operation completed with terminal provisioning state 'Failed'.",
"details": [
{
"code": "Url validation",
"message": "The attempt to validate the provided endpoint https://myfunction.azurewebsites.net/runtime/webhooks/eventgrid failed. For more details, visit https://aka.ms/esvalidation."
}
]
}
这里我使用了 webhook URL 作为端点。我已经知道有一个验证调用返回到函数应用程序以验证它的存在。
我的问题是,在尝试为其创建事件网格订阅之前,我们是否需要将事件网格触发器函数发布到函数应用?
P.S。我也尝试过使用 AzureFunction 作为端点类型 (2020-01-01 version) 的相同顺序,但它仍然无法创建订阅。
根据 here 描述的验证细节:
At the time of event subscription creation/update, Event Grid posts a subscription validation event to the target endpoint
作为解决方法,您可以使用虚拟(nop 操作)订阅者处理程序端点来创建订阅,然后使用真实的订阅者处理程序端点更新 webhook 端点。