az webapp

Manage web apps.

Commands

az webapp auth

Manage webapp authentication and authorization.

az webapp auth show

Show the authentification settings for the webapp.

az webapp auth update

Update the authentication settings for the webapp.

az webapp browse

Open a web app in a browser.

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 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 web app container settings.

az webapp config container delete

Delete a web app container's settings.

az webapp config container set

Set a web app container's settings.

az webapp config container show

Get details of a web app container's 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 certificate to a web app from Key Vault.

az webapp config ssl list

List SSL certificates 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 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 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 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

Change 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 a 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 service identity.

az webapp identity assign

Assign or disable managed service identity to the web app.

az webapp identity remove

Disable web app's managed service identity.

az webapp identity show

Display web app's managed service identity.

az webapp list

List web apps.

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

az webapp update

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

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.

--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 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
                 [--deployment-container-image-name]
                 [--deployment-local-git]
                 [--deployment-source-branch]
                 [--deployment-source-url]
                 [--docker-registry-server-password]
                 [--docker-registry-server-user]
                 [--multicontainer-config-file]
                 [--multicontainer-config-type {COMPOSE, KUBE}]
                 [--runtime]
                 [--startup-file]
                 [--subscription]
                 [--tags]

Examples

Create a web app with the default configuration.

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

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|10.14" --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

Required Parameters

--name -n

Name of the new web app.

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

--deployment-container-image-name -i

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

--multicontainer-config-file

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

--multicontainer-config-type

Linux only.

accepted values: COMPOSE, KUBE
--runtime -r

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

--startup-file

Linux only. The web's startup file.

--subscription

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

--tags

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

az webapp create-remote-connection

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

az webapp create-remote-connection [--ids]
                                   [--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.

--name -n

Name of the web app. 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

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 list

List web apps.

az webapp list [--resource-group]
               [--subscription]

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

--subscription

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

az webapp list-runtimes

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

az webapp list-runtimes [--linux]
                        [--subscription]

Optional Parameters

--linux

List runtime stacks for linux based web apps.

--subscription

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

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

--name -n

Name of the web app. 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. 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. 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.

az webapp up [--dryrun]
             [--html]
             [--ids]
             [--launch-browser]
             [--location]
             [--logs]
             [--name]
             [--plan]
             [--resource-group]
             [--sku {B1, B2, B3, D1, F1, FREE, I1, I2, I3, P1V2, P2V2, P3V2, PC2, PC3, PC4, S1, S2, S3, SHARED}]
             [--subscription]

Examples

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

az webapp up -n MyUniqueAppName --dryrun

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

az webapp up -n MyUniqueAppName -l locationName

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

az webapp up -n MyUniqueAppName -l locationName

Deploy new code to an app that was originally created using the same command

az webapp up -n MyUniqueAppName -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 -n MyUniqueAppName --logs

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

az webapp up -n MyUniqueAppName --html

Optional Parameters

--dryrun

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

--html

Ignore app detection and deploy as an html app.

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

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

--name -n

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

--plan -p

Name of the appserviceplan associated with the webapp.

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

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

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

az webapp update

Update a web app.

az webapp update [--add]
                 [--client-affinity-enabled {false, true}]
                 [--force-dns-registration {false, true}]
                 [--force-string]
                 [--https-only {false, true}]
                 [--ids]
                 [--name]
                 [--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>.

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

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

--name -n

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

--remove

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

--resource-group -g

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

--set

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

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