Skip to main content

vpn_gateways

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

Overview

Namevpn_gateways
TypeResource
Idazure.network.vpn_gateways

Fields

The following fields are returned by SELECT queries:

Request successful. Returns the details of the virtual wan vpn gateway retrieved.

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.
propertiesobjectProperties of the VPN 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
getselectsubscriptionId, resourceGroupName, gatewayNameRetrieves the details of a virtual wan vpn gateway.
list_by_resource_groupselectsubscriptionId, resourceGroupNameLists all the VpnGateways in a resource group.
listselectsubscriptionIdLists all the VpnGateways in a subscription.
create_or_updateinsertsubscriptionId, resourceGroupName, gatewayName, data__locationCreates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway.
deletedeletesubscriptionId, resourceGroupName, gatewayNameDeletes a virtual wan vpn gateway.
update_tagsexecsubscriptionId, resourceGroupName, gatewayNameUpdates virtual wan vpn gateway tags.
resetexecresourceGroupName, gatewayName, subscriptionIdipConfigurationIdResets the primary of the vpn gateway in the specified resource group.
start_packet_captureexecresourceGroupName, gatewayName, subscriptionIdStarts packet capture on vpn gateway in the specified resource group.
stop_packet_captureexecresourceGroupName, gatewayName, subscriptionIdStops packet capture on vpn 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
gatewayNamestringThe name of the gateway.
resourceGroupNamestringThe resource group name of the VpnGateway.
subscriptionIdstring (uuid)The ID of the target subscription. The value must be an UUID.
ipConfigurationIdstringVpnGateway ipConfigurationId to specify the gateway instance.

SELECT examples

Retrieves the details of a virtual wan vpn gateway.

SELECT
id,
name,
etag,
properties,
systemData,
type
FROM azure.network.vpn_gateways
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND gatewayName = '{{ gatewayName }}' -- required
;

INSERT examples

Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway.

INSERT INTO azure.network.vpn_gateways (
data__properties,
subscriptionId,
resourceGroupName,
gatewayName
)
SELECT
'{{ properties }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ gatewayName }}'
RETURNING
id,
name,
etag,
properties,
systemData,
type
;

DELETE examples

Deletes a virtual wan vpn gateway.

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

Lifecycle Methods

Updates virtual wan vpn gateway tags.

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