public virtual Response <TemplateSpecVersion> Update(IDictionary <string, string> tags = null, CancellationToken cancellationToken = default) { using var scope = _clientDiagnostics.CreateScope("TemplateSpecVersion.Update"); scope.Start(); try { var response = _templateSpecVersionsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, tags, cancellationToken); return(Response.FromValue(new TemplateSpecVersion(this, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }
public virtual Response <TemplateSpecVersion> Update(PatchableTemplateSpecVersionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); using var scope = _templateSpecVersionClientDiagnostics.CreateScope("TemplateSpecVersion.Update"); scope.Start(); try { var response = _templateSpecVersionRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); return(Response.FromValue(new TemplateSpecVersion(Client, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }