1. Packages
  2. Azure Classic
  3. API Docs
  4. privatedns
  5. getResolver

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.privatedns.getResolver

Explore with Pulumi AI

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

Gets information about an existing Private DNS Resolver.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const test = azure.privatedns.getResolver({
    name: "example",
    resourceGroupName: "example-resourcegroup-name",
});
Copy
import pulumi
import pulumi_azure as azure

test = azure.privatedns.get_resolver(name="example",
    resource_group_name="example-resourcegroup-name")
Copy
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/privatedns"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := privatedns.LookupResolver(ctx, &privatedns.LookupResolverArgs{
			Name:              "example",
			ResourceGroupName: "example-resourcegroup-name",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var test = Azure.PrivateDns.GetResolver.Invoke(new()
    {
        Name = "example",
        ResourceGroupName = "example-resourcegroup-name",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.privatedns.PrivatednsFunctions;
import com.pulumi.azure.privatedns.inputs.GetResolverArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var test = PrivatednsFunctions.getResolver(GetResolverArgs.builder()
            .name("example")
            .resourceGroupName("example-resourcegroup-name")
            .build());

    }
}
Copy
variables:
  test:
    fn::invoke:
      function: azure:privatedns:getResolver
      arguments:
        name: example
        resourceGroupName: example-resourcegroup-name
Copy

Using getResolver

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getResolver(args: GetResolverArgs, opts?: InvokeOptions): Promise<GetResolverResult>
function getResolverOutput(args: GetResolverOutputArgs, opts?: InvokeOptions): Output<GetResolverResult>
Copy
def get_resolver(name: Optional[str] = None,
                 resource_group_name: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetResolverResult
def get_resolver_output(name: Optional[pulumi.Input[str]] = None,
                 resource_group_name: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetResolverResult]
Copy
func LookupResolver(ctx *Context, args *LookupResolverArgs, opts ...InvokeOption) (*LookupResolverResult, error)
func LookupResolverOutput(ctx *Context, args *LookupResolverOutputArgs, opts ...InvokeOption) LookupResolverResultOutput
Copy

> Note: This function is named LookupResolver in the Go SDK.

public static class GetResolver 
{
    public static Task<GetResolverResult> InvokeAsync(GetResolverArgs args, InvokeOptions? opts = null)
    public static Output<GetResolverResult> Invoke(GetResolverInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetResolverResult> getResolver(GetResolverArgs args, InvokeOptions options)
public static Output<GetResolverResult> getResolver(GetResolverArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azure:privatedns/getResolver:getResolver
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
Name of the Private DNS Resolver.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
Name of the Resource Group where the Private DNS Resolver exists.
Name This property is required. string
Name of the Private DNS Resolver.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
Name of the Resource Group where the Private DNS Resolver exists.
name This property is required. String
Name of the Private DNS Resolver.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
Name of the Resource Group where the Private DNS Resolver exists.
name This property is required. string
Name of the Private DNS Resolver.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
Name of the Resource Group where the Private DNS Resolver exists.
name This property is required. str
Name of the Private DNS Resolver.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
Name of the Resource Group where the Private DNS Resolver exists.
name This property is required. String
Name of the Private DNS Resolver.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
Name of the Resource Group where the Private DNS Resolver exists.

getResolver Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Location string
The Azure Region where the Private DNS Resolver exists.
Name string
ResourceGroupName string
Tags Dictionary<string, string>
The tags assigned to the Private DNS Resolver.
VirtualNetworkId string
The ID of the Virtual Network that is linked to the Private DNS Resolver.
Id string
The provider-assigned unique ID for this managed resource.
Location string
The Azure Region where the Private DNS Resolver exists.
Name string
ResourceGroupName string
Tags map[string]string
The tags assigned to the Private DNS Resolver.
VirtualNetworkId string
The ID of the Virtual Network that is linked to the Private DNS Resolver.
id String
The provider-assigned unique ID for this managed resource.
location String
The Azure Region where the Private DNS Resolver exists.
name String
resourceGroupName String
tags Map<String,String>
The tags assigned to the Private DNS Resolver.
virtualNetworkId String
The ID of the Virtual Network that is linked to the Private DNS Resolver.
id string
The provider-assigned unique ID for this managed resource.
location string
The Azure Region where the Private DNS Resolver exists.
name string
resourceGroupName string
tags {[key: string]: string}
The tags assigned to the Private DNS Resolver.
virtualNetworkId string
The ID of the Virtual Network that is linked to the Private DNS Resolver.
id str
The provider-assigned unique ID for this managed resource.
location str
The Azure Region where the Private DNS Resolver exists.
name str
resource_group_name str
tags Mapping[str, str]
The tags assigned to the Private DNS Resolver.
virtual_network_id str
The ID of the Virtual Network that is linked to the Private DNS Resolver.
id String
The provider-assigned unique ID for this managed resource.
location String
The Azure Region where the Private DNS Resolver exists.
name String
resourceGroupName String
tags Map<String>
The tags assigned to the Private DNS Resolver.
virtualNetworkId String
The ID of the Virtual Network that is linked to the Private DNS Resolver.

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi