We recommend using Azure Native.
Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi
azure.privatedns.getResolverForwardingRule
Explore with Pulumi AI
Gets information about an existing Private DNS Resolver Forwarding Rule.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.privatedns.getResolverForwardingRule({
name: "example-rule",
dnsForwardingRulesetId: "example-forwarding-rulset-id",
});
import pulumi
import pulumi_azure as azure
example = azure.privatedns.get_resolver_forwarding_rule(name="example-rule",
dns_forwarding_ruleset_id="example-forwarding-rulset-id")
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.LookupResolverForwardingRule(ctx, &privatedns.LookupResolverForwardingRuleArgs{
Name: "example-rule",
DnsForwardingRulesetId: "example-forwarding-rulset-id",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.PrivateDns.GetResolverForwardingRule.Invoke(new()
{
Name = "example-rule",
DnsForwardingRulesetId = "example-forwarding-rulset-id",
});
});
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()
.name("example-rule")
.dnsForwardingRulesetId("example-forwarding-rulset-id")
.build());
}
}
variables:
example:
fn::invoke:
Function: azure:privatedns:getResolverForwardingRule
Arguments:
name: example-rule
dnsForwardingRulesetId: example-forwarding-rulset-id
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:
- Dns
Forwarding stringRuleset Id - ID of the Private DNS Resolver Forwarding Ruleset.
- Name string
- Name of the Private DNS Resolver Forwarding Rule.
- Dns
Forwarding stringRuleset Id - ID of the Private DNS Resolver Forwarding Ruleset.
- Name string
- Name of the Private DNS Resolver Forwarding Rule.
- dns
Forwarding StringRuleset Id - ID of the Private DNS Resolver Forwarding Ruleset.
- name String
- Name of the Private DNS Resolver Forwarding Rule.
- dns
Forwarding stringRuleset Id - ID of the Private DNS Resolver Forwarding Ruleset.
- name string
- Name of the Private DNS Resolver Forwarding Rule.
- dns_
forwarding_ strruleset_ id - ID of the Private DNS Resolver Forwarding Ruleset.
- name str
- Name of the Private DNS Resolver Forwarding Rule.
- dns
Forwarding StringRuleset Id - 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:
- Dns
Forwarding stringRuleset Id - Domain
Name 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
- Target
Dns List<GetServers Resolver Forwarding Rule Target Dns Server> - A list of
target_dns_servers
block as defined below.
- Dns
Forwarding stringRuleset Id - Domain
Name 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
- Target
Dns []GetServers Resolver Forwarding Rule Target Dns Server - A list of
target_dns_servers
block as defined below.
- dns
Forwarding StringRuleset Id - domain
Name 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
- target
Dns List<GetServers Resolver Forwarding Rule Target Dns Server> - A list of
target_dns_servers
block as defined below.
- dns
Forwarding stringRuleset Id - domain
Name 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
- target
Dns GetServers Resolver Forwarding Rule Target Dns Server[] - A list of
target_dns_servers
block as defined below.
- dns_
forwarding_ strruleset_ id - 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_ Sequence[Getservers Resolver Forwarding Rule Target Dns Server] - A list of
target_dns_servers
block as defined below.
- dns
Forwarding StringRuleset Id - domain
Name 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
- target
Dns List<Property Map>Servers - A list of
target_dns_servers
block as defined below.
Supporting Types
GetResolverForwardingRuleTargetDnsServer
- ip_
address str - The DNS server IP address.
- port int
- 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.