In Azure Functions (runtime version 2.x), I can use Azure CLI to toggle the state of a function (enable/disable) by using the command az functionapp config appsettings set --name $functionAppName --resource-group $resourceGroupName --settings AzureWebJobs.functionName.Disabled=$disabled
but this only toggles the production slot. What is the correct syntax to toggle functions in the other slots? What should the --name
parameter be? I tried functionApp/stage
and functionApp-stage
but get errors as if they don't exist.
Asked
Active
Viewed 148 times
0

Anthony Klotz
- 567
- 1
- 5
- 19
1 Answers
1
You should use -s or --slot and specify the slot name.
https://learn.microsoft.com/en-us/cli/azure/functionapp?view=azure-cli-latest#optional-parameters

Thiago Custodio
- 17,332
- 6
- 45
- 90