vpn_gateways
Creates, updates, deletes, gets or lists a vpn_gateways resource.
Overview
| Name | vpn_gateways |
| Type | Resource |
| Id | azure.network.vpn_gateways |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_resource_group
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Resource ID. |
name | string | Resource name. |
bgpSettings | object | Local network gateway's BGP speaker settings. |
connections | array | List of all vpn connections to the gateway. |
enableBgpRouteTranslationForNat | boolean | Enable BGP routes translation for NAT on this VpnGateway. |
etag | string | A unique read-only string that changes whenever the resource is updated. |
ipConfigurations | array | List of all IPs configured on the gateway. |
isRoutingPreferenceInternet | boolean | Enable Routing Preference property for the Public IP Interface of the VpnGateway. |
location | string | Resource location. |
natRules | array | List of all the nat Rules associated with the gateway. |
provisioningState | string | The provisioning state of the VPN gateway resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". (Failed, Succeeded, Canceled, Creating, Updating, Deleting) |
tags | object | Resource tags. |
type | string | Resource type. |
virtualHub | object | Reference to another subresource. |
vpnGatewayScaleUnit | integer | The scale unit for this vpn gateway. |
| Name | Datatype | Description |
|---|---|---|
id | string | Resource ID. |
name | string | Resource name. |
bgpSettings | object | Local network gateway's BGP speaker settings. |
connections | array | List of all vpn connections to the gateway. |
enableBgpRouteTranslationForNat | boolean | Enable BGP routes translation for NAT on this VpnGateway. |
etag | string | A unique read-only string that changes whenever the resource is updated. |
ipConfigurations | array | List of all IPs configured on the gateway. |
isRoutingPreferenceInternet | boolean | Enable Routing Preference property for the Public IP Interface of the VpnGateway. |
location | string | Resource location. |
natRules | array | List of all the nat Rules associated with the gateway. |
provisioningState | string | The provisioning state of the VPN gateway resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". (Failed, Succeeded, Canceled, Creating, Updating, Deleting) |
tags | object | Resource tags. |
type | string | Resource type. |
virtualHub | object | Reference to another subresource. |
vpnGatewayScaleUnit | integer | The scale unit for this vpn gateway. |
| Name | Datatype | Description |
|---|---|---|
id | string | Resource ID. |
name | string | Resource name. |
bgpSettings | object | Local network gateway's BGP speaker settings. |
connections | array | List of all vpn connections to the gateway. |
enableBgpRouteTranslationForNat | boolean | Enable BGP routes translation for NAT on this VpnGateway. |
etag | string | A unique read-only string that changes whenever the resource is updated. |
ipConfigurations | array | List of all IPs configured on the gateway. |
isRoutingPreferenceInternet | boolean | Enable Routing Preference property for the Public IP Interface of the VpnGateway. |
location | string | Resource location. |
natRules | array | List of all the nat Rules associated with the gateway. |
provisioningState | string | The provisioning state of the VPN gateway resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". (Failed, Succeeded, Canceled, Creating, Updating, Deleting) |
tags | object | Resource tags. |
type | string | Resource type. |
virtualHub | object | Reference to another subresource. |
vpnGatewayScaleUnit | integer | The scale unit for this vpn 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, subscription_id | Retrieves the details of a virtual wan vpn gateway. | |
list_by_resource_group | select | resource_group_name, subscription_id | Lists all the VpnGateways in a resource group. | |
list | select | subscription_id | Lists all the VpnGateways in a subscription. | |
create_or_update | insert | resource_group_name, gateway_name, subscription_id | Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. | |
update_tags | update | resource_group_name, gateway_name, subscription_id | Updates virtual wan vpn gateway tags. | |
create_or_update | replace | resource_group_name, gateway_name, subscription_id | Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. | |
delete | delete | resource_group_name, gateway_name, subscription_id | Deletes a virtual wan vpn gateway. | |
reset | exec | resource_group_name, gateway_name, subscription_id | ipConfigurationId | Resets the primary of the vpn gateway in the specified resource group. |
start_packet_capture | exec | resource_group_name, gateway_name, subscription_id | Starts packet capture on vpn gateway in the specified resource group. | |
stop_packet_capture | exec | resource_group_name, gateway_name, subscription_id | Stops 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.
| Name | Datatype | Description |
|---|---|---|
gateway_name | string | The name of the gateway. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
ipConfigurationId | string | VpnGateway ipConfigurationId to specify the gateway instance. Default value is None. |
SELECT examples
- get
- list_by_resource_group
- list
Retrieves the details of a virtual wan vpn gateway.
SELECT
id,
name,
bgpSettings,
connections,
enableBgpRouteTranslationForNat,
etag,
ipConfigurations,
isRoutingPreferenceInternet,
location,
natRules,
provisioningState,
tags,
type,
virtualHub,
vpnGatewayScaleUnit
FROM azure.network.vpn_gateways
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND gateway_name = '{{ gateway_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Lists all the VpnGateways in a resource group.
SELECT
id,
name,
bgpSettings,
connections,
enableBgpRouteTranslationForNat,
etag,
ipConfigurations,
isRoutingPreferenceInternet,
location,
natRules,
provisioningState,
tags,
type,
virtualHub,
vpnGatewayScaleUnit
FROM azure.network.vpn_gateways
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Lists all the VpnGateways in a subscription.
SELECT
id,
name,
bgpSettings,
connections,
enableBgpRouteTranslationForNat,
etag,
ipConfigurations,
isRoutingPreferenceInternet,
location,
natRules,
provisioningState,
tags,
type,
virtualHub,
vpnGatewayScaleUnit
FROM azure.network.vpn_gateways
WHERE subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway.
INSERT INTO azure.network.vpn_gateways (
id,
location,
tags,
properties,
resource_group_name,
gateway_name,
subscription_id
)
SELECT
'{{ id }}',
'{{ location }}',
'{{ tags }}',
'{{ properties }}',
'{{ resource_group_name }}',
'{{ gateway_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
location,
properties,
tags,
type
;
# Description fields are for documentation purposes
- name: vpn_gateways
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the vpn_gateways resource.
- name: gateway_name
value: "{{ gateway_name }}"
description: Required parameter for the vpn_gateways resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the vpn_gateways resource.
- name: id
value: "{{ id }}"
description: |
Resource ID.
- name: location
value: "{{ location }}"
description: |
Resource location.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: properties
description: |
Properties of the VPN gateway.
value:
virtualHub:
id: "{{ id }}"
connections:
- id: "{{ id }}"
properties:
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: "{{ vpnSiteLink }}"
routingWeight: {{ routingWeight }}
vpnLinkConnectionMode: "{{ vpnLinkConnectionMode }}"
connectionStatus: "{{ connectionStatus }}"
vpnConnectionProtocolType: "{{ vpnConnectionProtocolType }}"
ingressBytesTransferred: {{ ingressBytesTransferred }}
egressBytesTransferred: {{ egressBytesTransferred }}
connectionBandwidth: {{ connectionBandwidth }}
sharedKey: "{{ sharedKey }}"
enableBgp: {{ enableBgp }}
vpnGatewayCustomBgpAddresses: "{{ vpnGatewayCustomBgpAddresses }}"
usePolicyBasedTrafficSelectors: {{ usePolicyBasedTrafficSelectors }}
ipsecPolicies: "{{ ipsecPolicies }}"
enableRateLimiting: {{ enableRateLimiting }}
useLocalAzureIpAddress: {{ useLocalAzureIpAddress }}
provisioningState: "{{ provisioningState }}"
ingressNatRules: "{{ ingressNatRules }}"
egressNatRules: "{{ egressNatRules }}"
dpdTimeoutSeconds: {{ dpdTimeoutSeconds }}
etag: "{{ etag }}"
routingConfiguration:
associatedRouteTable:
id: "{{ id }}"
propagatedRouteTables:
labels: "{{ labels }}"
ids: "{{ ids }}"
vnetRoutes:
staticRoutesConfig: "{{ staticRoutesConfig }}"
staticRoutes: "{{ staticRoutes }}"
bgpConnections: "{{ bgpConnections }}"
inboundRouteMap:
id: "{{ id }}"
outboundRouteMap:
id: "{{ id }}"
name: "{{ name }}"
etag: "{{ etag }}"
bgpSettings:
asn: {{ asn }}
bgpPeeringAddress: "{{ bgpPeeringAddress }}"
peerWeight: {{ peerWeight }}
bgpPeeringAddresses:
- ipconfigurationId: "{{ ipconfigurationId }}"
defaultBgpIpAddresses: "{{ defaultBgpIpAddresses }}"
customBgpIpAddresses: "{{ customBgpIpAddresses }}"
tunnelIpAddresses: "{{ tunnelIpAddresses }}"
provisioningState: "{{ provisioningState }}"
vpnGatewayScaleUnit: {{ vpnGatewayScaleUnit }}
ipConfigurations:
- id: "{{ id }}"
publicIpAddress: "{{ publicIpAddress }}"
privateIpAddress: "{{ privateIpAddress }}"
enableBgpRouteTranslationForNat: {{ enableBgpRouteTranslationForNat }}
isRoutingPreferenceInternet: {{ isRoutingPreferenceInternet }}
natRules:
- id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
properties:
provisioningState: "{{ provisioningState }}"
type: "{{ type }}"
mode: "{{ mode }}"
internalMappings:
- addressSpace: "{{ addressSpace }}"
portRange: "{{ portRange }}"
externalMappings:
- addressSpace: "{{ addressSpace }}"
portRange: "{{ portRange }}"
ipConfigurationId: "{{ ipConfigurationId }}"
egressVpnSiteLinkConnections:
- id: "{{ id }}"
ingressVpnSiteLinkConnections:
- id: "{{ id }}"
etag: "{{ etag }}"
UPDATE examples
- update_tags
Updates virtual wan vpn gateway tags.
UPDATE azure.network.vpn_gateways
SET
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND gateway_name = '{{ gateway_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
location,
properties,
tags,
type;
REPLACE examples
- create_or_update
Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway.
REPLACE azure.network.vpn_gateways
SET
id = '{{ id }}',
location = '{{ location }}',
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND gateway_name = '{{ gateway_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
location,
properties,
tags,
type;
DELETE examples
- delete
Deletes a virtual wan vpn gateway.
DELETE FROM azure.network.vpn_gateways
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND gateway_name = '{{ gateway_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- reset
- start_packet_capture
- stop_packet_capture
Resets the primary of the vpn gateway in the specified resource group.
EXEC azure.network.vpn_gateways.reset
@resource_group_name='{{ resource_group_name }}' --required,
@gateway_name='{{ gateway_name }}' --required,
@subscription_id='{{ subscription_id }}' --required,
@ipConfigurationId='{{ ipConfigurationId }}'
;
Starts packet capture on vpn gateway in the specified resource group.
EXEC azure.network.vpn_gateways.start_packet_capture
@resource_group_name='{{ resource_group_name }}' --required,
@gateway_name='{{ gateway_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"filterData": "{{ filterData }}"
}'
;
Stops packet capture on vpn gateway in the specified resource group.
EXEC azure.network.vpn_gateways.stop_packet_capture
@resource_group_name='{{ resource_group_name }}' --required,
@gateway_name='{{ gateway_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"sasUrl": "{{ sasUrl }}"
}'
;