az network vpn-gateway connection
Note
This reference is part of the virtual-wan extension for the Azure CLI (version 2.55.0 or higher). The extension will automatically install the first time you run an az network vpn-gateway connection command. Learn more about extensions.
Manage site-to-site VPN gateway connections.
Commands
Name | Description | Type | Status |
---|---|---|---|
az network vpn-gateway connection create |
Create a site-to-site VPN gateway connection. |
Extension | GA |
az network vpn-gateway connection delete |
Delete a site-to-site VPN gateway connection. |
Extension | GA |
az network vpn-gateway connection ipsec-policy |
Manage site-to-site VPN gateway connection IPSec policies. |
Extension | GA |
az network vpn-gateway connection ipsec-policy add |
Add an IPSec policy to a site-to-site VPN gateway connection. |
Extension | GA |
az network vpn-gateway connection ipsec-policy list |
List site-to-site VPN gateway connection IPSec policies. |
Extension | GA |
az network vpn-gateway connection ipsec-policy remove |
Remove an IPSec policy from a site-to-site VPN gateway connection. |
Extension | GA |
az network vpn-gateway connection list |
List site-to-site VPN gateway connections. |
Extension | GA |
az network vpn-gateway connection packet-capture |
Manage site-to-site VPN gateway connections packet capture. |
Extension | GA |
az network vpn-gateway connection packet-capture start |
Starts packet capture on Vpn connection in the specified resource group. |
Extension | GA |
az network vpn-gateway connection show |
Get the details of a site-to-site VPN gateway connection. |
Extension | GA |
az network vpn-gateway connection update |
Update settings of VPN gateway connection. |
Extension | GA |
az network vpn-gateway connection vpn-site-link-conn |
Manage site-to-site VPN gateway connection VPN site link connection. |
Extension | GA |
az network vpn-gateway connection vpn-site-link-conn add |
Add a VPN site link connection to a site-to-site VPN gateway connection. |
Extension | GA |
az network vpn-gateway connection vpn-site-link-conn ipsec-policy |
Manage site-to-site VPN gateway connection VPN site link IPSec policies. |
Extension | GA |
az network vpn-gateway connection vpn-site-link-conn ipsec-policy add |
Add an IPSec policy to a site-to-site VPN gateway connection VPN site link. |
Extension | GA |
az network vpn-gateway connection vpn-site-link-conn ipsec-policy list |
List site-to-site VPN gateway connection VPN site link IPSec policies. |
Extension | GA |
az network vpn-gateway connection vpn-site-link-conn ipsec-policy remove |
Remove an IPSec policy from a site-to-site VPN gateway connection VPN site link. |
Extension | GA |
az network vpn-gateway connection vpn-site-link-conn list |
List site-to-site VPN gateway connection VPN site link connection. |
Extension | GA |
az network vpn-gateway connection vpn-site-link-conn remove |
Remove a VPN site link connection from a site-to-site VPN gateway connection. |
Extension | GA |
az network vpn-gateway connection wait |
Place the CLI in a waiting state until a condition of the site-to-site VPN gateway connection is met. |
Extension | GA |
az network vpn-gateway connection create
Create a site-to-site VPN gateway connection.
az network vpn-gateway connection create --gateway-name
--name
--remote-vpn-site
--resource-group
[--associated --associated-route-table]
[--associated-inbound-routemap]
[--associated-outbound-routemap]
[--connection-bandwidth]
[--enable-bgp {false, true}]
[--internet-security {false, true}]
[--labels]
[--no-wait]
[--propagated --propagated-route-tables]
[--protocol-type {IKEv1, IKEv2}]
[--rate-limiting {false, true}]
[--routing-weight]
[--shared-key]
[--vpn-site-link]
[--with-link {false, true}]
Examples
Create a site-to-site 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
Name of the VPN gateway.
Name of the VPN gateway connection.
Name of ID of the remote VPN site.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
The resource id of route table associated with this routing configuration.
Property | Value |
---|---|
Parameter group: | Routing Configuration Arguments |
Resource uri of inbound routemap for this connection’s routing configuration.
Resource uri of outbound routemap for this connection’s routing configuration.
Expected bandwidth in Mbps.
Enable BGP.
Property | Value |
---|---|
Accepted values: | false, true |
Enable internet security.
Property | Value |
---|---|
Accepted values: | false, true |
Space-separated list of labels for propagated route tables.
Property | Value |
---|---|
Parameter group: | Routing Configuration Arguments |
Do not wait for the long-running operation to finish.
Property | Value |
---|---|
Default value: | False |
Space-separated list of resource id of propagated route tables.
Property | Value |
---|---|
Parameter group: | Routing Configuration Arguments |
Connection protocol.
Property | Value |
---|---|
Accepted values: | IKEv1, IKEv2 |
Enable rate limiting.
Property | Value |
---|---|
Accepted values: | false, true |
Routing weight.
Shared key.
The resource ID of VPN Site Link.
Create VpnConnection with default link.
Property | Value |
---|---|
Accepted values: | false, true |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
az network vpn-gateway connection delete
Delete a site-to-site VPN gateway connection.
az network vpn-gateway connection delete [--gateway-name]
[--ids]
[--name]
[--resource-group]
[--subscription]
Examples
Delete a site-to-site VPN gateway connection
az network vpn-gateway connection delete -g MyRG -n MyConnection --gateway-name MyGateway
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Name of the VPN gateway.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
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.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of the VPN gateway connection.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az network vpn-gateway connection list
List site-to-site VPN gateway connections.
az network vpn-gateway connection list --gateway-name
--resource-group
Examples
List all connections for a given site-to-site VPN gateway
az network vpn-gateway connection list -g MyRG --gateway-name MyGateway
Required Parameters
Name of the VPN gateway.
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.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
az network vpn-gateway connection show
Get the details of a site-to-site VPN gateway connection.
az network vpn-gateway connection show [--gateway-name]
[--ids]
[--name]
[--resource-group]
[--subscription]
Examples
Get the details of a site-to-site VPN gateway connection
az network vpn-gateway connection show -g MyRG -n MyConnection --gateway-name MyGateway
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Name of the VPN gateway.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
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.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of the VPN gateway connection.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az network vpn-gateway connection update
Update settings of VPN gateway connection.
az network vpn-gateway connection update [--add]
[--associated --associated-route-table]
[--associated-inbound-routemap]
[--associated-outbound-routemap]
[--force-string]
[--gateway-name]
[--ids]
[--labels]
[--name]
[--no-wait]
[--propagated --propagated-route-tables]
[--remove]
[--resource-group]
[--set]
[--subscription]
Examples
Add labels for propagated route tables under routing configuration.
az network vpn-gateway connection update -g MyRG -n MyConnection --gateway-name MyGateway --labels NewLabel1 NewLabels2
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>
.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
Default value: | [] |
The resource id of route table associated with this routing configuration.
Property | Value |
---|---|
Parameter group: | Routing Configuration Arguments |
Resource uri of inbound routemap for this connection’s routing configuration.
Resource uri of outbound routemap for this connection’s routing configuration.
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
Default value: | False |
Name of the VPN gateway.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
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.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Space-separated list of labels for propagated route tables.
Property | Value |
---|---|
Parameter group: | Routing Configuration Arguments |
Name of the VPN gateway connection.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Do not wait for the long-running operation to finish.
Property | Value |
---|---|
Default value: | False |
Space-separated list of resource id of propagated route tables.
Property | Value |
---|---|
Parameter group: | Routing Configuration Arguments |
Remove a property or an element from a list. Example: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
Default value: | [] |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>
.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
Default value: | [] |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az network vpn-gateway connection wait
Place the CLI in a waiting state until a condition of the site-to-site VPN gateway connection is met.
az network vpn-gateway connection wait [--created]
[--custom]
[--deleted]
[--exists]
[--gateway-name]
[--ids]
[--interval]
[--name]
[--resource-group]
[--subscription]
[--timeout]
[--updated]
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Wait until created with 'provisioningState' at 'Succeeded'.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | False |
Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Wait until deleted.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | False |
Wait until the resource exists.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | False |
Name of the VPN gateway.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
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.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Polling interval in seconds.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | 30 |
Name of the VPN gateway connection.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Maximum wait in seconds.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | 3600 |
Wait until updated with provisioningState at 'Succeeded'.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | False |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |