PageRuleArgs

data class PageRuleArgs(val actions: Output<PageRuleActionsArgs>? = null, val priority: Output<Int>? = null, val status: Output<String>? = null, val target: Output<String>? = null, val zoneId: Output<String>? = null) : ConvertibleToJava<PageRuleArgs>

Provides a Cloudflare page rule resource.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.PageRule;
import com.pulumi.cloudflare.PageRuleArgs;
import com.pulumi.cloudflare.inputs.PageRuleActionsArgs;
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 foobar = new PageRule("foobar", PageRuleArgs.builder()
.zoneId(var_.cloudflare_zone_id())
.target(String.format("sub.%s/page", var_.cloudflare_zone()))
.priority(1)
.actions(PageRuleActionsArgs.builder()
.ssl("flexible")
.emailObfuscation("on")
.minifies(PageRuleActionsMinifyArgs.builder()
.html("off")
.css("on")
.js("on")
.build())
.build())
.build());
}
}

Import

Page rules can be imported using a composite ID formed of zone ID and page rule ID, e.g.

$ pulumi import cloudflare:index/pageRule:PageRule default d41d8cd98f00b204e9800998ecf8427e/ch8374ftwdghsif43

Constructors

Link copied to clipboard
constructor(actions: Output<PageRuleActionsArgs>? = null, priority: Output<Int>? = null, status: Output<String>? = null, target: Output<String>? = null, zoneId: Output<String>? = null)

Properties

Link copied to clipboard
val actions: Output<PageRuleActionsArgs>? = null

The actions taken by the page rule, options given below.

Link copied to clipboard
val priority: Output<Int>? = null

The priority of the page rule among others for this target, the higher the number the higher the priority as per API documentation.

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

Whether the page rule is active or disabled.

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

The URL pattern to target with the page rule.

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

The DNS zone ID to which the page rule should be added.

Functions

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