Web App
Introduction
Section titled “Introduction”Azure Web App lets you deploy and run web applications without managing underlying infrastructure. It supports multiple runtimes, app configuration, and integration with App Service plans. Web App is useful for quickly building and testing hosted HTTP applications.
LocalStack for Azure allows you to build and test Web App workflows in your local environment. The supported APIs are available on our API Coverage section, which provides information on the extent of Web App’s integration with LocalStack.
Getting started
Section titled “Getting started”This guide is designed for users new to Web App and assumes basic knowledge of the Azure CLI and our azlocal wrapper script.
Start your LocalStack container using your preferred method. Then start CLI interception:
azlocal start_interceptionCreate a resource group
Section titled “Create a resource group”Create a resource group for your Web App resources:
az group create \ --name rg-web-demo \ --location westeurope{ "name": "rg-web-demo", "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-web-demo", "location": "westeurope", "properties": { "provisioningState": "Succeeded" }, ...}Create an App Service plan
Section titled “Create an App Service plan”Create an App Service plan that will host the web app:
az appservice plan create \ --name asp-web-doc89 \ --resource-group rg-web-demo \ --location westeurope \ --sku F1{ "name": "asp-web-doc89", "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-web-demo/providers/Microsoft.Web/serverfarms/asp-web-doc89", "location": "westeurope", "provisioningState": "Succeeded", "sku": { "name": "B1", "tier": "Basic", ... }, ...}Create and inspect a Web App
Section titled “Create and inspect a Web App”Create a web app using a Python runtime:
az webapp create \ --name ls-web-doc89 \ --resource-group rg-web-demo \ --plan asp-web-doc89 \ --runtime "PYTHON:3.11"{ "name": "ls-web-doc89", "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-web-demo/providers/Microsoft.Web/sites/ls-web-doc89", "type": "Microsoft.Web/sites", "location": "westeurope", "defaultHostName": "ls-web-doc89.azurewebsites.net", "state": "Running", ...}Get the web app:
az webapp show \ --name ls-web-doc89 \ --resource-group rg-web-demoRead and update web app configuration
Section titled “Read and update web app configuration”Read the current web app configuration:
az webapp config show \ --name ls-web-doc89 \ --resource-group rg-web-demo{ "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-web-demo/providers/Microsoft.Web/sites/ls-web-doc89/config/web", "linuxFxVersion": "PYTHON|3.11", "http20Enabled": true, "alwaysOn": false, "ftpsState": "FtpsOnly", ...}Update web app configuration:
az webapp config set \ --name ls-web-doc89 \ --resource-group rg-web-demo \ --always-on false \ --http20-enabled true{ "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-web-demo/providers/Microsoft.Web/sites/ls-web-doc89", "http20Enabled": true, "alwaysOn": false, ...}Delete and verify
Section titled “Delete and verify”Delete the web app and verify it no longer appears:
az webapp delete \ --name ls-web-doc89 \ --resource-group rg-web-demo
az webapp list --resource-group rg-web-demo[]API Coverage
Section titled “API Coverage”| Operation ▲ | Implemented ▼ |
|---|