az acr network-rule
Manage network rules for Azure Container Registries.
Commands
az acr network-rule add |
Add a network rule. |
az acr network-rule list |
List network rules. |
az acr network-rule remove |
Remove a network rule. |
az acr network-rule add
Add a network rule.
az acr network-rule add --name
[--ip-address]
[--resource-group]
Examples
Add a rule to allow access for a subnet in the same resource group as the registry.
az acr network-rule add -n MyRegistry --vnet-name myvnet --subnet mysubnet
Add a rule to allow access for a subnet in a different subscription or resource group.
az acr network-rule add -n MyRegistry --subnet /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet
Add a rule to allow access for a specific IP address-range.
az acr network-rule add -n MyRegistry --ip-address 23.45.1.0/24
Required Parameters
The name of the container registry. It should be specified in lower case. You can configure the default registry name using az configure --defaults acr=<registry name>
.
Optional Parameters
IPv4 address or CIDR range.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az acr network-rule list
List network rules.
az acr network-rule list --name
[--resource-group]
Examples
List network rules for a registry.
az acr network-rule list -n MyRegistry
Required Parameters
The name of the container registry. It should be specified in lower case. You can configure the default registry name using az configure --defaults acr=<registry name>
.
Optional Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az acr network-rule remove
Remove a network rule.
az acr network-rule remove --name
[--ip-address]
[--resource-group]
Examples
Remove a rule that allows access for a subnet in the same resource group as the registry.
az acr network-rule remove -n MyRegistry --vnet-name myvnet --subnet mysubnet
Remove a rule that allows access for a subnet in a different subscription or resource group.
az acr network-rule remove -n MyRegistry --subnet /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet
Remove a rule that allows access for a specific IP address-range.
az acr network-rule remove -n MyRegistry --ip-address 23.45.1.0/24
Required Parameters
The name of the container registry. It should be specified in lower case. You can configure the default registry name using az configure --defaults acr=<registry name>
.
Optional Parameters
IPv4 address or CIDR range.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Feedback
Submit and view feedback for