Share via


Dns Resolvers - Get

Gets properties of a DNS resolver.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers/{dnsResolverName}?api-version=2025-05-01

URI Parameters

Name In Required Type Description
dnsResolverName
path True

string

The name of the DNS resolver.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

The name of the resource group. The name is case insensitive.

subscriptionId
path True

string (uuid)

The ID of the target subscription. The value must be an UUID.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Responses

Name Type Description
200 OK

DnsResolver

The DNS resolver was found.

Other Status Codes

CloudError

Default response. It will be deserialized as per the Error definition.

Examples

Retrieve DNS resolver

Sample request

GET https://management.azure.com/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver?api-version=2025-05-01

Sample response

{
  "id": "/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver",
  "name": "sampleDnsResolver",
  "type": "Microsoft.Network/dnsResolvers",
  "tags": {
    "key1": "value1"
  },
  "systemData": {
    "createdByType": "Application",
    "createdAt": "2021-04-03T01:01:01.1075056Z",
    "lastModifiedByType": "Application",
    "lastModifiedAt": "2021-04-04T02:03:01.1974346Z"
  },
  "location": "westus2",
  "etag": "00000000-0000-0000-0000-000000000000",
  "properties": {
    "virtualNetwork": {
      "id": "/subscriptions/cbb1387e-4b03-44f2-ad41-58d4677b9873/resourceGroups/virtualNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork"
    },
    "dnsResolverState": "Connected",
    "provisioningState": "Succeeded",
    "resourceGuid": "a7e1a32c-498c-401c-a805-5bc3518257b8"
  }
}

Definitions

Name Description
CloudError

An error message

CloudErrorBody

The body of an error message

createdByType

The type of identity that created the resource.

DnsResolver

Describes a DNS resolver.

DnsResolverState

The current status of the DNS resolver. This is a read-only property and any attempt to set this value will be ignored.

ProvisioningState

The current provisioning state of the resource.

SubResource

Reference to another ARM resource.

systemData

Metadata pertaining to creation and last modification of the resource.

CloudError

An error message

Name Type Description
error

CloudErrorBody

The error message body

CloudErrorBody

The body of an error message

Name Type Description
code

string

The error code

details

CloudErrorBody[]

Extra error information

message

string

A description of what caused the error

target

string

The target resource of the error message

createdByType

The type of identity that created the resource.

Value Description
User
Application
ManagedIdentity
Key

DnsResolver

Describes a DNS resolver.

Name Type Description
etag

string

ETag of the DNS resolver.

id

string (arm-id)

Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

location

string

The geo-location where the resource lives

name

string

The name of the resource

properties.dnsResolverState

DnsResolverState

The current status of the DNS resolver. This is a read-only property and any attempt to set this value will be ignored.

properties.provisioningState

ProvisioningState

The current provisioning state of the DNS resolver. This is a read-only property and any attempt to set this value will be ignored.

properties.resourceGuid

string

The resourceGuid property of the DNS resolver resource.

properties.virtualNetwork

SubResource

The reference to the virtual network. This cannot be changed after creation.

systemData

systemData

Metadata pertaining to creation and last modification of the resource.

tags

object

Resource tags.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

DnsResolverState

The current status of the DNS resolver. This is a read-only property and any attempt to set this value will be ignored.

Value Description
Connected
Disconnected

ProvisioningState

The current provisioning state of the resource.

Value Description
Creating
Updating
Deleting
Succeeded
Failed
Canceled

SubResource

Reference to another ARM resource.

Name Type Description
id

string

Resource ID.

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string (date-time)

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string (date-time)

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.