Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure management API: How to change web app pricing tier?

I'm automating the creation of Azure web apps using the management SDK (i.e. https://github.com/Azure/azure-sdk-for-net) and it's not obvious how to change a web apps app service plan pricing tier using this SDK. Specifically I want to change the web apps I'm creating from 'Free' to 'Shared'.

How can I do this?

like image 908
Ian Newson Avatar asked Nov 10 '22 13:11

Ian Newson


1 Answers

Look at WebHostingPlanOperations.UpdateAsync() (WebHostingPlanOperations.cs).

Notice that it takes a WebHostingPlanUpdateParameters object as a parameter (located in Models, here). Within that, you can set:

  • WorkerSize (0, 1, or 2 for Small, Medium or Large)
  • SkuOptions (which takes a SkuOptions enum, also in Models, here).

SkuOptions values:

  • Free = 0
  • Shared = 1
  • Basic = 2
  • Standard = 3
  • Premium = 4
like image 177
David Makogon Avatar answered Nov 14 '22 21:11

David Makogon