Skip to content

Commit 31d24e1

Browse files
Update storage-how-to-create-file-share.md
move region supportability section to the bottom as requested by the team.
1 parent b66d933 commit 31d24e1

File tree

1 file changed

+109
-111
lines changed

1 file changed

+109
-111
lines changed

articles/storage/files/storage-how-to-create-file-share.md

Lines changed: 109 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -53,117 +53,6 @@ Storage accounts have two properties, kind and SKU, which dictate the billing mo
5353

5454
If you're creating an HDD file share, you can choose between the provisioned v2 and pay-as-you-go billing models. Both models are fully supported, however, we recommend provisioned v2 for new file share deployments. Provisioned v2 file shares are currently available in a limited subset of regions; see [provisioned v2 availability](./understanding-billing.md#provisioned-v2-availability) for more information.
5555

56-
### Region supportability base on different billing models
57-
# [Portal](#tab/azure-portal)
58-
To view region supportability based on different billing models, use Azure PowerShell or Azure CLI.
59-
60-
# [PowerShell](#tab/azure-powershell)
61-
### Region supportability on different billing models (PowerShell)
62-
```powershell
63-
# Login to Azure account
64-
Connect-AzAccount
65-
66-
# Track down the subscription ID in GUID format
67-
$subscriptionID = "your-subscription-id-number"
68-
69-
# Get Token
70-
$token = Get-AzAccessToken
71-
72-
# Invoke SRP list SKU API, and get the returned SKU list
73-
$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)"}
74-
75-
# Filter the SKU list to get the required information, customization requried here to get the best result.
76-
$filteredResult = $result | `
77-
Select-Object -ExpandProperty value | `
78-
Where-Object {
79-
$_.resourceType -eq "storageAccounts" -and
80-
# Filter based on your needs. FileStorage kind includes pv2, and pv1 file share, where StorageV2 kind include PayGO file shares.
81-
$_.kind -in @("FileStorage", "StorageV2") -and
82-
# Filter based on your needs. "Standard_" for PayGO file share, "StandardV2_" for Pv2 file share, "Premium_" for pv1 file shares.
83-
# $_.name.StartsWith("StandardV2_") -and
84-
# Change region based on your need to see if we currently support the region (all small cases, no space in between).
85-
# $_.locations -eq "italynorth" -and
86-
$_.name -notin @("Standard_RAGRS", "Standard_RAGZRS")
87-
}
88-
89-
if ($filteredResult.Count -eq 0) {
90-
Write-Output "No results found."
91-
} else {
92-
$filteredResult | `
93-
Select-Object `
94-
-Property `
95-
@{
96-
Name = "sku";
97-
Expression = { $_.name }
98-
}, `
99-
kind, `
100-
@{
101-
Name = "mediaTier";
102-
Expression = {
103-
if ($_.tier -eq "Premium") {
104-
"SSD"
105-
} elseif ($_.tier -eq "Standard") {
106-
"HDD"
107-
} else {
108-
"Unknown"
109-
}
110-
}
111-
}, `
112-
@{
113-
Name = "billingModel";
114-
Expression = {
115-
if ($_.name.StartsWith("StandardV2_") -or
116-
$_.name.StartsWith("PremiumV2_")
117-
) {
118-
"ProvisionedV2"
119-
} elseif ($_.name.StartsWith("Premium_")) {
120-
"ProvisionedV1"
121-
} else {
122-
"PayAsYouGo"
123-
}
124-
}
125-
}, `
126-
@{
127-
Name = "location";
128-
Expression = { $_.locations | Select-Object -First 1 }
129-
} | ft sku, kind, mediaTier, billingModel, location
130-
}
131-
```
132-
133-
# [Azure CLI](#tab/azure-cli)
134-
### Region supportability on different billing models (Azure CLI)
135-
This script uses jq command line JSON processor. To download it, visit https://jqlang.org/download/
136-
```bash
137-
# Login to Azure account
138-
Az login
139-
140-
# Track down the subscription ID in GUID format and set subscription ID
141-
subscriptionID="your-subscription-id-number"
142-
143-
# Get Token
144-
token=$(az account get-access-token --query accessToken --output tsv)
145-
146-
# Invoke SRP list SKU API, and get the returned SKU list
147-
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")
148-
149-
# Filter the SKU list to get the required information, customization required here to get the best result.
150-
filteredResult=$(echo $result | jq '.value[] | select(.resourceType == "storageAccounts" and (.kind == "FileStorage" or .kind == "StorageV2") and (.name | test("^(?!Standard_RAGRS|Standard_RAGZRS)")))' )
151-
152-
if [ -z "$filteredResult" ]; then
153-
echo "No results found."
154-
else
155-
# Print the table header
156-
printf "%-30s %-15s %-10s %-20s %-15s\n" "SKU" "Kind" "MediaTier" "BillingModel" "Location"
157-
# Print the filtered results
158-
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
159-
printf "%-30s %-15s %-10s %-20s %-15s\n" "$sku" "$kind" "$mediaTier" "$billingModel" "$location"
160-
done
161-
fi
162-
```
163-
164-
---
165-
166-
### Storage account creation
16756
# [Portal](#tab/azure-portal)
16857
To create a storage account via the Azure portal, use the search box at the top of the Azure portal to search for **storage accounts** and select the matching result.
16958

@@ -937,6 +826,115 @@ az storage share-rm delete \
937826

938827
---
939828

829+
## Region supportability base on different billing models
830+
You can verify region supportability for various billing models using the following commands.
831+
# [Portal](#tab/azure-portal)
832+
To view region supportability based on different billing models, use Azure PowerShell or Azure CLI.
833+
834+
# [PowerShell](#tab/azure-powershell)
835+
```powershell
836+
# Login to Azure account
837+
Connect-AzAccount
838+
839+
# Track down the subscription ID in GUID format
840+
$subscriptionID = "your-subscription-id-number"
841+
842+
# Get Token
843+
$token = Get-AzAccessToken
844+
845+
# Invoke SRP list SKU API, and get the returned SKU list
846+
$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)"}
847+
848+
# Filter the SKU list to get the required information, customization requried here to get the best result.
849+
$filteredResult = $result | `
850+
Select-Object -ExpandProperty value | `
851+
Where-Object {
852+
$_.resourceType -eq "storageAccounts" -and
853+
# Filter based on your needs. FileStorage kind includes pv2, and pv1 file share, where StorageV2 kind include PayGO file shares.
854+
$_.kind -in @("FileStorage", "StorageV2") -and
855+
# Filter based on your needs. "Standard_" for PayGO file share, "StandardV2_" for Pv2 file share, "Premium_" for pv1 file shares.
856+
# $_.name.StartsWith("StandardV2_") -and
857+
# Change region based on your need to see if we currently support the region (all small cases, no space in between).
858+
# $_.locations -eq "italynorth" -and
859+
$_.name -notin @("Standard_RAGRS", "Standard_RAGZRS")
860+
}
861+
862+
if ($filteredResult.Count -eq 0) {
863+
Write-Output "No results found."
864+
} else {
865+
$filteredResult | `
866+
Select-Object `
867+
-Property `
868+
@{
869+
Name = "sku";
870+
Expression = { $_.name }
871+
}, `
872+
kind, `
873+
@{
874+
Name = "mediaTier";
875+
Expression = {
876+
if ($_.tier -eq "Premium") {
877+
"SSD"
878+
} elseif ($_.tier -eq "Standard") {
879+
"HDD"
880+
} else {
881+
"Unknown"
882+
}
883+
}
884+
}, `
885+
@{
886+
Name = "billingModel";
887+
Expression = {
888+
if ($_.name.StartsWith("StandardV2_") -or
889+
$_.name.StartsWith("PremiumV2_")
890+
) {
891+
"ProvisionedV2"
892+
} elseif ($_.name.StartsWith("Premium_")) {
893+
"ProvisionedV1"
894+
} else {
895+
"PayAsYouGo"
896+
}
897+
}
898+
}, `
899+
@{
900+
Name = "location";
901+
Expression = { $_.locations | Select-Object -First 1 }
902+
} | ft sku, kind, mediaTier, billingModel, location
903+
}
904+
```
905+
906+
# [Azure CLI](#tab/azure-cli)
907+
This script uses jq command line JSON processor. To download it, visit https://jqlang.org/download/
908+
```bash
909+
# Login to Azure account
910+
Az login
911+
912+
# Track down the subscription ID in GUID format and set subscription ID
913+
subscriptionID="your-subscription-id-number"
914+
915+
# Get Token
916+
token=$(az account get-access-token --query accessToken --output tsv)
917+
918+
# Invoke SRP list SKU API, and get the returned SKU list
919+
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")
920+
921+
# Filter the SKU list to get the required information, customization required here to get the best result.
922+
filteredResult=$(echo $result | jq '.value[] | select(.resourceType == "storageAccounts" and (.kind == "FileStorage" or .kind == "StorageV2") and (.name | test("^(?!Standard_RAGRS|Standard_RAGZRS)")))' )
923+
924+
if [ -z "$filteredResult" ]; then
925+
echo "No results found."
926+
else
927+
# Print the table header
928+
printf "%-30s %-15s %-10s %-20s %-15s\n" "SKU" "Kind" "MediaTier" "BillingModel" "Location"
929+
# Print the filtered results
930+
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
931+
printf "%-30s %-15s %-10s %-20s %-15s\n" "$sku" "$kind" "$mediaTier" "$billingModel" "$location"
932+
done
933+
fi
934+
```
935+
936+
---
937+
940938
## Next steps
941939
- [Planning for an Azure Files deployment](storage-files-planning.md) or [Planning for an Azure File Sync deployment](../file-sync/file-sync-planning.md).
942940
- [Azure Files networking overview](storage-files-networking-overview.md).

0 commit comments

Comments
 (0)