getWafRules

Use this data source to look up WAF Rules.

Example Usage

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.

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.GetWafRulesArgs;
import com.pulumi.cloudflare.inputs.GetWafRulesFilterArgs;
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.getWafRules(GetWafRulesArgs.builder()
.zoneId("ae36f999674d196762efcc5abb06b345")
.packageId("a25a9a7e9c00afc1fb2e0245519d725b")
.filter(GetWafRulesFilterArgs.builder()
.description(".*example.*")
.mode("on")
.groupId("de677e5818985db1285d0e80225f06e5")
.build())
.build());
ctx.export("wafRules", test.applyValue(getWafRulesResult -> getWafRulesResult.rules()));
}
}

Return

A collection of values returned by getWafRules.

Parameters

argument

A collection of arguments for invoking getWafRules.


suspend fun getWafRules(filter: GetWafRulesFilter? = null, packageId: String? = null, zoneId: String): GetWafRulesResult

Return

A collection of values returned by getWafRules.

Parameters

filter

One or more values used to look up WAF Rules. If more than one value is given all values must match in order to be included, see below for full list.

packageId

The ID of the WAF Rule Package in which to search for the WAF Rules.

zoneId

The ID of the DNS zone in which to search for the WAF Rules.

See also


suspend fun getWafRules(argument: suspend GetWafRulesPlainArgsBuilder.() -> Unit): GetWafRulesResult

Return

A collection of values returned by getWafRules.

Parameters

argument

Builder for com.pulumi.cloudflare.kotlin.inputs.GetWafRulesPlainArgs.

See also