question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[QUERY] Update the SKU of an App Service Plan

See original GitHub issue

Library name and version

Azure.ResourceManager.AppService 1.0.0-beta.2

Query/Question

How can you update the SKU of an App Service Plan? I don’t see any property in the AppServicePlanPatch object to pass it? I’ve tried setting the WorkerTierName to “EP2” but that results in an error:

{"Code":"BadRequest","Message":"The parameter SKU cannot be null.","Target":null,"Details":[{"Message":"The parameter SKU cannot be null."},{"Code":"BadRequest"},{"ErrorEntity":{"MessageTemplate":"The parameter {0} cannot be null.","Parameters":["SKU"],"Code":"BadRequest","Message":"The parameter SKU cannot be null."}}],"Innererror":null}

Full code sample:

var armClient = new ArmClient(new AzureCliCredential());
SubscriptionResource subscription = await armClient.GetSubscriptions().GetAsync("****");
ResourceGroupResource resourceGroup = await subscription.GetResourceGroupAsync("****");
AppServicePlanResource appServicePlan = await resourceGroup.GetAppServicePlanAsync("****");
var patch = new AppServicePlanPatch {WorkerTierName = "EP2"};
var result = await appServicePlan.UpdateAsync(patch);

Environment

Running on Windows 10 with dotnet 6.0.301

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
ransagycommented, Aug 17, 2022

Same question; I was hoping to use this SDK to scale app service plans programatically by patching the SKU.Capacity properties. Is that possible?

1reaction
adugglebycommented, Nov 14, 2022

Any news here after the 1.0.0 release? Are there any samples on how to use AppServicePlanPatch? I get the same SKU error even just setting MaximumElasticWorkerCount on AppServicePlanPatch.

Read more comments on GitHub >

github_iconTop Results From Across the Web

az appservice plan
Update an object by specifying a property path and value to set. Example: --set property1.property2=. default value: []. --sku. The pricing tiers, ...
Read more >
App Service Plans - Update - REST API (Azure App Service)
Description for Creates or updates an App Service Plan. ... Apps in this plan will scale as if the ServerFarm was ElasticPremium sku....
Read more >
Change App Service Plan from Isolated to Isolated V2 Plan ...
You can try the following: (1) Provision the new Isolated V2 Service Plan; (2) Export the existent WebApp ARM template in Azure Portal;...
Read more >
Announcing Larger SKUs for App Service Environment v3
You can create new plans and scale in the Azure portal with the new SKUs. The new SKUs are not available if you...
Read more >
Azure Permissions
Queries the permissions list from the assigned custom role ... Gets a list of web apps that are part of App Service plans....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found