public virtual Response <StorageQueueResource> Update(StorageQueueData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); using var scope = _storageQueueQueueClientDiagnostics.CreateScope("StorageQueueResource.Update"); scope.Start(); try { var response = _storageQueueQueueRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Name, data, cancellationToken); return(Response.FromValue(new StorageQueueResource(Client, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }
public virtual Response <StorageQueue> Update(StorageQueueData queue, CancellationToken cancellationToken = default) { if (queue == null) { throw new ArgumentNullException(nameof(queue)); } using var scope = _clientDiagnostics.CreateScope("StorageQueue.Update"); scope.Start(); try { var response = _restClient.Update(Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, queue, cancellationToken); return(Response.FromValue(new StorageQueue(this, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }