public virtual Response <SessionHost> Update(SessionHostUpdateOptions options = null, CancellationToken cancellationToken = default) { using var scope = _sessionHostClientDiagnostics.CreateScope("SessionHost.Update"); scope.Start(); try { var response = _sessionHostRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, options, cancellationToken); return(Response.FromValue(new SessionHost(Client, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }
public virtual Response <SessionHostResource> Update(PatchableSessionHostData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); using var scope = _sessionHostClientDiagnostics.CreateScope("SessionHostResource.Update"); scope.Start(); try { var response = _sessionHostRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); return(Response.FromValue(new SessionHostResource(Client, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }