To disable a function means to make the runtime ignore the automatic trigger that's defined for the function. This lets you prevent a specific function from running without stopping the entire function app.
The Update-AzFunctionAppSetting
command adds or updates an application setting. The following command disables a function named QueueTrigger
by creating an app setting named AzureWebJobs.QueueTrigger.Disabled
and setting it to true
.
Update-AzFunctionAppSetting -Name <FUNCTION_APP_NAME> -ResourceGroupName <RESOURCE_GROUP_NAME> -AppSetting @{"AzureWebJobs.QueueTrigger.Disabled" = "true"}
o re-enable the function, rerun the same command with a value of false
.
Update-AzFunctionAppSetting -Name <FUNCTION_APP_NAME> -ResourceGroupName <RESOURCE_GROUP_NAME> -AppSetting @{"AzureWebJobs.QueueTrigger.Disabled" = "false"}