Search code examples
azurefunctionsignalrscale

signalr - programatically scaling up (from azure function)


Trying to figure out a good way to scale up/down (ex: from Free to Standard) a SignalR Service programmatically from an Azure timer Function (C#). The function has a managed identity with the Contributor role to the SignalR Service already.

Any thoughts on how to do this and what Nuget libraries would be best? Examples with a managed identity would be helpful.

Thanks in advance!


Solution

  • Since this is a resource (control plane) level change, you will need to use the Azure.ResourceManager.SignalR SDK which supports Managed Identity.

    In your scenario, I assume you have the Resource ID, so you can use the SDK to fetch the latest configuration and perform updates as shown here.

    Do note the following warning that the Azure Portal has for converting between Free and other tiers of Azure SignalR Service

    enter image description here