public virtual Response <HciCluster> Update(HciClusterUpdateOptions options, CancellationToken cancellationToken = default) { Argument.AssertNotNull(options, nameof(options)); using var scope = _hciClusterClustersClientDiagnostics.CreateScope("HciCluster.Update"); scope.Start(); try { var response = _hciClusterClustersRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, options, cancellationToken); return(Response.FromValue(new HciCluster(Client, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }
public virtual Response <HciCluster> Update(ClusterPatch cluster, CancellationToken cancellationToken = default) { if (cluster == null) { throw new ArgumentNullException(nameof(cluster)); } using var scope = _hciClusterClustersClientDiagnostics.CreateScope("HciCluster.Update"); scope.Start(); try { var response = _hciClusterClustersRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cluster, cancellationToken); return(Response.FromValue(new HciCluster(Client, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }