az network p2s-vpn-gateway
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 p2s-vpn-gateway command. Learn more about extensions.
Manage point-to-site VPN gateway.
Commands
Name | Description | Type | Status |
---|---|---|---|
az network p2s-vpn-gateway connection |
Manage point-to-site VPN gateway connections. |
Extension | Preview |
az network p2s-vpn-gateway connection list |
List all connections for a given point-to-site VPN gateway. |
Extension | Preview |
az network p2s-vpn-gateway connection show |
Show the details of a point-to-site VPN gateway connection. |
Extension | Preview |
az network p2s-vpn-gateway create |
Create a point-to-site VPN gateway. |
Extension | GA |
az network p2s-vpn-gateway delete |
Delete a point-to-site VPN gateway. |
Extension | GA |
az network p2s-vpn-gateway disconnect |
Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource group. |
Extension | GA |
az network p2s-vpn-gateway list |
List all point-to-site VPN gateway. |
Extension | GA |
az network p2s-vpn-gateway reset |
Resets the primary of the p2s vpn gateway in the specified resource group. |
Extension | GA |
az network p2s-vpn-gateway show |
Show the details of a point-to-site VPN gateway. |
Extension | GA |
az network p2s-vpn-gateway update |
Update settings of a point-to-site VPN gateway. |
Extension | GA |
az network p2s-vpn-gateway vpn-client |
Download a VPN client configuration required to connect to Azure via point-to-site. |
Extension | GA |
az network p2s-vpn-gateway vpn-client generate |
Generate VPN profile for P2S client of the P2SVpnGateway in the specified resource group. |
Extension | GA |
az network p2s-vpn-gateway wait |
Place the CLI in a waiting state until a condition of the point-to-site VPN gateway is met. |
Extension | GA |
az network p2s-vpn-gateway create
Create a point-to-site VPN gateway.
az network p2s-vpn-gateway create --name
--resource-group
--scale-unit
--vhub
[--address-space]
[--associated]
[--associated-inbound-routemap]
[--associated-outbound-routemap]
[--config-name]
[--labels]
[--location]
[--no-wait]
[--propagated]
[--tags]
[--vpn-server-config]
Examples
Create a point-to-site VPN gateway.
az network p2s-vpn-gateway create -g MyRG -n MyP2SVPNGateway --scale-unit 2 --vhub MyVhub --vpn-server-config MyVPNServerConfig --address-space 10.0.0.0/24 11.0.0.0/24
Create a point-to-site VPN gateway with routing configuration.
az network p2s-vpn-gateway create -g MyRG -n MyP2SVPNGateway --scale-unit 2 --vhub MyVhub --vpn-server-config MyVPNServerConfig --address-space 10.0.0.0/24 11.0.0.0/24 --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 P2S Vpn Gateway.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
The scale unit for this VPN gateway.
Name or ID of a virtual hub.
Optional Parameters
Address space for P2S VpnClient. Space-separated list of IP address ranges.
The resource id of route table associated with this routing configuration.
Resource uri of inbound routemap for this connection’s routing configuration.
Resource uri of outbound routemap for this connection’s routing configuration.
Name or p2s connection configuration.
Space-separated list of labels for propagated route tables.
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
Do not wait for the long-running operation to finish.
Space-separated list of resource id of propagated route tables.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Name or ID of a vpn server configuration.
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 network p2s-vpn-gateway delete
Delete a point-to-site VPN gateway.
az network p2s-vpn-gateway delete --name
--resource-group
[--yes]
Required Parameters
Name of the P2S Vpn Gateway.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
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 network p2s-vpn-gateway disconnect
Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource group.
az network p2s-vpn-gateway disconnect [--ids]
[--name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--subscription]
[--vpn-connection-ids]
Examples
Disconnect P2S vpn connections.
az network p2s-vpn-gateway disconnect -g MyResourceGroup -n MyP2sGateway --vpn-connection-ids "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Network/p2sVpnGateways/MyP2sGateway/p2sConnectionConfigurations/P2SConnectionConfigDefault"
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.
The name of the P2S Vpn Gateway.
Do not wait for the long-running operation to finish.
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
.
List of p2s vpn connection Ids. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
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 network p2s-vpn-gateway list
List all point-to-site VPN gateway.
az network p2s-vpn-gateway list [--resource-group]
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 network p2s-vpn-gateway reset
Resets the primary of the p2s vpn gateway in the specified resource group.
az network p2s-vpn-gateway reset [--ids]
[--name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--subscription]
Examples
Resets the primary of the p2s vpn gateway.
az network p2s-vpn-gateway reset -g MyResourceGroup -n MyP2sGateway
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.
The name of the gateway.
Do not wait for the long-running operation to finish.
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 network p2s-vpn-gateway show
Show the details of a point-to-site VPN gateway.
az network p2s-vpn-gateway show --name
--resource-group
Required Parameters
Name of the P2S 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.
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 network p2s-vpn-gateway update
Update settings of a point-to-site VPN gateway.
az network p2s-vpn-gateway update --name
--resource-group
[--add]
[--address-space]
[--associated]
[--associated-inbound-routemap]
[--associated-outbound-routemap]
[--config-name]
[--force-string]
[--labels]
[--no-wait]
[--propagated]
[--remove]
[--scale-unit]
[--set]
[--tags]
[--vpn-server-config]
Examples
Add labels for propagated route tables under routing configuration.
az network p2s-vpn-gateway update -g MyRG -n MyP2SVPNGateway --labels Newlabel1 Newlabel2 Newlabel3
Required Parameters
Name of the P2S Vpn Gateway.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
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>
.
Address space for P2S VpnClient. Space-separated list of IP address ranges.
The resource id of route table associated with this routing configuration.
Resource uri of inbound routemap for this connection’s routing configuration.
Resource uri of outbound routemap for this connection’s routing configuration.
Name or p2s connection configuration.
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
Space-separated list of labels for propagated route tables.
Do not wait for the long-running operation to finish.
Space-separated list of resource id of propagated route tables.
Remove a property or an element from a list. Example: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
The scale unit for this VPN gateway.
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>
.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Name or ID of a vpn server configuration.
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 network p2s-vpn-gateway wait
Place the CLI in a waiting state until a condition of the point-to-site VPN gateway is met.
az network p2s-vpn-gateway wait --name
--resource-group
[--created]
[--custom]
[--deleted]
[--exists]
[--interval]
[--timeout]
[--updated]
Required Parameters
Name of the P2S Vpn Gateway.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Wait until created with 'provisioningState' at 'Succeeded'.
Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].
Wait until deleted.
Wait until the resource exists.
Polling interval in seconds.
Maximum wait in seconds.
Wait until updated with provisioningState at 'Succeeded'.
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