Show / Hide Table of Contents

Class GetWafRules

Inheritance
System.Object
GetWafRules
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Cloudflare
Assembly: Pulumi.Cloudflare.dll
Syntax
public static class GetWafRules

Methods

View Source

InvokeAsync(GetWafRulesArgs, InvokeOptions)

Use this data source to look up WAF Rules.

{{% examples %}}

Example Usage

{{% example %}}

The example below matches all WAF Rules that are in the group of ID de677e5818985db1285d0e80225f06e5, contain example in their description, and are currently on. The matched WAF Rules are then returned as output.

using Pulumi;
using Cloudflare = Pulumi.Cloudflare;

class MyStack : Stack
{
public MyStack()
{
    var test = Output.Create(Cloudflare.GetWafRules.InvokeAsync(new Cloudflare.GetWafRulesArgs
    {
        ZoneId = "ae36f999674d196762efcc5abb06b345",
        PackageId = "a25a9a7e9c00afc1fb2e0245519d725b",
        Filter = new Cloudflare.Inputs.GetWafRulesFilterArgs
        {
            Description = ".*example.*",
            Mode = "on",
            GroupId = "de677e5818985db1285d0e80225f06e5",
        },
    }));
    this.WafRules = test.Apply(test => test.Rules);
}

[Output("wafRules")]
public Output<string> WafRules { get; set; }
}

{{% /example %}} {{% /examples %}}

Declaration
public static Task<GetWafRulesResult> InvokeAsync(GetWafRulesArgs args, InvokeOptions options = null)
Parameters
Type Name Description
GetWafRulesArgs args
InvokeOptions options
Returns
Type Description
System.Threading.Tasks.Task<GetWafRulesResult>
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.