Skip to main content

vpn_connections

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

Overview

Namevpn_connections
TypeResource
Idazure.network.vpn_connections

Fields

The following fields are returned by SELECT queries:

Request successful. Returns the details of the vpn connection.

NameDatatypeDescription
idstringResource ID.
namestringThe name of the resource that is unique within a resource group. This name can be used to access the resource.
etagstringA unique read-only string that changes whenever the resource is updated.
propertiesobjectProperties of the VPN connection.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, gatewayName, connectionNameRetrieves the details of a vpn connection.
list_by_vpn_gatewayselectsubscriptionId, resourceGroupName, gatewayNameRetrieves all vpn connections for a particular virtual wan vpn gateway.
create_or_updateinsertsubscriptionId, resourceGroupName, gatewayName, connectionNameCreates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection.
deletedeletesubscriptionId, resourceGroupName, gatewayName, connectionNameDeletes a vpn connection.
start_packet_captureexecresourceGroupName, gatewayName, vpnConnectionName, subscriptionIdStarts packet capture on Vpn connection in the specified resource group.
stop_packet_captureexecresourceGroupName, gatewayName, vpnConnectionName, subscriptionIdStops packet capture on Vpn connection 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
connectionNamestringThe name of the connection.
gatewayNamestringThe name of the gateway.
resourceGroupNamestringThe name of the resource group.
subscriptionIdstring (uuid)The ID of the target subscription. The value must be an UUID.
vpnConnectionNamestringThe name of the vpn connection.

SELECT examples

Retrieves the details of a vpn connection.

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

INSERT examples

Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection.

INSERT INTO azure.network.vpn_connections (
data__properties,
data__name,
data__id,
subscriptionId,
resourceGroupName,
gatewayName,
connectionName
)
SELECT
'{{ properties }}',
'{{ name }}',
'{{ id }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ gatewayName }}',
'{{ connectionName }}'
RETURNING
id,
name,
etag,
properties
;

DELETE examples

Deletes a vpn connection.

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

Lifecycle Methods

Starts packet capture on Vpn connection in the specified resource group.

EXEC azure.network.vpn_connections.start_packet_capture 
@resourceGroupName='{{ resourceGroupName }}' --required,
@gatewayName='{{ gatewayName }}' --required,
@vpnConnectionName='{{ vpnConnectionName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
@@json=
'{
"filterData": "{{ filterData }}",
"linkConnectionNames": "{{ linkConnectionNames }}"
}'
;