az webapp

Manage web apps.

Commands

az webapp auth

Manage webapp authentication and authorization. To use v2 auth commands, run "az extension add --name authV2" to add the authV2 CLI extension.

az webapp auth apple

Manage webapp authentication and authorization of the Apple identity provider.

az webapp auth apple show

Show the authentication settings for the Apple identity provider.

az webapp auth apple update

Update the client id and client secret for the Apple identity provider.

az webapp auth config-version

Manage the state of the configuration version for the authentication settings for the webapp. Configuration version v1 refers to the /authSettings endpoints whereas v2 refers to the /authSettingsV2 endpoints.

az webapp auth config-version revert

Reverts the configuration version of the authentication settings for the webapp from v2 to v1 (classic).

az webapp auth config-version show

Show the configuration version of the authentication settings for the webapp. Configuration version v1 refers to the /authSettings endpoints whereas v2 refers to the /authSettingsV2 endpoints.

az webapp auth config-version upgrade

Upgrades the configuration version of the authentication settings for the webapp from v1 (classic) to v2.

az webapp auth facebook

Manage webapp authentication and authorization of the Facebook identity provider.

az webapp auth facebook show

Show the authentication settings for the Facebook identity provider.

az webapp auth facebook update

Update the app id and app secret for the Facebook identity provider.

az webapp auth github

Manage webapp authentication and authorization of the GitHub identity provider.

az webapp auth github show

Show the authentication settings for the GitHub identity provider.

az webapp auth github update

Update the client id and client secret for the GitHub identity provider.

az webapp auth google

Manage webapp authentication and authorization of the Google identity provider.

az webapp auth google show

Show the authentication settings for the Google identity provider.

az webapp auth google update

Update the client id and client secret for the Google identity provider.

az webapp auth microsoft

Manage webapp authentication and authorization of the Microsoft identity provider.

az webapp auth microsoft show

Show the authentication settings for the Azure Active Directory identity provider.

az webapp auth microsoft update

Update the client id and client secret for the Azure Active Directory identity provider.

az webapp auth openid-connect

Manage webapp authentication and authorization of the custom OpenID Connect identity providers.

az webapp auth openid-connect add

Configure a new custom OpenID Connect identity provider.

az webapp auth openid-connect remove

Removes an existing custom OpenID Connect identity provider.

az webapp auth openid-connect show

Show the authentication settings for the custom OpenID Connect identity provider.

az webapp auth openid-connect update

Update the client id and client secret setting name for an existing custom OpenID Connect identity provider.

az webapp auth set

Sets the authentication settings for the webapp in the v2 format, overwriting any existing settings.

az webapp auth show

Show the authentification settings for the webapp.

az webapp auth twitter

Manage webapp authentication and authorization of the Twitter identity provider.

az webapp auth twitter show

Show the authentication settings for the Twitter identity provider.

az webapp auth twitter update

Update the consumer key and consumer secret for the Twitter identity provider.

az webapp auth update

Update the authentication settings for the webapp.

az webapp auth-classic

Manage webapp authentication and authorization in the classic format.

az webapp auth-classic show

Show the authentication settings for the webapp in the classic format.

az webapp auth-classic update

Update the authentication settings for the webapp in the classic format.

az webapp browse

Open a web app in a browser. This is not supported in Azure Cloud Shell.

az webapp config

Configure a web app.

az webapp config access-restriction

Methods that show, set, add, and remove access restrictions on a webapp.

az webapp config access-restriction add

Adds an Access Restriction to the webapp.

az webapp config access-restriction remove

Removes an Access Restriction from the webapp.

az webapp config access-restriction set

Sets if SCM site is using the same restrictions as the main site.

az webapp config access-restriction show

Show Access Restriction settings for webapp.

az webapp config appsettings

Configure web app settings. Updating or removing application settings will cause an app recycle.

az webapp config appsettings delete

Delete web app settings.

az webapp config appsettings list

Get the details of a web app's settings.

az webapp config appsettings set

Set a web app's settings.

az webapp config backup

Manage backups for web apps.

az webapp config backup create

Create a backup of a web app.

az webapp config backup delete

Delete a web app backup.

az webapp config backup list

List backups of a web app.

az webapp config backup restore

Restore a web app from a backup.

az webapp config backup show

Show the backup schedule for a web app.

