AWS v6.73.0 published on Wednesday, Mar 19, 2025 by Pulumi
aws.route53.getResolverRules
Explore with Pulumi AI
aws.route53.getResolverRules provides details about a set of Route53 Resolver rules.
Example Usage
Retrieving the default resolver rule
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.route53.getResolverRules({
    ownerId: "Route 53 Resolver",
    ruleType: "RECURSIVE",
    shareStatus: "NOT_SHARED",
});
import pulumi
import pulumi_aws as aws
example = aws.route53.get_resolver_rules(owner_id="Route 53 Resolver",
    rule_type="RECURSIVE",
    share_status="NOT_SHARED")
package main
import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := route53.GetResolverRules(ctx, &route53.GetResolverRulesArgs{
			OwnerId:     pulumi.StringRef("Route 53 Resolver"),
			RuleType:    pulumi.StringRef("RECURSIVE"),
			ShareStatus: pulumi.StringRef("NOT_SHARED"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() => 
{
    var example = Aws.Route53.GetResolverRules.Invoke(new()
    {
        OwnerId = "Route 53 Resolver",
        RuleType = "RECURSIVE",
        ShareStatus = "NOT_SHARED",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.route53.Route53Functions;
import com.pulumi.aws.route53.inputs.GetResolverRulesArgs;
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 = Route53Functions.getResolverRules(GetResolverRulesArgs.builder()
            .ownerId("Route 53 Resolver")
            .ruleType("RECURSIVE")
            .shareStatus("NOT_SHARED")
            .build());
    }
}
variables:
  example:
    fn::invoke:
      function: aws:route53:getResolverRules
      arguments:
        ownerId: Route 53 Resolver
        ruleType: RECURSIVE
        shareStatus: NOT_SHARED
Retrieving forward rules shared with me
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.route53.getResolverRules({
    ruleType: "FORWARD",
    shareStatus: "SHARED_WITH_ME",
});
import pulumi
import pulumi_aws as aws
example = aws.route53.get_resolver_rules(rule_type="FORWARD",
    share_status="SHARED_WITH_ME")
package main
import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := route53.GetResolverRules(ctx, &route53.GetResolverRulesArgs{
			RuleType:    pulumi.StringRef("FORWARD"),
			ShareStatus: pulumi.StringRef("SHARED_WITH_ME"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() => 
{
    var example = Aws.Route53.GetResolverRules.Invoke(new()
    {
        RuleType = "FORWARD",
        ShareStatus = "SHARED_WITH_ME",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.route53.Route53Functions;
import com.pulumi.aws.route53.inputs.GetResolverRulesArgs;
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 = Route53Functions.getResolverRules(GetResolverRulesArgs.builder()
            .ruleType("FORWARD")
            .shareStatus("SHARED_WITH_ME")
            .build());
    }
}
variables:
  example:
    fn::invoke:
      function: aws:route53:getResolverRules
      arguments:
        ruleType: FORWARD
        shareStatus: SHARED_WITH_ME
Retrieving rules by name regex
Resolver rules whose name contains abc.
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.route53.getResolverRules({
    nameRegex: ".*abc.*",
});
import pulumi
import pulumi_aws as aws
example = aws.route53.get_resolver_rules(name_regex=".*abc.*")
package main
import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := route53.GetResolverRules(ctx, &route53.GetResolverRulesArgs{
			NameRegex: pulumi.StringRef(".*abc.*"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() => 
{
    var example = Aws.Route53.GetResolverRules.Invoke(new()
    {
        NameRegex = ".*abc.*",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.route53.Route53Functions;
import com.pulumi.aws.route53.inputs.GetResolverRulesArgs;
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 = Route53Functions.getResolverRules(GetResolverRulesArgs.builder()
            .nameRegex(".*abc.*")
            .build());
    }
}
variables:
  example:
    fn::invoke:
      function: aws:route53:getResolverRules
      arguments:
        nameRegex: .*abc.*
Using getResolverRules
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 getResolverRules(args: GetResolverRulesArgs, opts?: InvokeOptions): Promise<GetResolverRulesResult>
function getResolverRulesOutput(args: GetResolverRulesOutputArgs, opts?: InvokeOptions): Output<GetResolverRulesResult>def get_resolver_rules(name_regex: Optional[str] = None,
                       owner_id: Optional[str] = None,
                       resolver_endpoint_id: Optional[str] = None,
                       rule_type: Optional[str] = None,
                       share_status: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetResolverRulesResult
def get_resolver_rules_output(name_regex: Optional[pulumi.Input[str]] = None,
                       owner_id: Optional[pulumi.Input[str]] = None,
                       resolver_endpoint_id: Optional[pulumi.Input[str]] = None,
                       rule_type: Optional[pulumi.Input[str]] = None,
                       share_status: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetResolverRulesResult]func GetResolverRules(ctx *Context, args *GetResolverRulesArgs, opts ...InvokeOption) (*GetResolverRulesResult, error)
func GetResolverRulesOutput(ctx *Context, args *GetResolverRulesOutputArgs, opts ...InvokeOption) GetResolverRulesResultOutput> Note: This function is named GetResolverRules in the Go SDK.
public static class GetResolverRules 
{
    public static Task<GetResolverRulesResult> InvokeAsync(GetResolverRulesArgs args, InvokeOptions? opts = null)
    public static Output<GetResolverRulesResult> Invoke(GetResolverRulesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetResolverRulesResult> getResolverRules(GetResolverRulesArgs args, InvokeOptions options)
public static Output<GetResolverRulesResult> getResolverRules(GetResolverRulesArgs args, InvokeOptions options)
fn::invoke:
  function: aws:route53/getResolverRules:getResolverRules
  arguments:
    # arguments dictionaryThe following arguments are supported:
- NameRegex string
- Regex string to filter resolver rule names. The filtering is done locally, so could have a performance impact if the result is large. This argument should be used along with other arguments to limit the number of results returned.
- OwnerId string
- When the desired resolver rules are shared with another AWS account, the account ID of the account that the rules are shared with.
- ResolverEndpoint stringId 
- ID of the outbound resolver endpoint for the desired resolver rules.
- RuleType string
- Rule type of the desired resolver rules. Valid values are FORWARD,SYSTEMandRECURSIVE.
- string
- Whether the desired resolver rules are shared and, if so, whether the current account is sharing the rules with another account, or another account is sharing the rules with the current account. Valid values are NOT_SHARED,SHARED_BY_MEorSHARED_WITH_ME
- NameRegex string
- Regex string to filter resolver rule names. The filtering is done locally, so could have a performance impact if the result is large. This argument should be used along with other arguments to limit the number of results returned.
- OwnerId string
- When the desired resolver rules are shared with another AWS account, the account ID of the account that the rules are shared with.
- ResolverEndpoint stringId 
- ID of the outbound resolver endpoint for the desired resolver rules.
- RuleType string
- Rule type of the desired resolver rules. Valid values are FORWARD,SYSTEMandRECURSIVE.
- string
- Whether the desired resolver rules are shared and, if so, whether the current account is sharing the rules with another account, or another account is sharing the rules with the current account. Valid values are NOT_SHARED,SHARED_BY_MEorSHARED_WITH_ME
- nameRegex String
- Regex string to filter resolver rule names. The filtering is done locally, so could have a performance impact if the result is large. This argument should be used along with other arguments to limit the number of results returned.
- ownerId String
- When the desired resolver rules are shared with another AWS account, the account ID of the account that the rules are shared with.
- resolverEndpoint StringId 
- ID of the outbound resolver endpoint for the desired resolver rules.
- ruleType String
- Rule type of the desired resolver rules. Valid values are FORWARD,SYSTEMandRECURSIVE.
- String
- Whether the desired resolver rules are shared and, if so, whether the current account is sharing the rules with another account, or another account is sharing the rules with the current account. Valid values are NOT_SHARED,SHARED_BY_MEorSHARED_WITH_ME
- nameRegex string
- Regex string to filter resolver rule names. The filtering is done locally, so could have a performance impact if the result is large. This argument should be used along with other arguments to limit the number of results returned.
- ownerId string
- When the desired resolver rules are shared with another AWS account, the account ID of the account that the rules are shared with.
- resolverEndpoint stringId 
- ID of the outbound resolver endpoint for the desired resolver rules.
- ruleType string
- Rule type of the desired resolver rules. Valid values are FORWARD,SYSTEMandRECURSIVE.
- string
- Whether the desired resolver rules are shared and, if so, whether the current account is sharing the rules with another account, or another account is sharing the rules with the current account. Valid values are NOT_SHARED,SHARED_BY_MEorSHARED_WITH_ME
- name_regex str
- Regex string to filter resolver rule names. The filtering is done locally, so could have a performance impact if the result is large. This argument should be used along with other arguments to limit the number of results returned.
- owner_id str
- When the desired resolver rules are shared with another AWS account, the account ID of the account that the rules are shared with.
- resolver_endpoint_ strid 
- ID of the outbound resolver endpoint for the desired resolver rules.
- rule_type str
- Rule type of the desired resolver rules. Valid values are FORWARD,SYSTEMandRECURSIVE.
- str
- Whether the desired resolver rules are shared and, if so, whether the current account is sharing the rules with another account, or another account is sharing the rules with the current account. Valid values are NOT_SHARED,SHARED_BY_MEorSHARED_WITH_ME
- nameRegex String
- Regex string to filter resolver rule names. The filtering is done locally, so could have a performance impact if the result is large. This argument should be used along with other arguments to limit the number of results returned.
- ownerId String
- When the desired resolver rules are shared with another AWS account, the account ID of the account that the rules are shared with.
- resolverEndpoint StringId 
- ID of the outbound resolver endpoint for the desired resolver rules.
- ruleType String
- Rule type of the desired resolver rules. Valid values are FORWARD,SYSTEMandRECURSIVE.
- String
- Whether the desired resolver rules are shared and, if so, whether the current account is sharing the rules with another account, or another account is sharing the rules with the current account. Valid values are NOT_SHARED,SHARED_BY_MEorSHARED_WITH_ME
getResolverRules Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- ResolverRule List<string>Ids 
- IDs of the matched resolver rules.
- NameRegex string
- OwnerId string
- ResolverEndpoint stringId 
- RuleType string
- string
- Id string
- The provider-assigned unique ID for this managed resource.
- ResolverRule []stringIds 
- IDs of the matched resolver rules.
- NameRegex string
- OwnerId string
- ResolverEndpoint stringId 
- RuleType string
- string
- id String
- The provider-assigned unique ID for this managed resource.
- resolverRule List<String>Ids 
- IDs of the matched resolver rules.
- nameRegex String
- ownerId String
- resolverEndpoint StringId 
- ruleType String
- String
- id string
- The provider-assigned unique ID for this managed resource.
- resolverRule string[]Ids 
- IDs of the matched resolver rules.
- nameRegex string
- ownerId string
- resolverEndpoint stringId 
- ruleType string
- string
- id str
- The provider-assigned unique ID for this managed resource.
- resolver_rule_ Sequence[str]ids 
- IDs of the matched resolver rules.
- name_regex str
- owner_id str
- resolver_endpoint_ strid 
- rule_type str
- str
- id String
- The provider-assigned unique ID for this managed resource.
- resolverRule List<String>Ids 
- IDs of the matched resolver rules.
- nameRegex String
- ownerId String
- resolverEndpoint StringId 
- ruleType String
- String
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.