az network vnet subnet update
command to update the subnet configuration.--network-security-group
parameter with the name or resource ID of the NSG you want to associate with the subnet.az network nsg rule create
command to create a new NSG rule.--nsg-name
parameter with the name of the NSG you want to add the rule to.--name
, --priority
, --source-address-prefixes
, --destination-port-ranges
, etc. to define the rule.az network watcher configure
command to enable Network Watcher for your Azure subscription.--location
parameter with the region where you want to enable Network Watcher.azure.mgmt.network
package to retrieve the NSG resource.enable_flow_logs
property to True
.network_client.network_security_groups.create_or_update
method.azure.mgmt.network
package to retrieve the NSG resource.security_rules
list.network_client.network_security_groups.create_or_update
method.azure.mgmt.network
package to retrieve the NSG resource.network_client.network_security_groups.create_or_update
method.