1. Packages
  2. AWS
  3. API Docs
  4. wafregional
  5. getRule
AWS v6.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

aws.wafregional.getRule

Explore with Pulumi AI

AWS v6.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

aws.wafregional.Rule Retrieves a WAF Regional Rule Resource Id.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = aws.wafregional.getRule({
    name: "tfWAFRegionalRule",
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.wafregional.get_rule(name="tfWAFRegionalRule")
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/wafregional"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := wafregional.LookupRule(ctx, &wafregional.LookupRuleArgs{
			Name: "tfWAFRegionalRule",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = Aws.WafRegional.GetRule.Invoke(new()
    {
        Name = "tfWAFRegionalRule",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.wafregional.WafregionalFunctions;
import com.pulumi.aws.wafregional.inputs.GetRuleArgs;
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 = WafregionalFunctions.getRule(GetRuleArgs.builder()
            .name("tfWAFRegionalRule")
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: aws:wafregional:getRule
      arguments:
        name: tfWAFRegionalRule
Copy

Using getRule

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 getRule(args: GetRuleArgs, opts?: InvokeOptions): Promise<GetRuleResult>
function getRuleOutput(args: GetRuleOutputArgs, opts?: InvokeOptions): Output<GetRuleResult>
Copy
def get_rule(name: Optional[str] = None,
             opts: Optional[InvokeOptions] = None) -> GetRuleResult
def get_rule_output(name: Optional[pulumi.Input[str]] = None,
             opts: Optional[InvokeOptions] = None) -> Output[GetRuleResult]
Copy
func LookupRule(ctx *Context, args *LookupRuleArgs, opts ...InvokeOption) (*LookupRuleResult, error)
func LookupRuleOutput(ctx *Context, args *LookupRuleOutputArgs, opts ...InvokeOption) LookupRuleResultOutput
Copy

> Note: This function is named LookupRule in the Go SDK.

public static class GetRule 
{
    public static Task<GetRuleResult> InvokeAsync(GetRuleArgs args, InvokeOptions? opts = null)
    public static Output<GetRuleResult> Invoke(GetRuleInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetRuleResult> getRule(GetRuleArgs args, InvokeOptions options)
public static Output<GetRuleResult> getRule(GetRuleArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aws:wafregional/getRule:getRule
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
Name of the WAF Regional rule.
Name This property is required. string
Name of the WAF Regional rule.
name This property is required. String
Name of the WAF Regional rule.
name This property is required. string
Name of the WAF Regional rule.
name This property is required. str
Name of the WAF Regional rule.
name This property is required. String
Name of the WAF Regional 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 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
id String
The provider-assigned unique ID for this managed resource.
name String

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.
AWS v6.76.0 published on Tuesday, Apr 8, 2025 by Pulumi