Skip to main content

virtual_network_gateways

Creates, updates, deletes, gets or lists a virtual_network_gateways resource.

Overview

Namevirtual_network_gateways
TypeResource
Idazure.network.virtual_network_gateways

Fields

The following fields are returned by SELECT queries:

Request successful. The operation returns a VirtualNetworkGateway resource.

NameDatatypeDescription
idstring (arm-id)Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
namestringThe name of the resource
etagstringA unique read-only string that changes whenever the resource is updated.
extendedLocationobjectThe extended location of type local virtual network gateway.
identityobjectThe identity of the virtual network gateway, if configured.
propertiesobjectProperties of the virtual network gateway.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, virtualNetworkGatewayName, subscriptionIdGets the specified virtual network gateway by resource group.
listselectresourceGroupName, subscriptionIdGets all virtual network gateways by resource group.
create_or_updateinsertresourceGroupName, virtualNetworkGatewayName, subscriptionId, data__propertiesCreates or updates a virtual network gateway in the specified resource group.
deletedeleteresourceGroupName, virtualNetworkGatewayName, subscriptionIdDeletes the specified virtual network gateway.
update_tagsexecresourceGroupName, virtualNetworkGatewayName, subscriptionIdUpdates a virtual network gateway tags.
resetexecresourceGroupName, virtualNetworkGatewayName, subscriptionIdgatewayVipResets the primary of the virtual network gateway in the specified resource group.
reset_vpn_client_shared_keyexecresourceGroupName, virtualNetworkGatewayName, subscriptionIdResets the VPN client shared key of the virtual network gateway in the specified resource group.
generatevpnclientpackageexecresourceGroupName, virtualNetworkGatewayName, subscriptionIdGenerates VPN client package for P2S client of the virtual network gateway in the specified resource group.
generate_vpn_profileexecresourceGroupName, virtualNetworkGatewayName, subscriptionIdGenerates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication.
supported_vpn_devicesexecresourceGroupName, virtualNetworkGatewayName, subscriptionIdGets a xml format representation for supported vpn devices.
set_vpnclient_ipsec_parametersexecresourceGroupName, virtualNetworkGatewayName, subscriptionId, saLifeTimeSeconds, saDataSizeKilobytes, ipsecEncryption, ipsecIntegrity, ikeEncryption, ikeIntegrity, dhGroup, pfsGroupThe Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider.
vpn_device_configuration_scriptexecresourceGroupName, virtualNetworkGatewayConnectionName, subscriptionIdGets a xml format representation for vpn device configuration script.
start_packet_captureexecresourceGroupName, virtualNetworkGatewayName, subscriptionIdStarts packet capture on virtual network gateway in the specified resource group.
stop_packet_captureexecresourceGroupName, virtualNetworkGatewayName, subscriptionIdStops packet capture on virtual network gateway in the specified resource group.
disconnect_virtual_network_gateway_vpn_connectionsexecsubscriptionId, resourceGroupName, virtualNetworkGatewayNameDisconnect vpn connections of virtual network gateway in the specified resource group.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
resourceGroupNamestringThe name of the resource group.
subscriptionIdstring (uuid)The ID of the target subscription. The value must be an UUID.
virtualNetworkGatewayConnectionNamestringThe name of the virtual network gateway connection for which the configuration script is generated.
virtualNetworkGatewayNamestringThe name of the virtual network gateway.
gatewayVipstringVirtual network gateway vip address supplied to the begin reset of the active-active feature enabled gateway.

SELECT examples

Gets the specified virtual network gateway by resource group.

SELECT
id,
name,
etag,
extendedLocation,
identity,
properties,
systemData,
type
FROM azure.network.virtual_network_gateways
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND virtualNetworkGatewayName = '{{ virtualNetworkGatewayName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

INSERT examples

Creates or updates a virtual network gateway in the specified resource group.

INSERT INTO azure.network.virtual_network_gateways (
data__properties,
data__extendedLocation,
data__identity,
resourceGroupName,
virtualNetworkGatewayName,
subscriptionId
)
SELECT
'{{ properties }}' /* required */,
'{{ extendedLocation }}',
'{{ identity }}',
'{{ resourceGroupName }}',
'{{ virtualNetworkGatewayName }}',
'{{ subscriptionId }}'
RETURNING
id,
name,
etag,
extendedLocation,
identity,
properties,
systemData,
type
;

DELETE examples

Deletes the specified virtual network gateway.

DELETE FROM azure.network.virtual_network_gateways
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND virtualNetworkGatewayName = '{{ virtualNetworkGatewayName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;

Lifecycle Methods

Updates a virtual network gateway tags.

EXEC azure.network.virtual_network_gateways.update_tags 
@resourceGroupName='{{ resourceGroupName }}' --required,
@virtualNetworkGatewayName='{{ virtualNetworkGatewayName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
@@json=
'{
"tags": "{{ tags }}"
}'
;