Complete the code to add an application setting named 'AppMode' with value 'Production' in Azure App Service.
az webapp config appsettings set --name MyApp --resource-group MyResourceGroup --settings [1]The correct syntax for setting an application setting is key=value, so 'AppMode=Production' is correct.
Complete the code to retrieve the connection string named 'MyDb' from an Azure App Service.
az webapp config connection-string show --name MyApp --resource-group MyResourceGroup --connection-string-type SQLAzure --query [1]The connection string value is accessed with connectionStrings['MyDb'].value in the query.
Fix the error in the code to update a connection string named 'StorageAccount' with a new value.
az webapp config connection-string set --name MyApp --resource-group MyResourceGroup --settings StorageAccount=[1] --connection-string-type CustomThe connection string value must be enclosed in double quotes to be parsed correctly by the CLI.
Fill both blanks to create a new app setting 'Environment' with value 'Staging' and a connection string 'DbConn' with type 'SQLServer'.
az webapp config appsettings set --name MyApp --resource-group MyResourceGroup --settings [1] && az webapp config connection-string set --name MyApp --resource-group MyResourceGroup --settings [2] --connection-string-type [3]
App settings use key=value format, connection strings also use key=value, and the connection-string-type must be 'SQLServer'.
Fill all three blanks to list all app settings, filter for keys starting with 'APP_', and output only their values.
az webapp config appsettings list --name MyApp --resource-group MyResourceGroup | jq '[.[] | select(.name | startswith([1])) | [2]]' | jq -r '.[] | [3]'
The filter uses the string "APP_" with escaped quotes, then selects the '.value' property to output the values.