public virtual Response <VCenter> Update(ResourcePatch body = null, CancellationToken cancellationToken = default) { using var scope = _vCenterClientDiagnostics.CreateScope("VCenter.Update"); scope.Start(); try { var response = _vCenterRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken); return(Response.FromValue(new VCenter(ArmClient, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }
public virtual Response <VCenterResource> Update(ResourcePatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); using var scope = _vCenterClientDiagnostics.CreateScope("VCenterResource.Update"); scope.Start(); try { var response = _vCenterRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); return(Response.FromValue(new VCenterResource(Client, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }