Skip to main content

private_zones

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

Overview

Nameprivate_zones
TypeResource
Idazure.private_dns.private_zones

Fields

NameDatatypeDescription
etagtextThe ETag of the zone.
internal_idtextfield from the properties object
locationtextThe Azure Region where the resource lives
max_number_of_record_setstextfield from the properties object
max_number_of_virtual_network_linkstextfield from the properties object
max_number_of_virtual_network_links_with_registrationtextfield from the properties object
number_of_record_setstextfield from the properties object
number_of_virtual_network_linkstextfield from the properties object
number_of_virtual_network_links_with_registrationtextfield from the properties object
privateZoneNametextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags.

Methods

NameAccessible byRequired ParamsDescription
getSELECTprivateZoneName, resourceGroupName, subscriptionIdGets a Private DNS zone. Retrieves the zone properties, but not the virtual networks links or the record sets within the zone.
listSELECTsubscriptionIdLists the Private DNS zones in all resource groups in a subscription.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdLists the Private DNS zones within a resource group.
create_or_updateINSERTprivateZoneName, resourceGroupName, subscriptionIdCreates or updates a Private DNS zone. Does not modify Links to virtual networks or DNS records within the zone.
deleteDELETEprivateZoneName, resourceGroupName, subscriptionIdDeletes a Private DNS zone. WARNING: All DNS records in the zone will also be deleted. This operation cannot be undone. Private DNS zone cannot be deleted unless all virtual network links to it are removed.
updateUPDATEprivateZoneName, resourceGroupName, subscriptionIdUpdates a Private DNS zone. Does not modify virtual network links or DNS records within the zone.

SELECT examples

Lists the Private DNS zones in all resource groups in a subscription.

SELECT
etag,
internal_id,
location,
max_number_of_record_sets,
max_number_of_virtual_network_links,
max_number_of_virtual_network_links_with_registration,
number_of_record_sets,
number_of_virtual_network_links,
number_of_virtual_network_links_with_registration,
privateZoneName,
provisioning_state,
resourceGroupName,
subscriptionId,
tags
FROM azure.private_dns.vw_private_zones
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.private_dns.private_zones (
privateZoneName,
resourceGroupName,
subscriptionId,
etag,
properties,
tags,
location
)
SELECT
'{{ privateZoneName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ etag }}',
'{{ properties }}',
'{{ tags }}',
'{{ location }}'
;

UPDATE example

Updates a private_zones resource.

/*+ update */
UPDATE azure.private_dns.private_zones
SET
etag = '{{ etag }}',
properties = '{{ properties }}',
tags = '{{ tags }}',
location = '{{ location }}'
WHERE
privateZoneName = '{{ privateZoneName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified private_zones resource.

/*+ delete */
DELETE FROM azure.private_dns.private_zones
WHERE privateZoneName = '{{ privateZoneName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';