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

We recommend using Azure Native.

Azure Classic v5.67.0 published on Wednesday, Feb 21, 2024 by Pulumi

azure.privatedns.getResolverForwardingRule

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.67.0 published on Wednesday, Feb 21, 2024 by Pulumi

    Gets information about an existing Private DNS Resolver Forwarding Rule.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.PrivateDns.GetResolverForwardingRule.Invoke(new()
        {
            DnsForwardingRulesetId = "example-forwarding-rulset-id",
            Name = "example-rule",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/privatedns"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := privatedns.LookupResolverForwardingRule(ctx, &privatedns.LookupResolverForwardingRuleArgs{
    			DnsForwardingRulesetId: "example-forwarding-rulset-id",
    			Name:                   "example-rule",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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.GetResolverForwardingRuleArgs;
    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 example = PrivatednsFunctions.getResolverForwardingRule(GetResolverForwardingRuleArgs.builder()
                .dnsForwardingRulesetId("example-forwarding-rulset-id")
                .name("example-rule")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.privatedns.get_resolver_forwarding_rule(dns_forwarding_ruleset_id="example-forwarding-rulset-id",
        name="example-rule")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.privatedns.getResolverForwardingRule({
        dnsForwardingRulesetId: "example-forwarding-rulset-id",
        name: "example-rule",
    });
    
    variables:
      example:
        fn::invoke:
          Function: azure:privatedns:getResolverForwardingRule
          Arguments:
            dnsForwardingRulesetId: example-forwarding-rulset-id
            name: example-rule
    

    Using getResolverForwardingRule

    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 getResolverForwardingRule(args: GetResolverForwardingRuleArgs, opts?: InvokeOptions): Promise<GetResolverForwardingRuleResult>
    function getResolverForwardingRuleOutput(args: GetResolverForwardingRuleOutputArgs, opts?: InvokeOptions): Output<GetResolverForwardingRuleResult>
    def get_resolver_forwarding_rule(dns_forwarding_ruleset_id: Optional[str] = None,
                                     name: Optional[str] = None,
                                     opts: Optional[InvokeOptions] = None) -> GetResolverForwardingRuleResult
    def get_resolver_forwarding_rule_output(dns_forwarding_ruleset_id: Optional[pulumi.Input[str]] = None,
                                     name: Optional[pulumi.Input[str]] = None,
                                     opts: Optional[InvokeOptions] = None) -> Output[GetResolverForwardingRuleResult]
    func LookupResolverForwardingRule(ctx *Context, args *LookupResolverForwardingRuleArgs, opts ...InvokeOption) (*LookupResolverForwardingRuleResult, error)
    func LookupResolverForwardingRuleOutput(ctx *Context, args *LookupResolverForwardingRuleOutputArgs, opts ...InvokeOption) LookupResolverForwardingRuleResultOutput

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

    public static class GetResolverForwardingRule 
    {
        public static Task<GetResolverForwardingRuleResult> InvokeAsync(GetResolverForwardingRuleArgs args, InvokeOptions? opts = null)
        public static Output<GetResolverForwardingRuleResult> Invoke(GetResolverForwardingRuleInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetResolverForwardingRuleResult> getResolverForwardingRule(GetResolverForwardingRuleArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:privatedns/getResolverForwardingRule:getResolverForwardingRule
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DnsForwardingRulesetId string
    ID of the Private DNS Resolver Forwarding Ruleset.
    Name string
    Name of the Private DNS Resolver Forwarding Rule.
    DnsForwardingRulesetId string
    ID of the Private DNS Resolver Forwarding Ruleset.
    Name string
    Name of the Private DNS Resolver Forwarding Rule.
    dnsForwardingRulesetId String
    ID of the Private DNS Resolver Forwarding Ruleset.
    name String
    Name of the Private DNS Resolver Forwarding Rule.
    dnsForwardingRulesetId string
    ID of the Private DNS Resolver Forwarding Ruleset.
    name string
    Name of the Private DNS Resolver Forwarding Rule.
    dns_forwarding_ruleset_id str
    ID of the Private DNS Resolver Forwarding Ruleset.
    name str
    Name of the Private DNS Resolver Forwarding Rule.
    dnsForwardingRulesetId String
    ID of the Private DNS Resolver Forwarding Ruleset.
    name String
    Name of the Private DNS Resolver Forwarding Rule.

    getResolverForwardingRule Result

    The following output properties are available:

    DnsForwardingRulesetId string
    DomainName string
    The domain name for the Private DNS Resolver Forwarding Rule.
    Enabled bool
    Is the Private DNS Resolver Forwarding Rule enabled?
    Id string
    The provider-assigned unique ID for this managed resource.
    Metadata Dictionary<string, string>
    The metadata attached to the Private DNS Resolver Forwarding Rule.
    Name string
    TargetDnsServers List<GetResolverForwardingRuleTargetDnsServer>
    A list of target_dns_servers block as defined below.
    DnsForwardingRulesetId string
    DomainName string
    The domain name for the Private DNS Resolver Forwarding Rule.
    Enabled bool
    Is the Private DNS Resolver Forwarding Rule enabled?
    Id string
    The provider-assigned unique ID for this managed resource.
    Metadata map[string]string
    The metadata attached to the Private DNS Resolver Forwarding Rule.
    Name string
    TargetDnsServers []GetResolverForwardingRuleTargetDnsServer
    A list of target_dns_servers block as defined below.
    dnsForwardingRulesetId String
    domainName String
    The domain name for the Private DNS Resolver Forwarding Rule.
    enabled Boolean
    Is the Private DNS Resolver Forwarding Rule enabled?
    id String
    The provider-assigned unique ID for this managed resource.
    metadata Map<String,String>
    The metadata attached to the Private DNS Resolver Forwarding Rule.
    name String
    targetDnsServers List<GetResolverForwardingRuleTargetDnsServer>
    A list of target_dns_servers block as defined below.
    dnsForwardingRulesetId string
    domainName string
    The domain name for the Private DNS Resolver Forwarding Rule.
    enabled boolean
    Is the Private DNS Resolver Forwarding Rule enabled?
    id string
    The provider-assigned unique ID for this managed resource.
    metadata {[key: string]: string}
    The metadata attached to the Private DNS Resolver Forwarding Rule.
    name string
    targetDnsServers GetResolverForwardingRuleTargetDnsServer[]
    A list of target_dns_servers block as defined below.
    dns_forwarding_ruleset_id str
    domain_name str
    The domain name for the Private DNS Resolver Forwarding Rule.
    enabled bool
    Is the Private DNS Resolver Forwarding Rule enabled?
    id str
    The provider-assigned unique ID for this managed resource.
    metadata Mapping[str, str]
    The metadata attached to the Private DNS Resolver Forwarding Rule.
    name str
    target_dns_servers Sequence[GetResolverForwardingRuleTargetDnsServer]
    A list of target_dns_servers block as defined below.
    dnsForwardingRulesetId String
    domainName String
    The domain name for the Private DNS Resolver Forwarding Rule.
    enabled Boolean
    Is the Private DNS Resolver Forwarding Rule enabled?
    id String
    The provider-assigned unique ID for this managed resource.
    metadata Map<String>
    The metadata attached to the Private DNS Resolver Forwarding Rule.
    name String
    targetDnsServers List<Property Map>
    A list of target_dns_servers block as defined below.

    Supporting Types

    GetResolverForwardingRuleTargetDnsServer

    IpAddress string
    The DNS server IP address.
    Port int
    The DNS server port.
    IpAddress string
    The DNS server IP address.
    Port int
    The DNS server port.
    ipAddress String
    The DNS server IP address.
    port Integer
    The DNS server port.
    ipAddress string
    The DNS server IP address.
    port number
    The DNS server port.
    ip_address str
    The DNS server IP address.
    port int
    The DNS server port.
    ipAddress String
    The DNS server IP address.
    port Number
    The DNS server port.

    Package Details

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

    We recommend using Azure Native.

    Azure Classic v5.67.0 published on Wednesday, Feb 21, 2024 by Pulumi