1

Cannot find a way how to create or delete Availability Test with C# Azure SDK. I don't see anything in the fluent SDK and traditional either. I've managed to create Availability Test programmatically by using ARM template and running it with C# code.

Unfortunately, no clue how to delete such resource. Any advice?

elklusek
  • 49
  • 7
  • do you mean `Application Insights Availability Test`? – Ivan Glasenberg Jan 08 '21 at 01:08
  • Hello, if my answer is helpful, could you please accept it as answer, as per [this link](https://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work?answertab=active#tab-top)? thanks:). – Ivan Glasenberg Jan 27 '21 at 07:13

2 Answers2

0

If you mean Application Insights Availability Test, then there is a preview package for Application Insights management: Microsoft.Azure.Management.ApplicationInsights.

After installing this package:

To create Availability Test, you can follow add a new web test to create it.

To delete Availability Test, you can follow delete web test to delete it.

I didn't test the code above, but if you encounter any issues, please let me know.

Another way is that you can use the Web Tests rest api to create or delete it accordingly.

Ivan Glasenberg
  • 29,865
  • 2
  • 44
  • 60
0

It seems like there is an SDK (not fluent) which allows to perform several operations over Application Insights and Availability Tests (Web Tests). The nuget is called Microsoft.Azure.Management.ApplicationInsights (currently version 0.3.0-preview).

It has quite nice way to delete Web Test but when it comes to creating WebTest it requires in the web test configuration a XML which seems to be not that elegant solutions as some might expect.

Anyway, it's doable with some SDK to make it programmatically.

elklusek
  • 49
  • 7