running logic app error code start vm

Paul Webber 0 Reputation points
2023-08-15T13:25:48.0333333+00:00

while running a logic app to start stop a vm

im getting a internal server error during the scheduled code

code is

User's image

{
    "inputs": {
        "body": {
            "Action": "start",
            "EnableClassic": true,
            "RequestScopes": {
                "ExcludedVMLists": [],
                "ResourceGroups": [
                    "/subscriptions/xxxxxxx-xxxx-xxx-xxxx-xxxxxxxxx/resourceGroups/xxx-xx-rg/"
                ]
            }
        },
        "function": {
            "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/xxx-xx-automationV2/providers/Microsoft.Web/sites/xxx-xx-autoV2xxxxxxxxxcsls/functions/Scheduled"
        }
    }
}
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,013 questions
Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,542 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Harry Cook 5 Reputation points
    2024-01-09T20:20:51.91+00:00

    I know it's a little late but just incase it helps other users, I had exactly the same when using the copied in input from the V2 Deploy guide, when comparing it to the blank scheduled stop or start request body, I found that the copied in text had "EnableClassic": true set rather than false as per the original example. Changed this to false and it ran instantly.

    Hope this helps someone.

    1 person found this answer helpful.
    0 comments No comments

  2. Dillon Silzer 57,826 Reputation points Volunteer Moderator
    2023-08-17T16:52:10.02+00:00

    Have you tried the following deployment scripts with Start/Stop VMs v2 GitHub organization?

    Deploy feature

    https://learn.microsoft.com/en-us/azure/azure-functions/start-stop-vms/deploy#deploy-feature

    Or did you build your own flow from scratch?


    If this is helpful please accept answer.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.