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