az webapp config backup update

Configure a new backup schedule for a web app.

az webapp config connection-string

Manage a web app's connection strings.

az webapp config connection-string delete

Delete a web app's connection strings.

az webapp config connection-string list

Get a web app's connection strings.

az webapp config connection-string set

Update a web app's connection strings.

az webapp config container

Manage an existing web app's container settings.

az webapp config container delete

Delete an existing web app's container settings.

az webapp config container set

Set an existing web app's container settings.

az webapp config container show

Get details of a web app's container settings.

az webapp config hostname

Configure hostnames for a web app.

az webapp config hostname add

Bind a hostname to a web app.

az webapp config hostname delete

Unbind a hostname from a web app.

az webapp config hostname get-external-ip

Get the external-facing IP address for a web app.

az webapp config hostname list

List all hostname bindings for a web app.

az webapp config set

Set a web app's configuration.

az webapp config show

Get the details of a web app's configuration.

az webapp config snapshot

Manage web app snapshots.

az webapp config snapshot list

List the restorable snapshots for a web app.

az webapp config snapshot restore

Restore a web app snapshot.

az webapp config ssl

Configure SSL certificates for web apps.

az webapp config ssl bind

Bind an SSL certificate to a web app.

az webapp config ssl create

Create a Managed Certificate for a hostname in a webapp app.

az webapp config ssl delete

Delete an SSL certificate from a web app.

az webapp config ssl import

Import an SSL or App Service Certificate to a web app from Key Vault.

az webapp config ssl list

List SSL certificates for a web app.

az webapp config ssl show

Show the details of an SSL certificate for a web app.

az webapp config ssl unbind

Unbind an SSL certificate from a web app.

az webapp config ssl upload

Upload an SSL certificate to a web app.

az webapp config storage-account

Manage a web app's Azure storage account configurations. (Linux Web Apps and Windows Containers Web Apps Only).

az webapp config storage-account add

Add an Azure storage account configuration to a web app. (Linux Web Apps and Windows Containers Web Apps Only).

az webapp config storage-account delete

Delete a web app's Azure storage account configuration. (Linux Web Apps and Windows Containers Web Apps Only).

az webapp config storage-account list

Get a web app's Azure storage account configurations. (Linux Web Apps and Windows Containers Web Apps Only).

az webapp config storage-account update

Update an existing Azure storage account configuration on a web app. (Linux Web Apps and Windows Containers Web Apps Only).

az webapp connection

Commands to manage webapp connections.

az webapp connection create

Create a connection between a webapp and a target resource.

az webapp connection create appconfig

Create a webapp connection to appconfig.

az webapp connection create confluent-cloud

Create a webapp connection to confluent-cloud.

az webapp connection create cosmos-cassandra

Create a webapp connection to cosmos-cassandra.

az webapp connection create cosmos-gremlin

Create a webapp connection to cosmos-gremlin.

az webapp connection create cosmos-mongo

Create a webapp connection to cosmos-mongo.

az webapp connection create cosmos-sql

Create a webapp connection to cosmos-sql.

az webapp connection create cosmos-table

Create a webapp connection to cosmos-table.

az webapp connection create eventhub

Create a webapp connection to eventhub.

az webapp connection create keyvault

Create a webapp connection to keyvault.

az webapp connection create mysql

Create a webapp connection to mysql.

az webapp connection create mysql-flexible

Create a webapp connection to mysql-flexible.

az webapp connection create postgres

Create a webapp connection to postgres.

az webapp connection create postgres-flexible

Create a webapp connection to postgres-flexible.

az webapp connection create redis

Create a webapp connection to redis.

az webapp connection create redis-enterprise

Create a webapp connection to redis-enterprise.

az webapp connection create servicebus

Create a webapp connection to servicebus.

az webapp connection create signalr

Create a webapp connection to signalr.

az webapp connection create sql

Create a webapp connection to sql.

az webapp connection create storage-blob

Create a webapp connection to storage-blob.

az webapp connection create storage-file

Create a webapp connection to storage-file.

az webapp connection create storage-queue

Create a webapp connection to storage-queue.

az webapp connection create storage-table

Create a webapp connection to storage-table.

az webapp connection create webpubsub

Create a webapp connection to webpubsub.

az webapp connection delete

Delete a webapp connection.

az webapp connection list

List connections of a webapp.

az webapp connection list-configuration

List source configurations of a webapp connection.

az webapp connection list-support-types

List client types and auth types supported by webapp connections.

az webapp connection show

Get the details of a webapp connection.

az webapp connection update

Update a webapp connection.

az webapp connection update appconfig

Update a webapp to appconfig connection.

az webapp connection update confluent-cloud

Update a webapp to confluent-cloud connection.

az webapp connection update cosmos-cassandra

Update a webapp to cosmos-cassandra connection.

az webapp connection update cosmos-gremlin

Update a webapp to cosmos-gremlin connection.

az webapp connection update cosmos-mongo

Update a webapp to cosmos-mongo connection.

az webapp connection update cosmos-sql

Update a webapp to cosmos-sql connection.

az webapp connection update cosmos-table

Update a webapp to cosmos-table connection.

az webapp connection update eventhub

Update a webapp to eventhub connection.

az webapp connection update keyvault

Update a webapp to keyvault connection.

az webapp connection update mysql

Update a webapp to mysql connection.

az webapp connection update mysql-flexible

Update a webapp to mysql-flexible connection.

az webapp connection update postgres

Update a webapp to postgres connection.

az webapp connection update postgres-flexible

Update a webapp to postgres-flexible connection.

az webapp connection update redis

Update a webapp to redis connection.

az webapp connection update redis-enterprise

Update a webapp to redis-enterprise connection.

az webapp connection update servicebus

Update a webapp to servicebus connection.

az webapp connection update signalr

Update a webapp to signalr connection.

az webapp connection update sql

Update a webapp to sql connection.

az webapp connection update storage-blob

Update a webapp to storage-blob connection.

az webapp connection update storage-file

Update a webapp to storage-file connection.

az webapp connection update storage-queue

Update a webapp to storage-queue connection.

az webapp connection update storage-table

Update a webapp to storage-table connection.

az webapp connection update webpubsub

Update a webapp to webpubsub connection.

az webapp connection validate

Validate a webapp connection.

az webapp connection wait

Place the CLI in a waiting state until a condition of the connection is met.

az webapp cors

Manage Cross-Origin Resource Sharing (CORS).

az webapp cors add

Add allowed origins.

az webapp cors remove

Remove allowed origins.

az webapp cors show

Show allowed origins.

az webapp create

Create a web app.

az webapp create-remote-connection

Creates a remote connection using a tcp tunnel to your web app.

az webapp delete

Delete a web app.

az webapp deleted

Manage deleted web apps.

az webapp deleted list

List web apps that have been deleted.

az webapp deleted restore

Restore a deleted web app.

az webapp deploy

Deploys a provided artifact to Azure Web Apps.

az webapp deployment

Manage web app deployments.

az webapp deployment container

Manage container-based continuous deployment.

az webapp deployment container config

Configure continuous deployment via containers.

az webapp deployment container show-cd-url

Get the URL which can be used to configure webhooks for continuous deployment.

az webapp deployment github-actions

Configure GitHub Actions for a webapp.

az webapp deployment github-actions add

Add a GitHub Actions workflow file to the specified repository. The workflow will build and deploy your app to the specified webapp.

az webapp deployment github-actions remove

Remove and disconnect the GitHub Actions workflow file from the specified repository.

az webapp deployment list-publishing-credentials

Get the details for available web app publishing credentials.

az webapp deployment list-publishing-profiles

Get the details for available web app deployment profiles.

az webapp deployment slot

Manage web app deployment slots.

az webapp deployment slot auto-swap

Configure deployment slot auto swap.

az webapp deployment slot create

Create a deployment slot.

az webapp deployment slot delete

Delete a deployment slot.

az webapp deployment slot list

List all deployment slots.

az webapp deployment slot swap

Swap deployment slots for a web app.

az webapp deployment source

Manage web app deployment via source control.

az webapp deployment source config

Manage deployment from git or Mercurial repositories.

az webapp deployment source config-local-git

Get a URL for a git repository endpoint to clone and push to for web app deployment.

az webapp deployment source config-zip

Perform deployment using the kudu zip push deployment for a web app.

az webapp deployment source delete

Delete a source control deployment configuration.

az webapp deployment source show

Get the details of a source control deployment configuration.

