1. Packages
  2. AWS Classic
  3. API Docs
  4. waf
  5. getRateBasedRule

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.45.0 published on Tuesday, Jul 16, 2024 by Pulumi

aws.waf.getRateBasedRule

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.45.0 published on Tuesday, Jul 16, 2024 by Pulumi

    aws.waf.RateBasedRule Retrieves a WAF Rate Based Rule Resource Id.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.waf.getRateBasedRule({
        name: "tfWAFRateBasedRule",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.waf.get_rate_based_rule(name="tfWAFRateBasedRule")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/waf"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := waf.LookupRateBasedRule(ctx, &waf.LookupRateBasedRuleArgs{
    			Name: "tfWAFRateBasedRule",
    		}, 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.Waf.GetRateBasedRule.Invoke(new()
        {
            Name = "tfWAFRateBasedRule",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.waf.WafFunctions;
    import com.pulumi.aws.waf.inputs.GetRateBasedRuleArgs;
    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 = WafFunctions.getRateBasedRule(GetRateBasedRuleArgs.builder()
                .name("tfWAFRateBasedRule")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: aws:waf:getRateBasedRule
          Arguments:
            name: tfWAFRateBasedRule
    

    Using getRateBasedRule

    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 getRateBasedRule(args: GetRateBasedRuleArgs, opts?: InvokeOptions): Promise<GetRateBasedRuleResult>
    function getRateBasedRuleOutput(args: GetRateBasedRuleOutputArgs, opts?: InvokeOptions): Output<GetRateBasedRuleResult>
    def get_rate_based_rule(name: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetRateBasedRuleResult
    def get_rate_based_rule_output(name: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetRateBasedRuleResult]
    func LookupRateBasedRule(ctx *Context, args *LookupRateBasedRuleArgs, opts ...InvokeOption) (*LookupRateBasedRuleResult, error)
    func LookupRateBasedRuleOutput(ctx *Context, args *LookupRateBasedRuleOutputArgs, opts ...InvokeOption) LookupRateBasedRuleResultOutput

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

    public static class GetRateBasedRule 
    {
        public static Task<GetRateBasedRuleResult> InvokeAsync(GetRateBasedRuleArgs args, InvokeOptions? opts = null)
        public static Output<GetRateBasedRuleResult> Invoke(GetRateBasedRuleInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRateBasedRuleResult> getRateBasedRule(GetRateBasedRuleArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:waf/getRateBasedRule:getRateBasedRule
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    Name of the WAF rate based rule.
    Name string
    Name of the WAF rate based rule.
    name String
    Name of the WAF rate based rule.
    name string
    Name of the WAF rate based rule.
    name str
    Name of the WAF rate based rule.
    name String
    Name of the WAF rate based rule.

    getRateBasedRule 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 logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.45.0 published on Tuesday, Jul 16, 2024 by Pulumi