public virtual Response <ImmutabilityPolicy> ExtendImmutabilityPolicy(string ifMatch, ImmutabilityPolicyData parameters = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(ifMatch, nameof(ifMatch)); using var scope = _immutabilityPolicyBlobContainersClientDiagnostics.CreateScope("ImmutabilityPolicy.ExtendImmutabilityPolicy"); scope.Start(); try { var response = _immutabilityPolicyBlobContainersRestClient.ExtendImmutabilityPolicy(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Name, ifMatch, parameters, cancellationToken); return(Response.FromValue(new ImmutabilityPolicy(Client, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }
public virtual Response <ImmutabilityPolicy> ExtendImmutabilityPolicy(string ifMatch, ImmutabilityPolicy parameters = null, CancellationToken cancellationToken = default) { if (ifMatch == null) { throw new ArgumentNullException(nameof(ifMatch)); } using var scope = _clientDiagnostics.CreateScope("BlobContainer.ExtendImmutabilityPolicy"); scope.Start(); try { var response = _restClient.ExtendImmutabilityPolicy(Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, parameters, cancellationToken); return(response); } catch (Exception e) { scope.Failed(e); throw; } }