public virtual Response <WebSiteConfigResource> Update(SiteConfigData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); using var scope = _webSiteConfigWebAppsClientDiagnostics.CreateScope("WebSiteConfigResource.Update"); scope.Start(); try { var response = _webSiteConfigWebAppsRestClient.UpdateConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken); return(Response.FromValue(new WebSiteConfigResource(Client, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }
public async virtual Task <Response <WebSiteSlotConfig> > UpdateAsync(SiteConfigData siteConfig, CancellationToken cancellationToken = default) { Argument.AssertNotNull(siteConfig, nameof(siteConfig)); using var scope = _webSiteSlotConfigWebAppsClientDiagnostics.CreateScope("WebSiteSlotConfig.Update"); scope.Start(); try { var response = await _webSiteSlotConfigWebAppsRestClient.UpdateConfigurationSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, siteConfig, cancellationToken).ConfigureAwait(false); return(Response.FromValue(new WebSiteSlotConfig(Client, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }
public virtual Response <SiteConfigWeb> Update(SiteConfigData siteConfig, CancellationToken cancellationToken = default) { if (siteConfig == null) { throw new ArgumentNullException(nameof(siteConfig)); } using var scope = _siteConfigWebWebAppsClientDiagnostics.CreateScope("SiteConfigWeb.Update"); scope.Start(); try { var response = _siteConfigWebWebAppsRestClient.UpdateConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, siteConfig, cancellationToken); return(Response.FromValue(new SiteConfigWeb(ArmClient, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }
internal WebSiteConfigResource(ArmClient client, SiteConfigData data) : this(client, data.Id) { HasData = true; _data = data; }
public virtual ArmOperation <WebSiteConfigResource> CreateOrUpdate(WaitUntil waitUntil, SiteConfigData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); using var scope = _webSiteConfigWebAppsClientDiagnostics.CreateScope("WebSiteConfigResource.CreateOrUpdate"); scope.Start(); try { var response = _webSiteConfigWebAppsRestClient.CreateOrUpdateConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken); var operation = new AppServiceArmOperation <WebSiteConfigResource>(Response.FromValue(new WebSiteConfigResource(Client, response), response.GetRawResponse())); if (waitUntil == WaitUntil.Completed) { operation.WaitForCompletion(cancellationToken); } return(operation); } catch (Exception e) { scope.Failed(e); throw; } }
internal SiteSlotConfigSnapshotResource(ArmClient client, SiteConfigData data) : this(client, data.Id) { HasData = true; _data = data; }
internal SiteConfigWeb(ArmClient armClient, SiteConfigData data) : this(armClient, data.Id) { HasData = true; _data = data; }
public virtual SiteConfigWebCreateOrUpdateOperation CreateOrUpdate(bool waitForCompletion, SiteConfigData siteConfig, CancellationToken cancellationToken = default) { if (siteConfig == null) { throw new ArgumentNullException(nameof(siteConfig)); } using var scope = _siteConfigWebWebAppsClientDiagnostics.CreateScope("SiteConfigWeb.CreateOrUpdate"); scope.Start(); try { var response = _siteConfigWebWebAppsRestClient.CreateOrUpdateConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, siteConfig, cancellationToken); var operation = new SiteConfigWebCreateOrUpdateOperation(ArmClient, response); if (waitForCompletion) { operation.WaitForCompletion(cancellationToken); } return(operation); } catch (Exception e) { scope.Failed(e); throw; } }
public async virtual Task <ArmOperation <WebSiteSlotConfig> > CreateOrUpdateAsync(bool waitForCompletion, SiteConfigData siteConfig, CancellationToken cancellationToken = default) { Argument.AssertNotNull(siteConfig, nameof(siteConfig)); using var scope = _webSiteSlotConfigWebAppsClientDiagnostics.CreateScope("WebSiteSlotConfig.CreateOrUpdate"); scope.Start(); try { var response = await _webSiteSlotConfigWebAppsRestClient.CreateOrUpdateConfigurationSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, siteConfig, cancellationToken).ConfigureAwait(false); var operation = new AppServiceArmOperation <WebSiteSlotConfig>(Response.FromValue(new WebSiteSlotConfig(Client, response), response.GetRawResponse())); if (waitForCompletion) { await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); } return(operation); } catch (Exception e) { scope.Failed(e); throw; } }
internal SiteSlotConfigSnapshot(ArmClient armClient, SiteConfigData data) : this(armClient, data.Id) { HasData = true; _data = data; }