Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

az acr network-rule

Manage network rules for Azure Container Registries.

Commands

Name Description Type Status
az acr network-rule add

Add a network rule.

Core GA
az acr network-rule list

List network rules.

Core GA
az acr network-rule remove

Remove a network rule.

Core GA

az acr network-rule add

Add a network rule.

az acr network-rule add --name
 [--acquire-policy-token]
 [--change-reference]
 [--ip-address]
 [--resource-group]

Examples

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

Add a rule to allow access for a specific virtual network.

az acr network-rule add -n myregistry --subnet $subnetId

Required Parameters

--name -n

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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--ip-address

IPv4/IPv6 address or CIDR range.

--resource-group -g

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

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

--name -n

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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--resource-group -g

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

az acr network-rule remove

Remove a network rule.

az acr network-rule remove --name
 [--acquire-policy-token]
 [--change-reference]
 [--ip-address]
 [--resource-group]

Examples

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

--name -n

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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--ip-address

IPv4/IPv6 address or CIDR range.

--resource-group -g

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


Feedback

Was this page helpful?