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