Skip to main content

dns_resolvers

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

Overview

Namedns_resolvers
TypeResource
Idazure.dns_resolver.dns_resolvers

Fields

NameDatatypeDescription
dnsResolverNametextfield from the properties object
dns_resolver_statetextfield from the properties object
etagtextETag of the DNS resolver.
locationtextThe geo-location where the resource lives
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
resource_guidtextfield from the properties object
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object
tagstextResource tags.
virtual_networktextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTdnsResolverName, resourceGroupName, subscriptionIdGets properties of a DNS resolver.
listSELECTsubscriptionIdLists DNS resolvers in all resource groups of a subscription.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdLists DNS resolvers within a resource group.
list_by_virtual_networkSELECTresourceGroupName, subscriptionId, virtualNetworkNameLists DNS resolver resource IDs linked to a virtual network.
create_or_updateINSERTdnsResolverName, resourceGroupName, subscriptionId, data__propertiesCreates or updates a DNS resolver.
deleteDELETEdnsResolverName, resourceGroupName, subscriptionIdDeletes a DNS resolver. WARNING: This operation cannot be undone.
updateUPDATEdnsResolverName, resourceGroupName, subscriptionIdUpdates a DNS resolver.

SELECT examples

Lists DNS resolvers in all resource groups of a subscription.

SELECT
dnsResolverName,
dns_resolver_state,
etag,
location,
provisioning_state,
resourceGroupName,
resource_guid,
subscriptionId,
system_data,
tags,
virtual_network
FROM azure.dns_resolver.vw_dns_resolvers
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.dns_resolver.dns_resolvers (
dnsResolverName,
resourceGroupName,
subscriptionId,
data__properties,
properties,
tags,
location
)
SELECT
'{{ dnsResolverName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__properties }}',
'{{ properties }}',
'{{ tags }}',
'{{ location }}'
;

UPDATE example

Updates a dns_resolvers resource.

/*+ update */
UPDATE azure.dns_resolver.dns_resolvers
SET
tags = '{{ tags }}'
WHERE
dnsResolverName = '{{ dnsResolverName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified dns_resolvers resource.

/*+ delete */
DELETE FROM azure.dns_resolver.dns_resolvers
WHERE dnsResolverName = '{{ dnsResolverName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';