in azure-toolkit-libs/azure-toolkit-appservice-lib/src/main/java/com/microsoft/azure/toolkit/lib/appservice/service/impl/FunctionApp.java [272:302]
public FunctionApp commit() {
Update update = remote().update();
if (getAppServicePlan() != null && getAppServicePlan().isPresent()) {
update = updateAppServicePlan(update, getAppServicePlan().get());
}
if (getRuntime() != null && getRuntime().isPresent()) {
update = updateRuntime(update, getRuntime().get());
}
if (getDockerConfiguration() != null && getDockerConfiguration().isPresent() && FunctionApp.this.getRuntime().isDocker()) {
modified = true;
update = updateDockerConfiguration(update, getDockerConfiguration().get());
}
if (!Collections.isEmpty(getAppSettingsToAdd())) {
modified = true;
update.withAppSettings(getAppSettingsToAdd());
}
if (!Collections.isEmpty(getAppSettingsToRemove())) {
modified = true;
getAppSettingsToRemove().forEach(update::withoutAppSetting);
}
if (getDiagnosticConfig() != null && getDiagnosticConfig().isPresent()) {
modified = true;
AppServiceUtils.updateDiagnosticConfigurationForWebAppBase(update, getDiagnosticConfig().get());
}
if (modified) {
FunctionApp.this.remote = update.apply();
}
FunctionApp.this.entity = AppServiceUtils.fromFunctionApp(FunctionApp.this.remote);
FunctionApp.this.refreshStatus();
return FunctionApp.this;
}