az network vpn-gateway connection

Manage VPN gateway connections.

Commands

az network vpn-gateway connection create

Create a VPN gateway connection.

az network vpn-gateway connection delete

Delete a VPN gateway connection.

az network vpn-gateway connection ipsec-policy

Manage VPN gateway connection IPSec policies.

az network vpn-gateway connection ipsec-policy add

Add an IPSec policy to a VPN gateway connection.

az network vpn-gateway connection ipsec-policy list

List VPN gateway connection IPSec policies.

az network vpn-gateway connection ipsec-policy remove

Remove an IPSec policy from a VPN gateway connection.

az network vpn-gateway connection list

List VPN gateway connections.

az network vpn-gateway connection show

Get the details of a VPN gateway connection.

az network vpn-gateway connection wait

Place the CLI in a waiting state until a condition of the VPN gateway connection is met.

az network vpn-gateway connection create

Create a VPN gateway connection.

az network vpn-gateway connection create --gateway-name
                                         --name
                                         --remote-vpn-site
                                         --resource-group
                                         [--associated]
                                         [--connection-bandwidth]
                                         [--enable-bgp {false, true}]
                                         [--internet-security {false, true}]
                                         [--labels]
                                         [--no-wait]
                                         [--propagated]
                                         [--protocol-type {IKEv1, IKEv2}]
                                         [--rate-limiting {false, true}]
                                         [--routing-weight]
                                         [--shared-key]

Examples

Create a VPN gateway connection

az network vpn-gateway connection create -g MyRG -n MyConnection --gateway-name MyGateway --remote-vpn-site /subscriptions/MySub/resourceGroups/MyRG/providers/Microsoft.Network/vpnSites/MyVPNSite --associated-route-table /subscriptions/MySub/resourceGroups/MyRG/providers/Microsoft.Network/virtualHubs/MyHub/hubRouteTables/MyRouteTable1 --propagated-route-tables /subscriptions/MySub/resourceGroups/MyRG/providers/Microsoft.Network/virtualHubs/MyHub/hubRouteTables/MyRouteTable1 /subscriptions/MySub/resourceGroups/MyRG/providers/Microsoft.Network/virtualHubs/MyHub/hubRouteTables/MyRouteTable2 --labels label1 label2

Required Parameters

--gateway-name

Name of the VPN gateway.

--name -n

Name of the VPN gateway connection.

--remote-vpn-site

Name of ID of the remote VPN site.

--resource-group -g

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

Optional Parameters

--associated --associated-route-table

The resource id of route table associated with this routing configuration.

--connection-bandwidth

Expected bandwidth in Mbps.

--enable-bgp

Enable BGP.

accepted values: false, true
--internet-security

Enable internet security.

accepted values: false, true
--labels

Space-separated list of labels for propagated route tables.

--no-wait

Do not wait for the long-running operation to finish.

--propagated --propagated-route-tables

Space-separated list of resource id of propagated route tables.

--protocol-type

Connection protocol.

accepted values: IKEv1, IKEv2
--rate-limiting

Enable rate limiting.

accepted values: false, true
--routing-weight

Routing weight.

--shared-key

Shared key.

az network vpn-gateway connection delete

Delete a VPN gateway connection.

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

Examples

Delete a VPN gateway connection

az network vpn-gateway connection delete -g MyRG -n MyConnection --gateway-name MyGateway

Required Parameters

--gateway-name

Name of the VPN gateway.

--name -n

Name of the VPN gateway connection.

--resource-group -g

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

az network vpn-gateway connection list

List VPN gateway connections.

az network vpn-gateway connection list --gateway-name
                                       --resource-group

Examples

List all connections for a given VPN gateway

az network vpn-gateway connection list -g MyRG --gateway-name MyGateway

Required Parameters

--gateway-name

Name of the VPN gateway.

--resource-group -g

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

az network vpn-gateway connection show

Get the details of a VPN gateway connection.

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

Examples

Get the details of a VPN gateway connection

az network vpn-gateway connection show -g MyRG -n MyConnection --gateway-name MyGateway

Required Parameters

--gateway-name

Name of the VPN gateway.

--name -n

Name of the VPN gateway connection.

--resource-group -g

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

az network vpn-gateway connection wait

Place the CLI in a waiting state until a condition of the VPN gateway connection is met.

az network vpn-gateway connection wait --gateway-name
                                       --resource-group
                                       [--created]
                                       [--custom]
                                       [--deleted]
                                       [--exists]
                                       [--interval]
                                       [--timeout]
                                       [--updated]

Required Parameters

--gateway-name

Name of the VPN gateway.

--resource-group -g

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

Optional Parameters

--created

Wait until created with 'provisioningState' at 'Succeeded'.

--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

--deleted

Wait until deleted.

--exists

Wait until the resource exists.

--interval

Polling interval in seconds.

default value: 30
--timeout

Maximum wait in seconds.

default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.