az-network
Manage Azure network resources
TLDR
List network resources in a region that are used against a subscription quota
List all virtual networks in a subscription
Create a virtual network
Enable accelerated networking for a network interface card
SYNOPSIS
az network [<subcommand>] [--debug] [--help -h] [--only-show-errors] [--output -o] [--query] [--subscription] [--verbose]
PARAMETERS
--debug
Increase logging verbosity to show all debug logs.
--help -h
Show this help message and exit.
--only-show-errors
Only show errors, suppressing warnings.
--output -o
Output format: json, jsonc, table, tsv. Default: json.
--query
JMESPath query string. Empty by default. See http://jmespath.org/.
--subscription
Name or ID of Azure subscription. Overrides defaults.
--verbose
Increase logging verbosity (use --debug for full logs).
DESCRIPTION
The az network command group is part of the Azure Command-Line Interface (CLI), a cross-platform tool for managing Microsoft Azure resources from Linux, macOS, or Windows terminals. It enables creation, configuration, listing, updating, and deletion of Azure networking components essential for cloud infrastructure.
Key capabilities include managing Virtual Networks (VNets), subnets, Network Interfaces (NICs), Network Security Groups (NSGs), Public/Private IP addresses, Load Balancers, Application Gateways, Route Tables, Service Endpoints, and Bastion hosts. These commands support automation, scripting, and integration with tools like Terraform or Ansible.
Usage typically starts with az login for authentication, followed by subscription selection. Examples: create a VNet with az network vnet create, list NICs via az network nic list, or associate security rules in NSGs. Output supports JSON, table, or TSV formats for parsing in pipelines.
Ideal for DevOps, it handles complex topologies like peered VNets or hybrid connectivity, but requires Azure permissions like Network Contributor role.
CAVEATS
Requires Azure CLI 2.0+ installed, az login authentication, and RBAC roles like Network Contributor. Invalid resource groups or regions cause errors. Not for on-premises networks.
COMMON SUBCOMMANDS
vnet: Manage VNets/subnets; nic: Network interfaces; nsg: Security groups; public-ip: IP addresses; lb: Load balancers; application-gateway: Web traffic routing.
EXAMPLES
az network vnet create --resource-group myRG --name myVNet --address-prefix 10.0.0.0/16 --subnet-name mySubnet --subnet-prefix 10.0.0.0/24
az network nic list --resource-group myRG
HISTORY
Launched with Azure CLI 2.0 in December 2017. Evolved with Azure features: VNet peering (2018), Private Link (2020), Azure Firewall integration (2019+). Regular updates via az upgrade.


