use of com.microsoft.azure.toolkit.lib.appservice.service.IAppServiceUpdater in project azure-tools-for-java by Microsoft.
the class WebAppPropertyViewPresenter method updateAppSettings.
@Override
protected void updateAppSettings(@NotNull final String sid, @NotNull final String webAppId, @Nullable final String name, final Map toUpdate, final Set toRemove) {
final IWebApp webApp = getWebAppBase(sid, webAppId, name);
final IAppServiceUpdater appServiceUpdater = webApp.update();
appServiceUpdater.withAppSettings(toUpdate);
toRemove.forEach(key -> appServiceUpdater.withoutAppSettings((String) key));
appServiceUpdater.commit();
}
use of com.microsoft.azure.toolkit.lib.appservice.service.IAppServiceUpdater in project azure-tools-for-java by Microsoft.
the class FunctionAppPropertyView method createPresenter.
@Override
protected WebAppBasePropertyViewPresenter createPresenter() {
return new WebAppBasePropertyViewPresenter() {
@Override
protected IFunctionApp getWebAppBase(String subscriptionId, String functionAppId, String name) {
return Azure.az(AzureAppService.class).subscription(subscriptionId).functionApp(functionAppId);
}
@Override
protected void updateAppSettings(String subscriptionId, String functionAppId, String name, Map toUpdate, Set toRemove) {
final IFunctionApp functionApp = getWebAppBase(subscriptionId, functionAppId, name);
final IAppServiceUpdater appServiceUpdater = functionApp.update();
appServiceUpdater.withAppSettings(toUpdate);
toRemove.forEach(key -> appServiceUpdater.withoutAppSettings((String) key));
appServiceUpdater.commit();
}
};
}
Aggregations