public virtual Response <IPAllocationResource> Update(TagsObject tagsObject, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tagsObject, nameof(tagsObject)); using var scope = _ipAllocationIpAllocationsClientDiagnostics.CreateScope("IPAllocationResource.Update"); scope.Start(); try { var response = _ipAllocationIpAllocationsRestClient.UpdateTags(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, tagsObject, cancellationToken); return(Response.FromValue(new IPAllocationResource(Client, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }
public virtual Response <IpAllocation> Update(TagsObject parameters, CancellationToken cancellationToken = default) { if (parameters == null) { throw new ArgumentNullException(nameof(parameters)); } using var scope = _clientDiagnostics.CreateScope("IpAllocation.Update"); scope.Start(); try { var response = _ipAllocationsRestClient.UpdateTags(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, parameters, cancellationToken); return(Response.FromValue(new IpAllocation(this, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }