public virtual async Task <Response <VpnServerConfigurationResource> > UpdateAsync(TagsObject vpnServerConfigurationParameters, CancellationToken cancellationToken = default) { Argument.AssertNotNull(vpnServerConfigurationParameters, nameof(vpnServerConfigurationParameters)); using var scope = _vpnServerConfigurationClientDiagnostics.CreateScope("VpnServerConfigurationResource.Update"); scope.Start(); try { var response = await _vpnServerConfigurationRestClient.UpdateTagsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, vpnServerConfigurationParameters, cancellationToken).ConfigureAwait(false); return(Response.FromValue(new VpnServerConfigurationResource(Client, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }
public virtual async Task <Response <VpnServerConfiguration> > UpdateTagsAsync(TagsObject vpnServerConfigurationParameters, CancellationToken cancellationToken = default) { if (vpnServerConfigurationParameters == null) { throw new ArgumentNullException(nameof(vpnServerConfigurationParameters)); } using var scope = _clientDiagnostics.CreateScope("VpnServerConfiguration.UpdateTags"); scope.Start(); try { var response = await _restClient.UpdateTagsAsync(Id.ResourceGroupName, Id.Name, vpnServerConfigurationParameters, cancellationToken).ConfigureAwait(false); return(Response.FromValue(new VpnServerConfiguration(this, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }