Skip to main content

p2s_vpn_gateways

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

Overview

Namep2s_vpn_gateways
TypeResource
Idazure.network.p2s_vpn_gateways

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringResource ID.
namestringResource name.
customDnsServersarrayList of all customer specified DNS servers IP addresses.
etagstringA unique read-only string that changes whenever the resource is updated.
isRoutingPreferenceInternetbooleanEnable Routing Preference property for the Public IP Interface of the P2SVpnGateway.
locationstringResource location.
p2SConnectionConfigurationsarrayList of all p2s connection configurations of the gateway.
provisioningStatestringThe provisioning state of the P2S VPN gateway resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". (Failed, Succeeded, Canceled, Creating, Updating, Deleting)
tagsobjectResource tags.
typestringResource type.
virtualHubobjectReference to another subresource.
vpnClientConnectionHealthobjectAll P2S VPN clients' connection health status.
vpnGatewayScaleUnitintegerThe scale unit for this p2s vpn gateway.
vpnServerConfigurationobjectReference to another subresource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, gateway_name, subscription_idRetrieves the details of a virtual wan p2s vpn gateway.
list_by_resource_groupselectresource_group_name, subscription_idLists all the P2SVpnGateways in a resource group.
listselectsubscription_idLists all the P2SVpnGateways in a subscription.
create_or_updateinsertresource_group_name, gateway_name, subscription_idCreates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway.
update_tagsupdateresource_group_name, gateway_name, subscription_idUpdates virtual wan p2s vpn gateway tags.
create_or_updatereplaceresource_group_name, gateway_name, subscription_idCreates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway.
deletedeleteresource_group_name, gateway_name, subscription_idDeletes a virtual wan p2s vpn gateway.
get_p2s_vpn_connection_healthexecresource_group_name, gateway_name, subscription_idGets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group.
get_p2s_vpn_connection_health_detailedexecresource_group_name, gateway_name, subscription_idGets the sas url to get the connection health detail of P2S clients of the virtual wan P2SVpnGateway in the specified resource group.
resetexecresource_group_name, gateway_name, subscription_idResets the primary of the p2s vpn gateway in the specified resource group.
generate_vpn_profileexecresource_group_name, gateway_name, subscription_idGenerates VPN profile for P2S client of the P2SVpnGateway in the specified resource group.
disconnect_p2s_vpn_connectionsexecresource_group_name, p2s_vpn_gateway_name, subscription_idDisconnect P2S vpn connections of the virtual wan P2SVpnGateway 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
gateway_namestringThe name of the gateway. Required.
p2s_vpn_gateway_namestringThe name of the P2S Vpn Gateway. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples

Retrieves the details of a virtual wan p2s vpn gateway.

SELECT
id,
name,
customDnsServers,
etag,
isRoutingPreferenceInternet,
location,
p2SConnectionConfigurations,
provisioningState,
tags,
type,
virtualHub,
vpnClientConnectionHealth,
vpnGatewayScaleUnit,
vpnServerConfiguration
FROM azure.network.p2s_vpn_gateways
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND gateway_name = '{{ gateway_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway.

INSERT INTO azure.network.p2s_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
;

UPDATE examples

Updates virtual wan p2s vpn gateway tags.

UPDATE azure.network.p2s_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

Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway.

REPLACE azure.network.p2s_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

Deletes a virtual wan p2s vpn gateway.

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

Lifecycle Methods

Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group.

EXEC azure.network.p2s_vpn_gateways.get_p2s_vpn_connection_health 
@resource_group_name='{{ resource_group_name }}' --required,
@gateway_name='{{ gateway_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;