Skip to main content

vpn_sites

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

Overview

Namevpn_sites
TypeResource
Idazure.network.vpn_sites

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringResource ID.
namestringResource name.
addressSpaceobjectThe AddressSpace that contains an array of IP address ranges.
bgpPropertiesobjectThe set of bgp properties.
devicePropertiesobjectThe device properties.
etagstringA unique read-only string that changes whenever the resource is updated.
ipAddressstringThe ip-address for the vpn-site.
isSecuritySitebooleanIsSecuritySite flag.
locationstringResource location.
o365PolicyobjectOffice365 Policy.
provisioningStatestringThe provisioning state of the VPN site resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". (Failed, Succeeded, Canceled, Creating, Updating, Deleting)
siteKeystringThe key for vpn-site that can be used for connections.
tagsobjectResource tags.
typestringResource type.
virtualWanobjectReference to another subresource.
vpnSiteLinksarrayList of all vpn site links.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, vpn_site_name, subscription_idRetrieves the details of a VPN site.
list_by_resource_groupselectresource_group_name, subscription_idLists all the vpnSites in a resource group.
listselectsubscription_idLists all the VpnSites in a subscription.
create_or_updateinsertresource_group_name, vpn_site_name, subscription_idCreates a VpnSite resource if it doesn't exist else updates the existing VpnSite.
update_tagsupdateresource_group_name, vpn_site_name, subscription_idUpdates VpnSite tags.
create_or_updatereplaceresource_group_name, vpn_site_name, subscription_idCreates a VpnSite resource if it doesn't exist else updates the existing VpnSite.
deletedeleteresource_group_name, vpn_site_name, subscription_idDeletes a VpnSite.

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
vpn_site_namestringThe name of the VpnSite being retrieved. Required.

SELECT examples

Retrieves the details of a VPN site.

SELECT
id,
name,
addressSpace,
bgpProperties,
deviceProperties,
etag,
ipAddress,
isSecuritySite,
location,
o365Policy,
provisioningState,
siteKey,
tags,
type,
virtualWan,
vpnSiteLinks
FROM azure.network.vpn_sites
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND vpn_site_name = '{{ vpn_site_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite.

INSERT INTO azure.network.vpn_sites (
id,
location,
tags,
properties,
resource_group_name,
vpn_site_name,
subscription_id
)
SELECT
'{{ id }}',
'{{ location }}',
'{{ tags }}',
'{{ properties }}',
'{{ resource_group_name }}',
'{{ vpn_site_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
location,
properties,
tags,
type
;

UPDATE examples

Updates VpnSite tags.

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

REPLACE examples

Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite.

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

DELETE examples

Deletes a VpnSite.

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