az webapp deployment source sync

Synchronize from the repository. Only needed under manual integration mode.

az webapp deployment source update-token

Update source control token cached in Azure app service.

az webapp deployment user

Manage user credentials for deployment.

az webapp deployment user set

Update deployment credentials.

az webapp deployment user show

Get deployment publishing user.

az webapp hybrid-connection

Methods that list, add and remove hybrid-connections from webapps.

az webapp hybrid-connection add

Add an existing hybrid-connection to a webapp.

az webapp hybrid-connection list

List the hybrid-connections on a webapp.

az webapp hybrid-connection remove

Remove a hybrid-connection from a webapp.

az webapp identity

Manage web app's managed identity.

az webapp identity assign

Assign managed identity to the web app.

az webapp identity remove

Disable web app's managed identity.

az webapp identity show

Display web app's managed identity.

az webapp list

List web apps.

az webapp list-instances

List all scaled out instances of a web app or web app slot.

az webapp list-runtimes

List available built-in stacks which can be used for web apps.

az webapp log

Manage web app logs.

az webapp log config

Configure logging for a web app.

az webapp log deployment

Manage web app deployment logs.

az webapp log deployment list

List deployments associated with web app.

az webapp log deployment show

Show deployment logs of the latest deployment, or a specific deployment if deployment-id is specified.

az webapp log download

Download a web app's log history as a zip file.

az webapp log show

Get the details of a web app's logging configuration.

az webapp log tail

Start live log tracing for a web app.

az webapp restart

Restart a web app.

az webapp scale

Modify the number of instances of a webapp.

az webapp scan

Holds group of commands which cater to webapp scans. Currently available only for Linux based webapps.

az webapp scan list-result

Get details of all scans conducted on webapp, upto max scan limit set on the webapp This will get you the scan log results in addition to the scan status of each scan conducted on the webapp.

az webapp scan show-result

Get results of specified scan-id. This will fetch you the Scan log results of the specified scan-id.

az webapp scan start

Starts the scan on the specified webapp files in the wwwroot directory. It returns a JSON containing the ScanID, traking and results URL.

az webapp scan stop

Stops the current executing scan. Does nothing if no scan is executing.

az webapp scan track

Track status of scan by providing scan-id. You can track the status of the scan from [Starting, Success, Failed, TimeoutFailure, Executing].

az webapp show

Get the details of a web app.

az webapp ssh

SSH command establishes a ssh session to the web container and developer would get a shell terminal remotely.

az webapp start

Start a web app.

az webapp stop

Stop a web app.

az webapp traffic-routing

Manage traffic routing for web apps.

az webapp traffic-routing clear

Clear the routing rules and send all traffic to production.

az webapp traffic-routing set

Configure routing traffic to deployment slots.

az webapp traffic-routing show

Display the current distribution of traffic across slots.

az webapp up

Create a webapp and deploy code from a local workspace to the app. The command is required to run from the folder where the code is present. Current support includes Node, Python, .NET Core and ASP.NET. Node, Python apps are created as Linux apps. .Net Core, ASP.NET, and static HTML apps are created as Windows apps. Append the html flag to deploy as a static HTML app. Each time the command is successfully run, default argument values for resource group, sku, location, plan, and name are saved for the current directory. These defaults are then used for any arguments not provided on subsequent runs of the command in the same directory. Use 'az configure' to manage defaults.

az webapp update

Update an existing web app.

az webapp vnet-integration

Methods that list, add, and remove virtual network integrations from a webapp.

az webapp vnet-integration add

Add a regional virtual network integration to a webapp.

az webapp vnet-integration list

List the virtual network integrations on a webapp.

az webapp vnet-integration remove

Remove a regional virtual network integration from webapp.

az webapp webjob

Allows management operations for webjobs on a web app.

az webapp webjob continuous

Allows management operations of continuous webjobs on a web app.

az webapp webjob continuous list

List all continuous webjobs on a selected web app.

az webapp webjob continuous remove

Delete a specific continuous webjob.

az webapp webjob continuous start

Start a specific continuous webjob on a selected web app.

az webapp webjob continuous stop

Stop a specific continuous webjob.

az webapp webjob triggered

Allows management operations of triggered webjobs on a web app.

az webapp webjob triggered list

List all triggered webjobs hosted on a web app.

