Skip to main content

virtual_network_gateway_connections

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

Overview

Namevirtual_network_gateway_connections
TypeResource
Idazure.network.virtual_network_gateway_connections

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringResource ID.
namestringResource name.
authenticationTypestringGateway connection authentication type. Known values are: "PSK" and "Certificate". (PSK, Certificate)
authorizationKeystringThe authorizationKey.
certificateAuthenticationobjectCertificate Authentication information for a certificate based authentication connection.
connectionModestringThe connection mode for this connection. Known values are: "Default", "ResponderOnly", and "InitiatorOnly". (Default, ResponderOnly, InitiatorOnly)
connectionProtocolstringConnection protocol used for this connection. Known values are: "IKEv2" and "IKEv1". (IKEv2, IKEv1)
connectionStatusstringVirtual Network Gateway connection status. Known values are: "Unknown", "Connecting", "Connected", and "NotConnected". (Unknown, Connecting, Connected, NotConnected)
connectionTypestringGateway connection type. Required. Known values are: "IPsec", "Vnet2Vnet", "ExpressRoute", and "VPNClient". (IPsec, Vnet2Vnet, ExpressRoute, VPNClient)
dpdTimeoutSecondsintegerThe dead peer detection timeout of this connection in seconds.
egressBytesTransferredintegerThe egress bytes transferred in this connection.
egressNatRulesarrayList of egress NatRules.
enableBgpbooleanEnableBgp flag.
enablePrivateLinkFastPathbooleanBypass the ExpressRoute gateway when accessing private-links. ExpressRoute FastPath (expressRouteGatewayBypass) must be enabled.
etagstringA unique read-only string that changes whenever the resource is updated.
expressRouteGatewayBypassbooleanBypass ExpressRoute Gateway for data forwarding.
gatewayCustomBgpIpAddressesarrayGatewayCustomBgpIpAddresses to be used for virtual network gateway Connection.
ingressBytesTransferredintegerThe ingress bytes transferred in this connection.
ingressNatRulesarrayList of ingress NatRules.
ipsecPoliciesarrayThe IPSec Policies to be considered by this connection.
localNetworkGateway2objectThe reference to local network gateway resource.
locationstringResource location.
peerobjectReference to another subresource.
provisioningStatestringThe provisioning state of the virtual network gateway connection resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". (Failed, Succeeded, Canceled, Creating, Updating, Deleting)
resourceGuidstringThe resource GUID property of the virtual network gateway connection resource.
routingConfigurationobjectThe routing configuration indicating the associated and propagated route tables for this connection.
routingWeightintegerThe routing weight.
sharedKeystringThe IPSec shared key.
tagsobjectResource tags.
trafficSelectorPoliciesarrayThe Traffic Selector Policies to be considered by this connection.
tunnelConnectionStatusarrayCollection of all tunnels' connection health status.
tunnelPropertiesarrayTunnel properties for virtual network gateway connection.
typestringResource type.
useLocalAzureIpAddressbooleanUse private local Azure IP for the connection.
usePolicyBasedTrafficSelectorsbooleanEnable policy-based traffic selectors.
virtualNetworkGateway1objectThe reference to virtual network gateway resource. Required.
virtualNetworkGateway2objectThe reference to virtual network gateway resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, virtual_network_gateway_connection_name, subscription_idGets the specified virtual network gateway connection by resource group.
listselectresource_group_name, subscription_idThe List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created.
create_or_updateinsertresource_group_name, virtual_network_gateway_connection_name, subscription_id, propertiesCreates or updates a virtual network gateway connection in the specified resource group.
update_tagsupdateresource_group_name, virtual_network_gateway_connection_name, subscription_idUpdates a virtual network gateway connection tags.
create_or_updatereplaceresource_group_name, virtual_network_gateway_connection_name, subscription_id, propertiesCreates or updates a virtual network gateway connection in the specified resource group.
deletedeleteresource_group_name, virtual_network_gateway_connection_name, subscription_idDeletes the specified virtual network Gateway connection.
get_shared_keyexecresource_group_name, virtual_network_gateway_connection_name, subscription_idThe Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider.
set_shared_keyexecresource_group_name, virtual_network_gateway_connection_name, subscription_id, valueThe Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider.
get_ike_sasexecresource_group_name, virtual_network_gateway_connection_name, subscription_idLists IKE Security Associations for the virtual network gateway connection in the specified resource group.
reset_shared_keyexecresource_group_name, virtual_network_gateway_connection_name, subscription_id, keyLengthThe VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider.
start_packet_captureexecresource_group_name, virtual_network_gateway_connection_name, subscription_idStarts packet capture on virtual network gateway connection in the specified resource group.
stop_packet_captureexecresource_group_name, virtual_network_gateway_connection_name, subscription_idStops packet capture on virtual network gateway connection in the specified resource group.
reset_connectionexecresource_group_name, virtual_network_gateway_connection_name, subscription_idResets the virtual network gateway connection specified.

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
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
virtual_network_gateway_connection_namestringThe name of the virtual network gateway connection. Required.

SELECT examples

Gets the specified virtual network gateway connection by resource group.

SELECT
id,
name,
authenticationType,
authorizationKey,
certificateAuthentication,
connectionMode,
connectionProtocol,
connectionStatus,
connectionType,
dpdTimeoutSeconds,
egressBytesTransferred,
egressNatRules,
enableBgp,
enablePrivateLinkFastPath,
etag,
expressRouteGatewayBypass,
gatewayCustomBgpIpAddresses,
ingressBytesTransferred,
ingressNatRules,
ipsecPolicies,
localNetworkGateway2,
location,
peer,
provisioningState,
resourceGuid,
routingConfiguration,
routingWeight,
sharedKey,
tags,
trafficSelectorPolicies,
tunnelConnectionStatus,
tunnelProperties,
type,
useLocalAzureIpAddress,
usePolicyBasedTrafficSelectors,
virtualNetworkGateway1,
virtualNetworkGateway2
FROM azure.network.virtual_network_gateway_connections
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND virtual_network_gateway_connection_name = '{{ virtual_network_gateway_connection_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates or updates a virtual network gateway connection in the specified resource group.

INSERT INTO azure.network.virtual_network_gateway_connections (
id,
location,
tags,
properties,
resource_group_name,
virtual_network_gateway_connection_name,
subscription_id
)
SELECT
'{{ id }}',
'{{ location }}',
'{{ tags }}',
'{{ properties }}' /* required */,
'{{ resource_group_name }}',
'{{ virtual_network_gateway_connection_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
location,
properties,
tags,
type
;

UPDATE examples

Updates a virtual network gateway connection tags.

UPDATE azure.network.virtual_network_gateway_connections
SET
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND virtual_network_gateway_connection_name = '{{ virtual_network_gateway_connection_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
location,
properties,
tags,
type;

REPLACE examples

Creates or updates a virtual network gateway connection in the specified resource group.

REPLACE azure.network.virtual_network_gateway_connections
SET
id = '{{ id }}',
location = '{{ location }}',
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND virtual_network_gateway_connection_name = '{{ virtual_network_gateway_connection_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND properties = '{{ properties }}' --required
RETURNING
id,
name,
etag,
location,
properties,
tags,
type;

DELETE examples

Deletes the specified virtual network Gateway connection.

DELETE FROM azure.network.virtual_network_gateway_connections
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND virtual_network_gateway_connection_name = '{{ virtual_network_gateway_connection_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider.

EXEC azure.network.virtual_network_gateway_connections.get_shared_key 
@resource_group_name='{{ resource_group_name }}' --required,
@virtual_network_gateway_connection_name='{{ virtual_network_gateway_connection_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;