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]
[--subnet]
[--subscription]
[--vnet-name]
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. 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>
.
Name or ID of subnet. If name is supplied, --vnet-name
must be supplied.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Name of a virtual network.
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.
Increase logging verbosity. Use --debug for full debug logs.
az acr network-rule list
List network rules.
az acr network-rule list --name
[--query-examples]
[--resource-group]
[--subscription]
Examples
List network rules for a registry.
az acr network-rule list -n MyRegistry
Required Parameters
The name of the container registry. You can configure the default registry name using az configure --defaults acr=<registry name>
.
Optional Parameters
Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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.
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]
[--subnet]
[--subscription]
[--vnet-name]
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. 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>
.
Name or ID of subnet. If name is supplied, --vnet-name
must be supplied.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Name of a virtual network.
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.
Increase logging verbosity. Use --debug for full debug logs.