Skip to main content

vpn_gateways

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

Overview

Namevpn_gateways
TypeResource
Idazure.network.vpn_gateways

Fields

NameDatatypeDescription
idtextResource ID.
nametextResource name.
bgp_settingstextfield from the properties object
connectionstextfield from the properties object
enable_bgp_route_translation_for_nattextfield from the properties object
etagtextA unique read-only string that changes whenever the resource is updated.
gatewayNametextfield from the properties object
ip_configurationstextfield from the properties object
is_routing_preference_internettextfield from the properties object
locationtextResource location.
nat_rulestextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags.
typetextResource type.
virtual_hubtextfield from the properties object
vpn_gateway_scale_unittextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTgatewayName, resourceGroupName, subscriptionIdRetrieves the details of a virtual wan vpn gateway.
listSELECTsubscriptionIdLists all the VpnGateways in a subscription.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdLists all the VpnGateways in a resource group.
create_or_updateINSERTgatewayName, resourceGroupName, subscriptionId, data__locationCreates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway.
deleteDELETEgatewayName, resourceGroupName, subscriptionIdDeletes a virtual wan vpn gateway.
resetEXECgatewayName, resourceGroupName, subscriptionIdResets the primary of the vpn gateway in the specified resource group.
start_packet_captureEXECgatewayName, resourceGroupName, subscriptionIdStarts packet capture on vpn gateway in the specified resource group.
stop_packet_captureEXECgatewayName, resourceGroupName, subscriptionIdStops packet capture on vpn gateway in the specified resource group.
update_tagsEXECgatewayName, resourceGroupName, subscriptionIdUpdates virtual wan vpn gateway tags.

SELECT examples

Lists all the VpnGateways in a subscription.

SELECT
id,
name,
bgp_settings,
connections,
enable_bgp_route_translation_for_nat,
etag,
gatewayName,
ip_configurations,
is_routing_preference_internet,
location,
nat_rules,
provisioning_state,
resourceGroupName,
subscriptionId,
tags,
type,
virtual_hub,
vpn_gateway_scale_unit
FROM azure.network.vw_vpn_gateways
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new vpn_gateways resource.

/*+ create */
INSERT INTO azure.network.vpn_gateways (
gatewayName,
resourceGroupName,
subscriptionId,
data__location,
properties,
id,
location,
tags
)
SELECT
'{{ gatewayName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__location }}',
'{{ properties }}',
'{{ id }}',
'{{ location }}',
'{{ tags }}'
;

DELETE example

Deletes the specified vpn_gateways resource.

/*+ delete */
DELETE FROM azure.network.vpn_gateways
WHERE gatewayName = '{{ gatewayName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';