az appservice plan

Manage app service plans.

Commands

az appservice plan create Create an app service plan.
az appservice plan delete Delete an app service plan.
az appservice plan list List app service plans.
az appservice plan show Get the app service plans for a resource group or a set of resource groups.
az appservice plan update Update an app service plan. See <a href="https://docs.microsoft.com/azure/app-service/app-service-plan-manage#move-an-app-to-another-app-service-plan">https://docs.microsoft.com/azure/app-service/app-service-plan-manage#move-an-app-to-another-app-service-plan</a> to learn more.

az appservice plan create

Create an app service plan.

az appservice plan create --name
--resource-group
[--hyper-v]
[--is-linux]
[--location]
[--number-of-workers]
[--per-site-scaling]
[--sku {B1, B2, B3, D1, F1, FREE, I1, I2, I3, P1V2, P2V2, P3V2, PC2, PC3, PC4, S1, S2, S3, SHARED}]
[--subscription]
[--tags]

Examples

Create a basic app service plan.

az appservice plan create -g MyResourceGroup -n MyPlan

Create a standard app service plan with with four Linux workers.

az appservice plan create -g MyResourceGroup -n MyPlan \
    --is-linux --number-of-workers 4 --sku S1

Required Parameters

--name -n

Name of the new app service plan.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--hyper-v

Host web app on Windows container.

--is-linux

Host web app on Linux worker.

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--number-of-workers

Number of workers to be allocated.

default value: 1
--per-site-scaling

Enable per-app scaling at the App Service plan level to allow for scaling an app independently from the App Service plan that hosts it.

--sku

The pricing tiers, e.g., F1(Free), D1(Shared), B1(Basic Small), B2(Basic Medium), B3(Basic Large), S1(Standard Small), P1V2(Premium V2 Small), PC2 (Premium Container Small), PC3 (Premium Container Medium), PC4 (Premium Container Large).

accepted values: B1, B2, B3, D1, F1, FREE, I1, I2, I3, P1V2, P2V2, P3V2, PC2, PC3, PC4, S1, S2, S3, SHARED
default value: B1
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--tags

Space-separated tags in 'key[=value]' format. Use "" to clear existing tags.

az appservice plan delete

Delete an app service plan.

az appservice plan delete [--ids]
[--name]
[--resource-group]
[--subscription]
[--yes]

Examples

Delete an app service plan. (autogenerated)

az appservice plan delete --name MyAppServicePlan --resource-group MyResourceGroup

Optional Parameters

--ids

One or more resource IDs (space-delimited). If provided, no other 'Resource Id' arguments should be specified.

--name -n

The name of the app service plan.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--yes -y

Do not prompt for confirmation.

az appservice plan list

List app service plans.

az appservice plan list [--resource-group]
[--subscription]

Examples

List all free tier App Service plans.

az appservice plan list --query "[?sku.tier=='Free']"

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az appservice plan show

Get the app service plans for a resource group or a set of resource groups.

az appservice plan show [--ids]
[--name]
[--resource-group]
[--subscription]

Examples

Get the app service plans for a resource group or a set of resource groups. (autogenerated)

az appservice plan show --name MyAppServicePlan   --resource-group MyResourceGroup

Optional Parameters

--ids

One or more resource IDs (space-delimited). If provided, no other 'Resource Id' arguments should be specified.

--name -n

The name of the app service plan.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az appservice plan update

Update an app service plan. See https://docs.microsoft.com/azure/app-service/app-service-plan-manage#move-an-app-to-another-app-service-plan to learn more.

az appservice plan update [--add]
[--force-string]
[--ids]
[--name]
[--number-of-workers]
[--remove]
[--resource-group]
[--set]
[--sku {B1, B2, B3, D1, F1, FREE, I1, I2, I3, P1V2, P2V2, P3V2, PC2, PC3, PC4, S1, S2, S3, SHARED}]
[--subscription]

Examples

Update an app service plan. (autogenerated)

az appservice plan update --name MyAppServicePlan --resource-group MyResourceGroup --sku F1

Optional Parameters

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

--ids

One or more resource IDs (space-delimited). If provided, no other 'Resource Id' arguments should be specified.

--name -n

The name of the app service plan.

--number-of-workers

Number of workers to be allocated.

default value: 1
--remove

Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=.

--sku

The pricing tiers, e.g., F1(Free), D1(Shared), B1(Basic Small), B2(Basic Medium), B3(Basic Large), S1(Standard Small), P1V2(Premium V2 Small), PC2 (Premium Container Small), PC3 (Premium Container Medium), PC4 (Premium Container Large).

accepted values: B1, B2, B3, D1, F1, FREE, I1, I2, I3, P1V2, P2V2, P3V2, PC2, PC3, PC4, S1, S2, S3, SHARED
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.