Complete the code to define a VM Scale Set resource in Azure ARM template.
"type": "Microsoft.Compute/virtualMachineScaleSets", "apiVersion": "2022-08-01", "name": "myScaleSet", "location": "eastus", "sku": { "name": "Standard_DS1_v2", "tier": "Standard", "capacity": [1] }, "properties": {}
The capacity property sets the initial number of VM instances in the scale set. Setting it to 1 means the scale set starts with one VM.
Complete the code to specify the upgrade policy mode for the VM Scale Set.
"upgradePolicy": { "mode": "[1]" }
The upgradePolicy.mode property controls how VMs are updated. Manual means updates are applied only when triggered.
Fix the error in the autoscale profile metric trigger condition.
"metricTrigger": { "metricName": "Percentage CPU", "metricNamespace": "", "timeGrain": "PT1M", "statistic": "Average", "timeWindow": "PT5M", "timeAggregation": "Average", "operator": "[1]", "threshold": 75 }
The operator GreaterThanOrEqual triggers scaling when the CPU usage is 75% or higher.
Fill both blanks to define a scale out rule that increases capacity by 1 when CPU is high.
"scaleOut": { "cooldown": "PT1M", "action": { "type": "ChangeCount", "value": "[1]", "direction": "[2]" } }
The scale out action increases the VM count by 1 when triggered.
Fill all three blanks to define a scale in rule that decreases capacity by 1 when CPU is low.
"scaleIn": { "cooldown": "PT5M", "action": { "type": "ChangeCount", "value": "[1]", "direction": "[2]", "instanceIds": [[3]] } }
The scale in action decreases the VM count by 1 and targets the instance with ID '0' for removal.