CmdID

CmdID / az / az webpubsub / az webpubsub network-rule

az webpubsub network-rule update

Update the Network access control of WebPubSub Service. Azure CLI extensions reference

3 examples 4 options Its page in the Azure CLI extensions reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from the Azure CLI, each command read by CmdID

Set allowing RESTAPI only for public network.

az webpubsub network-rule update --public-network -n MyWebPubSub -g MyResourceGroup --allow RESTAPIIdentify
--public-networkSet rules for public network.
-nName of the webpubsub.
-gName of resource group.
--allowThe allowed virtual network rule.

Set allowing client connection and server connection for a private endpoint connection

az webpubsub network-rule update --connection-name MyPrivateEndpointConnection -n MyWebPubSub -g MyResourceGroup --allow ClientConnection ServerConnectionIdentify
--connection-nameSpace-separeted list of private endpoint connection name.
-nName of the webpubsub.
-gName of resource group.
--allowThe allowed virtual network rule.

Set denying client connection for both public network and private endpoint connections

az webpubsub network-rule update --public-network --connection-name MyPrivateEndpointConnection1 MyPrivateEndpointConnection2 -n MyWebPubSub -g MyResourceGroup --deny ClientConnectionIdentify
--public-networkSet rules for public network.
--connection-nameSpace-separeted list of private endpoint connection name.
-nName of the webpubsub.
-gName of resource group.
--denyThe denied virtual network rule.

Options

4 in the Azure CLI extensions reference
--allowThe allowed virtual network rule.
--connection-nameSpace-separeted list of private endpoint connection name.
--denyThe denied virtual network rule.
--public-networkSet rules for public network.