Beispiel #1
0
 public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default)
 {
     using var scope = _subscriptionPolicyDefinitionPolicyDefinitionsClientDiagnostics.CreateScope("SubscriptionPolicyDefinition.Delete");
     scope.Start();
     try
     {
         var response  = _subscriptionPolicyDefinitionPolicyDefinitionsRestClient.Delete(Id.SubscriptionId, Id.Name, cancellationToken);
         var operation = new ResourcesArmOperation(response);
         if (waitUntil == WaitUntil.Completed)
         {
             operation.WaitForCompletionResponse(cancellationToken);
         }
         return(operation);
     }
     catch (Exception e)
     {
         scope.Failed(e);
         throw;
     }
 }