Costa Rica
Last updated: 2025-05-13
Using Python 3.7+
Note
Enable Autoscale IOPS via REST API, as now this is the only way to automate enabling Autoscale IOPS since, Azure CLI and PowerShell do not support this setting yet.
Important
Autoscale IOPS is only available for the General Purpose and Business Critical tiers. Burstable tier (B-series) servers (e.g., B1ms) do not support autoscale IOPS.
Overall process:
- Automatically retrieves your Azure subscription ID using the Azure CLI.
- List all Resource Groups in current subscription ID.
- Prompts you only for the resource group name.
- Lists all MySQL Flexible Servers in that resource group. Few conditions were added to review which servers are available for update.
- Sends a
PATCH requestto enableautoIoScalingfor each server using theAzure REST API
Review the script, and download it to your local machine.
Example: enabling Autoscale IOPS on two different servers, each hosted in same resource group and same subscription.
E.g.enabling.Autoscale.IOPS.on.two.different.servers.each.hosted.in.same.resource.group.and.same.subscription.mp4
You can also enable autoscale IOPS across an entire subscription, overall process:
- Listing all MySQL Flexible Servers in the subscription.
- For each server, retrieving its resource group.
- Applying the update if the server is in a supported tier (General Purpose or Business Critical).
Review the script, and download it to your local machine.
Example: enabling Autoscale IOPS on 4 different servers, each hosted in different resource group and same subscription.
- Download the script to be used to your local machine or a cloud shell environment.
- Make sure you're logged in:
az login - Run the script:
python {script-name}.py

