public virtual Response <JitRequestDefinition> Update(IDictionary <string, string> tags = null, CancellationToken cancellationToken = default) { using var scope = _clientDiagnostics.CreateScope("JitRequestDefinition.Update"); scope.Start(); try { var response = _restClient.Update(Id.ResourceGroupName, Id.Name, tags, cancellationToken); return(Response.FromValue(new JitRequestDefinition(this, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }
public virtual Response <JitRequestResource> Update(JitRequestPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); using var scope = _jitRequestClientDiagnostics.CreateScope("JitRequestResource.Update"); scope.Start(); try { var response = _jitRequestRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); return(Response.FromValue(new JitRequestResource(Client, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }