az appservice plan

Note

This command group has commands that are defined in both Azure CLI and at least one extension. Install each extension to benefit from its extended capabilities. Learn more about extensions.

Manage app service plans.

Commands

Name Description Type Status
az appservice plan create

Create an app service plan.

Core GA
az appservice plan create (appservice-kube extension)

Create an app service plan.

Extension GA
az appservice plan delete

Delete an app service plan.

Core GA
az appservice plan list

List app service plans.

Core GA
az appservice plan list (appservice-kube extension)

List app service plans.

Extension GA
az appservice plan show

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

Core GA
az appservice plan show (appservice-kube extension)

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

Extension GA
az appservice plan update

Update an app service plan.

Core GA
az appservice plan update (appservice-kube extension)

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.

Extension GA

az appservice plan create

Create an app service plan.

az appservice plan create --name
                          --resource-group
                          [--app-service-environment]
                          [--hyper-v]
                          [--is-linux]
                          [--location]
                          [--no-wait]
                          [--number-of-workers]
                          [--per-site-scaling]
                          [--sku {B1, B2, B3, D1, F1, FREE, I1, I1v2, I2, I2v2, I3, I3v2, I4v2, I5v2, I6v2, P0V3, P1MV3, P1V2, P1V3, P2MV3, P2V2, P2V3, P3MV3, P3V2, P3V3, P4MV3, P5MV3, S1, S2, S3, SHARED, WS1, WS2, WS3}]
                          [--tags]
                          [--zone-redundant]

Examples

Create a basic app service plan.

az appservice plan create -g MyResourceGroup -n MyPlan

Create a standard app service plan with four Linux workers.

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

Create a Windows container app service plan.

az appservice plan create -g MyResourceGroup -n MyPlan --hyper-v --sku P1V3

Create an app service plan for app service environment.

az appservice plan create -g MyResourceGroup -n MyPlan --app-service-environment MyAppServiceEnvironment --sku I1

Create an app service plan for app service environment in different subscription.

az appservice plan create -g MyResourceGroup -n MyPlan --app-service-environment '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase' --sku I1V2

Create an app service plan for app service environment in different subscription and the resource group in different region than app service environment.

az appservice plan create -g MyResourceGroup -n MyPlan --app-service-environment '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase' --sku I1V2 --location ase-region

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

--app-service-environment -e

Name or ID of the app service environment. If you want to create the app service plan in different subscription than the app service environment, please use the resource ID for --app-service-environment parameter.

--hyper-v

Host Windows Container Web App on Hyper-V worker.

--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>.

--no-wait

Do not wait for the long-running operation to finish.

default value: False
--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.

default value: False
--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), P2V2(Premium V2 Medium), P3V2(Premium V2 Large), P0V3(Premium V3 Extra Small), P1V3(Premium V3 Small), P2V3(Premium V3 Medium), P3V3(Premium V3 Large), P1MV3(Premium Memory Optimized V3 Small), P2MV3(Premium Memory Optimized V3 Medium), P3MV3(Premium Memory Optimized V3 Large), P4MV3(Premium Memory Optimized V3 Extra Large), P5MV3(Premium Memory Optimized V3 Extra Extra Large), I1 (Isolated Small), I2 (Isolated Medium), I3 (Isolated Large), I1v2 (Isolated V2 Small), I2v2 (Isolated V2 Medium), I3v2 (Isolated V2 Large), I4v2 (Isolated V2 I4v2), I5v2 (Isolated V2 I5v2), I6v2 (Isolated V2 I6v2), WS1 (Logic Apps Workflow Standard 1), WS2 (Logic Apps Workflow Standard 2), WS3 (Logic Apps Workflow Standard 3).

accepted values: B1, B2, B3, D1, F1, FREE, I1, I1v2, I2, I2v2, I3, I3v2, I4v2, I5v2, I6v2, P0V3, P1MV3, P1V2, P1V3, P2MV3, P2V2, P2V3, P3MV3, P3V2, P3V3, P4MV3, P5MV3, S1, S2, S3, SHARED, WS1, WS2, WS3
default value: B1
--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

--zone-redundant -z

Enable zone redundancy for high availability. Cannot be changed after plan creation. Minimum instance count is 3.

default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az appservice plan create (appservice-kube extension)

Create an app service plan.

az appservice plan create --name
                          --resource-group
                          [--app-service-environment]
                          [--custom-location]
                          [--hyper-v]
                          [--is-linux]
                          [--location]
                          [--no-wait]
                          [--number-of-workers]
                          [--per-site-scaling]
                          [--sku]
                          [--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

Create an app service plan for app service environment.

az appservice plan create -g MyResourceGroup -n MyPlan \
    --app-service-environment MyAppServiceEnvironment --sku I1

Create an app service plan for a kubernetes environment.

az appservice plan create -g MyResourceGroup -n MyPlan \
    --custom-location /subscriptions/sub_id/resourcegroups/group_name/providers/microsoft.extendedlocation/customlocations/custom_location_name \
    --per-site-scaling --is-linux --sku K1

Create a kubernetes environment app service plan in the same resource group as the custom location

az appservice plan create -g MyResourceGroup -n MyPlan \
    --custom-location custom_location_name \
    --per-site-scaling --is-linux --sku K1

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

--app-service-environment -e

Name or ID of the app service environment.

--custom-location -c

Name or ID of the custom location. Use an ID for a custom location in a different resource group from the plan.

--hyper-v
Preview

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>.

--no-wait

Do not wait for the long-running operation to finish.

default value: False
--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.

default value: False
--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), I1 (Isolated Small), I2 (Isolated Medium), I3 (Isolated Large), I1v2 (Isolated V2 Small), I2v2 (Isolated V2 Medium), I3v2(Isolated V2 Large) K1 (Kubernetes).

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--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.

