Network Rules in Azure
Read the Microsoft article first.
Note this is possible from Azure PowerShell
Add
az storage account network-rule add --resource-group MyResourceGroup --account-name mystorageaccount --ip-address 23.45.1.0/24
# or
az storage account network-rule add --resource-group MyResourceGroup --account-name mystorageaccount --vnet myvnet --subnet mysubnet
List
az storage account network-rule list --account-name mystorageaccount --resource-group MyResourceGroup
Also possible via the Azure CLI
# List virtual network rules
#
az storage account network-rule list --resource-group "myresourcegroup" --account-name "mystorageaccount" --query virtualNetworkRules
# Enable service endpoint for Azure Storage on an existing virtual network and subnet
#
az network vnet subnet update --resource-group "myresourcegroup" --vnet-name "myvnet" --name "mysubnet" --service-endpoints "Microsoft.Storage"
# Add a network rule for a virtual network and subnet
#
$subnetid=(az network vnet subnet show --resource-group "myresourcegroup" --vnet-name "myvnet" --name "mysubnet" --query id --output tsv)
az storage account network-rule add --resource-group "myresourcegroup" --account-name "mystorageaccount" --subnet $subnetid
# Remove a network rule for a virtual network and subnet
#
$subnetid=(az network vnet subnet show --resource-group "myresourcegroup" --vnet-name "myvnet" --name "mysubnet" --query id --output tsv)
az storage account network-rule remove --resource-group "myresourcegroup" --account-name "mystorageaccount" --subnet $subnetid
And similary for IP addresses
# List IP network rules.
#
az storage account network-rule list --resource-group "myresourcegroup" --account-name "mystorageaccount" --query ipRules
# Add a network rule for an individual IP address.
#
az storage account network-rule add --resource-group "myresourcegroup" --account-name "mystorageaccount" --ip-address "16.17.18.19"
# Add a network rule for an IP address range.
#
az storage account network-rule add --resource-group "myresourcegroup" --account-name "mystorageaccount" --ip-address "16.17.18.0/24"
# Remove a network rule for an individual IP address.
#
az storage account network-rule remove --resource-group "myresourcegroup" --account-name "mystorageaccount" --ip-address "16.17.18.19"
# Remove a network rule for an IP address range.
#
az storage account network-rule remove --resource-group "myresourcegroup" --account-name "mystorageaccount" --ip-address "16.17.18.0/24"