azureazure-fluent-api

Azure Fluent Management API: Remove an app setting


I'm trying to remove the AzureWebJobsDashboard app setting from a Function App which is provisioned using the fluent management API

    var fnApp = await azure.AppServices.FunctionApps
         .Define("fnappname")
         .WithExistingAppServicePlan(fnAppPlan)
         .WithExistingResourceGroup(resourceGroup)
         .WithExistingStorageAccount(fnStorage)
         .WithRuntimeVersion("~2")
         .WithHttp20Enabled(true)
         .WithAppSetting("AzureWebJobsDashboard", null)
         .WithTags(tags)
         .CreateAsync();

I've tried setting the app setting to null and also to an empty string, but it seems to make no difference and I don't see a method to explicitly delete a setting.


Solution

  • You can use WithoutAppSetting("AzureWebJobsDashboard").