VPN connections - az network vpn-connection

Manage VPN connections.

Commands

az network vpn-connection create Create a VPN connection.
az network vpn-connection delete Delete a VPN connection.
az network vpn-connection ipsec-policy Manage VPN connection IPSec policies.
az network vpn-connection ipsec-policy add Add a VPN connection IPSec policy.
az network vpn-connection ipsec-policy clear Delete all IPSec policies on a VPN connection.
az network vpn-connection ipsec-policy list List IPSec policies associated with a VPN connection.
az network vpn-connection list List VPN connections.
az network vpn-connection shared-key Manage VPN shared keys.
az network vpn-connection shared-key reset Reset a VPN connection shared key.
az network vpn-connection shared-key show Show a VPN connection shared key.
az network vpn-connection shared-key update Update a VPN connection shared key.
az network vpn-connection show Show details of a VPN connection.
az network vpn-connection update Update a VPN connection.

az network vpn-connection create

Create a VPN connection.

az network vpn-connection create --name
--resource-group
--vnet-gateway1
[--authorization-key]
[--enable-bgp]
[--express-route-circuit2]
[--local-gateway2]
[--location]
[--no-wait]
[--routing-weight]
[--shared-key]
[--tags]
[--use-policy-based-traffic-selectors {false, true}]
[--validate]
[--vnet-gateway2]

Required Parameters

--name -n

Connection name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=.

--vnet-gateway1

Name or ID of the source virtual network gateway.

Optional Parameters

--authorization-key

The authorization key for the VPN connection.

--enable-bgp

Enable BGP for this VPN connection.

--express-route-circuit2

Name or ID of the destination ExpressRoute to connect to using an 'ExpressRoute' connection.

--local-gateway2

Name or ID of the destination local network gateway to connect to using an 'IPSec' connection.

--location -l

Location. You can configure the default location using az configure --defaults location=.

--no-wait

Do not wait for the long running operation to finish.

--routing-weight
default value: 10
--shared-key

Shared IPSec key.

--tags

Space separated tags in 'key[=value]' format. Use "" to clear existing tags.

--use-policy-based-traffic-selectors

Enable policy-based traffic selectors.

accepted values: false, true
--validate

Display and validate the ARM template but do not create any resources.

--vnet-gateway2

Name or ID of the destination virtual network gateway to connect to using a 'Vnet2Vnet' connection.

az network vpn-connection delete

Delete a VPN connection.

az network vpn-connection delete --name
--resource-group

Required Parameters

--name -n

Connection name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=.

az network vpn-connection list

List VPN connections.

az network vpn-connection list --resource-group

Required Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=.

az network vpn-connection show

Show details of a VPN connection.

az network vpn-connection show --name
--resource-group

Required Parameters

--name -n

Connection name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=.

az network vpn-connection update

Update a VPN connection.

az network vpn-connection update --name
--resource-group
[--add]
[--enable-bgp {false, true}]
[--remove]
[--routing-weight]
[--set]
[--shared-key]
[--tags]
[--use-policy-based-traffic-selectors {false, true}]

Required Parameters

--name -n

Connection name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=.

Optional Parameters

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty .

--enable-bgp

Enable BGP (Border Gateway Protocol).

accepted values: false, true
--remove

Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.

--routing-weight

Connection routing weight.

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=.

--shared-key

Shared IPSec key.

--tags

Space separated tags in 'key[=value]' format. Use "" to clear existing tags.

--use-policy-based-traffic-selectors

Enable policy-based traffic selectors.

accepted values: false, true