az network local-gateway
Manage local gateways.
For more information on local gateways, visit: https://docs.microsoft.com/azure/vpn-gateway/vpn-gateway-howto-site-to-site-resource-manager-cli#localnet.
Commands
Name | Description | Type | Status |
---|---|---|---|
az network local-gateway create |
Create a local VPN gateway. |
Core | GA |
az network local-gateway delete |
Delete a local VPN gateway. |
Core | GA |
az network local-gateway list |
List all local VPN gateways in a resource group. |
Core | GA |
az network local-gateway show |
Get the details of a local VPN gateway. |
Core | GA |
az network local-gateway update |
Update a local VPN gateway. |
Core | GA |
az network local-gateway wait |
Place the CLI in a waiting state until a condition is met. |
Core | GA |
az network local-gateway create
Create a local VPN gateway.
az network local-gateway create --name
--resource-group
[--address-prefixes]
[--asn]
[--bgp-peering-address]
[--gateway-ip-address]
[--location]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--peer-weight]
[--tags]
Examples
Create a Local Network Gateway to represent your on-premises site.
az network local-gateway create -g MyResourceGroup -n MyLocalGateway --gateway-ip-address 23.99.221.164 --local-address-prefixes 10.0.0.0/24 20.0.0.0/24
Required Parameters
Name of the local network gateway.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
List of CIDR block prefixes representing the address space of the OnPremise VPN's subnet. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Autonomous System Number to use for the BGP settings.
IP address from the OnPremise VPN's subnet to use for BGP peering.
Gateway's public IP address. (e.g. 10.1.1.1).
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.
Weight (0-100) added to routes learned through BGP peering.
Space-separated tags: key[=value] [key[=value] ...]. 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 local-gateway delete
Delete a local VPN gateway.
In order to delete a Local Network Gateway, you must first delete ALL Connection objects in Azure that are connected to the Gateway. After deleting the Gateway, proceed to delete other resources now not in use. For more information, follow the order of instructions on this page: https://docs.microsoft.com/azure/vpn-gateway/vpn-gateway-delete-vnet-gateway-portal.
az network local-gateway delete [--ids]
[--name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--subscription]
Examples
Delete a Local Network Gateway.
az network local-gateway delete -g MyResourceGroup -n MyLocalGateway
Delete a local VPN gateway. (autogenerated)
az network local-gateway delete --name MyLocalGateway --resource-group MyResourceGroup --subscription MySubscription
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.
Name of the local network 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 local-gateway list
List all local VPN gateways in a resource group.
az network local-gateway list --resource-group
Examples
List all local VPN gateways in a resource group.
az network local-gateway list -g MyResourceGroup
Required 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 local-gateway show
Get the details of a local VPN gateway.
az network local-gateway show [--ids]
[--name]
[--resource-group]
[--subscription]
Examples
Get the details of a local VPN gateway.
az network local-gateway show -g MyResourceGroup -n MyLocalGateway
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.
Name of the local network gateway.
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 local-gateway update
Update a local VPN gateway.
az network local-gateway update [--add]
[--address-prefixes]
[--asn]
[--bgp-peering-address]
[--force-string {0, 1, f, false, n, no, t, true, y, yes}]
[--gateway-ip-address]
[--ids]
[--name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--peer-weight]
[--remove]
[--resource-group]
[--set]
[--subscription]
[--tags]
Examples
Update a Local Network Gateway provisioned with a 10.0.0.0/24 address prefix with additional prefixes.
az network local-gateway update -g MyResourceGroup -n MyLocalGateway --address-prefixes 10.0.0.0/24 20.0.0.0/24 30.0.0.0/24
Update a local VPN gateway. (autogenerated)
az network local-gateway update --gateway-ip-address 23.99.221.164 --name MyLocalGateway --resource-group MyResourceGroup
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>
.
List of CIDR block prefixes representing the address space of the OnPremise VPN's subnet. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Autonomous System Number to use for the BGP settings.
IP address from the OnPremise VPN's subnet to use for BGP peering.
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
Gateway's public IP address. (e.g. 10.1.1.1).
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.
Name of the local network gateway.
Do not wait for the long-running operation to finish.
Weight (0-100) added to routes learned through BGP peering.
Remove a property or an element from a list. Example: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Space-separated tags: key[=value] [key[=value] ...]. 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 local-gateway wait
Place the CLI in a waiting state until a condition is met.
az network local-gateway wait [--created]
[--custom]
[--deleted]
[--exists]
[--ids]
[--interval]
[--name]
[--resource-group]
[--subscription]
[--timeout]
[--updated]
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.
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.
Polling interval in seconds.
Name of the local network gateway.
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
.
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