1. Dokumentationen
  2. Cloud
  3. Azure
  4. Tutorials
  5. Budget with Automated Actions

Dokumentationen

Budget with Automated Actions

At a Glance

Goals

  1. Create a budget with an action that shuts down virtual machines.

Prerequisites

  1. You have access to a Subscription.
  2. You have the Unibe-Subscription-Owner (mg-unibe) role for this Subscription.

Note

This guide was created with the language setting set to English. Therefore, the screenshots shown may differ from your device if you have a different language set.

Create an Automation Account

  1. Log in to the Portal.
  2. Create a new Automation Account. Click in the global search field, enter Automation Accounts, and select the Automation Accounts service.
  3. Click the Create button.
  4. Select your Subscription and create a new Resource Group for the Automation Account.
  5. In the Advanced tab, check the box System assigned.
  6. Click Review + Create and then Create.
  7. After the Automation Account is created, navigate to it. You can click the popup Go to resource.

Create a Runbook

  1. Under Process Automation, click Runbooks.
  2. Click Browse Gallery.
  3. Select Stop Azure V2 VMs from the list.
  4. Click Select.
  5. Give the Runbook a name and click Import.
  6. Navigate to the overview of the new Runbook.
  7. On first import, the Runbook must be Published. Click Edit and In portal.
  8. Validate the logic of the Runbook and click Publish.

Create a Budget

  1. Navigate to your Subscription.
  2. Under Cost Management, click Budgets.
  3. Click Add.
  4. Enter a name and value for the Budget and click Next.
  5. Under Alert condition, enter a condition for the alert.
  6. Click Manage action group.
  7. Click Create.
  8. Select a Subscription and Resource Group and give the Action Group a name.
  9. Select the Actions tab. Under Action type, select Automation Runbook.
  10. In the new popup, select User as the Resource type. Select your Subscription and the created Automation Account. Then select the created Runbook. You may need to enter parameters for the Runbook. Click Configure parameters, enter the parameters, and then click Ok.
  11. Give the Action a name, click Review + Create, and then Create.