public virtual Response <VirtualWorkspace> Update(VirtualWorkspaceUpdateOptions options = null, CancellationToken cancellationToken = default) { using var scope = _virtualWorkspaceWorkspacesClientDiagnostics.CreateScope("VirtualWorkspace.Update"); scope.Start(); try { var response = _virtualWorkspaceWorkspacesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, options, cancellationToken); return(Response.FromValue(new VirtualWorkspace(Client, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }
public virtual Response <VirtualWorkspaceResource> Update(PatchableVirtualWorkspaceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); using var scope = _virtualWorkspaceWorkspacesClientDiagnostics.CreateScope("VirtualWorkspaceResource.Update"); scope.Start(); try { var response = _virtualWorkspaceWorkspacesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data, cancellationToken); return(Response.FromValue(new VirtualWorkspaceResource(Client, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }