如何使用New-AzAppServicePlan创建Linux AppService计划? [英] How to create a Linux AppService Plan with New-AzAppServicePlan?

查看:120
本文介绍了如何使用New-AzAppServicePlan创建Linux AppService计划?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用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?

我只找到了这个答案,它基本上直接使用了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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