az webapp webjob triggered log

Get history of a specific triggered webjob hosted on a web app.

az webapp webjob triggered remove

Delete a specific triggered webjob hosted on a web app.

az webapp webjob triggered run

Run a specific triggered webjob hosted on a web app.

az webapp browse

Open a web app in a browser. This is not supported in Azure Cloud Shell.

az webapp browse [--ids]
                 [--logs]
                 [--name]
                 [--resource-group]
                 [--slot]
                 [--subscription]

Examples

Open a web app in a browser. (autogenerated)

az webapp browse --name MyWebapp --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.

--logs -l

Enable viewing the log stream immediately after launching the web app.

default value: False
--name -n

Name of the web app. If left unspecified, a name will be randomly generated. You can configure the default using az configure --defaults web=<name>.

--resource-group -g

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

--slot -s

The name of the slot. Default to the productions slot if not specified.

--subscription

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

az webapp create

Create a web app.

The web app's name must be able to produce a unique FQDN as AppName.azurewebsites.net.

az webapp create --name
                 --plan
                 --resource-group
                 [--assign-identity]
                 [--deployment-container-image-name]
                 [--deployment-local-git]
                 [--deployment-source-branch]
                 [--deployment-source-url]
                 [--docker-registry-server-password]
                 [--docker-registry-server-user]
                 [--https-only {false, true}]
                 [--multicontainer-config-file]
                 [--multicontainer-config-type {COMPOSE, KUBE}]
                 [--public-network-access {Disabled, Enabled}]
                 [--role]
                 [--runtime]
                 [--scope]
                 [--startup-file]
                 [--subnet]
                 [--tags]
                 [--vnet]

Examples

Create a web app with the default configuration.

az webapp create -g MyResourceGroup -p MyPlan -n MyUniqueAppName

Create a web app with a Java 11 runtime.

az webapp create -g MyResourceGroup -p MyPlan -n MyUniqueAppName --runtime "java:11:Java SE:11"

Create a web app with a NodeJS 10.14 runtime and deployed from a local git repository.

az webapp create -g MyResourceGroup -p MyPlan -n MyUniqueAppName --runtime "node:12LTS" --deployment-local-git

Create a web app with an image from DockerHub.

az webapp create -g MyResourceGroup -p MyPlan -n MyUniqueAppName -i nginx

Create a web app with an image from a private DockerHub registry.

az webapp create -g MyResourceGroup -p MyPlan -n MyUniqueAppName -i MyImageName -s username -w password

Create a web app with an image from a private Azure Container Registry.

az webapp create -g MyResourceGroup -p MyPlan -n MyUniqueAppName -i myregistry.azurecr.io/docker-image:tag

create a WebApp using shared App Service Plan that is in a different resource group.

AppServicePlanID=$(az appservice plan show -n SharedAppServicePlan -g MyASPRG --query "id" --out tsv) az webapp create -g MyResourceGroup -p "$AppServicePlanID" -n MyUniqueAppName

Required Parameters

--name -n

Name of the new web app. Web app name can contain only allow alphanumeric characters and hyphens, it cannot start or end in a hyphen, and must be less than 64 characters.

--plan -p

Name or resource id of the app service plan. Use 'appservice plan create' to get one.

--resource-group -g

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

Optional Parameters

--assign-identity

Accept system or user assigned identities separated by spaces. Use '[system]' to refer system assigned identity, or a resource id to refer user assigned identity. Check out help for more examples.

--deployment-container-image-name -i

Container image name from Docker Hub, e.g. publisher/image-name:tag.

--deployment-local-git -l

Enable local git.

--deployment-source-branch -b

The branch to deploy.

default value: master
--deployment-source-url -u

Git repository URL to link with manual integration.

--docker-registry-server-password -w

The container registry server password. Required for private registries.

--docker-registry-server-user -s

The container registry server username.

--https-only

Redirect all traffic made to an app using HTTP to HTTPS.

accepted values: false, true
default value: False
--multicontainer-config-file

Linux only. Config file for multicontainer apps. (local or remote).

--multicontainer-config-type

Linux only.

accepted values: COMPOSE, KUBE
--public-network-access

Enable or disable public access to the web app.

accepted values: Disabled, Enabled
--role

Role name or id the system assigned identity will have.

