LinuxCommandLibrary

az-network

Manage Azure network resources

TLDR

List network resources in a region that are used against a subscription quota

$ az network list-usages
copy

List all virtual networks in a subscription
$ az network vnet list
copy

Create a virtual network
$ az network vnet create --address-prefixes [10.0.0.0/16] --name [vnet] --resource_group [group_name] --submet-name [subnet] --subnet-prefixes [10.0.0.0/24]
copy

Enable accelerated networking for a network interface card
$ az network nic update --accelerated-networking true --name [nic] --resource-group [resource_group]
copy

SYNOPSIS

az network [group] [command] [parameters]

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 {json,jsonc,table,tsv,yaml,yamlc,none}
    Output format.

--query
    JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription
    Name or ID of subscription to use. If you do not specify a subscription, the default subscription as configured by az account set will be used.

--verbose
    Increase logging verbosity. Use --debug for full debug logs.

DESCRIPTION

The az network command-line tool is part of the Azure CLI and is used to manage Azure Networking resources. It allows users to create, configure, and manage virtual networks, subnets, network interfaces, load balancers, network security groups, public IP addresses, application security groups, virtual network gateways, VPN connections, DNS zones, and other networking components within the Azure cloud platform.

It provides a programmatic interface to perform tasks such as provisioning network resources, modifying configurations, and monitoring the network infrastructure. Using 'az network', users can automate network deployment, troubleshooting, and administration, which are crucial for developing, deploying, and managing cloud-based applications and services on Azure.

This command is used in many automation pipelines and scripts, facilitating Infrastructure as Code (IaC) practices. It offers a consistent way to interact with Azure's networking capabilities across different platforms and environments. The command is used by developers, system administrators, and network engineers who work with Azure cloud services.

SUBGROUPS

The 'az network' command has many subgroups for managing specific networking resources, such as 'az network vnet' for virtual networks, 'az network nsg' for network security groups, 'az network public-ip' for public IP addresses, and 'az network lb' for load balancers. Each subgroup provides specific commands for creating, updating, deleting, and managing resources of that type. Refer to the Azure CLI documentation for specific details on the available commands and options within each subgroup.

EXAMPLES

Creating a virtual network:
az network vnet create --resource-group myResourceGroup --name myVNet --address-prefixes 10.0.0.0/16 --subnet-name mySubnet --subnet-prefixes 10.0.1.0/24

Creating a Network Security Group:
az network nsg create --resource-group myResourceGroup --name myNSG

SEE ALSO

az network vnet(1), az network nsg(1), az network public-ip(1), az network lb(1)

Copied to clipboard