I'm automating the creation of Azure web apps using the management SDK (ie 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?
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:
You can change the pricing tier from the Portal
WebApps -> Select the Web App -> Scale -> Choose the desired Pricing Tier.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.