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 LookupRule in the Go SDK.

public static class GetRule {
    public static Task<GetRuleResult> InvokeAsync(GetRuleArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string

The name of the WAF rule.

Name string

The name of the WAF rule.

name string

The name of the WAF rule.

name str

The name of the WAF rule.

GetRule Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Name string
Id string

The provider-assigned unique ID for this managed resource.

Name string
id string

The provider-assigned unique ID for this managed resource.

name string
id str

The provider-assigned unique ID for this managed resource.

name str

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.