Viewing docs for Cloudflare v4.16.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
Viewing docs for Cloudflare v4.16.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
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 dictionaryThe following arguments are supported:
- Zone
Id string - The ID of the DNS zone in which to search for the WAF Rule Packages.
- Filter
Get
Waf Packages Filter - 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 string - The ID of the DNS zone in which to search for the WAF Rule Packages.
- Filter
Get
Waf Packages Filter - 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 String - The ID of the DNS zone in which to search for the WAF Rule Packages.
- filter
Get
Waf Packages Filter - 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 string - The ID of the DNS zone in which to search for the WAF Rule Packages.
- filter
Get
Waf Packages Filter - 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
Get
Waf Packages Filter - 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 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<Get
Waf Packages Package> - A map of WAF Rule Packages details. Full list below:
- Zone
Id string - Filter
Get
Waf Packages Filter
- Id string
- The provider-assigned unique ID for this managed resource.
- Packages
[]Get
Waf Packages Package - A map of WAF Rule Packages details. Full list below:
- Zone
Id string - Filter
Get
Waf Packages Filter
- id String
- The provider-assigned unique ID for this managed resource.
- packages
List<Get
Waf Packages Package> - A map of WAF Rule Packages details. Full list below:
- zone
Id String - filter
Get
Waf Packages Filter
- id string
- The provider-assigned unique ID for this managed resource.
- packages
Get
Waf Packages Package[] - A map of WAF Rule Packages details. Full list below:
- zone
Id string - filter
Get
Waf Packages Filter
- id str
- The provider-assigned unique ID for this managed resource.
- packages
Sequence[Get
Waf Packages Package] - A map of WAF Rule Packages details. Full list below:
- zone_
id str - filter
Get
Waf Packages Filter
- 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:
- zone
Id String - filter Property Map
Supporting Types
GetWafPackagesFilter
- Action
Mode string - Action mode of the WAF Rule Packages to lookup. Valid values: simulate, block and challenge.
- Detection
Mode 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 string - Action mode of the WAF Rule Packages to lookup. Valid values: simulate, block and challenge.
- Detection
Mode 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 String - Action mode of the WAF Rule Packages to lookup. Valid values: simulate, block and challenge.
- detection
Mode 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 string - Action mode of the WAF Rule Packages to lookup. Valid values: simulate, block and challenge.
- detection
Mode 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.
- action
Mode String - Action mode of the WAF Rule Packages to lookup. Valid values: simulate, block and challenge.
- detection
Mode 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
- Action
Mode string - Action mode of the WAF Rule Packages to lookup. Valid values: simulate, block and challenge.
- Description string
- The WAF Rule Package description
- Detection
Mode 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 string - Action mode of the WAF Rule Packages to lookup. Valid values: simulate, block and challenge.
- Description string
- The WAF Rule Package description
- Detection
Mode 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 String - Action mode of the WAF Rule Packages to lookup. Valid values: simulate, block and challenge.
- description String
- The WAF Rule Package description
- detection
Mode 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 string - Action mode of the WAF Rule Packages to lookup. Valid values: simulate, block and challenge.
- description string
- The WAF Rule Package description
- detection
Mode 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.
- action
Mode String - Action mode of the WAF Rule Packages to lookup. Valid values: simulate, block and challenge.
- description String
- The WAF Rule Package description
- detection
Mode 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
cloudflareTerraform Provider.
Viewing docs for Cloudflare v4.16.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
