【发布时间】:2017-05-15 06:18:21
【问题描述】:
我在 VS2017 Preview 中使用 Azure Functions 项目的新工具,并将一些功能从 Azure 门户移植到新项目。
我正在绑定到 Azure 文档数据库 - 它工作正常,但是当我使用 DocumentDB 属性时,我必须提供数据库名称作为第一个参数。
在我的情况下,它现在是 DEV 数据库.. 但当然会有其他环境 - 有没有办法通过函数应用程序的应用程序设置来获取数据库名称?
[FunctionName("TimerTriggeredFunction")]
public static void Run([TimerTrigger("0 */5 * * * *")] TimerInfo myTimer, TraceWriter log,
[DocumentDB("my-db-DEV", "MyCollection")] IEnumerable<dynamic> inputDocuments)
【问题讨论】:
标签: azure azure-functions azure-cosmosdb