【发布时间】:2022-08-02 19:35:16
【问题描述】:
无法使用 Python Azure 函数为托管标识设置服务总线的连接信息。
我在 function.json 中有以下设置
{
\"scriptFile\": \"__init__.py\",
\"bindings\": [
{
\"name\": \"msg\",
\"type\": \"serviceBusTrigger\",
\"direction\": \"in\",
\"queueName\": \"myinputqueue\",
\"connection\": \"MySvcConn\"
}
]
}
在 Azure 门户的应用程序设置中,我设置了
\"MySvcConn__fullyQualifiedNamespace\":\"mysvcns.servicebus.windows.net\"
我收到消息
\"Microsoft.Azure.ServiceBus: Value for the connection string
parameter name \'mysvcns.servicebus.windows.net\' was not found. (Parameter \'connectionString\').
使用的运行时版本 ~4
host.json 配置
{
\"version\": \"2.0\",
\"logging\": {
\"applicationInsights\": {
\"samplingSettings\": {
\"isEnabled\": true,
\"excludedTypes\": \"Request\"
}
}
},
\"extensionBundle\": {
\"id\": \"Microsoft.Azure.Functions.ExtensionBundle\",
\"version\": \"[2.*, 3.0.0)\"
}
}
-
你能检查一下安装包:docs.microsoft.com/en-us/azure/azure-functions/… 吗?
-
azure 门户部署旧版本的扩展程序 \"version\": \"[2.*, 3.0.0)\",其中推荐的版本是 \"[3.3.0, 4.0.0)\"。如何更新扩展
-
您应该能够在本地编辑 host.json 然后重新部署。