我有azure功能,LinuxFxVersion設定為DOTNET:
"siteProperties": {
"metadata": null,
"properties": []。
{>
"name": "LinuxFxVersion",
"value": "DOTNET|3.1"
},
{>
"name": "WindowsFxVersion",
"value": null
}
],
"appSettings": null
},
我想把它設定為Python:
"siteProperties": {
"metadata": null,
"properties": []。
{>
"name": "LinuxFxVersion",
"value": "Python|3.9"
},
{>
"name": "WindowsFxVersion",
"value": null
}
],
"appSettings": null
},
根據msdn來源,我需要使用Power shell來改變它:
az functionapp config set --name <func_name> --resource-group < rg> --linux-fx-version 'Python|3. 9'
但我得到的錯誤是:
'3. 9' 是 不承認作為內部或 外部指令。
可操作的程式 或批量檔案。
當我只輸入'Python'時,我得到的回應是:
操作回傳一個無效的狀態 'Bad Request'。
如何將Azure Function中的linux fx版本從.NET改為Python?
uj5u.com熱心網友回復:
在Powershell中解決這個錯誤的方法是用引號將包含管道字符的字串包起來。
這里有多個例子:
az functionapp config set --name <func_name> --resource-group <rg> --linux-fx-version '"Python|3.9"'/code><
az functionapp config set --name <func_name> --resource-group <rg> --linux-fx-version 'Python"|"3.9'。
如果你在 bash 中運行上述命令,請使用 : 而不是 |
az functionapp config set --name <func_name> --resource-group <rg> --linux-fx-version "Python:3.9"/code>
https://octopus.com/blog/powershell-pipe-escaping
https://github.com/Azure/azure-cli/issues/7874
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/326093.html
標籤:
上一篇:如何在MacOS上下載Sf軟體包
