[英]Creating webapps in Azure using AZ cli command
While creating webapps using Az cli in Azure, the command line have no option to mention the location parameter. However while creating from azure portal,there is a option where in we can select the region .
以下是命令的鏈接和命令 itsel https://docs.microsoft.com/en-us/cli/azure/webapp?view=azure-cli-latest
az webapp create --name
--plan
--resource-group
[--assign-identity]
[--deployment-container-image-name]
[--deployment-local-git]
[--deployment-source-branch]
[--deployment-source-url]
[--docker-registry-server-password]
[--docker-registry-server-user]
[--https-only {false, true}]
[--multicontainer-config-file]
[--multicontainer-config-type {COMPOSE, KUBE}]
[--role]
[--runtime]
[--scope]
[--startup-file]
[--subnet]
[--tags]
[--vnet]
您可以使用具有location
開關的az webapp up
CLI 命令,例如
az webapp up -n MyUniqueAppName --runtime "java:11:Java SE:11" -l locationName
順便說一句,如果您在使用az webapp create
時甚至沒有指定位置,它將默認為“資源組”的區域,或者如果您正在指定應用服務計划,那么該區域將被使用
在 Azure 中創建 Web 應用程序時,可以使用此 cmdlet 指定location
:
New-AzwebApp [[-ResourceGroupName] <String>] [-Name] <String> [[-Location] <String>] ...
當然,下一個問題將是一些參數,例如在New-AzWebApp
cmdlet 中缺少的指定runtime
環境,我們需要使用不同的 cmdlet 組合來滿足我們的要求。
請參閱其中一種解決方法,其中顯示了在使用New-AzWebApp
cmdlet 時如何選擇運行時環境。
有關New-AzWebApp
cmdlet 參數的詳細信息,請參閱此處。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.