default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az appservice plan list

List app service plans.

az appservice plan list [--resource-group]

Examples

List all free tier App Service plans.

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

List all App Service plans for an App Service environment.

az appservice plan list --query "[?hostingEnvironmentProfile.name=='<ase-name>']"

Optional Parameters

--resource-group -g

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az appservice plan list (appservice-kube extension)

List app service plans.

az appservice plan list [--resource-group]

Examples

List all free tier App Service plans.

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

List all App Service plans for an App Service environment.

az appservice plan list --query "[?hostingEnvironmentProfile.name=='<ase-name>']"

Optional Parameters

--resource-group -g

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--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.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az appservice plan show (appservice-kube extension)

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). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--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.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az appservice plan update

Update an app service plan.

See https:///go.microsoft.com/fwlink/?linkid=2133856 to learn more.

az appservice plan update [--add]
                          [--elastic-scale {false, true}]
                          [--force-string]
                          [--ids]
                          [--max-elastic-worker-count]
                          [--name]
                          [--no-wait]
                          [--number-of-workers]
                          [--remove]
                          [--resource-group]
                          [--set]
                          [--sku {B1, B2, B3, D1, F1, FREE, I1, I1v2, I2, I2v2, I3, I3v2, I4v2, I5v2, I6v2, P0V3, P1MV3, P1V2, P1V3, P2MV3, P2V2, P2V3, P3MV3, P3V2, P3V3, P4MV3, P5MV3, S1, S2, S3, SHARED, WS1, WS2, WS3}]
                          [--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>.

default value: []
--elastic-scale
Preview

Enable or disable automatic scaling. Set to "true" to enable elastic scale for this plan, or "false" to disable elastic scale for this plan. The SKU must be a Premium V2 SKU (P1V2, P2V2, P3V2) or a Premium V3 SKU (P1V3, P2V3, P3V3).

accepted values: false, true
--force-string

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

default value: False
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--max-elastic-worker-count -m
Preview

Maximum number of instances that the plan can scale out to. The plan must be an elastic scale plan.

--name -n

The name of the app service plan.

--no-wait

Do not wait for the long-running operation to finish.

default value: False
--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 <indexToRemove> OR --remove propertyToRemove.

default value: []
--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=<value>.

default value: []
--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), P2V2(Premium V2 Medium), P3V2(Premium V2 Large), P0V3(Premium V3 Extra Small), P1V3(Premium V3 Small), P2V3(Premium V3 Medium), P3V3(Premium V3 Large), P1MV3(Premium Memory Optimized V3 Small), P2MV3(Premium Memory Optimized V3 Medium), P3MV3(Premium Memory Optimized V3 Large), P4MV3(Premium Memory Optimized V3 Extra Large), P5MV3(Premium Memory Optimized V3 Extra Extra Large), I1 (Isolated Small), I2 (Isolated Medium), I3 (Isolated Large), I1v2 (Isolated V2 Small), I2v2 (Isolated V2 Medium), I3v2 (Isolated V2 Large), I4v2 (Isolated V2 I4v2), I5v2 (Isolated V2 I5v2), I6v2 (Isolated V2 I6v2), WS1 (Logic Apps Workflow Standard 1), WS2 (Logic Apps Workflow Standard 2), WS3 (Logic Apps Workflow Standard 3).

accepted values: B1, B2, B3, D1, F1, FREE, I1, I1v2, I2, I2v2, I3, I3v2, I4v2, I5v2, I6v2, P0V3, P1MV3, P1V2, P1V3, P2MV3, P2V2, P2V3, P3MV3, P3V2, P3V3, P4MV3, P5MV3, S1, S2, S3, SHARED, WS1, WS2, WS3
--subscription

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az appservice plan update (appservice-kube extension)

az appservice plan update [--ids]
                          [--name]
                          [--no-wait]
                          [--number-of-workers]
                          [--resource-group]
                          [--sku {ANY, B1, B2, B3, D1, ELASTICANY, 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

Update a kubernetes app service plan.

az appservice plan update --name MyAppServicePlan --resource-group MyResourceGroup \
    --sku ANY --number-of-workers 3

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

The name of the app service plan.

--no-wait

Do not wait for the long-running operation to finish.

default value: False
--number-of-workers

Number of workers to be allocated.

default value: 1
--resource-group -g

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

--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), I1 (Isolated Small), I2 (Isolated Medium), I3 (Isolated Large), K1 (Kubernetes).

accepted values: ANY, B1, B2, B3, D1, ELASTICANY, 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.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.