如何使用New-AzAppServicePlan创建Linux AppService计划? [英] How to create a Linux AppService Plan with New-AzAppServicePlan?
问题描述
使用New-AzAppServicePlan
等效于什么代码?
What is the equivalient of this code using New-AzAppServicePlan
?
az appservice plan create --resource-group $ServerFarmResourceGroupName `
--name $AppServicePlanName `
--is-linux `
--location $ResourceGroupLocation `
--sku $AppServicePlanTier `
--number-of-workers $NumberOfWorkers
真的没有办法使用Az Powershell创建应用程序服务计划吗?为什么只能通过Azure CLI或ARM完成此操作?
Is there really no way to create an App Service Plan using Az Powershell? Why can it only be done via Azure CLI or ARM?
I only found this answer, which basically uses ARM directly: How do I use Powershell to create an Azure Web App that runs on Linux?
推荐答案
对此有一些问题,假设目前New-AzureRmAppServicePlan
不支持此功能,但是您可以使用New-AzureRmResource
创建Linux计划.您可以尝试以下命令.
There are some issues about this, suppose for now this is not supported for New-AzureRmAppServicePlan
, however you could use New-AzureRmResource
to create a linux plan. You could try the below command.
New-AzureRmResource -ResourceGroupName <>group name -Location "Central US" -ResourceType microsoft.web/serverfarms -ResourceName <plan name> -kind linux -Properties @{reserved="true"} -Sku @{name="S1";tier="Standard"; size="S1"; family="S"; capacity="1"} -Force
这篇关于如何使用New-AzAppServicePlan创建Linux AppService计划?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!