At a Glance
Goals
- Create a budget with an action that shuts down virtual machines.
Prerequisites
- You have access to a Subscription.
- 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
- Log in to the Portal.
- Create a new Automation Account. Click in the global search field, enter
Automation Accounts, and select theAutomation Accountsservice. - Click the
Createbutton. - Select your Subscription and create a new Resource Group for the Automation Account.
- In the
Advancedtab, check the boxSystem assigned. - Click
Review + Createand thenCreate. - After the Automation Account is created, navigate to it. You can click the popup
Go to resource.
Create a Runbook
- Under
Process Automation, clickRunbooks. - Click
Browse Gallery. - Select
Stop Azure V2 VMsfrom the list. - Click
Select. - Give the Runbook a name and click
Import. - Navigate to the overview of the new Runbook.
- On first import, the Runbook must be Published. Click
EditandIn portal. - Validate the logic of the Runbook and click Publish.
Create a Budget
- Navigate to your Subscription.
- Under
Cost Management, clickBudgets. - Click
Add. - Enter a name and value for the Budget and click
Next. - Under
Alert condition, enter a condition for the alert. - Click
Manage action group. - Click
Create. - Select a Subscription and Resource Group and give the Action Group a name.
- Select the
Actionstab. UnderAction type, selectAutomation Runbook. - In the new popup, select
Useras theResource type. Select your Subscription and the created Automation Account. Then select the created Runbook. You may need to enter parameters for the Runbook. ClickConfigure parameters, enter the parameters, and then clickOk. - Give the Action a name, click
Review + Create, and thenCreate.