az storage account network-rule

Manage network rules.

Commands

az storage account network-rule add Add a network rule.
az storage account network-rule list List network rules.
az storage account network-rule remove Remove a network rule.

az storage account network-rule add

Add a network rule.

az storage account network-rule add --account-name
[--action]
[--ip-address]
[--resource-group]
[--subnet]
[--vnet-name]

Examples

Create a rule to allow a specific address-range.

az storage account network-rule add -g myRg --account-name mystorageaccount --ip-address 23.45.1.0/24

Create a rule to allow access for a subnet.

az storage account network-rule add -g myRg --account-name mystorageaccount --vnet myvnet --subnet mysubnet

Required Parameters

--account-name -n

The storage account name.

Optional Parameters

--action

The action of virtual network rule.

default value: Allow
--ip-address

IPv4 address or CIDR range.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subnet

Name or ID of subnet. If name is supplied, --vnet-name must be supplied.

--vnet-name

Name of a virtual network.

az storage account network-rule list

List network rules.

az storage account network-rule list --account-name
[--resource-group]

Required Parameters

--account-name -n

The storage account name.

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

az storage account network-rule remove

Remove a network rule.

az storage account network-rule remove --account-name
[--ip-address]
[--resource-group]
[--subnet]
[--vnet-name]

Required Parameters

--account-name -n

The storage account name.

Optional Parameters

--ip-address

IPv4 address or CIDR range.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subnet

Name or ID of subnet. If name is supplied, --vnet-name must be supplied.

--vnet-name

Name of a virtual network.