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:

NameDatatypeDescription
idstringResource ID.
namestringThe name of the resource that is unique within a resource group. This name can be used to access the resource.
connectionBandwidthintegerExpected bandwidth in MBPS.
connectionStatusstringThe connection status. Known values are: "Unknown", "Connecting", "Connected", and "NotConnected". (Unknown, Connecting, Connected, NotConnected)
dpdTimeoutSecondsintegerDPD timeout in seconds for vpn connection.
egressBytesTransferredintegerEgress bytes transferred.
enableBgpbooleanEnableBgp flag.
enableInternetSecuritybooleanEnable internet security.
enableRateLimitingbooleanEnableBgp flag.
etagstringA unique read-only string that changes whenever the resource is updated.
ingressBytesTransferredintegerIngress bytes transferred.
ipsecPoliciesarrayThe IPSec Policies to be considered by this connection.
provisioningStatestringThe provisioning state of the VPN connection resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". (Failed, Succeeded, Canceled, Creating, Updating, Deleting)
remoteVpnSiteobjectReference to another subresource.
routingConfigurationobjectThe Routing Configuration indicating the associated and propagated route tables on this connection.
routingWeightintegerRouting weight for vpn connection.
sharedKeystringDeprecated: SharedKey for the vpn connection. This is no more used.
trafficSelectorPoliciesarrayThe Traffic Selector Policies to be considered by this connection.
useLocalAzureIpAddressbooleanUse local azure ip to initiate connection.
usePolicyBasedTrafficSelectorsbooleanEnable policy-based traffic selectors.
vpnConnectionProtocolTypestringConnection protocol used for this connection. Known values are: "IKEv2" and "IKEv1". (IKEv2, IKEv1)
vpnLinkConnectionsarrayList of all vpn site link connections to the gateway.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, gateway_name, connection_name, subscription_idRetrieves the details of a vpn connection.
list_by_vpn_gatewayselectresource_group_name, gateway_name, subscription_idRetrieves all vpn connections for a particular virtual wan vpn gateway.
create_or_updateinsertresource_group_name, gateway_name, connection_name, subscription_idCreates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection.
create_or_updatereplaceresource_group_name, gateway_name, connection_name, subscription_idCreates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection.
deletedeleteresource_group_name, gateway_name, connection_name, subscription_idDeletes a vpn connection.
start_packet_captureexecresource_group_name, gateway_name, vpn_connection_name, subscription_idStarts packet capture on Vpn connection in the specified resource group.
stop_packet_captureexecresource_group_name, gateway_name, vpn_connection_name, subscription_idStops 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
connection_namestringThe name of the vpn connection. Required.
gateway_namestringThe name of the vpn gateway. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
vpn_connection_namestringThe name of the vpn connection. Required.

SELECT examples

Retrieves the details of a vpn connection.

SELECT
id,
name,
connectionBandwidth,
connectionStatus,
dpdTimeoutSeconds,
egressBytesTransferred,
enableBgp,
enableInternetSecurity,
enableRateLimiting,
etag,
ingressBytesTransferred,
ipsecPolicies,
provisioningState,
remoteVpnSite,
routingConfiguration,
routingWeight,
sharedKey,
trafficSelectorPolicies,
useLocalAzureIpAddress,
usePolicyBasedTrafficSelectors,
vpnConnectionProtocolType,
vpnLinkConnections
FROM azure.network.vpn_connections
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND gateway_name = '{{ gateway_name }}' -- required
AND connection_name = '{{ connection_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- 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 (
id,
properties,
name,
resource_group_name,
gateway_name,
connection_name,
subscription_id
)
SELECT
'{{ id }}',
'{{ properties }}',
'{{ name }}',
'{{ resource_group_name }}',
'{{ gateway_name }}',
'{{ connection_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
properties
;

REPLACE examples

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

REPLACE azure.network.vpn_connections
SET
id = '{{ id }}',
properties = '{{ properties }}',
name = '{{ name }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND gateway_name = '{{ gateway_name }}' --required
AND connection_name = '{{ connection_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
properties;

DELETE examples

Deletes a vpn connection.

DELETE FROM azure.network.vpn_connections
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND gateway_name = '{{ gateway_name }}' --required
AND connection_name = '{{ connection_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

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

EXEC azure.network.vpn_connections.start_packet_capture 
@resource_group_name='{{ resource_group_name }}' --required,
@gateway_name='{{ gateway_name }}' --required,
@vpn_connection_name='{{ vpn_connection_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"filterData": "{{ filterData }}",
"linkConnectionNames": "{{ linkConnectionNames }}"
}'
;