1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. getWafPackages
Viewing docs for Cloudflare v4.16.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
cloudflare logo
Viewing docs for Cloudflare v4.16.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Use this data source to look up WAF Rule Packages.

    Example Usage

    The example below matches all

    using System.Collections.Generic;
    using Pulumi;
    using Cloudflare = Pulumi.Cloudflare;
    
    return await Deployment.RunAsync(() => 
    {
        var test = Cloudflare.GetWafPackages.Invoke(new()
        {
            Filter = new Cloudflare.Inputs.GetWafPackagesFilterInputArgs
            {
                Name = ".*example.*",
                DetectionMode = "anomaly",
                Sensitivity = "high",
                ActionMode = "challenge",
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["wafPackages"] = test.Apply(getWafPackagesResult => getWafPackagesResult.Packages),
        };
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudflare/sdk/v4/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		test, err := cloudflare.GetWafPackages(ctx, &cloudflare.GetWafPackagesArgs{
    			Filter: cloudflare.GetWafPackagesFilter{
    				Name:          pulumi.StringRef(".*example.*"),
    				DetectionMode: pulumi.StringRef("anomaly"),
    				Sensitivity:   pulumi.StringRef("high"),
    				ActionMode:    pulumi.StringRef("challenge"),
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("wafPackages", test.Packages)
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.CloudflareFunctions;
    import com.pulumi.cloudflare.inputs.GetWafPackagesArgs;
    import com.pulumi.cloudflare.inputs.GetWafPackagesFilterArgs;
    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 test = CloudflareFunctions.getWafPackages(GetWafPackagesArgs.builder()
                .filter(GetWafPackagesFilterArgs.builder()
                    .name(".*example.*")
                    .detectionMode("anomaly")
                    .sensitivity("high")
                    .actionMode("challenge")
                    .build())
                .build());
    
            ctx.export("wafPackages", test.applyValue(getWafPackagesResult -> getWafPackagesResult.packages()));
        }
    }
    
    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const test = cloudflare.getWafPackages({
        filter: {
            name: ".*example.*",
            detectionMode: "anomaly",
            sensitivity: "high",
            actionMode: "challenge",
        },
    });
    export const wafPackages = test.then(test => test.packages);
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    test = cloudflare.get_waf_packages(filter=cloudflare.GetWafPackagesFilterArgs(
        name=".*example.*",
        detection_mode="anomaly",
        sensitivity="high",
        action_mode="challenge",
    ))
    pulumi.export("wafPackages", test.packages)
    
    variables:
      test:
        fn::invoke:
          Function: cloudflare:getWafPackages
          Arguments:
            filter:
              name: .*example.*
              detectionMode: anomaly
              sensitivity: high
              actionMode: challenge
    outputs:
      wafPackages: ${test.packages}
    

    Using getWafPackages

    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 getWafPackages(args: GetWafPackagesArgs, opts?: InvokeOptions): Promise<GetWafPackagesResult>
    function getWafPackagesOutput(args: GetWafPackagesOutputArgs, opts?: InvokeOptions): Output<GetWafPackagesResult>
    def get_waf_packages(filter: Optional[GetWafPackagesFilter] = None,
                         zone_id: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetWafPackagesResult
    def get_waf_packages_output(filter: Optional[pulumi.Input[GetWafPackagesFilterArgs]] = None,
                         zone_id: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetWafPackagesResult]
    func GetWafPackages(ctx *Context, args *GetWafPackagesArgs, opts ...InvokeOption) (*GetWafPackagesResult, error)
    func GetWafPackagesOutput(ctx *Context, args *GetWafPackagesOutputArgs, opts ...InvokeOption) GetWafPackagesResultOutput

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

    public static class GetWafPackages 
    {
        public static Task<GetWafPackagesResult> InvokeAsync(GetWafPackagesArgs args, InvokeOptions? opts = null)
        public static Output<GetWafPackagesResult> Invoke(GetWafPackagesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetWafPackagesResult> getWafPackages(GetWafPackagesArgs args, InvokeOptions options)
    public static Output<GetWafPackagesResult> getWafPackages(GetWafPackagesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: cloudflare:index/getWafPackages:getWafPackages
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ZoneId string
    The ID of the DNS zone in which to search for the WAF Rule Packages.
    Filter GetWafPackagesFilter
    One or more values used to look up WAF Rule Packages. If more than one value is given all values must match in order to be included, see below for full list.
    ZoneId string
    The ID of the DNS zone in which to search for the WAF Rule Packages.
    Filter GetWafPackagesFilter
    One or more values used to look up WAF Rule Packages. If more than one value is given all values must match in order to be included, see below for full list.
    zoneId String
    The ID of the DNS zone in which to search for the WAF Rule Packages.
    filter GetWafPackagesFilter
    One or more values used to look up WAF Rule Packages. If more than one value is given all values must match in order to be included, see below for full list.
    zoneId string
    The ID of the DNS zone in which to search for the WAF Rule Packages.
    filter GetWafPackagesFilter
    One or more values used to look up WAF Rule Packages. If more than one value is given all values must match in order to be included, see below for full list.
    zone_id str
    The ID of the DNS zone in which to search for the WAF Rule Packages.
    filter GetWafPackagesFilter
    One or more values used to look up WAF Rule Packages. If more than one value is given all values must match in order to be included, see below for full list.
    zoneId String
    The ID of the DNS zone in which to search for the WAF Rule Packages.
    filter Property Map
    One or more values used to look up WAF Rule Packages. If more than one value is given all values must match in order to be included, see below for full list.

    getWafPackages Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Packages List<GetWafPackagesPackage>
    A map of WAF Rule Packages details. Full list below:
    ZoneId string
    Filter GetWafPackagesFilter
    Id string
    The provider-assigned unique ID for this managed resource.
    Packages []GetWafPackagesPackage
    A map of WAF Rule Packages details. Full list below:
    ZoneId string
    Filter GetWafPackagesFilter
    id String
    The provider-assigned unique ID for this managed resource.
    packages List<GetWafPackagesPackage>
    A map of WAF Rule Packages details. Full list below:
    zoneId String
    filter GetWafPackagesFilter
    id string
    The provider-assigned unique ID for this managed resource.
    packages GetWafPackagesPackage[]
    A map of WAF Rule Packages details. Full list below:
    zoneId string
    filter GetWafPackagesFilter
    id str
    The provider-assigned unique ID for this managed resource.
    packages Sequence[GetWafPackagesPackage]
    A map of WAF Rule Packages details. Full list below:
    zone_id str
    filter GetWafPackagesFilter
    id String
    The provider-assigned unique ID for this managed resource.
    packages List<Property Map>
    A map of WAF Rule Packages details. Full list below:
    zoneId String
    filter Property Map

    Supporting Types

    GetWafPackagesFilter

    ActionMode string
    Action mode of the WAF Rule Packages to lookup. Valid values: simulate, block and challenge.
    DetectionMode string
    Detection mode of the WAF Rule Packages to lookup.
    Name string
    A regular expression matching the name of the WAF Rule Packages to lookup.
    Sensitivity string
    Sensitivity of the WAF Rule Packages to lookup. Valid values: high, medium, low and off.
    ActionMode string
    Action mode of the WAF Rule Packages to lookup. Valid values: simulate, block and challenge.
    DetectionMode string
    Detection mode of the WAF Rule Packages to lookup.
    Name string
    A regular expression matching the name of the WAF Rule Packages to lookup.
    Sensitivity string
    Sensitivity of the WAF Rule Packages to lookup. Valid values: high, medium, low and off.
    actionMode String
    Action mode of the WAF Rule Packages to lookup. Valid values: simulate, block and challenge.
    detectionMode String
    Detection mode of the WAF Rule Packages to lookup.
    name String
    A regular expression matching the name of the WAF Rule Packages to lookup.
    sensitivity String
    Sensitivity of the WAF Rule Packages to lookup. Valid values: high, medium, low and off.
    actionMode string
    Action mode of the WAF Rule Packages to lookup. Valid values: simulate, block and challenge.
    detectionMode string
    Detection mode of the WAF Rule Packages to lookup.
    name string
    A regular expression matching the name of the WAF Rule Packages to lookup.
    sensitivity string
    Sensitivity of the WAF Rule Packages to lookup. Valid values: high, medium, low and off.
    action_mode str
    Action mode of the WAF Rule Packages to lookup. Valid values: simulate, block and challenge.
    detection_mode str
    Detection mode of the WAF Rule Packages to lookup.
    name str
    A regular expression matching the name of the WAF Rule Packages to lookup.
    sensitivity str
    Sensitivity of the WAF Rule Packages to lookup. Valid values: high, medium, low and off.
    actionMode String
    Action mode of the WAF Rule Packages to lookup. Valid values: simulate, block and challenge.
    detectionMode String
    Detection mode of the WAF Rule Packages to lookup.
    name String
    A regular expression matching the name of the WAF Rule Packages to lookup.
    sensitivity String
    Sensitivity of the WAF Rule Packages to lookup. Valid values: high, medium, low and off.

    GetWafPackagesPackage

    ActionMode string
    Action mode of the WAF Rule Packages to lookup. Valid values: simulate, block and challenge.
    Description string
    The WAF Rule Package description
    DetectionMode string
    Detection mode of the WAF Rule Packages to lookup.
    Id string
    The WAF Rule Package ID
    Name string
    A regular expression matching the name of the WAF Rule Packages to lookup.
    Sensitivity string
    Sensitivity of the WAF Rule Packages to lookup. Valid values: high, medium, low and off.
    ActionMode string
    Action mode of the WAF Rule Packages to lookup. Valid values: simulate, block and challenge.
    Description string
    The WAF Rule Package description
    DetectionMode string
    Detection mode of the WAF Rule Packages to lookup.
    Id string
    The WAF Rule Package ID
    Name string
    A regular expression matching the name of the WAF Rule Packages to lookup.
    Sensitivity string
    Sensitivity of the WAF Rule Packages to lookup. Valid values: high, medium, low and off.
    actionMode String
    Action mode of the WAF Rule Packages to lookup. Valid values: simulate, block and challenge.
    description String
    The WAF Rule Package description
    detectionMode String
    Detection mode of the WAF Rule Packages to lookup.
    id String
    The WAF Rule Package ID
    name String
    A regular expression matching the name of the WAF Rule Packages to lookup.
    sensitivity String
    Sensitivity of the WAF Rule Packages to lookup. Valid values: high, medium, low and off.
    actionMode string
    Action mode of the WAF Rule Packages to lookup. Valid values: simulate, block and challenge.
    description string
    The WAF Rule Package description
    detectionMode string
    Detection mode of the WAF Rule Packages to lookup.
    id string
    The WAF Rule Package ID
    name string
    A regular expression matching the name of the WAF Rule Packages to lookup.
    sensitivity string
    Sensitivity of the WAF Rule Packages to lookup. Valid values: high, medium, low and off.
    action_mode str
    Action mode of the WAF Rule Packages to lookup. Valid values: simulate, block and challenge.
    description str
    The WAF Rule Package description
    detection_mode str
    Detection mode of the WAF Rule Packages to lookup.
    id str
    The WAF Rule Package ID
    name str
    A regular expression matching the name of the WAF Rule Packages to lookup.
    sensitivity str
    Sensitivity of the WAF Rule Packages to lookup. Valid values: high, medium, low and off.
    actionMode String
    Action mode of the WAF Rule Packages to lookup. Valid values: simulate, block and challenge.
    description String
    The WAF Rule Package description
    detectionMode String
    Detection mode of the WAF Rule Packages to lookup.
    id String
    The WAF Rule Package ID
    name String
    A regular expression matching the name of the WAF Rule Packages to lookup.
    sensitivity String
    Sensitivity of the WAF Rule Packages to lookup. Valid values: high, medium, low and off.

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Viewing docs for Cloudflare v4.16.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.