BotManagement

class BotManagement : KotlinCustomResource

Provides a resource to configure Bot Management. Specifically, this resource can be used to manage:

  • Bot Fight Mode

  • Super Bot Fight Mode

  • Bot Management for Enterprise

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const example = new cloudflare.BotManagement("example", {
zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
enableJs: true,
sbfmDefinitelyAutomated: "block",
sbfmLikelyAutomated: "managed_challenge",
sbfmVerifiedBots: "allow",
sbfmStaticResourceProtection: false,
optimizeWordpress: true,
});
import pulumi
import pulumi_cloudflare as cloudflare
example = cloudflare.BotManagement("example",
zone_id="0da42c8d2132a9ddaf714f9e7c920711",
enable_js=True,
sbfm_definitely_automated="block",
sbfm_likely_automated="managed_challenge",
sbfm_verified_bots="allow",
sbfm_static_resource_protection=False,
optimize_wordpress=True)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
var example = new Cloudflare.BotManagement("example", new()
{
ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
EnableJs = true,
SbfmDefinitelyAutomated = "block",
SbfmLikelyAutomated = "managed_challenge",
SbfmVerifiedBots = "allow",
SbfmStaticResourceProtection = false,
OptimizeWordpress = true,
});
});
package main
import (
"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudflare.NewBotManagement(ctx, "example", &cloudflare.BotManagementArgs{
ZoneId: pulumi.String("0da42c8d2132a9ddaf714f9e7c920711"),
EnableJs: pulumi.Bool(true),
SbfmDefinitelyAutomated: pulumi.String("block"),
SbfmLikelyAutomated: pulumi.String("managed_challenge"),
SbfmVerifiedBots: pulumi.String("allow"),
SbfmStaticResourceProtection: pulumi.Bool(false),
OptimizeWordpress: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.BotManagement;
import com.pulumi.cloudflare.BotManagementArgs;
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) {
var example = new BotManagement("example", BotManagementArgs.builder()
.zoneId("0da42c8d2132a9ddaf714f9e7c920711")
.enableJs(true)
.sbfmDefinitelyAutomated("block")
.sbfmLikelyAutomated("managed_challenge")
.sbfmVerifiedBots("allow")
.sbfmStaticResourceProtection(false)
.optimizeWordpress(true)
.build());
}
}
resources:
example:
type: cloudflare:BotManagement
properties:
zoneId: 0da42c8d2132a9ddaf714f9e7c920711
enableJs: true
sbfmDefinitelyAutomated: block
sbfmLikelyAutomated: managed_challenge
sbfmVerifiedBots: allow
sbfmStaticResourceProtection: false
optimizeWordpress: true

Import

$ pulumi import cloudflare:index/botManagement:BotManagement example <zone_id>

Properties

Link copied to clipboard

Enable rule to block AI Scrapers and Crawlers.

Link copied to clipboard
val autoUpdateModel: Output<Boolean>?

Automatically update to the newest bot detection models created by Cloudflare as they are released. Learn more..

Link copied to clipboard
val enableJs: Output<Boolean>?

Use lightweight, invisible JavaScript detections to improve Bot Management. Learn more about JavaScript Detections.

Link copied to clipboard
val fightMode: Output<Boolean>?

Whether to enable Bot Fight Mode.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

Whether to optimize Super Bot Fight Mode protections for Wordpress.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Super Bot Fight Mode (SBFM) action to take on definitely automated requests.

Link copied to clipboard

Super Bot Fight Mode (SBFM) action to take on likely automated requests.

Link copied to clipboard

Super Bot Fight Mode (SBFM) to enable static resource protection. Enable if static resources on your application need bot protection. Note: Static resource protection can also result in legitimate traffic being blocked.

Link copied to clipboard
val sbfmVerifiedBots: Output<String>?

Super Bot Fight Mode (SBFM) action to take on verified bots requests.

Link copied to clipboard

Whether to disable tracking the highest bot score for a session in the Bot Management cookie.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard

A read-only field that indicates whether the zone currently is running the latest ML model.

Link copied to clipboard
val zoneId: Output<String>

The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.