azure - 如何在 Azure Function for Azure Gov 中编辑配置设置

标签 azure azure-functions azure-gov

我想在我的 Azure 函数中使用这样的代码:

var key = ConfigurationManager.AppSettings["SubscriptionKey"];

鉴于 Azure 政府门户中还没有适用于 Azure Functions 的 UI,是否有办法通过 Azure CLI 添加此功能,或者是否有其他方法可以实现这一点?

更新

我明白了:

az functionapp config appsettings set --name appname --settings SubscriptionKey=1234 --resource-group resourcegroupname 

最佳答案

正如您已经发现的,您可以使用以下命令通过 Azure CLI 执行此操作:

az functionapp config appsettings set --name appname --settings SubscriptionKey=1234 --resource-group resourcegroupname

关于azure - 如何在 Azure Function for Azure Gov 中编辑配置设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47559625/

相关文章:

azure - 在带有IdentityServer4认证/http错误的Azure Web应用程序容器上部署.net Core 3 Linux容器

azure - 使用 OpenId Connect 针对 Azure Active Directory 获取 token

azure - 多次读取 BrokeredMessage 正文

azure - 登录-AzureRmAccount 无法在 Microsoft Azure Government 中工作

azure - 是否可以使用美国政府租户在 'commercial' 公共(public) Azure 门户中注册的 Azure AD 应用程序?

azure - 服务信任门户和合规管理器之间的主要区别是什么

未提供的 C# 数据库插入 : The parameterized query expects the parameter,

c# - 如何从 Azure VM 内部访问数据?

asp.net - 将 Azure Functions 升级到 5.0 : System. UriFormatException

azure - 使用 ADF Web 事件启动/停止 Azure Function App