public virtual Response <LegalHold> ClearLegalHold(LegalHold legalHold, CancellationToken cancellationToken = default) { Argument.AssertNotNull(legalHold, nameof(legalHold)); using var scope = _blobContainerClientDiagnostics.CreateScope("BlobContainer.ClearLegalHold"); scope.Start(); try { var response = _blobContainerRestClient.ClearLegalHold(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Name, legalHold, cancellationToken); return(response); } catch (Exception e) { scope.Failed(e); throw; } }
public virtual Response <LegalHold> ClearLegalHold(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 = _restClient.ClearLegalHold(Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, legalHold, cancellationToken); return(response); } catch (Exception e) { scope.Failed(e); throw; } }