az azurestackhci virtualnetwork
Note
This reference is part of the azurestackhci extension for the Azure CLI (version 2.15.0 or higher). The extension will automatically install the first time you run an az azurestackhci virtualnetwork command. Learn more about extensions.
Command group 'azurestackhci' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Manage virtualnetwork with azurestackhci.
Commands
Name | Description | Type | Status |
---|---|---|---|
az azurestackhci virtualnetwork create |
Create a virtual network. |
Extension | Experimental |
az azurestackhci virtualnetwork delete |
Delete a virtual network. |
Extension | Experimental |
az azurestackhci virtualnetwork list |
List all the virtual networks. |
Extension | Experimental |
az azurestackhci virtualnetwork show |
Get the details of a virtual network. |
Extension | Experimental |
az azurestackhci virtualnetwork update |
Update a virtual network. |
Extension | Experimental |
az azurestackhci virtualnetwork create
Command group 'azurestackhci' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Create a virtual network.
az azurestackhci virtualnetwork create --name
--resource-group
[--address-prefix]
[--dns-servers]
[--extended-location]
[--gateway]
[--ip-allocation-method]
[--location]
[--network-type]
[--routes]
[--subnets]
[--tags]
[--vlan]
[--vm-switch-name]
Examples
PutVirtualNetwork
az azurestackhci virtualnetwork create --resource-group "test-rg" --extended-location name="/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location" type="CustomLocation" --location "West US2" --network-type "Transparent" --name "test-vnet" --ip-allocation-method "Static" --address-prefix "10.0.0.0/28" --vm-switch-name "test-vm-switch" --dns-servers 10.220.32.16 10.220.32.17
Required Parameters
Name of the virtual network.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Cidr for this subnet - IPv4, IPv6.
Usage: --address-prefix "1.2.3.0/16".
Space-separated list of DNS server IP addresses.
Usage: --dns-servers 10.220.32.16 10.220.32.17.
Usage: --extended-location type=XX name=XX
type: The extended location type. name: The extended location name.
Gateway.
Usage: --gateway 1.2.3.4.
IPAllocationMethod - The IP address allocation method. Possible values include: Static, Dynamic.
Usage: --ip-allocation-method "Static/Dynamic".
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
Type of the network.
Collection of routes contained within a route table.
Usage: --routes '[{/"name/":/"route1/",/"properties/":{/"address_prefix/":/"1.2.3.0/28/",/"next_hop_ip_address/":/"1.2.3.1/"}},{/"name/":/"route2/",/"properties/":{/"address_prefix/":/"1.2.6.0/24/",/"next_hop_ip_address/":/"1.2.6.1/"}}]' Expected value: json-string/json-file/@json-file.
Subnet - list of subnets under the virtual network. All other subnet properties in the cli parameters will be ignored if this is provided. Expected value: json-string/@json-file.
Usage: --subnets '[{"properties":{"addressPrefix":"1.2.3.0/24","ipAllocationMethod":"Static"}}]'.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Vlan to use for the subnet.
Usage: --vlan 10.
Name of the VM switch.
Usage: --vm-switch-name "vm-switch-01".
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az azurestackhci virtualnetwork delete
Command group 'azurestackhci' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Delete a virtual network.
az azurestackhci virtualnetwork delete [--ids]
[--name]
[--resource-group]
[--subscription]
[--yes]
Examples
DeleteVirtualNetwork
az azurestackhci virtualnetwork delete --resource-group "test-rg" --name "test-vnet"
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Name of the virtual network.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Do not prompt for confirmation.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az azurestackhci virtualnetwork list
Command group 'azurestackhci' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
List all the virtual networks.
az azurestackhci virtualnetwork list [--resource-group]
Examples
ListVirtualNetworkByResourceGroup
az azurestackhci virtualnetwork list --resource-group "test-rg"
ListVirtualNetworkBySubscription
az azurestackhci virtualnetwork list
Optional Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az azurestackhci virtualnetwork show
Command group 'azurestackhci' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Get the details of a virtual network.
az azurestackhci virtualnetwork show [--ids]
[--name]
[--resource-group]
[--subscription]
Examples
GetVirtualNetwork
az azurestackhci virtualnetwork show --resource-group "test-rg" --name "test-vnet"
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Name of the virtual network.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az azurestackhci virtualnetwork update
Command group 'azurestackhci' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Update a virtual network.
az azurestackhci virtualnetwork update [--ids]
[--name]
[--resource-group]
[--subscription]
[--tags]
Examples
UpdateVirtualNetwork
az azurestackhci virtualnetwork update --resource-group "test-rg" --tags additionalProperties="sample" --name "test-vnet"
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Name of the virtual network.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Azure CLI