Skip to content

Commit f0ff5fd

Browse files
Update files-redundancy.md
move the region supportability script to data redundancy page.
1 parent 4280efd commit f0ff5fd

File tree

1 file changed

+108
-1
lines changed

1 file changed

+108
-1
lines changed

articles/storage/files/files-redundancy.md

Lines changed: 108 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Understand the data redundancy options available in Azure file shar
44
author: khdownie
55
ms.service: azure-file-storage
66
ms.topic: concept-article
7-
ms.date: 03/27/2025
7+
ms.date: 05/20/2025
88
ms.author: kendownie
99
ms.custom: references_regions
1010
---
@@ -194,6 +194,113 @@ The following table indicates whether your data is durable and available in a gi
194194

195195
For pricing information for each redundancy option, see [Azure Files pricing](https://azure.microsoft.com/pricing/details/storage/files/).
196196

197+
## Region supportability base on different billing models
198+
You can verify region supportability for various billing models using the following commands.
199+
# [Portal](#tab/azure-portal)
200+
To view region supportability based on different billing models, use Azure PowerShell or Azure CLI.
201+
202+
# [PowerShell](#tab/azure-powershell)
203+
```powershell
204+
# Login to Azure account
205+
Connect-AzAccount
206+
207+
# Track down the subscription ID in GUID format
208+
$subscriptionID = "your-subscription-id-number"
209+
210+
# Get Token
211+
$token = Get-AzAccessToken
212+
213+
# Invoke SRP list SKU API, and get the returned SKU list
214+
$result = Invoke-RestMethod -Method Get -Uri "https://management.azure.com/subscriptions/$($subscriptionID)/providers/Microsoft.Storage/skus?api-version=2024-01-01" -Headers @{"Authorization" = "Bearer $($token.Token)"}
215+
216+
# Filter the SKU list to get the required information, customization requried here to get the best result.
217+
$filteredResult = $result | `
218+
Select-Object -ExpandProperty value | `
219+
Where-Object {
220+
$_.resourceType -eq "storageAccounts" -and
221+
# Filter based on your needs. FileStorage kind includes pv2, and pv1 file share, where StorageV2 kind include PayGO file shares.
222+
$_.kind -in @("FileStorage", "StorageV2") -and
223+
# Filter based on your needs. "Standard_" for PayGO file share, "StandardV2_" for Pv2 file share, "Premium_" for pv1 file shares.
224+
# $_.name.StartsWith("StandardV2_") -and
225+
# Change region based on your need to see if we currently support the region (all small cases, no space in between).
226+
# $_.locations -eq "italynorth" -and
227+
$_.name -notin @("Standard_RAGRS", "Standard_RAGZRS")
228+
}
229+
230+
if ($filteredResult.Count -eq 0) {
231+
Write-Output "No results found."
232+
} else {
233+
$filteredResult | `
234+
Select-Object `
235+
-Property `
236+
@{
237+
Name = "sku";
238+
Expression = { $_.name }
239+
}, `
240+
kind, `
241+
@{
242+
Name = "mediaTier";
243+
Expression = {
244+
if ($_.tier -eq "Premium") {
245+
"SSD"
246+
} elseif ($_.tier -eq "Standard") {
247+
"HDD"
248+
} else {
249+
"Unknown"
250+
}
251+
}
252+
}, `
253+
@{
254+
Name = "billingModel";
255+
Expression = {
256+
if ($_.name.StartsWith("StandardV2_") -or
257+
$_.name.StartsWith("PremiumV2_")
258+
) {
259+
"ProvisionedV2"
260+
} elseif ($_.name.StartsWith("Premium_")) {
261+
"ProvisionedV1"
262+
} else {
263+
"PayAsYouGo"
264+
}
265+
}
266+
}, `
267+
@{
268+
Name = "location";
269+
Expression = { $_.locations | Select-Object -First 1 }
270+
} | ft sku, kind, mediaTier, billingModel, location
271+
}
272+
```
273+
274+
# [Azure CLI](#tab/azure-cli)
275+
This script uses jq command line JSON processor. To download it, visit https://jqlang.org/download/
276+
```bash
277+
# Login to Azure account
278+
Az login
279+
280+
# Track down the subscription ID in GUID format and set subscription ID
281+
subscriptionID="your-subscription-id-number"
282+
283+
# Get Token
284+
token=$(az account get-access-token --query accessToken --output tsv)
285+
286+
# Invoke SRP list SKU API, and get the returned SKU list
287+
result=$(az rest --method get --uri "https://management.azure.com/subscriptions/$subscriptionID/providers/Microsoft.Storage/skus?api-version=2024-01-01" --headers "Authorization=Bearer $token")
288+
289+
# Filter the SKU list to get the required information, customization required here to get the best result.
290+
filteredResult=$(echo $result | jq '.value[] | select(.resourceType == "storageAccounts" and (.kind == "FileStorage" or .kind == "StorageV2") and (.name | test("^(?!Standard_RAGRS|Standard_RAGZRS)")))' )
291+
292+
if [ -z "$filteredResult" ]; then
293+
echo "No results found."
294+
else
295+
# Print the table header
296+
printf "%-30s %-15s %-10s %-20s %-15s\n" "SKU" "Kind" "MediaTier" "BillingModel" "Location"
297+
# Print the filtered results
298+
echo $filteredResult | jq -r '. | "\(.name)\t\(.kind)\t\(.tier | if . == "Premium" then "SSD" elif . == "Standard" then "HDD" else "Unknown" end)\t\(.name | if test("^StandardV2_|^PremiumV2_") then "ProvisionedV2" elif test("^Premium_") then "ProvisionedV1" else "PayAsYouGo" end)\t\(.locations)"' | while IFS=$'\t' read -r sku kind mediaTier billingModel location; do
299+
printf "%-30s %-15s %-10s %-20s %-15s\n" "$sku" "$kind" "$mediaTier" "$billingModel" "$location"
300+
done
301+
fi
302+
```
303+
197304
## See also
198305

199306
- [Change the redundancy option for a storage account](../common/redundancy-migration.md?toc=/azure/storage/files/toc.json)

0 commit comments

Comments
 (0)