存储队列连接字符串环境变量

Storage Queue Connection String Environment variable

是否可以在我的 Azure 应用程序设置中设置一个环境变量,让一个函数获取我的存储队列连接字符串?我一直在查看源代码,但没有看到任何内容。

但我确实在本地看到了关于 运行 并且能够指定连接字符串的部分 (https://github.com/Azure/azure-content-nlnl/blob/master/articles/azure-functions/functions-run-local.md#to-run-locally)。我无法在我的 oss 应用程序中发送连接字符串。

son "queueBinding": { "properties": { "queueName": { "type": "string", "description": "The queue name." }, "connection": { "type": "string", "description": "An app setting (or environment variable) with the storage connection string to be used by this binding." } }

查看规范后发现,只需为连接输入环境变量名称就可以做到这一点。

是的,以下是为您的功能应用设置应用程序设置的步骤:

  1. 通过浏览器中的 Azure Functions 门户访问您的 Function App。
  2. 点击左下角的功能应用程序设置按钮。
  3. 单击配置应用程序设置 以加载应用程序设置边栏选项卡。
  4. 向下滚动到 应用程序设置 部分,并为您的存储队列连接添加键值对。
  5. 单击 保存 按钮。