default value: Contributor
--runtime -r

Canonicalized web runtime in the format of Framework:Version, e.g. "PHP:7.2".Use az webapp list-runtimes for available list.

--scope

Scope that the system assigned identity can access.

--startup-file

Linux only. The web's startup file.

--subnet

Name or resource ID of the pre-existing subnet to have the webapp join. The --vnet is argument also needed if specifying subnet by name.

--tags

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

--vnet

Name or resource ID of the regional virtual network. If there are multiple vnets of the same name across different resource groups, use vnet resource id to specify which vnet to use. If vnet name is used, by default, the vnet in the same resource group as the webapp will be used. Must be used with --subnet argument.

az webapp create-remote-connection

Creates a remote connection using a tcp tunnel to your web app.

az webapp create-remote-connection [--ids]
                                   [--instance]
                                   [--name]
                                   [--port]
                                   [--resource-group]
                                   [--slot]
                                   [--subscription]
                                   [--timeout]

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.

--instance -i

Webapp instance to connect to. Defaults to none.

--name -n

Name of the web app. If left unspecified, a name will be randomly generated. You can configure the default using az configure --defaults web=<name>.

--port -p

Port for the remote connection. Default: Random available port.

--resource-group -g

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

--slot -s

The name of the slot. Default to the productions slot if not specified.

--subscription

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

--timeout -t

Timeout in seconds. Defaults to none.

az webapp delete

Delete a web app.

az webapp delete [--ids]
                 [--keep-dns-registration]
                 [--keep-empty-plan]
                 [--keep-metrics]
                 [--name]
                 [--resource-group]
                 [--slot]
                 [--subscription]

Examples

Delete a web app. (autogenerated)

az webapp delete --name MyWebapp --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.

--keep-dns-registration

Keep DNS registration.

--keep-empty-plan

Keep empty app service plan.

--keep-metrics

Keep app metrics.

--name -n

The name of the webapp.

--resource-group -g

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

--slot -s

The name of the slot. Default to the productions slot if not specified.

--subscription

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

az webapp deploy

Deploys a provided artifact to Azure Web Apps.

az webapp deploy [--async {false, true}]
                 [--clean {false, true}]
                 [--ids]
                 [--ignore-stack {false, true}]
                 [--name]
                 [--resource-group]
                 [--restart {false, true}]
                 [--slot]
                 [--src-path]
                 [--src-url]
                 [--subscription]
                 [--target-path]
                 [--timeout]
                 [--type {ear, jar, lib, startup, static, war, zip}]

Examples

Deploy a war file asynchronously.

az webapp deploy --resource-group ResourceGroup --name AppName --src-path SourcePath --type war --async true

Deploy a static text file to wwwroot/staticfiles/test.txt

az webapp deploy --resource-group ResourceGroup --name AppName --src-path SourcePath --type static --target-path staticfiles/test.txt

Optional Parameters

--async

If true, the artifact is deployed asynchronously. (The command will exit once the artifact is pushed to the web app.).

accepted values: false, true
--clean

If true, cleans the target directory prior to deploying the file(s). Default value is determined based on artifact type.

accepted values: false, true
--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.

--ignore-stack

If true, any stack-specific defaults are ignored.

accepted values: false, true
--name -n

Name of the webapp to deploy to.

--resource-group -g

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

--restart

If true, the web app will be restarted following the deployment. Set this to false if you are deploying multiple artifacts and do not want to restart the site on the earlier deployments.

accepted values: false, true
--slot -s

The name of the slot. Default to the productions slot if not specified.

--src-path

Path of the artifact to be deployed. Ex: "myapp.zip" or "/myworkspace/apps/myapp.war".

--src-url

URL of the artifact. The webapp will pull the artifact from this URL. Ex: "http://mysite.com/files/myapp.war?key=123".

--subscription

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

--target-path

Absolute path that the artifact should be deployed to. Defaults to "home/site/wwwroot/" Ex: "/home/site/deployments/tools/", "/home/site/scripts/startup-script.sh".

--timeout

Timeout for the deployment operation in milliseconds.

--type

Used to override the type of artifact being deployed.

accepted values: ear, jar, lib, startup, static, war, zip

az webapp list

List web apps.

az webapp list [--resource-group]

Examples

List all web apps in MyResourceGroup.

