public virtual Response <FileShareResource> Update(FileShareData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); using var scope = _fileShareClientDiagnostics.CreateScope("FileShareResource.Update"); scope.Start(); try { var response = _fileShareRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Name, data, cancellationToken); return(Response.FromValue(new FileShareResource(Client, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }
public virtual Response <FileShare> Update(FileShareData fileShare, CancellationToken cancellationToken = default) { if (fileShare == null) { throw new ArgumentNullException(nameof(fileShare)); } using var scope = _fileShareClientDiagnostics.CreateScope("FileShare.Update"); scope.Start(); try { var response = _fileShareRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Name, fileShare, cancellationToken); return(Response.FromValue(new FileShare(ArmClient, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }