Skip to main content

zones

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

Overview

Namezones
TypeResource
Idazure.dns.zones

Fields

NameDatatypeDescription
idtextResource ID.
nametextResource name.
etagtextThe etag of the zone.
locationtextResource location.
max_number_of_record_setstextfield from the properties object
max_number_of_records_per_record_settextfield from the properties object
name_serverstextfield from the properties object
number_of_record_setstextfield from the properties object
registration_virtual_networkstextfield from the properties object
resolution_virtual_networkstextfield from the properties object
resourceGroupNametextfield from the properties object
signing_keystextfield from the properties object
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object
tagstextResource tags.
typetextResource type.
zoneNametextfield from the properties object
zone_typetextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, subscriptionId, zoneNameGets a DNS zone. Retrieves the zone properties, but not the record sets within the zone.
listSELECTsubscriptionIdLists the DNS zones in all resource groups in a subscription.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdLists the DNS zones within a resource group.
create_or_updateINSERTresourceGroupName, subscriptionId, zoneNameCreates or updates a DNS zone. Does not modify DNS records within the zone.
deleteDELETEresourceGroupName, subscriptionId, zoneNameDeletes a DNS zone. WARNING: All DNS records in the zone will also be deleted. This operation cannot be undone.
updateUPDATEresourceGroupName, subscriptionId, zoneNameUpdates a DNS zone. Does not modify DNS records within the zone.

SELECT examples

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

SELECT
id,
name,
etag,
location,
max_number_of_record_sets,
max_number_of_records_per_record_set,
name_servers,
number_of_record_sets,
registration_virtual_networks,
resolution_virtual_networks,
resourceGroupName,
signing_keys,
subscriptionId,
system_data,
tags,
type,
zoneName,
zone_type
FROM azure.dns.vw_zones
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.dns.zones (
resourceGroupName,
subscriptionId,
zoneName,
etag,
properties,
location,
tags
)
SELECT
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ zoneName }}',
'{{ etag }}',
'{{ properties }}',
'{{ location }}',
'{{ tags }}'
;

UPDATE example

Updates a zones resource.

/*+ update */
UPDATE azure.dns.zones
SET
tags = '{{ tags }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND zoneName = '{{ zoneName }}';

DELETE example

Deletes the specified zones resource.

/*+ delete */
DELETE FROM azure.dns.zones
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND zoneName = '{{ zoneName }}';