github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/route53/getResolverFirewallRules.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package route53 5 6 import ( 7 "context" 8 "reflect" 9 10 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 11 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 ) 13 14 // `route53.getResolverFirewallRules` Provides details about rules in a specific Route53 Resolver Firewall rule group. 15 // 16 // ## Example Usage 17 // 18 // The following example shows how to get Route53 Resolver Firewall rules based on its associated firewall group id. 19 // 20 // <!--Start PulumiCodeChooser --> 21 // ```go 22 // package main 23 // 24 // import ( 25 // 26 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53" 27 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 28 // 29 // ) 30 // 31 // func main() { 32 // pulumi.Run(func(ctx *pulumi.Context) error { 33 // _, err := route53.GetResolverFirewallRules(ctx, &route53.GetResolverFirewallRulesArgs{ 34 // FirewallRuleGroupId: exampleAwsRoute53ResolverFirewallRuleGroup.Id, 35 // }, nil) 36 // if err != nil { 37 // return err 38 // } 39 // return nil 40 // }) 41 // } 42 // 43 // ``` 44 // <!--End PulumiCodeChooser --> 45 func GetResolverFirewallRules(ctx *pulumi.Context, args *GetResolverFirewallRulesArgs, opts ...pulumi.InvokeOption) (*GetResolverFirewallRulesResult, error) { 46 opts = internal.PkgInvokeDefaultOpts(opts) 47 var rv GetResolverFirewallRulesResult 48 err := ctx.Invoke("aws:route53/getResolverFirewallRules:getResolverFirewallRules", args, &rv, opts...) 49 if err != nil { 50 return nil, err 51 } 52 return &rv, nil 53 } 54 55 // A collection of arguments for invoking getResolverFirewallRules. 56 type GetResolverFirewallRulesArgs struct { 57 // The action that DNS Firewall should take on a DNS query when it matches one of the domains in the rule's domain list. 58 Action *string `pulumi:"action"` 59 // The unique identifier of the firewall rule group that you want to retrieve the rules for. 60 FirewallRuleGroupId string `pulumi:"firewallRuleGroupId"` 61 // The setting that determines the processing order of the rules in a rule group. 62 Priority *int `pulumi:"priority"` 63 } 64 65 // A collection of values returned by getResolverFirewallRules. 66 type GetResolverFirewallRulesResult struct { 67 Action *string `pulumi:"action"` 68 FirewallRuleGroupId string `pulumi:"firewallRuleGroupId"` 69 // List with information about the firewall rules. See details below. 70 FirewallRules []GetResolverFirewallRulesFirewallRule `pulumi:"firewallRules"` 71 // The provider-assigned unique ID for this managed resource. 72 Id string `pulumi:"id"` 73 Priority *int `pulumi:"priority"` 74 } 75 76 func GetResolverFirewallRulesOutput(ctx *pulumi.Context, args GetResolverFirewallRulesOutputArgs, opts ...pulumi.InvokeOption) GetResolverFirewallRulesResultOutput { 77 return pulumi.ToOutputWithContext(context.Background(), args). 78 ApplyT(func(v interface{}) (GetResolverFirewallRulesResult, error) { 79 args := v.(GetResolverFirewallRulesArgs) 80 r, err := GetResolverFirewallRules(ctx, &args, opts...) 81 var s GetResolverFirewallRulesResult 82 if r != nil { 83 s = *r 84 } 85 return s, err 86 }).(GetResolverFirewallRulesResultOutput) 87 } 88 89 // A collection of arguments for invoking getResolverFirewallRules. 90 type GetResolverFirewallRulesOutputArgs struct { 91 // The action that DNS Firewall should take on a DNS query when it matches one of the domains in the rule's domain list. 92 Action pulumi.StringPtrInput `pulumi:"action"` 93 // The unique identifier of the firewall rule group that you want to retrieve the rules for. 94 FirewallRuleGroupId pulumi.StringInput `pulumi:"firewallRuleGroupId"` 95 // The setting that determines the processing order of the rules in a rule group. 96 Priority pulumi.IntPtrInput `pulumi:"priority"` 97 } 98 99 func (GetResolverFirewallRulesOutputArgs) ElementType() reflect.Type { 100 return reflect.TypeOf((*GetResolverFirewallRulesArgs)(nil)).Elem() 101 } 102 103 // A collection of values returned by getResolverFirewallRules. 104 type GetResolverFirewallRulesResultOutput struct{ *pulumi.OutputState } 105 106 func (GetResolverFirewallRulesResultOutput) ElementType() reflect.Type { 107 return reflect.TypeOf((*GetResolverFirewallRulesResult)(nil)).Elem() 108 } 109 110 func (o GetResolverFirewallRulesResultOutput) ToGetResolverFirewallRulesResultOutput() GetResolverFirewallRulesResultOutput { 111 return o 112 } 113 114 func (o GetResolverFirewallRulesResultOutput) ToGetResolverFirewallRulesResultOutputWithContext(ctx context.Context) GetResolverFirewallRulesResultOutput { 115 return o 116 } 117 118 func (o GetResolverFirewallRulesResultOutput) Action() pulumi.StringPtrOutput { 119 return o.ApplyT(func(v GetResolverFirewallRulesResult) *string { return v.Action }).(pulumi.StringPtrOutput) 120 } 121 122 func (o GetResolverFirewallRulesResultOutput) FirewallRuleGroupId() pulumi.StringOutput { 123 return o.ApplyT(func(v GetResolverFirewallRulesResult) string { return v.FirewallRuleGroupId }).(pulumi.StringOutput) 124 } 125 126 // List with information about the firewall rules. See details below. 127 func (o GetResolverFirewallRulesResultOutput) FirewallRules() GetResolverFirewallRulesFirewallRuleArrayOutput { 128 return o.ApplyT(func(v GetResolverFirewallRulesResult) []GetResolverFirewallRulesFirewallRule { return v.FirewallRules }).(GetResolverFirewallRulesFirewallRuleArrayOutput) 129 } 130 131 // The provider-assigned unique ID for this managed resource. 132 func (o GetResolverFirewallRulesResultOutput) Id() pulumi.StringOutput { 133 return o.ApplyT(func(v GetResolverFirewallRulesResult) string { return v.Id }).(pulumi.StringOutput) 134 } 135 136 func (o GetResolverFirewallRulesResultOutput) Priority() pulumi.IntPtrOutput { 137 return o.ApplyT(func(v GetResolverFirewallRulesResult) *int { return v.Priority }).(pulumi.IntPtrOutput) 138 } 139 140 func init() { 141 pulumi.RegisterOutputType(GetResolverFirewallRulesResultOutput{}) 142 }