GetWafRules

Use this data source to look up WAF Rules.

Example Usage

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; }
}

Coming soon!

import pulumi
import pulumi_cloudflare as cloudflare

test = cloudflare.get_waf_rules(zone_id="ae36f999674d196762efcc5abb06b345",
    package_id="a25a9a7e9c00afc1fb2e0245519d725b",
    filter={
        "description": ".*example.*",
        "mode": "on",
        "group_id": "de677e5818985db1285d0e80225f06e5",
    })
pulumi.export("wafRules", test.rules)
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";

const test = cloudflare.getWafRules({
    zoneId: "ae36f999674d196762efcc5abb06b345",
    packageId: "a25a9a7e9c00afc1fb2e0245519d725b",
    filter: {
        description: ".*example.*",
        mode: "on",
        groupId: "de677e5818985db1285d0e80225f06e5",
    },
});
export const wafRules = test.then(test => test.rules);

Using GetWafRules

function getWafRules(args: GetWafRulesArgs, opts?: InvokeOptions): Promise<GetWafRulesResult>
function  get_waf_rules(filter=None, package_id=None, zone_id=None, opts=None)
func GetWafRules(ctx *Context, args *GetWafRulesArgs, opts ...InvokeOption) (*GetWafRulesResult, error)
public static class GetWafRules {
    public static Task<GetWafRulesResult> InvokeAsync(GetWafRulesArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

ZoneId string
Filter GetWafRulesFilterArgs
PackageId string
ZoneId string
Filter GetWafRulesFilter
PackageId string
zoneId string
filter GetWafRulesFilter
packageId string
zone_id str
filter Dict[GetWafRulesFilter]
package_id str

GetWafRules Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Rules List<GetWafRulesRule>
ZoneId string
Filter GetWafRulesFilter
PackageId string
Id string

The provider-assigned unique ID for this managed resource.

Rules []GetWafRulesRule
ZoneId string
Filter GetWafRulesFilter
PackageId string
id string

The provider-assigned unique ID for this managed resource.

rules GetWafRulesRule[]
zoneId string
filter GetWafRulesFilter
packageId string
id str

The provider-assigned unique ID for this managed resource.

rules List[GetWafRulesRule]
zone_id str
filter Dict[GetWafRulesFilter]
package_id str

Supporting Types

GetWafRulesFilter

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Description string
GroupId string
Mode string
Description string
GroupId string
Mode string
description string
groupId string
mode string
description str
group_id str
mode str

GetWafRulesRule

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

AllowedModes List<string>
Description string
GroupId string
GroupName string
Id string
Mode string
PackageId string
Priority string
AllowedModes []string
Description string
GroupId string
GroupName string
Id string
Mode string
PackageId string
Priority string
allowedModes string[]
description string
groupId string
groupName string
id string
mode string
packageId string
priority string
allowedModes List[str]
description str
groupName str
group_id str
id str
mode str
package_id str
priority str

Package Details

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