public virtual async Task <Response <RouteTableResource> > UpdateAsync(TagsObject tagsObject, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tagsObject, nameof(tagsObject)); using var scope = _routeTableClientDiagnostics.CreateScope("RouteTableResource.Update"); scope.Start(); try { var response = await _routeTableRestClient.UpdateTagsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, tagsObject, cancellationToken).ConfigureAwait(false); return(Response.FromValue(new RouteTableResource(Client, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }
public virtual async Task <Response <RouteTable> > UpdateTagsAsync(TagsObject parameters, CancellationToken cancellationToken = default) { if (parameters == null) { throw new ArgumentNullException(nameof(parameters)); } using var scope = _clientDiagnostics.CreateScope("RouteTable.UpdateTags"); scope.Start(); try { var response = await _restClient.UpdateTagsAsync(Id.ResourceGroupName, Id.Name, parameters, cancellationToken).ConfigureAwait(false); return(Response.FromValue(new RouteTable(this, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }