UserAgentBlockingRuleArgs

data class UserAgentBlockingRuleArgs(val configuration: Output<UserAgentBlockingRuleConfigurationArgs>? = null, val description: Output<String>? = null, val mode: Output<String>? = null, val paused: Output<Boolean>? = null, val zoneId: Output<String>? = null) : ConvertibleToJava<UserAgentBlockingRuleArgs>

Provides a resource to manage User Agent Blocking Rules.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.UserAgentBlockingRule;
import com.pulumi.cloudflare.UserAgentBlockingRuleArgs;
import com.pulumi.cloudflare.inputs.UserAgentBlockingRuleConfigurationArgs;
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 example1 = new UserAgentBlockingRule("example1", UserAgentBlockingRuleArgs.builder()
.configuration(UserAgentBlockingRuleConfigurationArgs.builder()
.target("ua")
.value("Chrome")
.build())
.description("My description 1")
.mode("js_challenge")
.paused(false)
.zoneId("0da42c8d2132a9ddaf714f9e7c920711")
.build());
var example2 = new UserAgentBlockingRule("example2", UserAgentBlockingRuleArgs.builder()
.configuration(UserAgentBlockingRuleConfigurationArgs.builder()
.target("ua")
.value("Mozilla")
.build())
.description("My description 22")
.mode("challenge")
.paused(true)
.zoneId("0da42c8d2132a9ddaf714f9e7c920711")
.build());
}
}

Constructors

Link copied to clipboard
constructor(configuration: Output<UserAgentBlockingRuleConfigurationArgs>? = null, description: Output<String>? = null, mode: Output<String>? = null, paused: Output<Boolean>? = null, zoneId: Output<String>? = null)

Properties

Link copied to clipboard

The configuration object for the current rule.

Link copied to clipboard
val description: Output<String>? = null

An informative summary of the rule.

Link copied to clipboard
val mode: Output<String>? = null

The action to apply to a matched request. Available values: block, challenge, js_challenge, managed_challenge.

Link copied to clipboard
val paused: Output<Boolean>? = null

When true, indicates that the rule is currently paused.

Link copied to clipboard
val zoneId: Output<String>? = null

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

Functions

Link copied to clipboard
open override fun toJava(): UserAgentBlockingRuleArgs