CmdID / az / az network / az network perimeter / az network perimeter profile / az network perimeter profile access-rule
az network perimeter profile access-rule create
Create a network security perimeter profile access rule. Azure CLI extensions reference
5 examples 10 options Its page in the Azure CLI extensions reference
Examples
Create IP based access rule
az network perimeter profile access-rule create -n MyAccessRule --profile-name MyProfile --perimeter-name MyPerimeter -g MyResourceGroup --address-prefixes "[10.10.0.0/16]"Identify-nThe name of the NSP access rule.--profile-nameThe name of the NSP profile.--perimeter-nameThe name of the network security perimeter.-gName of resource group.--address-prefixesInbound address prefixes (IPv4/IPv6)Create NSP based access rule
az network perimeter profile access-rule create -n MyAccessRule --profile-name MyProfile --perimeter-name MyPerimeter -g MyResourceGroup --nsp "[{id:<NSP_ARM_ID>}]"Identify-nThe name of the NSP access rule.--profile-nameThe name of the NSP profile.--perimeter-nameThe name of the network security perimeter.-gName of resource group.Create FQDN based access rule
az network perimeter profile access-rule create -n MyAccessRule --profile-name MyProfile --perimeter-name MyPerimeter -g MyResourceGroup --fqdn "['www.abc.com', 'www.google.com']" --direction "Outbound"Identify-nThe name of the NSP access rule.--profile-nameThe name of the NSP profile.--perimeter-nameThe name of the network security perimeter.-gName of resource group.--fqdnOutbound rules in fully qualified domain name format.--directionDirection that specifies whether the access rules is inbound/outbound.Create Subscription based access rule
az network perimeter profile access-rule create -n MyAccessRule --profile-name MyProfile --perimeter-name MyPerimeter -g MyResourceGroup --subscriptions [0].id="<SubscriptionID1>" [1].id="<SubscriptionID2>"Identify-nThe name of the NSP access rule.--profile-nameThe name of the NSP profile.--perimeter-nameThe name of the network security perimeter.-gName of resource group.--subscriptionsSubscription id in the ARM id format.Create ServiceTags based access rule
az network perimeter profile access-rule create -n MyAccessRule --profile-name MyProfile --perimeter-name MyPerimeter -g MyResourceGroup --service-tags [st1,st2]Identify-nThe name of the NSP access rule.--profile-nameThe name of the NSP profile.--perimeter-nameThe name of the network security perimeter.-gName of resource group.--service-tagsInbound rules of type service tag.Options
--access-rule-name, --name, -nThe name of the NSP access rule.--address-prefixesInbound address prefixes (IPv4/IPv6)--directionDirection that specifies whether the access rules is inbound/outbound.--email-addressesOutbound rules in email address format.--fqdnOutbound rules in fully qualified domain name format.--perimeter-nameThe name of the network security perimeter.--phone-numbersOutbound rules in phone number format.--profile-nameThe name of the NSP profile.--service-tagsInbound rules of type service tag.--subscriptionsSubscription id in the ARM id format.