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

Dokumentationen

Budget with Automated Actions

At a Glance

Goals

  1. You are able to create a budget with an action that shuts down virtual machines.

Prerequisites

  1. Access to a Subscription is available.
  2. The Unibe-Subscription-Owner (mg-unibe) role for the Subscription is available.

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 Create.
  4. Select the 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 by clicking Go to resource in the popup.

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 the 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 the Subscription and the created Automation Account. Then select the created Runbook. If parameters are required for the Runbook, click Configure parameters, enter the parameters, and click Ok.
  11. Give the Action Group a name, click Review + Create, and then Create.