public virtual Response <EventHubNamespaceResource> Update(EventHubNamespaceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); using var scope = _eventHubNamespaceClientDiagnostics.CreateScope("EventHubNamespaceResource.Update"); scope.Start(); try { var response = _eventHubNamespaceRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data, cancellationToken); return(Response.FromValue(new EventHubNamespaceResource(Client, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }
public virtual Response <EventHubNamespace> Update(EventHubNamespaceData parameters, CancellationToken cancellationToken = default) { if (parameters == null) { throw new ArgumentNullException(nameof(parameters)); } using var scope = _eventHubNamespaceClientDiagnostics.CreateScope("EventHubNamespace.Update"); scope.Start(); try { var response = _eventHubNamespaceRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, parameters, cancellationToken); return(Response.FromValue(new EventHubNamespace(ArmClient, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }