Create an app in the myAppServicePlan
App Service plan with the az webapp create command.
The web app provides a hosting space for your API and provides a URL to view the deployed app.
In the following command, replace <app_name> with a unique name. If <app_name>
is not unique, you get the error message "Website with given name <app_name> already exists." The default URL of the web app is https://<app_name>.azurewebsites.net
.
az webapp create --name <app_name> --resource-group myResourceGroup --plan myAppServicePlan
When the web app has been created, the Azure CLI shows information similar to the following example:
{
"availabilityState": "Normal",
"clientAffinityEnabled": true,
"clientCertEnabled": false,
"cloningInfo": null,
"containerSize": 0,
"dailyMemoryTimeQuota": 0,
"defaultHostName": "<app_name>.azurewebsites.net",
"enabled": true,
"enabledHostNames": [
"<app_name>.azurewebsites.net",
"<app_name>.scm.azurewebsites.net"
],
"gatewaySiteName": null,
"hostNameSslStates": [
{
"hostType": "Standard",
"name": "<app_name>.azurewebsites.net",
"sslState": "Disabled",
"thumbprint": null,
"toUpdate": null,
"virtualIp": null
}
< JSON data removed for brevity. >
}