I need the criteria that will result in throttling of disk storage in Azure.
Will high disk IOPS (how high I can see percentage in the metrics) result in throttling?
What are the factors that causes throttling in Azure disks?
# Install the Azure PowerShell module if not already installed
# Install-Module -Name Az -AllowClobber -Scope CurrentUser
# Connect to Azure
Connect-AzAccount
# Set your subscription ID
$subscriptionId = "your-subscription-id"
Select-AzSubscription -SubscriptionId $subscriptionId
# Set the resource group and VM name
$resourceGroupName = "your-resource-group"
$vmName = "your-vm-name"
# Get the VM
$vm = Get-AzVM -ResourceGroupName $resourceGroupName -Name $vmName
# Get the metrics for the VM's disks
Get-AzMetric -ResourceId $vm.Id -MetricNames "Disk Write Operations/sec", "Disk Read Operations/sec", "Disk Write Bytes/sec", "Disk Read Bytes/sec" -TimeGrain "PT1M" -StartTime (Get-Date).AddMinutes(-60) -EndTime (Get-Date)