且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Azure 函数的 Azure Cosmos DB 输入绑定不起作用

更新时间:2023-02-14 12:34:11

我遇到了同样的问题,结果新 UI 生成的绑定与旧 UI 不同.

I had the same issue, turns out the new UI generates a different binding than the old one.

新用户界面:

{
  "name": "bookmark",
  "direction": "in",
  "type": "cosmosDB",
  "databaseName": "func-io-learn-db",
  "collectionName": "Bookmarks",
  "connectionStringSetting": "learn-0088a129-899f-4d18-b4db-5fa74daf1cc3_DOCUMENTDB",
  "id": "{id}",
  "partitionKey": "{id}",
  "sqlQuery": ""
}

旧用户界面:

{
  "type": "cosmosDB",
  "name": "bookmark",
  "databaseName": "func-io-learn-db",
  "collectionName": "Bookmarks",
  "connectionStringSetting": "learn-0088a129-899f-4d18-b4db-5fa74daf1cc3_DOCUMENTDB",
  "id": "{id}",
  "partitionKey": "{id}",
  "direction": "in"
}

删除

"sqlQuery": ""

绑定的一部分为我修复了它.

part from the binding fixed it for me.

您可以在应用服务概览页面点击遇到问题?点击返回经典Function App管理体验"切换回旧UI,如您所见这里.

You can switch back to the old UI by clicking the "Having issues? Click to go back to the classic Function App management experience" on the app service overview page, as you can see here.