Complete the code to create a cost management budget in Azure using ARM template.
{
"type": "Microsoft.Consumption/budgets",
"apiVersion": "2021-10-01",
"name": "MyBudget",
"properties": {
"category": "Cost",
"amount": [1],
"timeGrain": "Monthly"
}
}The amount property expects a numeric value representing the budget limit. Using 1000 sets the budget to 1000 units of your currency.
Complete the Azure CLI command to show the cost for a subscription.
az costmanagement query --type Usage --scope /subscriptions/[1] --timeframe MonthToDateThe --scope parameter requires the subscription ID when querying cost management data for a subscription.
Fix the error in the ARM template snippet to correctly define a cost alert rule.
"properties": { "threshold": [1], "thresholdType": "Percentage", "timeAggregation": "Total" }
The threshold property expects a numeric value without quotes. Using 80 sets the alert threshold to 80%.
Fill both blanks to create a cost management export that runs daily and stores data in a storage account.
{
"type": "Microsoft.CostManagement/exports",
"apiVersion": "2021-10-01",
"name": "DailyExport",
"properties": {
"schedule": {
"frequency": "[1]"
},
"deliveryInfo": {
"destination": {
"storageAccountId": "[2]"
}
}
}
}The frequency must be set to "Daily" to run the export every day. The resourceId must point to a storage account where the export data will be saved.
Fill all three blanks to define a cost alert rule that triggers when cost exceeds a threshold in a subscription.
{
"type": "Microsoft.Consumption/alerts",
"apiVersion": "2021-10-01",
"name": "CostAlert",
"properties": {
"scope": "/subscriptions/[1]",
"threshold": [2],
"thresholdType": "[3]"
}
}The scope must be the subscription ID. The threshold is set to 100 units, and the thresholdType is "Percentage" to trigger when cost exceeds 100%.