Thank you for this tutorial. I was able to create an auto-scale Logic App based on the information you provided. I encountered (and resolved) two smallish issues in my build. First, our capacity administrators list was getting deleted every time the Logic App ran. It turns out that the "Create or update a resource" action overwrites the capacity. If you have tags or administrators set up, they get erased. The reason is that the action executes a "PUT" command on the API. You can get around this by calling the API via an HTTP action and using a "PATCH" command. The second issue I had was querying the metrics to see how close we were to the limits. I discovered that that step fails if the capacity is already past the limits -- that is fairly likely to happen if you start at F2. I fixed it by having the capacity go to the next level if that step fails. My Logic App does not allow the auto-scale to exceed a specified maximum, even when that step fails.
Thank you for this tutorial. I was able to create an auto-scale Logic App based on the information you provided. I encountered (and resolved) two smallish issues in my build. First, our capacity administrators list was getting deleted every time the Logic App ran. It turns out that the "Create or update a resource" action overwrites the capacity. If you have tags or administrators set up, they get erased. The reason is that the action executes a "PUT" command on the API. You can get around this by calling the API via an HTTP action and using a "PATCH" command. The second issue I had was querying the metrics to see how close we were to the limits. I discovered that that step fails if the capacity is already past the limits -- that is fairly likely to happen if you start at F2. I fixed it by having the capacity go to the next level if that step fails. My Logic App does not allow the auto-scale to exceed a specified maximum, even when that step fails.
This is gold!