Azure功能应用程序AzureWebJobsStorage与WEBSITE_CONTENTAZUREFILECONNECTIONSTRING

标签 azure azure-functions azure-storage app-config

Azure 函数应用 official documentation列出了两个对我来说似乎相同的应用程序设置。

AzureWebJobsStorage

The Azure Functions runtime uses this storage account connection string for normal operation. Some uses of this storage account include key management, timer trigger management, and Event Hubs checkpoints. The storage account must be a general-purpose one that supports blobs, queues, and tables.

WEBSITE_CONTENTAZUREFILECONNECTIONSTRING

Connection string for storage account where the function app code and configuration are stored in event-driven scaling plans.

似乎两者都指向该函数用于存储其文件的存储帐户。

那么,它们之间有什么区别,我是否都需要它们?

最佳答案

我同意@Dai 和@Nadeem Khan

AzureWebJobsStorage:

  • MSDocs 中所述

    The Azure Functions runtime uses this storage account connection string for normal operation. Some uses of this storage account include key management, timer trigger management, and Event Hubs checkpoints. The storage account must be a general-purpose one that supports blobs, queues, and tables.

  • 它用于配置 Azure Functions 运行时以存储内部操作数据,例如函数触发器、检查点和日志。如果您没有为函数指定特定的存储帐户,它还会充当函数的默认存储帐户。

  • 应将其设置为 Azure 存储帐户(通常是 Blob 存储帐户)的连接字符串。此存储帐户用于维护函数应用的状态和协调。

WEBSITE_CONTENTAZUREFILECONNECTIONSTRING:

  • 当您需要启用对文件共享中的文件的只读访问时,它用于在消耗计划中运行的 Azure Functions。适用于 Windows 和 Linux。作为引用,请检查此 MS Docs .

  • 应将其设置为指向 Azure 文件存储帐户的连接字符串。将在存储帐户中创建文件共享。

摘要,

AzureWebJobsStorage 主要用于内部 Azure Functions 操作数据,可以是任何 Azure 存储帐户,而 WEBSITE_CONTENTAZUREFILECONNECTIONSTRING 专门用于对 Azure 文件中的文件进行只读访问使用消费计划时的存储空间。它仅在 MS Doc 中提到的消费和弹性保费计划中创建。 .

我为每个应用程序服务计划创建了三个功能。您可以在消费和弹性高级计划中看到WEBSITE_CONTENTAZUREFILECONNECTIONSTRING可用

appsettingfunc消费计划:

enter image description here

appsettingfuncnon-conspiration基本计划:

enter image description here

appsettingfunc-premium弹性高级计划:

enter image description here

关于Azure功能应用程序AzureWebJobsStorage与WEBSITE_CONTENTAZUREFILECONNECTIONSTRING,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/77146538/

相关文章:

c# - 在 Microsoft Azure Web 应用程序中以编程方式访问性能计数器

node.js - 使用 InteractiveLogin 方法检索 ms-rest-azure 身份验证代码

azure - 集成运行时有两个磁盘驱动器,有没有办法参数化链接服务文件系统中的 Host 字段?

javascript - JavaScript Azure webjobs 可以根据存储 blob 的添加来触发吗?

c# - 在 Azure 中检索聊天机器人对话数据

java - Azure表存储无效输入

c# - ADAL 在网络服务器上循环

azure - 使用服务总线触发器在 Azure Functions 上进行本地测试时提供 UserProperties

python - 保留 Azure Batch 的输出文件时出现 FileUploadMiscError

azure - Azure Kubernetes 上的 Redis 配置