Skip to main content

virtual_network_links

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

Overview

Namevirtual_network_links
TypeResource
Idazure.private_dns.virtual_network_links

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource Id for the resource. Example - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateDnsZoneName}'. # pylint: disable=line-too-long
namestringThe name of the resource.
etagstringThe ETag of the virtual network link.
locationstringThe Azure Region where the resource lives.
provisioningStatestringThe provisioning state of the resource. This is a read-only property and any attempt to set this value will be ignored. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Canceled".
registrationEnabledbooleanIs auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled?.
resolutionPolicystringThe resolution policy on the virtual network link. Only applicable for virtual network links to privatelink zones, and for A,AAAA,CNAME queries. When set to 'NxDomainRedirect', Azure DNS resolver falls back to public resolution if private dns query resolution results in non-existent domain response. Known values are: "Default" and "NxDomainRedirect".
tagsobjectResource tags.
typestringThe type of the resource. Example - 'Microsoft.Network/privateDnsZones'.
virtualNetworkobjectThe reference of the virtual network.
virtualNetworkLinkStatestringThe status of the virtual network link to the Private DNS zone. Possible values are 'InProgress' and 'Done'. This is a read-only property and any attempt to set this value will be ignored. Known values are: "InProgress" and "Completed".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, private_zone_name, virtual_network_link_name, subscription_idGets a virtual network link to the specified Private DNS zone.
listselectresource_group_name, private_zone_name, subscription_id$topLists the virtual network links to the specified Private DNS zone.
create_or_updateinsertresource_group_name, private_zone_name, virtual_network_link_name, subscription_idIf-Match, If-None-MatchCreates or updates a virtual network link to the specified Private DNS zone.
updateupdateresource_group_name, private_zone_name, virtual_network_link_name, subscription_idIf-MatchUpdates a virtual network link to the specified Private DNS zone.
create_or_updatereplaceresource_group_name, private_zone_name, virtual_network_link_name, subscription_idIf-Match, If-None-MatchCreates or updates a virtual network link to the specified Private DNS zone.
deletedeleteresource_group_name, private_zone_name, virtual_network_link_name, subscription_idIf-MatchDeletes a virtual network link to the specified Private DNS zone. WARNING: In case of a registration virtual network, all auto-registered DNS records in the zone for the virtual network will also be deleted. This operation cannot be undone.

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
private_zone_namestringThe name of the Private DNS zone (without a terminating dot). Required.
resource_group_namestringThe name of the resource group. Required.
subscription_idstring
$topintegerThe maximum number of virtual network links to return. If not specified, returns up to 100 virtual network links. Default value is None.
If-MatchstringThe ETag of the virtual network link to the Private DNS zone. Omit this value to always delete the current zone. Specify the last-seen ETag value to prevent accidentally deleting any concurrent changes. Default value is None.
If-None-MatchstringSet to '*' to allow a new virtual network link to the Private DNS zone to be created, but to prevent updating an existing link. Other values will be ignored. Default value is None.

SELECT examples

Gets a virtual network link to the specified Private DNS zone.

SELECT
id,
name,
etag,
location,
provisioningState,
registrationEnabled,
resolutionPolicy,
tags,
type,
virtualNetwork,
virtualNetworkLinkState
FROM azure.private_dns.virtual_network_links
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND private_zone_name = '{{ private_zone_name }}' -- required
AND virtual_network_link_name = '{{ virtual_network_link_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates or updates a virtual network link to the specified Private DNS zone.

INSERT INTO azure.private_dns.virtual_network_links (
tags,
location,
etag,
properties,
resource_group_name,
private_zone_name,
virtual_network_link_name,
subscription_id,
If-Match,
If-None-Match
)
SELECT
'{{ tags }}',
'{{ location }}',
'{{ etag }}',
'{{ properties }}',
'{{ resource_group_name }}',
'{{ private_zone_name }}',
'{{ virtual_network_link_name }}',
'{{ subscription_id }}',
'{{ If-Match }}',
'{{ If-None-Match }}'
RETURNING
id,
name,
etag,
location,
properties,
tags,
type
;

UPDATE examples

Updates a virtual network link to the specified Private DNS zone.

UPDATE azure.private_dns.virtual_network_links
SET
tags = '{{ tags }}',
location = '{{ location }}',
etag = '{{ etag }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND private_zone_name = '{{ private_zone_name }}' --required
AND virtual_network_link_name = '{{ virtual_network_link_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND If-Match = '{{ If-Match}}'
RETURNING
id,
name,
etag,
location,
properties,
tags,
type;

REPLACE examples

Creates or updates a virtual network link to the specified Private DNS zone.

REPLACE azure.private_dns.virtual_network_links
SET
tags = '{{ tags }}',
location = '{{ location }}',
etag = '{{ etag }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND private_zone_name = '{{ private_zone_name }}' --required
AND virtual_network_link_name = '{{ virtual_network_link_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND If-Match = '{{ If-Match}}'
AND If-None-Match = '{{ If-None-Match}}'
RETURNING
id,
name,
etag,
location,
properties,
tags,
type;

DELETE examples

Deletes a virtual network link to the specified Private DNS zone. WARNING: In case of a registration virtual network, all auto-registered DNS records in the zone for the virtual network will also be deleted. This operation cannot be undone.

DELETE FROM azure.private_dns.virtual_network_links
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND private_zone_name = '{{ private_zone_name }}' --required
AND virtual_network_link_name = '{{ virtual_network_link_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND If-Match = '{{ If-Match }}'
;