public async virtual Task <Response <BlobContainer> > UpdateAsync(BlobContainerData blobContainer, CancellationToken cancellationToken = default) { Argument.AssertNotNull(blobContainer, nameof(blobContainer)); using var scope = _blobContainerClientDiagnostics.CreateScope("BlobContainer.Update"); scope.Start(); try { var response = await _blobContainerRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Name, blobContainer, cancellationToken).ConfigureAwait(false); return(Response.FromValue(new BlobContainer(Client, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }
public virtual async Task <Response <BlobContainer> > UpdateAsync(BlobContainerData blobContainer, CancellationToken cancellationToken = default) { if (blobContainer == null) { throw new ArgumentNullException(nameof(blobContainer)); } using var scope = _clientDiagnostics.CreateScope("BlobContainer.Update"); scope.Start(); try { var response = await _restClient.UpdateAsync(Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, blobContainer, cancellationToken).ConfigureAwait(false); return(Response.FromValue(new BlobContainer(this, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }