vpn_connections
Creates, updates, deletes, gets or lists a vpn_connections resource.
Overview
| Name | vpn_connections |
| Type | Resource |
| Id | azure.network.vpn_connections |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_vpn_gateway
| Name | Datatype | Description |
|---|---|---|
id | string | Resource ID. |
name | string | The name of the resource that is unique within a resource group. This name can be used to access the resource. |
connectionBandwidth | integer | Expected bandwidth in MBPS. |
connectionStatus | string | The connection status. Known values are: "Unknown", "Connecting", "Connected", and "NotConnected". (Unknown, Connecting, Connected, NotConnected) |
dpdTimeoutSeconds | integer | DPD timeout in seconds for vpn connection. |
egressBytesTransferred | integer | Egress bytes transferred. |
enableBgp | boolean | EnableBgp flag. |
enableInternetSecurity | boolean | Enable internet security. |
enableRateLimiting | boolean | EnableBgp flag. |
etag | string | A unique read-only string that changes whenever the resource is updated. |
ingressBytesTransferred | integer | Ingress bytes transferred. |
ipsecPolicies | array | The IPSec Policies to be considered by this connection. |
provisioningState | string | The provisioning state of the VPN connection resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". (Failed, Succeeded, Canceled, Creating, Updating, Deleting) |
remoteVpnSite | object | Reference to another subresource. |
routingConfiguration | object | The Routing Configuration indicating the associated and propagated route tables on this connection. |
routingWeight | integer | Routing weight for vpn connection. |
sharedKey | string | Deprecated: SharedKey for the vpn connection. This is no more used. |
trafficSelectorPolicies | array | The Traffic Selector Policies to be considered by this connection. |
useLocalAzureIpAddress | boolean | Use local azure ip to initiate connection. |
usePolicyBasedTrafficSelectors | boolean | Enable policy-based traffic selectors. |
vpnConnectionProtocolType | string | Connection protocol used for this connection. Known values are: "IKEv2" and "IKEv1". (IKEv2, IKEv1) |
vpnLinkConnections | array | List of all vpn site link connections to the gateway. |
| Name | Datatype | Description |
|---|---|---|
id | string | Resource ID. |
name | string | The name of the resource that is unique within a resource group. This name can be used to access the resource. |
connectionBandwidth | integer | Expected bandwidth in MBPS. |
connectionStatus | string | The connection status. Known values are: "Unknown", "Connecting", "Connected", and "NotConnected". (Unknown, Connecting, Connected, NotConnected) |
dpdTimeoutSeconds | integer | DPD timeout in seconds for vpn connection. |
egressBytesTransferred | integer | Egress bytes transferred. |
enableBgp | boolean | EnableBgp flag. |
enableInternetSecurity | boolean | Enable internet security. |
enableRateLimiting | boolean | EnableBgp flag. |
etag | string | A unique read-only string that changes whenever the resource is updated. |
ingressBytesTransferred | integer | Ingress bytes transferred. |
ipsecPolicies | array | The IPSec Policies to be considered by this connection. |
provisioningState | string | The provisioning state of the VPN connection resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". (Failed, Succeeded, Canceled, Creating, Updating, Deleting) |
remoteVpnSite | object | Reference to another subresource. |
routingConfiguration | object | The Routing Configuration indicating the associated and propagated route tables on this connection. |
routingWeight | integer | Routing weight for vpn connection. |
sharedKey | string | Deprecated: SharedKey for the vpn connection. This is no more used. |
trafficSelectorPolicies | array | The Traffic Selector Policies to be considered by this connection. |
useLocalAzureIpAddress | boolean | Use local azure ip to initiate connection. |
usePolicyBasedTrafficSelectors | boolean | Enable policy-based traffic selectors. |
vpnConnectionProtocolType | string | Connection protocol used for this connection. Known values are: "IKEv2" and "IKEv1". (IKEv2, IKEv1) |
vpnLinkConnections | array | List of all vpn site link connections to the gateway. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, gateway_name, connection_name, subscription_id | Retrieves the details of a vpn connection. | |
list_by_vpn_gateway | select | resource_group_name, gateway_name, subscription_id | Retrieves all vpn connections for a particular virtual wan vpn gateway. | |
create_or_update | insert | resource_group_name, gateway_name, connection_name, subscription_id | Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. | |
create_or_update | replace | resource_group_name, gateway_name, connection_name, subscription_id | Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. | |
delete | delete | resource_group_name, gateway_name, connection_name, subscription_id | Deletes a vpn connection. | |
start_packet_capture | exec | resource_group_name, gateway_name, vpn_connection_name, subscription_id | Starts packet capture on Vpn connection in the specified resource group. | |
stop_packet_capture | exec | resource_group_name, gateway_name, vpn_connection_name, subscription_id | Stops 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.
| Name | Datatype | Description |
|---|---|---|
connection_name | string | The name of the vpn connection. Required. |
gateway_name | string | The name of the vpn gateway. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
vpn_connection_name | string | The name of the vpn connection. Required. |
SELECT examples
- get
- list_by_vpn_gateway
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
;
Retrieves all vpn connections for a particular virtual wan vpn gateway.
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 subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: vpn_connections
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the vpn_connections resource.
- name: gateway_name
value: "{{ gateway_name }}"
description: Required parameter for the vpn_connections resource.
- name: connection_name
value: "{{ connection_name }}"
description: Required parameter for the vpn_connections resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the vpn_connections resource.
- name: id
value: "{{ id }}"
description: |
Resource ID.
- name: properties
description: |
Properties of the VPN connection.
value:
remoteVpnSite:
id: "{{ id }}"
routingWeight: {{ routingWeight }}
dpdTimeoutSeconds: {{ dpdTimeoutSeconds }}
connectionStatus: "{{ connectionStatus }}"
vpnConnectionProtocolType: "{{ vpnConnectionProtocolType }}"
ingressBytesTransferred: {{ ingressBytesTransferred }}
egressBytesTransferred: {{ egressBytesTransferred }}
connectionBandwidth: {{ connectionBandwidth }}
sharedKey: "{{ sharedKey }}"
enableBgp: {{ enableBgp }}
usePolicyBasedTrafficSelectors: {{ usePolicyBasedTrafficSelectors }}
ipsecPolicies:
- saLifeTimeSeconds: {{ saLifeTimeSeconds }}
saDataSizeKilobytes: {{ saDataSizeKilobytes }}
ipsecEncryption: "{{ ipsecEncryption }}"
ipsecIntegrity: "{{ ipsecIntegrity }}"
ikeEncryption: "{{ ikeEncryption }}"
ikeIntegrity: "{{ ikeIntegrity }}"
dhGroup: "{{ dhGroup }}"
pfsGroup: "{{ pfsGroup }}"
trafficSelectorPolicies:
- localAddressRanges: "{{ localAddressRanges }}"
remoteAddressRanges: "{{ remoteAddressRanges }}"
enableRateLimiting: {{ enableRateLimiting }}
enableInternetSecurity: {{ enableInternetSecurity }}
useLocalAzureIpAddress: {{ useLocalAzureIpAddress }}
provisioningState: "{{ provisioningState }}"
vpnLinkConnections:
- id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
properties:
vpnSiteLink:
id: "{{ id }}"
routingWeight: {{ routingWeight }}
vpnLinkConnectionMode: "{{ vpnLinkConnectionMode }}"
connectionStatus: "{{ connectionStatus }}"
vpnConnectionProtocolType: "{{ vpnConnectionProtocolType }}"
ingressBytesTransferred: {{ ingressBytesTransferred }}
egressBytesTransferred: {{ egressBytesTransferred }}
connectionBandwidth: {{ connectionBandwidth }}
sharedKey: "{{ sharedKey }}"
enableBgp: {{ enableBgp }}
vpnGatewayCustomBgpAddresses:
- ipConfigurationId: "{{ ipConfigurationId }}"
customBgpIpAddress: "{{ customBgpIpAddress }}"
usePolicyBasedTrafficSelectors: {{ usePolicyBasedTrafficSelectors }}
ipsecPolicies:
- saLifeTimeSeconds: {{ saLifeTimeSeconds }}
saDataSizeKilobytes: {{ saDataSizeKilobytes }}
ipsecEncryption: "{{ ipsecEncryption }}"
ipsecIntegrity: "{{ ipsecIntegrity }}"
ikeEncryption: "{{ ikeEncryption }}"
ikeIntegrity: "{{ ikeIntegrity }}"
dhGroup: "{{ dhGroup }}"
pfsGroup: "{{ pfsGroup }}"
enableRateLimiting: {{ enableRateLimiting }}
useLocalAzureIpAddress: {{ useLocalAzureIpAddress }}
provisioningState: "{{ provisioningState }}"
ingressNatRules:
- id: "{{ id }}"
egressNatRules:
- id: "{{ id }}"
dpdTimeoutSeconds: {{ dpdTimeoutSeconds }}
etag: "{{ etag }}"
routingConfiguration:
associatedRouteTable:
id: "{{ id }}"
propagatedRouteTables:
labels:
- "{{ labels }}"
ids:
- id: "{{ id }}"
vnetRoutes:
staticRoutesConfig:
propagateStaticRoutes: {{ propagateStaticRoutes }}
vnetLocalRouteOverrideCriteria: "{{ vnetLocalRouteOverrideCriteria }}"
staticRoutes:
- name: "{{ name }}"
addressPrefixes: "{{ addressPrefixes }}"
nextHopIpAddress: "{{ nextHopIpAddress }}"
bgpConnections:
- id: "{{ id }}"
inboundRouteMap:
id: "{{ id }}"
outboundRouteMap:
id: "{{ id }}"
- name: name
value: "{{ name }}"
description: |
The name of the resource that is unique within a resource group. This name can be used to access the resource.
REPLACE examples
- create_or_update
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
- delete
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
- start_packet_capture
- stop_packet_capture
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 }}"
}'
;
Stops packet capture on Vpn connection in the specified resource group.
EXEC azure.network.vpn_connections.stop_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=
'{
"sasUrl": "{{ sasUrl }}",
"linkConnectionNames": "{{ linkConnectionNames }}"
}'
;