in azure-toolkit-libs/azure-toolkit-appservice-lib/src/main/java/com/microsoft/azure/toolkit/lib/appservice/service/impl/WebApp.java [229:260]
public WebApp 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() && WebApp.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) {
WebApp.this.remote = update.apply();
}
WebApp.this.entity = AppServiceUtils.fromWebApp(WebApp.this.remote);
Azure.az(AzureWebApp.class).refresh(); // todo: refactor to support refresh single subscription
WebApp.this.refreshStatus();
return WebApp.this;
}