GetRule
aws.waf.Rule Retrieves a WAF Rule Resource Id.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Aws.Waf.GetRule.InvokeAsync(new Aws.Waf.GetRuleArgs
{
Name = "tfWAFRule",
}));
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/waf"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := waf.LookupRule(ctx, &waf.LookupRuleArgs{
Name: "tfWAFRule",
}, nil)
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
example = aws.waf.get_rule(name="tfWAFRule")import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = pulumi.output(aws.waf.getRule({
name: "tfWAFRule",
}, { async: true }));Using GetRule
function getRule(args: GetRuleArgs, opts?: InvokeOptions): Promise<GetRuleResult>function get_rule(name=None, opts=None)func LookupRule(ctx *Context, args *LookupRuleArgs, opts ...InvokeOption) (*LookupRuleResult, error)Note: This function is named
LookupRulein the Go SDK.
public static class GetRule {
public static Task<GetRuleResult> InvokeAsync(GetRuleArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
GetRule Result
The following output properties are available:
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.