0
0
Azurecloud~10 mins

Azure Cost Management and Billing - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a cost management budget in Azure using ARM template.

Azure
{
  "type": "Microsoft.Consumption/budgets",
  "apiVersion": "2021-10-01",
  "name": "MyBudget",
  "properties": {
    "category": "Cost",
    "amount": [1],
    "timeGrain": "Monthly"
  }
}
Drag options to blanks, or click blank then click option'
A1000
B"1000"
Ctrue
Dnull
Attempts:
3 left
💡 Hint
Common Mistakes
Using quotes around the number, making it a string.
Setting amount to true or null which are invalid.
2fill in blank
medium

Complete the Azure CLI command to show the cost for a subscription.

Azure
az costmanagement query --type Usage --scope /subscriptions/[1] --timeframe MonthToDate
Drag options to blanks, or click blank then click option'
AresourceGroupName
BresourceId
CsubscriptionId
DbillingAccountName
Attempts:
3 left
💡 Hint
Common Mistakes
Using resource group name instead of subscription ID.
Using billing account name which is not valid here.
3fill in blank
hard

Fix the error in the ARM template snippet to correctly define a cost alert rule.

Azure
"properties": {
  "threshold": [1],
  "thresholdType": "Percentage",
  "timeAggregation": "Total"
}
Drag options to blanks, or click blank then click option'
A"80"
B80
C"eighty"
Dtrue
Attempts:
3 left
💡 Hint
Common Mistakes
Putting the number in quotes, making it a string.
Using words like 'eighty' or boolean values.
4fill in blank
hard

Fill both blanks to create a cost management export that runs daily and stores data in a storage account.

Azure
{
  "type": "Microsoft.CostManagement/exports",
  "apiVersion": "2021-10-01",
  "name": "DailyExport",
  "properties": {
    "schedule": {
      "frequency": "[1]"
    },
    "deliveryInfo": {
      "destination": {
        "storageAccountId": "[2]"
      }
    }
  }
}
Drag options to blanks, or click blank then click option'
ADaily
BWeekly
C/subscriptions/12345/resourceGroups/myRG/providers/Microsoft.Storage/storageAccounts/myStorage
D/subscriptions/12345/resourceGroups/myRG/providers/Microsoft.Compute/virtualMachines/myVM
Attempts:
3 left
💡 Hint
Common Mistakes
Setting frequency to Weekly when daily export is needed.
Using a virtual machine resource ID instead of a storage account.
5fill in blank
hard

Fill all three blanks to define a cost alert rule that triggers when cost exceeds a threshold in a subscription.

Azure
{
  "type": "Microsoft.Consumption/alerts",
  "apiVersion": "2021-10-01",
  "name": "CostAlert",
  "properties": {
    "scope": "/subscriptions/[1]",
    "threshold": [2],
    "thresholdType": "[3]"
  }
}
Drag options to blanks, or click blank then click option'
AresourceGroup1
Bsubscription123
CPercentage
D100
Attempts:
3 left
💡 Hint
Common Mistakes
Using a resource group name instead of subscription ID for scope.
Setting threshold as a string or using incorrect thresholdType.