public virtual async Task <Response <ConfigurationStore> > SetTagsAsync(IDictionary <string, string> tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); using var scope = _configurationStoreClientDiagnostics.CreateScope("ConfigurationStore.SetTags"); scope.Start(); try { await TagHelper.DeleteAsync(WaitUntil.Completed, cancellationToken : cancellationToken).ConfigureAwait(false); var originalTags = await TagHelper.GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues.ReplaceWith(tags); await TagHelper.CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken : cancellationToken).ConfigureAwait(false); var originalResponse = await _configurationStoreRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); return(Response.FromValue(new ConfigurationStore(Client, originalResponse.Value), originalResponse.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }