public virtual ArmOperation Delete(bool waitForCompletion, CancellationToken cancellationToken = default) { using var scope = _appServicePlanClientDiagnostics.CreateScope("AppServicePlan.Delete"); scope.Start(); try { var response = _appServicePlanRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); var operation = new AppServiceArmOperation(response); if (waitForCompletion) { operation.WaitForCompletionResponse(cancellationToken); } return(operation); } catch (Exception e) { scope.Failed(e); throw; } }