az webapp list --resource-group MyResourceGroup

List default host name and state for all web apps.

az webapp list --query "[].{hostName: defaultHostName, state: state}"

List all running web apps.

az webapp list --query "[?state=='Running']"

Optional Parameters

--resource-group -g

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

az webapp list-instances

List all scaled out instances of a web app or web app slot.

az webapp list-instances --name
                         --resource-group
                         [--slot]

Required Parameters

--name -n

Name of the web app. If left unspecified, a name will be randomly generated. You can configure the default using az configure --defaults web=<name>.

--resource-group -g

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

Optional Parameters

--slot -s

Name of the web app slot. Default to the productions slot if not specified.

az webapp list-runtimes

List available built-in stacks which can be used for web apps.

az webapp list-runtimes [--linux]
                        [--os {linux, windows}]

Optional Parameters

--linux

List runtime stacks for linux based web apps.

default value: False
--os --os-type

Limit the output to just windows or linux runtimes.

accepted values: linux, windows

az webapp restart

Restart a web app.

az webapp restart [--ids]
                  [--name]
                  [--resource-group]
                  [--slot]
                  [--subscription]

Examples

Restart a web app. (autogenerated)

az webapp restart --name MyWebapp --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

Name of the web app. If left unspecified, a name will be randomly generated. You can configure the default using az configure --defaults web=<name>.

--resource-group -g

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

--slot -s

The name of the slot. Default to the productions slot if not specified.

--subscription

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

az webapp scale

Modify the number of instances of a webapp.

az webapp scale --instance-count
                [--ids]
                [--name]
                [--resource-group]
                [--slot]
                [--subscription]

Examples

Change the number of instances of MyApp to 2.

az webapp scale -g MyResourceGroup -n MyApp --instance-count 2

Required Parameters

--instance-count

Number of instances.

default value: 1

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

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

--resource-group -g

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

--slot -s

The name of the slot. Default to the productions slot if not specified.

--subscription

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

az webapp show

Get the details of a web app.

az webapp show [--ids]
               [--name]
               [--resource-group]
               [--slot]
               [--subscription]

Examples

Get the details of a web app. (autogenerated)

az webapp show --name MyWebapp --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

Name of the web app. If left unspecified, a name will be randomly generated. You can configure the default using az configure --defaults web=<name>.

--resource-group -g

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

--slot -s

The name of the slot. Default to the productions slot if not specified.

--subscription

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

az webapp ssh

SSH command establishes a ssh session to the web container and developer would get a shell terminal remotely.

az webapp ssh [--ids]
              [--instance]
              [--name]
              [--port]
              [--resource-group]
              [--slot]
              [--subscription]
              [--timeout]

Examples

ssh into a web app

az webapp ssh -n MyUniqueAppName -g 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.

--instance -i

Webapp instance to connect to. Defaults to none.

--name -n

Name of the web app. If left unspecified, a name will be randomly generated. You can configure the default using az configure --defaults web=<name>.

--port -p

Port for the remote connection. Default: Random available port.

--resource-group -g

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

--slot -s

The name of the slot. Default to the productions slot if not specified.

--subscription

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

--timeout -t

Timeout in seconds. Defaults to none.

az webapp start

Start a web app.

az webapp start [--ids]
                [--name]
                [--resource-group]
                [--slot]
                [--subscription]

Examples

Start a web app. (autogenerated)

az webapp start --name MyWebapp --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

Name of the web app. If left unspecified, a name will be randomly generated. You can configure the default using az configure --defaults web=<name>.

--resource-group -g

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

--slot -s

The name of the slot. Default to the productions slot if not specified.

--subscription

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

az webapp stop

Stop a web app.

az webapp stop [--ids]
               [--name]
               [--resource-group]
               [--slot]
               [--subscription]

Examples

Stop a web app. (autogenerated)

az webapp stop --name MyWebapp --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

Name of the web app. If left unspecified, a name will be randomly generated. You can configure the default using az configure --defaults web=<name>.

--resource-group -g

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

--slot -s

The name of the slot. Default to the productions slot if not specified.

--subscription

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

az webapp up

Create a webapp and deploy code from a local workspace to the app. The command is required to run from the folder where the code is present. Current support includes Node, Python, .NET Core and ASP.NET. Node, Python apps are created as Linux apps. .Net Core, ASP.NET, and static HTML apps are created as Windows apps. Append the html flag to deploy as a static HTML app. Each time the command is successfully run, default argument values for resource group, sku, location, plan, and name are saved for the current directory. These defaults are then used for any arguments not provided on subsequent runs of the command in the same directory. Use 'az configure' to manage defaults.

az webapp up [--app-service-environment]
             [--dryrun]
             [--html]
             [--ids]
             [--launch-browser]
             [--location]
             [--logs]
             [--name]
             [--os-type {Linux, Windows}]
             [--plan]
             [--resource-group]
             [--runtime]
             [--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

View the details of the app that will be created, without actually running the operation

az webapp up --dryrun

Create a web app with the default configuration, by running the command from the folder where the code to be deployed exists.

az webapp up

Create a web app with a specified name

az webapp up -n MyUniqueAppName

Create a web app with a specified name and a Java 11 runtime

az webapp up -n MyUniqueAppName --runtime "java:11:Java SE:11"

Create a web app in a specific region, by running the command from the folder where the code to be deployed exists.

az webapp up -l locationName

Create a web app and enable log streaming after the deployment operation is complete. This will enable the default configuration required to enable log streaming.

az webapp up --logs

Create a web app and deploy as a static HTML app.

az webapp up --html

Optional Parameters

--app-service-environment -e

Name or resource ID of the (pre-existing) App Service Environment to deploy to. Requires an Isolated V2 sku [I1v2, I2v2, I3v2].

--dryrun

Show summary of the create and deploy operation instead of executing it.

default value: False
--html

Ignore app detection and deploy as an html app.

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.

--launch-browser -b

Launch the created app using the default browser. This is not supported in Azure Cloud Shell.

default value: False
--location -l

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

--logs

Configure default logging required to enable viewing log stream immediately after launching the webapp.

default value: False
--name -n

Name of the web app. If left unspecified, a name will be randomly generated. You can configure the default using az configure --defaults web=<name>.

--os-type

Set the OS type for the app to be created.

accepted values: Linux, Windows
--plan -p

Name of the app service plan associated with the webapp.

--resource-group -g

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

--runtime -r

Canonicalized web runtime in the format of Framework:Version, e.g. "PHP:7.2".Use az webapp list-runtimes for available list.

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

az webapp update

Update an existing web app.

az webapp update [--add]
                 [--client-affinity-enabled {false, true}]
                 [--force-dns-registration {false, true}]
                 [--force-string]
                 [--https-only {false, true}]
                 [--ids]
                 [--minimum-elastic-instance-count]
                 [--name]
                 [--prewarmed-instance-count]
                 [--remove]
                 [--resource-group]
                 [--set]
                 [--skip-custom-domain-verification {false, true}]
                 [--skip-dns-registration {false, true}]
                 [--slot]
                 [--subscription]
                 [--ttl-in-seconds {false, true}]

Examples

Update the tags of a web app.

az webapp update -g MyResourceGroup -n MyAppName --set tags.tagName=tagValue

Update a web app. (autogenerated)

az webapp update --https-only true --name MyAppName --resource-group MyResourceGroup

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: []
--client-affinity-enabled

Enables sending session affinity cookies.

accepted values: false, true
--force-dns-registration

If true, web app hostname is force registered with DNS.

accepted values: false, true
--force-string

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

default value: False
--https-only

Redirect all traffic made to an app using HTTP to HTTPS.

accepted values: false, true
--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.

--minimum-elastic-instance-count -i

Minimum number of instances. App must be in an elastic scale App Service Plan.

--name -n

Name of the web app. If left unspecified, a name will be randomly generated. You can configure the default using az configure --defaults web=<name>.

--prewarmed-instance-count -w

Number of preWarmed instances. App must be in an elastic scale App Service Plan.

--remove

Remove a property or an element from a list. Example: --remove property.list 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=.

default value: []
--skip-custom-domain-verification

If true, custom (non *.azurewebsites.net) domains associated with web app are not verified.

accepted values: false, true
--skip-dns-registration

If true web app hostname is not registered with DNS on creation.

accepted values: false, true
--slot -s

The name of the slot. Default to the productions slot if not specified.

--subscription

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

--ttl-in-seconds

Time to live in seconds for web app's default domain name.

accepted values: false, true