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, I1MV2, I1V2, I2, I2MV2, I2V2, I3, I3MV2, I3V2, I4MV2, I4V2, I5MV2, 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 of the new app service plan.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
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.
Host Windows Container Web App on Hyper-V worker.
Host web app on Linux worker.
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
Do not wait for the long-running operation to finish.
Number of workers to be allocated.
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.
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 I1V2), I2V2 (Isolated V2 I2V2), I3V2 (Isolated V2 I3V2), I4V2 (Isolated V2 I4V2), I5V2 (Isolated V2 I5V2), I6V2 (Isolated V2 I6V2), I1MV2 (Isolated Memory Optimized V2 I1MV2), I2MV2 (Isolated Memory Optimized V2 I2MV2), I3MV2 (Isolated Memory Optimized V2 I3MV2), I4MV2 (Isolated Memory Optimized V2 I4MV2), I5MV2 (Isolated Memory Optimized V2 I5MV2), WS1 (Logic Apps Workflow Standard 1), WS2 (Logic Apps Workflow Standard 2), WS3 (Logic Apps Workflow Standard 3).
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Enable zone redundancy for high availability. Cannot be changed after plan creation. Minimum instance count is 3.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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 of the new app service plan.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Name or ID of the app service environment.
Name or ID of the custom location. Use an ID for a custom location in a different resource group from the plan.
Host web app on Windows container.
Host web app on Linux worker.
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
Do not wait for the long-running operation to finish.
Number of workers to be allocated.
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.
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).
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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
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.
The name of the app service plan.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Do not prompt for confirmation.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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
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.
The name of the app service plan.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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
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.
The name of the app service plan.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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, I1MV2, I1V2, I2, I2MV2, I2V2, I3, I3MV2, I3V2, I4MV2, I4V2, I5MV2, 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 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>
.
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).
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
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.
Maximum number of instances that the plan can scale out to. The plan must be an elastic scale plan.
The name of the app service plan.
Do not wait for the long-running operation to finish.
Number of workers to be allocated.
Remove a property or an element from a list. Example: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>
.
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 I1V2), I2V2 (Isolated V2 I2V2), I3V2 (Isolated V2 I3V2), I4V2 (Isolated V2 I4V2), I5V2 (Isolated V2 I5V2), I6V2 (Isolated V2 I6V2), I1MV2 (Isolated Memory Optimized V2 I1MV2), I2MV2 (Isolated Memory Optimized V2 I2MV2), I3MV2 (Isolated Memory Optimized V2 I3MV2), I4MV2 (Isolated Memory Optimized V2 I4MV2), I5MV2 (Isolated Memory Optimized V2 I5MV2), WS1 (Logic Apps Workflow Standard 1), WS2 (Logic Apps Workflow Standard 2), WS3 (Logic Apps Workflow Standard 3).
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
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.
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
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.
The name of the app service plan.
Do not wait for the long-running operation to finish.
Number of workers to be allocated.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
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).
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Azure CLI