Web Apps - az webapp

Manage web apps.

Commands

az webapp browse Open the web app in a browser.
az webapp config Configure a web app.
az webapp config appsettings Configure web app settings.
az webapp config appsettings delete
az webapp config appsettings list
az webapp config appsettings set Create or update web app settings.
az webapp config backup
az webapp config backup create Create a backup of a web app.
az webapp config backup list List all 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 of a web app.
az webapp config backup update Configure a new backup schedule.
az webapp config connection-string Configure web app connection strings.
az webapp config connection-string delete Delete connection strings.
az webapp config connection-string list
az webapp config connection-string set Create or update connection strings.
az webapp config container Configure container specific settings.
az webapp config container delete Delete container settings.
az webapp config container set Create or update container settings.
az webapp config container show Show container settings.
az webapp config hostname Configure hostnames.
az webapp config hostname add Bind a hostname (custom domain) to a web app.
az webapp config hostname delete Unbind a hostname (custom domain) from a web app.
az webapp config hostname get-external-ip Get the ip address to configure your DNS settings for A records.
az webapp config hostname list List all hostname bindings.
az webapp config set Create or update web app configurations.
az webapp config show Show web app configurations.
az webapp config ssl Configure SSL certificates.
az webapp config ssl bind Bind an SSL certificate to a web app.
az webapp config ssl delete Delete an SSL certificate from a web app.
az webapp config ssl list List SSL certificates within a resource group.
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 create Create a web app.
az webapp delete Delete a web app.
az webapp deployment Manage web application deployments.
az webapp deployment list-publishing-profiles Get publishing endpoints, credentials, database connection strings, etc.
az webapp deployment slot Manage deployment slots.
az webapp deployment slot auto-swap Configure slot auto swap.
az webapp deployment slot create Create a slot.
az webapp deployment slot delete Delete a slot.
az webapp deployment slot list List all slots.
az webapp deployment slot swap Swap slots.
az webapp deployment source Manage source control systems.
az webapp deployment source config Associate to Git or Mercurial repositories.
az webapp deployment source config-local-git Enable local git.
az webapp deployment source delete Delete source control configurations.
az webapp deployment source show Show source control configurations.
az webapp deployment source sync Synchronize from the source 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 a deployment.
az webapp deployment user set Update deployment credentials.
az webapp deployment user show Gets publishing user.
az webapp list List web apps.
az webapp list-runtimes List built-in web stack runtimes you can use to create new webapps.
az webapp log Manage web app logs.
az webapp log config Configure web app logs.
az webapp log download Download historical logs as a zip file.
az webapp log tail Start live tracing.
az webapp restart Restart a web app.
az webapp show Show a web app.
az webapp start Start a web app.
az webapp stop Stop a web app.
az webapp traffic-routing Manage traffic routings in production test.
az webapp traffic-routing clear Clear the routing rules to send 100% to production.
az webapp traffic-routing set Routing some percentages of traffic to deployment slots.
az webapp traffic-routing show Display the current distribution of traffic across slots.

az webapp browse

Open the web app in a browser.

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

Required Parameters

--name -n

Name of the web. You can configure the default using 'az configure --defaults web='.

--resource-group -g

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

Optional Parameters

--logs -l

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

--slot -s

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

az webapp create

Create a web app.

az webapp create --name
--plan
--resource-group
[--deployment-container-image-name]
[--deployment-local-git]
[--deployment-source-branch]
[--deployment-source-url]
[--runtime]
[--startup-file]

Examples

Create an empty webapp. Name must be unique to yield a unique FQDN; for example, MyUniqueApp.azurewebsites.net.

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

Create a webapp with node 6.2 stack runtime, and local git configured for web deployment

az webapp create -g MyResourceGroup -p MyPlan -n MyUniqueApp --runtime "node|6.2" --deployment-local-git

Required Parameters

--name -n

Name of the new webapp.

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

Optional Parameters

--deployment-container-image-name -i

Linux only. Container image name from Docker Hub, e.g. publisher/image-name:version.

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

--runtime -r

Canonicalized web runtime in the format of Framework|Version, e.g. PHP|5.6. Use 'az webapp list-runtimes' for available list.

--startup-file

Linux only. The web's startup file.

az webapp delete

Delete a web app.

az webapp delete --name
--resource-group
[--slot]

Required Parameters

--name -n

Name of the web. You can configure the default using 'az configure --defaults web='.

--resource-group -g

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

Optional Parameters

--slot -s

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

az webapp list

List web apps.

az webapp list [--resource-group]

Examples

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

az webapp list-runtimes

List built-in web stack runtimes you can use to create new webapps.

az webapp list-runtimes [--linux]

Optional Parameters

--linux

List runtime stacks for linux based webapps.

az webapp restart

Restart a web app.

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

Required Parameters

--name -n

Name of the web. You can configure the default using 'az configure --defaults web='.

--resource-group -g

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

Optional Parameters

--slot -s

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

az webapp show

Show a web app.

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

Required Parameters

--name -n

Name of the web. You can configure the default using 'az configure --defaults web='.

--resource-group -g

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

Optional Parameters

--slot -s

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

az webapp start

Start a web app.

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

Required Parameters

--name -n

Name of the web. You can configure the default using 'az configure --defaults web='.

--resource-group -g

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

Optional Parameters

--slot -s

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

az webapp stop

Stop a web app.

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

Required Parameters

--name -n

Name of the web. You can configure the default using 'az configure --defaults web='.

--resource-group -g

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

Optional Parameters

--slot -s

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