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-route-table]
[--associated-inbound-routemap]
[--associated-outbound-routemap]
[--config-name]
[--labels]
[--location]
[--no-wait]
[--propagated --propagated-route-tables]
[--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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Address space for P2S VpnClient. Space-separated list of IP address ranges.
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.
Name or p2s connection configuration.
Property | Value |
---|---|
Default value: | P2SConnectionConfigDefault |
Space-separated list of labels for propagated route tables.
Property | Value |
---|---|
Parameter group: | Routing Configuration Arguments |
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.
Property | Value |
---|---|
Default value: | False |
Space-separated list of resource id of propagated route tables.
Property | Value |
---|---|
Parameter group: | Routing Configuration Arguments |
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.
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 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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Do not prompt for confirmation.
Property | Value |
---|---|
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.
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 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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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 |
The name of the P2S Vpn Gateway.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Do not wait for the long-running operation to finish.
Property | Value |
---|---|
Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
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 |
List of p2s vpn connection Ids. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Property | Value |
---|---|
Parameter group: | Request 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 p2s-vpn-gateway list
List all point-to-site VPN gateway.
az network p2s-vpn-gateway list [--resource-group]
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 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 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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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 |
The name of the gateway.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Do not wait for the long-running operation to finish.
Property | Value |
---|---|
Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
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 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.
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 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-route-table]
[--associated-inbound-routemap]
[--associated-outbound-routemap]
[--config-name]
[--force-string]
[--labels]
[--no-wait]
[--propagated --propagated-route-tables]
[--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
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: | [] |
Address space for P2S VpnClient. Space-separated list of IP address ranges.
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.
Name or p2s connection 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 |
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 |
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: | [] |
The scale unit for this VPN gateway.
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: | [] |
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.
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 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
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 |
Polling interval in seconds.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | 30 |
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.
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 |